Skip to content

Commit dbe850a

Browse files
suofacebook-github-bot
authored andcommitted
[jit] do the code reorg (pytorch#33851)
Summary: Pull Request resolved: pytorch#33851 Rationale and context described in pytorch#33828. Script to reproduce the move: https://gist.github.com/suo/16cbefaaeb67ca5a7c6caffd49b7f6e9 ghstack-source-id: 99079645 Test Plan: Make sure CI passes Reviewed By: jamesr66a Differential Revision: D20133869 fbshipit-source-id: 390e9241a9c85366d9005c492ac31f10aa96488e
1 parent afbd044 commit dbe850a

File tree

385 files changed

+999
-994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+999
-994
lines changed

android/pytorch_android/generate_test_asset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <torch/jit.h>
22
#include <torch/script.h>
3-
#include <torch/csrc/jit/script/module.h>
3+
#include <torch/csrc/jit/api/module.h>
44

55
#include <iostream>
66
#include <fstream>

android/pytorch_android/src/main/cpp/pytorch_jni_jit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <fbjni/fbjni.h>
88

99
#include <torch/csrc/autograd/record_function.h>
10-
#include <torch/csrc/jit/print_handler.h>
10+
#include <torch/csrc/jit/runtime/print_handler.h>
1111
#include <torch/script.h>
1212
#include "caffe2/serialize/read_adapter_interface.h"
1313

aten/src/ATen/core/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ EXCLUDE(ATen_CORE_SRCS "${ATen_CORE_SRCS}" ${ATen_CORE_TEST_SRCS})
88

99
# Add files needed from jit folders
1010
LIST(APPEND ATen_CORE_HEADERS
11-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/source_range.h
12-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/function_schema_parser.h
13-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/lexer.h
14-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/strtod.h
15-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/parse_string_literal.h
16-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/schema_type_parser.h
17-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/error_report.h
18-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/tree.h
11+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/source_range.h
12+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/function_schema_parser.h
13+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/lexer.h
14+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/strtod.h
15+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/parse_string_literal.h
16+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/schema_type_parser.h
17+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/error_report.h
18+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/tree.h
1919
)
2020
LIST(APPEND ATen_CORE_SRCS
21-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/error_report.cpp
22-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/function_schema_parser.cpp
23-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/lexer.cpp
24-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/strtod.cpp
25-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/schema_type_parser.cpp
26-
${Caffe2_SOURCE_DIR}/torch/csrc/jit/source_range.cpp
21+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/error_report.cpp
22+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/function_schema_parser.cpp
23+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/lexer.cpp
24+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/strtod.cpp
25+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/schema_type_parser.cpp
26+
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/source_range.cpp
2727
)
2828

2929
# Pass to parent

aten/src/ATen/core/boxing/kernel_function_legacy_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <ATen/core/boxing/test_helpers.h>
88
#include <ATen/core/op_registration/op_registration.h>
99
#include <ATen/core/Tensor.h>
10-
#include <torch/csrc/jit/script/function_schema_parser.h>
10+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
1111

1212
/**
1313
* This file tests the legacy function-based API for registering kernels.

aten/src/ATen/core/boxing/kernel_function_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <ATen/core/op_registration/op_registration.h>
55
#include <ATen/core/Tensor.h>
6-
#include <torch/csrc/jit/script/function_schema_parser.h>
6+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
77

88
using c10::RegisterOperators;
99
using c10::DispatchKey;

aten/src/ATen/core/boxing/kernel_functor_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <ATen/core/op_registration/op_registration.h>
55
#include <ATen/core/Tensor.h>
6-
#include <torch/csrc/jit/script/function_schema_parser.h>
6+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
77

88
using c10::RegisterOperators;
99
using c10::OperatorKernel;

aten/src/ATen/core/boxing/kernel_lambda_legacy_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <ATen/core/boxing/test_helpers.h>
88
#include <ATen/core/op_registration/op_registration.h>
99
#include <ATen/core/Tensor.h>
10-
#include <torch/csrc/jit/script/function_schema_parser.h>
10+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
1111

1212
/**
1313
* This file tests the legacy lambda-based API for registering kernels:

aten/src/ATen/core/boxing/kernel_lambda_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <ATen/core/op_registration/op_registration.h>
55
#include <ATen/core/Tensor.h>
6-
#include <torch/csrc/jit/script/function_schema_parser.h>
6+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
77

88
using c10::RegisterOperators;
99
using c10::DispatchKey;

aten/src/ATen/core/boxing/kernel_stackbased_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <ATen/core/op_registration/op_registration.h>
66
#include <ATen/core/Tensor.h>
7-
#include <torch/csrc/jit/script/function_schema_parser.h>
7+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
88

99
using c10::RegisterOperators;
1010
using c10::DispatchKey;

aten/src/ATen/core/custom_class.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <ATen/core/jit_type.h>
2-
#include <torch/csrc/jit/custom_class.h>
2+
#include <torch/csrc/jit/api/custom_class.h>
33

44
#include <atomic>
55

aten/src/ATen/core/op_registration/op_registration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <ATen/core/op_registration/op_registration.h>
22
#if !defined(CAFFE2_IS_XPLAT_BUILD)
3-
#include <torch/csrc/jit/script/function_schema_parser.h>
3+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
44
#endif
55

66
namespace c10 {

aten/src/ATen/core/op_registration/op_registration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <ATen/core/dispatch/Dispatcher.h>
1010
#include <ATen/core/op_registration/infer_schema.h>
1111
#if !defined(CAFFE2_IS_XPLAT_BUILD)
12-
#include <torch/csrc/jit/script/function_schema_parser.h>
12+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
1313
#endif
1414
#include <ATen/core/OpsAlreadyMovedToC10.h>
1515

aten/src/ATen/quantized/Quantizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct CAFFE2_API Quantizer : public c10::intrusive_ptr_target {
5353
explicit Quantizer(ScalarType scalar_type) : scalar_type_(scalar_type) {}
5454
virtual ~Quantizer();
5555

56-
// Copied from torch/csrc/jit/scope.h
56+
// Copied from torch/csrc/jit/ir/scope.h
5757
QuantizerPtr intrusive_from_this() {
5858
c10::raw::intrusive_ptr::incref(this); // we are creating a new pointer
5959
// from a raw `this` pointer

aten/src/ATen/test/backend_fallback_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <ATen/ATen.h>
44
#include <ATen/NativeFunctions.h>
55
#include <ATen/core/op_registration/op_registration.h>
6-
#include <torch/csrc/jit/operator.h>
6+
#include <torch/csrc/jit/runtime/operator.h>
77

88
using namespace at;
99

aten/src/ATen/test/extension_backend_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <ATen/NativeFunctions.h>
55
#include <ATen/core/op_registration/op_registration.h>
66

7-
#include <torch/csrc/jit/operator.h>
7+
#include <torch/csrc/jit/runtime/operator.h>
88

99
using namespace at;
1010

binaries/dump_operator_names.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include <torch/csrc/jit/script/module.h>
17+
#include <torch/csrc/jit/api/module.h>
1818
#include <torch/csrc/jit/mobile/module.h>
19-
#include <torch/csrc/jit/import.h>
20-
#include <torch/csrc/jit/instruction.h>
19+
#include <torch/csrc/jit/serialization/import.h>
20+
#include <torch/csrc/jit/runtime/instruction.h>
2121
#include <c10/util/Flags.h>
2222

2323
#include <fstream>

binaries/speed_benchmark_torch.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "caffe2/core/timer.h"
2222
#include "caffe2/utils/string_utils.h"
2323
#include "torch/csrc/autograd/grad_mode.h"
24-
#include "torch/csrc/jit/import.h"
24+
#include "torch/csrc/jit/serialization/import.h"
2525
#include "torch/script.h"
2626

2727
#include <chrono>

caffe2/CMakeLists.txt

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -349,34 +349,34 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
349349
${TORCH_SRC_DIR}/csrc/autograd/record_function_ops.cpp
350350
${TORCH_SRC_DIR}/csrc/autograd/saved_variable.cpp
351351
${TORCH_SRC_DIR}/csrc/autograd/variable.cpp
352-
${TORCH_SRC_DIR}/csrc/jit/autodiff.cpp
353-
${TORCH_SRC_DIR}/csrc/jit/attributes.cpp
354-
${TORCH_SRC_DIR}/csrc/jit/argument_spec.cpp
355-
${TORCH_SRC_DIR}/csrc/jit/custom_class.cpp
356-
${TORCH_SRC_DIR}/csrc/jit/pass_manager.cpp
357-
${TORCH_SRC_DIR}/csrc/jit/pickler.cpp
358-
${TORCH_SRC_DIR}/csrc/jit/unpickler.cpp
359-
${TORCH_SRC_DIR}/csrc/jit/graph_executor.cpp
360-
${TORCH_SRC_DIR}/csrc/jit/import_source.cpp
361-
${TORCH_SRC_DIR}/csrc/jit/import.cpp
362-
${TORCH_SRC_DIR}/csrc/jit/pickle.cpp
363-
${TORCH_SRC_DIR}/csrc/jit/import_export_helpers.cpp
364-
${TORCH_SRC_DIR}/csrc/jit/instruction.cpp
365-
${TORCH_SRC_DIR}/csrc/jit/interpreter.cpp
366-
${TORCH_SRC_DIR}/csrc/jit/constants.cpp
367-
${TORCH_SRC_DIR}/csrc/jit/node_hashing.cpp
368-
${TORCH_SRC_DIR}/csrc/jit/type_hashing.cpp
369-
${TORCH_SRC_DIR}/csrc/jit/ir.cpp
370-
${TORCH_SRC_DIR}/csrc/jit/irparser.cpp
352+
${TORCH_SRC_DIR}/csrc/jit/runtime/autodiff.cpp
353+
${TORCH_SRC_DIR}/csrc/jit/ir/attributes.cpp
354+
${TORCH_SRC_DIR}/csrc/jit/runtime/argument_spec.cpp
355+
${TORCH_SRC_DIR}/csrc/jit/api/custom_class.cpp
356+
${TORCH_SRC_DIR}/csrc/jit/passes/pass_manager.cpp
357+
${TORCH_SRC_DIR}/csrc/jit/serialization/pickler.cpp
358+
${TORCH_SRC_DIR}/csrc/jit/serialization/unpickler.cpp
359+
${TORCH_SRC_DIR}/csrc/jit/runtime/graph_executor.cpp
360+
${TORCH_SRC_DIR}/csrc/jit/serialization/import_source.cpp
361+
${TORCH_SRC_DIR}/csrc/jit/serialization/import.cpp
362+
${TORCH_SRC_DIR}/csrc/jit/serialization/pickle.cpp
363+
${TORCH_SRC_DIR}/csrc/jit/serialization/import_export_helpers.cpp
364+
${TORCH_SRC_DIR}/csrc/jit/runtime/instruction.cpp
365+
${TORCH_SRC_DIR}/csrc/jit/runtime/interpreter.cpp
366+
${TORCH_SRC_DIR}/csrc/jit/ir/constants.cpp
367+
${TORCH_SRC_DIR}/csrc/jit/ir/node_hashing.cpp
368+
${TORCH_SRC_DIR}/csrc/jit/ir/type_hashing.cpp
369+
${TORCH_SRC_DIR}/csrc/jit/ir/ir.cpp
370+
${TORCH_SRC_DIR}/csrc/jit/ir/irparser.cpp
371371
${TORCH_SRC_DIR}/csrc/jit/jit_log.cpp
372-
${TORCH_SRC_DIR}/csrc/jit/operator.cpp
373-
${TORCH_SRC_DIR}/csrc/jit/register_c10_ops.cpp
374-
${TORCH_SRC_DIR}/csrc/jit/subgraph_matcher.cpp
375-
${TORCH_SRC_DIR}/csrc/jit/symbolic_script.cpp
376-
${TORCH_SRC_DIR}/csrc/jit/profiling_record.cpp
377-
${TORCH_SRC_DIR}/csrc/jit/profiling_graph_executor_impl.cpp
378-
${TORCH_SRC_DIR}/csrc/jit/update_graph_executor_opt.cpp
379-
${TORCH_SRC_DIR}/csrc/jit/passes/alias_analysis.cpp
372+
${TORCH_SRC_DIR}/csrc/jit/runtime/operator.cpp
373+
${TORCH_SRC_DIR}/csrc/jit/runtime/register_c10_ops.cpp
374+
${TORCH_SRC_DIR}/csrc/jit/ir/subgraph_matcher.cpp
375+
${TORCH_SRC_DIR}/csrc/jit/runtime/symbolic_script.cpp
376+
${TORCH_SRC_DIR}/csrc/jit/runtime/profiling_record.cpp
377+
${TORCH_SRC_DIR}/csrc/jit/runtime/profiling_graph_executor_impl.cpp
378+
${TORCH_SRC_DIR}/csrc/jit/python/update_graph_executor_opt.cpp
379+
${TORCH_SRC_DIR}/csrc/jit/ir/alias_analysis.cpp
380380
${TORCH_SRC_DIR}/csrc/jit/passes/batch_mm.cpp
381381
${TORCH_SRC_DIR}/csrc/jit/passes/bailout_graph.cpp
382382
${TORCH_SRC_DIR}/csrc/jit/passes/canonicalize.cpp
@@ -412,49 +412,49 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
412412
${TORCH_SRC_DIR}/csrc/jit/passes/specialize_autogradzero.cpp
413413
${TORCH_SRC_DIR}/csrc/jit/passes/subgraph_rewrite.cpp
414414
${TORCH_SRC_DIR}/csrc/jit/passes/tensorexpr_fuser.cpp
415-
${TORCH_SRC_DIR}/csrc/jit/passes/python_print.cpp
415+
${TORCH_SRC_DIR}/csrc/jit/serialization/python_print.cpp
416416
${TORCH_SRC_DIR}/csrc/jit/passes/utils/subgraph_utils.cpp
417417
${TORCH_SRC_DIR}/csrc/jit/passes/utils/check_alias_annotation.cpp
418418
${TORCH_SRC_DIR}/csrc/jit/passes/utils/memory_dag.cpp
419419
${TORCH_SRC_DIR}/csrc/jit/passes/quantization.cpp
420420
${TORCH_SRC_DIR}/csrc/jit/passes/fuse_linear.cpp
421-
${TORCH_SRC_DIR}/csrc/jit/print_handler.cpp
422-
${TORCH_SRC_DIR}/csrc/jit/fuser/interface.cpp
423-
${TORCH_SRC_DIR}/csrc/jit/register_prim_ops.cpp
424-
${TORCH_SRC_DIR}/csrc/jit/register_prim_ops_c10.cpp
425-
${TORCH_SRC_DIR}/csrc/jit/register_string_ops.cpp
426-
${TORCH_SRC_DIR}/csrc/jit/register_special_ops.cpp
427-
${TORCH_SRC_DIR}/csrc/jit/scope.cpp
428-
${TORCH_SRC_DIR}/csrc/jit/script/ir_emitter.cpp
421+
${TORCH_SRC_DIR}/csrc/jit/runtime/print_handler.cpp
422+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/interface.cpp
423+
${TORCH_SRC_DIR}/csrc/jit/runtime/register_prim_ops.cpp
424+
${TORCH_SRC_DIR}/csrc/jit/runtime/register_prim_ops_c10.cpp
425+
${TORCH_SRC_DIR}/csrc/jit/runtime/register_string_ops.cpp
426+
${TORCH_SRC_DIR}/csrc/jit/runtime/register_special_ops.cpp
427+
${TORCH_SRC_DIR}/csrc/jit/ir/scope.cpp
428+
${TORCH_SRC_DIR}/csrc/jit/frontend/ir_emitter.cpp
429429
${TORCH_SRC_DIR}/csrc/jit/testing/file_check.cpp
430-
${TORCH_SRC_DIR}/csrc/jit/script/convert_to_ssa.cpp
431-
${TORCH_SRC_DIR}/csrc/jit/script/exit_transforms.cpp
432-
${TORCH_SRC_DIR}/csrc/jit/script/inline_loop_condition.cpp
433-
${TORCH_SRC_DIR}/csrc/jit/script/schema_matching.cpp
434-
${TORCH_SRC_DIR}/csrc/jit/script/script_type_parser.cpp
435-
${TORCH_SRC_DIR}/csrc/jit/script/sugared_value.cpp
436-
${TORCH_SRC_DIR}/csrc/jit/script/class_type.cpp
437-
${TORCH_SRC_DIR}/csrc/jit/script/parser.cpp
438-
${TORCH_SRC_DIR}/csrc/jit/script/builtin_functions.cpp
439-
${TORCH_SRC_DIR}/csrc/jit/script/canonicalize_modified_loop.cpp
440-
${TORCH_SRC_DIR}/csrc/jit/script/edit_distance.cpp
441-
${TORCH_SRC_DIR}/csrc/jit/script/logging.cpp
442-
${TORCH_SRC_DIR}/csrc/jit/script/module.cpp
443-
${TORCH_SRC_DIR}/csrc/jit/script/object.cpp
444-
${TORCH_SRC_DIR}/csrc/jit/script/jit_exception.cpp
445-
${TORCH_SRC_DIR}/csrc/jit/script/string_to_type.cpp
446-
${TORCH_SRC_DIR}/csrc/jit/source_range_serialization.cpp
447-
${TORCH_SRC_DIR}/csrc/jit/tracer.cpp
448-
${TORCH_SRC_DIR}/csrc/jit/hooks_for_testing.cpp
430+
${TORCH_SRC_DIR}/csrc/jit/frontend/convert_to_ssa.cpp
431+
${TORCH_SRC_DIR}/csrc/jit/frontend/exit_transforms.cpp
432+
${TORCH_SRC_DIR}/csrc/jit/frontend/inline_loop_condition.cpp
433+
${TORCH_SRC_DIR}/csrc/jit/frontend/schema_matching.cpp
434+
${TORCH_SRC_DIR}/csrc/jit/frontend/script_type_parser.cpp
435+
${TORCH_SRC_DIR}/csrc/jit/frontend/sugared_value.cpp
436+
${TORCH_SRC_DIR}/csrc/jit/ir/class_type.cpp
437+
${TORCH_SRC_DIR}/csrc/jit/frontend/parser.cpp
438+
${TORCH_SRC_DIR}/csrc/jit/frontend/builtin_functions.cpp
439+
${TORCH_SRC_DIR}/csrc/jit/frontend/canonicalize_modified_loop.cpp
440+
${TORCH_SRC_DIR}/csrc/jit/frontend/edit_distance.cpp
441+
${TORCH_SRC_DIR}/csrc/jit/runtime/logging.cpp
442+
${TORCH_SRC_DIR}/csrc/jit/api/module.cpp
443+
${TORCH_SRC_DIR}/csrc/jit/api/object.cpp
444+
${TORCH_SRC_DIR}/csrc/jit/runtime/jit_exception.cpp
445+
${TORCH_SRC_DIR}/csrc/jit/frontend/string_to_type.cpp
446+
${TORCH_SRC_DIR}/csrc/jit/serialization/source_range_serialization.cpp
447+
${TORCH_SRC_DIR}/csrc/jit/frontend/tracer.cpp
448+
${TORCH_SRC_DIR}/csrc/jit/testing/hooks_for_testing.cpp
449449
${TORCH_SRC_DIR}/csrc/utils/tensor_flatten.cpp
450450
${TORCH_SRC_DIR}/csrc/utils/variadic.cpp
451-
${TORCH_SRC_DIR}/csrc/jit/fuser/kernel_cache.cpp
452-
${TORCH_SRC_DIR}/csrc/jit/fuser/compiler.cpp
453-
${TORCH_SRC_DIR}/csrc/jit/fuser/executor.cpp
454-
${TORCH_SRC_DIR}/csrc/jit/fuser/codegen.cpp
455-
${TORCH_SRC_DIR}/csrc/jit/fuser/fallback.cpp
456-
${TORCH_SRC_DIR}/csrc/jit/function.cpp
457-
${TORCH_SRC_DIR}/csrc/jit/vararg_functions.cpp
451+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/kernel_cache.cpp
452+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/compiler.cpp
453+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/executor.cpp
454+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/codegen.cpp
455+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/fallback.cpp
456+
${TORCH_SRC_DIR}/csrc/jit/api/function.cpp
457+
${TORCH_SRC_DIR}/csrc/jit/runtime/vararg_functions.cpp
458458

459459
${TORCH_SRC_DIR}/csrc/jit/tensorexpr/mem_arena.cpp
460460
${TORCH_SRC_DIR}/csrc/jit/tensorexpr/codegen.cpp
@@ -489,12 +489,12 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
489489
if (NOT INTERN_BUILD_MOBILE)
490490
list(APPEND TORCH_SRCS
491491
${TORCH_SRC_DIR}/csrc/api/src/jit.cpp
492-
${TORCH_SRC_DIR}/csrc/jit/export.cpp
493-
${TORCH_SRC_DIR}/csrc/jit/export_module.cpp
494-
${TORCH_SRC_DIR}/csrc/jit/import_legacy.cpp
492+
${TORCH_SRC_DIR}/csrc/jit/serialization/export.cpp
493+
${TORCH_SRC_DIR}/csrc/jit/serialization/export_module.cpp
494+
${TORCH_SRC_DIR}/csrc/jit/serialization/import_legacy.cpp
495495
${TORCH_SRC_DIR}/csrc/jit/netdef_converter.cpp
496-
${TORCH_SRC_DIR}/csrc/jit/fuser/cpu/fused_kernel.cpp
497-
${TORCH_SRC_DIR}/csrc/jit/script/module_save.cpp
496+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/cpu/fused_kernel.cpp
497+
${TORCH_SRC_DIR}/csrc/jit/api/module_save.cpp
498498
${TORCH_SRC_DIR}/csrc/utils/byte_order.cpp
499499
)
500500
if (USE_DISTRIBUTED)
@@ -526,14 +526,14 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
526526
${TORCH_SRC_DIR}/csrc/distributed/rpc/script_resp.cpp
527527
${TORCH_SRC_DIR}/csrc/distributed/rpc/types.cpp
528528
${TORCH_SRC_DIR}/csrc/distributed/rpc/utils.cpp
529-
${TORCH_SRC_DIR}/csrc/jit/register_distributed_ops.cpp
529+
${TORCH_SRC_DIR}/csrc/jit/runtime/register_distributed_ops.cpp
530530
)
531531
endif()
532532
endif()
533533

534534
if (USE_CUDA)
535535
list(APPEND Caffe2_GPU_SRCS
536-
${TORCH_SRC_DIR}/csrc/jit/fuser/cuda/fused_kernel.cpp
536+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp
537537
${TORCH_SRC_DIR}/csrc/autograd/profiler_cuda.cpp
538538
${TORCH_SRC_DIR}/csrc/autograd/functions/comm.cpp
539539
${TORCH_SRC_DIR}/csrc/cuda/comm.cpp
@@ -550,7 +550,7 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
550550

551551
if (USE_ROCM)
552552
list(APPEND Caffe2_HIP_SRCS
553-
${TORCH_SRC_DIR}/csrc/jit/fuser/cuda/fused_kernel.cpp
553+
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp
554554
${TORCH_SRC_DIR}/csrc/autograd/profiler_cuda.cpp
555555
${TORCH_SRC_DIR}/csrc/autograd/functions/comm.cpp
556556
${TORCH_SRC_DIR}/csrc/cuda/comm.cpp
@@ -864,8 +864,8 @@ if(USE_ROCM)
864864
USE_ROCM
865865
__HIP_PLATFORM_HCC__
866866
)
867-
# NB: Massive hack. torch/csrc/jit/fuser/codegen.cpp includes
868-
# torch/csrc/jit/fuser/cuda/resource_strings.h which changes the
867+
# NB: Massive hack. torch/csrc/jit/codegen/fuser/codegen.cpp includes
868+
# torch/csrc/jit/codegen/fuser/cuda/resource_strings.h which changes the
869869
# strings depending on if you're __HIP_PLATFORM_HCC__ or not.
870870
# But that file is in torch_cpu! So, against all odds, this macro
871871
# has to be set on torch_cpu too. I also added it to torch for

caffe2/core/export_caffe2_op_to_c10.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <ATen/core/function_schema.h>
77
#include <ATen/core/grad_mode.h>
88
#include <ATen/core/op_registration/op_registration.h>
9-
#include <torch/csrc/jit/script/function_schema_parser.h>
9+
#include <torch/csrc/jit/frontend/function_schema_parser.h>
1010
#include <vector>
1111

1212
namespace caffe2 {

0 commit comments

Comments
 (0)