mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[jit] do the code reorg (#33851)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/33851 Rationale and context described in #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
This commit is contained in:
committed by
Facebook Github Bot
parent
afbd04449e
commit
dbe850af5b
@ -1,6 +1,6 @@
|
||||
#include <torch/jit.h>
|
||||
#include <torch/script.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <fbjni/fbjni.h>
|
||||
|
||||
#include <torch/csrc/autograd/record_function.h>
|
||||
#include <torch/csrc/jit/print_handler.h>
|
||||
#include <torch/csrc/jit/runtime/print_handler.h>
|
||||
#include <torch/script.h>
|
||||
#include "caffe2/serialize/read_adapter_interface.h"
|
||||
|
||||
|
@ -8,22 +8,22 @@ EXCLUDE(ATen_CORE_SRCS "${ATen_CORE_SRCS}" ${ATen_CORE_TEST_SRCS})
|
||||
|
||||
# Add files needed from jit folders
|
||||
LIST(APPEND ATen_CORE_HEADERS
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/source_range.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/function_schema_parser.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/lexer.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/strtod.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/parse_string_literal.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/schema_type_parser.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/error_report.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/tree.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/source_range.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/function_schema_parser.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/lexer.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/strtod.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/parse_string_literal.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/schema_type_parser.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/error_report.h
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/tree.h
|
||||
)
|
||||
LIST(APPEND ATen_CORE_SRCS
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/error_report.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/function_schema_parser.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/lexer.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/strtod.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/script/schema_type_parser.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/source_range.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/error_report.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/function_schema_parser.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/lexer.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/strtod.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/schema_type_parser.cpp
|
||||
${Caffe2_SOURCE_DIR}/torch/csrc/jit/frontend/source_range.cpp
|
||||
)
|
||||
|
||||
# Pass to parent
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <ATen/core/boxing/test_helpers.h>
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <ATen/core/Tensor.h>
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
|
||||
/**
|
||||
* This file tests the legacy function-based API for registering kernels.
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <ATen/core/Tensor.h>
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
|
||||
using c10::RegisterOperators;
|
||||
using c10::DispatchKey;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <ATen/core/Tensor.h>
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
|
||||
using c10::RegisterOperators;
|
||||
using c10::OperatorKernel;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <ATen/core/boxing/test_helpers.h>
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <ATen/core/Tensor.h>
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
|
||||
/**
|
||||
* This file tests the legacy lambda-based API for registering kernels:
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <ATen/core/Tensor.h>
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
|
||||
using c10::RegisterOperators;
|
||||
using c10::DispatchKey;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <ATen/core/Tensor.h>
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
|
||||
using c10::RegisterOperators;
|
||||
using c10::DispatchKey;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <ATen/core/jit_type.h>
|
||||
#include <torch/csrc/jit/custom_class.h>
|
||||
#include <torch/csrc/jit/api/custom_class.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#if !defined(CAFFE2_IS_XPLAT_BUILD)
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
#endif
|
||||
|
||||
namespace c10 {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <ATen/core/dispatch/Dispatcher.h>
|
||||
#include <ATen/core/op_registration/infer_schema.h>
|
||||
#if !defined(CAFFE2_IS_XPLAT_BUILD)
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
#endif
|
||||
#include <ATen/core/OpsAlreadyMovedToC10.h>
|
||||
|
||||
|
@ -53,7 +53,7 @@ struct CAFFE2_API Quantizer : public c10::intrusive_ptr_target {
|
||||
explicit Quantizer(ScalarType scalar_type) : scalar_type_(scalar_type) {}
|
||||
virtual ~Quantizer();
|
||||
|
||||
// Copied from torch/csrc/jit/scope.h
|
||||
// Copied from torch/csrc/jit/ir/scope.h
|
||||
QuantizerPtr intrusive_from_this() {
|
||||
c10::raw::intrusive_ptr::incref(this); // we are creating a new pointer
|
||||
// from a raw `this` pointer
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <ATen/ATen.h>
|
||||
#include <ATen/NativeFunctions.h>
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <torch/csrc/jit/operator.h>
|
||||
#include <torch/csrc/jit/runtime/operator.h>
|
||||
|
||||
using namespace at;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <ATen/NativeFunctions.h>
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
|
||||
#include <torch/csrc/jit/operator.h>
|
||||
#include <torch/csrc/jit/runtime/operator.h>
|
||||
|
||||
using namespace at;
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
#include <torch/csrc/jit/mobile/module.h>
|
||||
#include <torch/csrc/jit/import.h>
|
||||
#include <torch/csrc/jit/instruction.h>
|
||||
#include <torch/csrc/jit/serialization/import.h>
|
||||
#include <torch/csrc/jit/runtime/instruction.h>
|
||||
#include <c10/util/Flags.h>
|
||||
|
||||
#include <fstream>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "caffe2/core/timer.h"
|
||||
#include "caffe2/utils/string_utils.h"
|
||||
#include "torch/csrc/autograd/grad_mode.h"
|
||||
#include "torch/csrc/jit/import.h"
|
||||
#include "torch/csrc/jit/serialization/import.h"
|
||||
#include "torch/script.h"
|
||||
|
||||
#include <chrono>
|
||||
|
@ -349,34 +349,34 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
|
||||
${TORCH_SRC_DIR}/csrc/autograd/record_function_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/saved_variable.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/variable.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/autodiff.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/attributes.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/argument_spec.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/custom_class.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/pass_manager.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/pickler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/unpickler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/graph_executor.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/import_source.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/import.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/pickle.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/import_export_helpers.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/instruction.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/interpreter.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/constants.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/node_hashing.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/type_hashing.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/irparser.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/autodiff.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/attributes.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/argument_spec.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/api/custom_class.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/pass_manager.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/pickler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/unpickler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/graph_executor.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/import_source.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/import.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/pickle.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/import_export_helpers.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/instruction.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/interpreter.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/constants.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/node_hashing.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/type_hashing.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/ir.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/irparser.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/jit_log.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/operator.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/register_c10_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/subgraph_matcher.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/symbolic_script.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/profiling_record.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/profiling_graph_executor_impl.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/update_graph_executor_opt.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/alias_analysis.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/operator.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/register_c10_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/subgraph_matcher.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/symbolic_script.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/profiling_record.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/profiling_graph_executor_impl.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/update_graph_executor_opt.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/alias_analysis.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/batch_mm.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/bailout_graph.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/canonicalize.cpp
|
||||
@ -412,49 +412,49 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/specialize_autogradzero.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/subgraph_rewrite.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/tensorexpr_fuser.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/python_print.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/python_print.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/utils/subgraph_utils.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/utils/check_alias_annotation.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/utils/memory_dag.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/quantization.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/fuse_linear.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/print_handler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/interface.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/register_prim_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/register_prim_ops_c10.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/register_string_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/register_special_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/scope.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/ir_emitter.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/print_handler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/interface.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/register_prim_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/register_prim_ops_c10.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/register_string_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/register_special_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/scope.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/ir_emitter.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/testing/file_check.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/convert_to_ssa.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/exit_transforms.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/inline_loop_condition.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/schema_matching.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/script_type_parser.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/sugared_value.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/class_type.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/parser.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/builtin_functions.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/canonicalize_modified_loop.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/edit_distance.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/logging.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/module.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/object.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/jit_exception.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/string_to_type.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/source_range_serialization.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/tracer.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/hooks_for_testing.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/convert_to_ssa.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/exit_transforms.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/inline_loop_condition.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/schema_matching.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/script_type_parser.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/sugared_value.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/ir/class_type.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/parser.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/builtin_functions.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/canonicalize_modified_loop.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/edit_distance.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/logging.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/api/module.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/api/object.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/jit_exception.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/string_to_type.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/source_range_serialization.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/tracer.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/testing/hooks_for_testing.cpp
|
||||
${TORCH_SRC_DIR}/csrc/utils/tensor_flatten.cpp
|
||||
${TORCH_SRC_DIR}/csrc/utils/variadic.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/kernel_cache.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/compiler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/executor.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/codegen.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/fallback.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/function.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/vararg_functions.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/kernel_cache.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/compiler.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/executor.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/codegen.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/fallback.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/api/function.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/vararg_functions.cpp
|
||||
|
||||
${TORCH_SRC_DIR}/csrc/jit/tensorexpr/mem_arena.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/tensorexpr/codegen.cpp
|
||||
@ -489,12 +489,12 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
|
||||
if (NOT INTERN_BUILD_MOBILE)
|
||||
list(APPEND TORCH_SRCS
|
||||
${TORCH_SRC_DIR}/csrc/api/src/jit.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/export.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/export_module.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/import_legacy.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/export.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/export_module.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/serialization/import_legacy.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/netdef_converter.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/cpu/fused_kernel.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/module_save.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/cpu/fused_kernel.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/api/module_save.cpp
|
||||
${TORCH_SRC_DIR}/csrc/utils/byte_order.cpp
|
||||
)
|
||||
if (USE_DISTRIBUTED)
|
||||
@ -526,14 +526,14 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
|
||||
${TORCH_SRC_DIR}/csrc/distributed/rpc/script_resp.cpp
|
||||
${TORCH_SRC_DIR}/csrc/distributed/rpc/types.cpp
|
||||
${TORCH_SRC_DIR}/csrc/distributed/rpc/utils.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/register_distributed_ops.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/runtime/register_distributed_ops.cpp
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (USE_CUDA)
|
||||
list(APPEND Caffe2_GPU_SRCS
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/cuda/fused_kernel.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/profiler_cuda.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/functions/comm.cpp
|
||||
${TORCH_SRC_DIR}/csrc/cuda/comm.cpp
|
||||
@ -550,7 +550,7 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
|
||||
|
||||
if (USE_ROCM)
|
||||
list(APPEND Caffe2_HIP_SRCS
|
||||
${TORCH_SRC_DIR}/csrc/jit/fuser/cuda/fused_kernel.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/profiler_cuda.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/functions/comm.cpp
|
||||
${TORCH_SRC_DIR}/csrc/cuda/comm.cpp
|
||||
@ -864,8 +864,8 @@ if(USE_ROCM)
|
||||
USE_ROCM
|
||||
__HIP_PLATFORM_HCC__
|
||||
)
|
||||
# NB: Massive hack. torch/csrc/jit/fuser/codegen.cpp includes
|
||||
# torch/csrc/jit/fuser/cuda/resource_strings.h which changes the
|
||||
# NB: Massive hack. torch/csrc/jit/codegen/fuser/codegen.cpp includes
|
||||
# torch/csrc/jit/codegen/fuser/cuda/resource_strings.h which changes the
|
||||
# strings depending on if you're __HIP_PLATFORM_HCC__ or not.
|
||||
# But that file is in torch_cpu! So, against all odds, this macro
|
||||
# has to be set on torch_cpu too. I also added it to torch for
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <ATen/core/function_schema.h>
|
||||
#include <ATen/core/grad_mode.h>
|
||||
#include <ATen/core/op_registration/op_registration.h>
|
||||
#include <torch/csrc/jit/script/function_schema_parser.h>
|
||||
#include <torch/csrc/jit/frontend/function_schema_parser.h>
|
||||
#include <vector>
|
||||
|
||||
namespace caffe2 {
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "caffe2/utils/proto_convert.h"
|
||||
#include "caffe2/utils/string_utils.h"
|
||||
#include "torch/csrc/autograd/variable.h"
|
||||
#include "torch/csrc/jit/script/module_python.h"
|
||||
#include "torch/csrc/jit/python/module_python.h"
|
||||
|
||||
// Because of CMake setup, we can't depend on script module here just yet -
|
||||
// it pulls in generated files from a different directory and it
|
||||
|
@ -56,9 +56,9 @@ INPUT = ../../../aten/src/ATen/ATen.h \
|
||||
../../../torch/csrc/api/include \
|
||||
../../../torch/csrc/api/src \
|
||||
../../../torch/csrc/autograd/generated/variable_factories.h \
|
||||
../../../torch/csrc/jit/custom_operator.h \
|
||||
../../../torch/csrc/jit/import.h \
|
||||
../../../torch/csrc/jit/script/module.h
|
||||
../../../torch/csrc/jit/runtime/custom_operator.h \
|
||||
../../../torch/csrc/jit/serialization/import.h \
|
||||
../../../torch/csrc/jit/api/module.h
|
||||
# Don't include .cpp files!
|
||||
FILE_PATTERNS = *.h
|
||||
# If you need this to be YES, exhale will probably break.
|
||||
|
@ -538,7 +538,7 @@ but intuitively the interface they provide looks like this::
|
||||
in positional.
|
||||
"""
|
||||
|
||||
The ONNX graph C++ definition is in ``torch/csrc/jit/ir.h``.
|
||||
The ONNX graph C++ definition is in ``torch/csrc/jit/ir/ir.h``.
|
||||
|
||||
Here is an example of handling missing symbolic function for ``elu`` operator.
|
||||
We try to export the model and see the error message as below::
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "caffe2/core/timer.h"
|
||||
#include "caffe2/utils/string_utils.h"
|
||||
#include "torch/csrc/autograd/grad_mode.h"
|
||||
#include "torch/csrc/jit/import.h"
|
||||
#include "torch/csrc/jit/serialization/import.h"
|
||||
#include "torch/script.h"
|
||||
|
||||
static std::string model = "model.pt";
|
||||
|
7
setup.py
7
setup.py
@ -831,7 +831,12 @@ if __name__ == '__main__':
|
||||
'include/torch/csrc/jit/generated/*.h',
|
||||
'include/torch/csrc/jit/passes/*.h',
|
||||
'include/torch/csrc/jit/passes/utils/*.h',
|
||||
'include/torch/csrc/jit/script/*.h',
|
||||
'include/torch/csrc/jit/runtime/*.h',
|
||||
'include/torch/csrc/jit/ir/*.h',
|
||||
'include/torch/csrc/jit/frontend/*.h',
|
||||
'include/torch/csrc/jit/api/*.h',
|
||||
'include/torch/csrc/jit/serialization/*.h',
|
||||
'include/torch/csrc/jit/python/*.h',
|
||||
'include/torch/csrc/jit/testing/*.h',
|
||||
'include/torch/csrc/onnx/*.h',
|
||||
'include/torch/csrc/utils/*.h',
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <torch/csrc/autograd/generated/variable_factories.h>
|
||||
#include <torch/csrc/jit/irparser.h>
|
||||
#include <torch/csrc/jit/ir/irparser.h>
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "torch/csrc/jit/custom_operator.h"
|
||||
#include "torch/csrc/jit/passes/alias_analysis.h"
|
||||
#include "torch/csrc/jit/script/ir_emitter.h"
|
||||
#include "torch/csrc/jit/runtime/custom_operator.h"
|
||||
#include "torch/csrc/jit/ir/alias_analysis.h"
|
||||
#include "torch/csrc/jit/frontend/ir_emitter.h"
|
||||
#include "torch/csrc/utils/memory.h"
|
||||
|
||||
namespace torch {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/jit.h>
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
#include "torch/csrc/jit/argument_spec.h"
|
||||
#include "torch/csrc/jit/runtime/argument_spec.h"
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
#include "torch/csrc/jit/argument_spec.h"
|
||||
#include "torch/csrc/jit/autodiff.h"
|
||||
#include "torch/csrc/jit/runtime/argument_spec.h"
|
||||
#include "torch/csrc/jit/runtime/autodiff.h"
|
||||
#include "torch/csrc/jit/passes/common_subexpression_elimination.h"
|
||||
#include "torch/csrc/jit/passes/constant_propagation.h"
|
||||
#include "torch/csrc/jit/passes/create_autodiff_subgraphs.h"
|
||||
@ -11,7 +11,7 @@
|
||||
#include "torch/csrc/jit/passes/requires_grad_analysis.h"
|
||||
#include "torch/csrc/jit/passes/shape_analysis.h"
|
||||
#include "torch/csrc/jit/passes/utils/subgraph_utils.h"
|
||||
#include "torch/csrc/jit/tracer.h"
|
||||
#include "torch/csrc/jit/frontend/tracer.h"
|
||||
|
||||
#include <ATen/ATen.h>
|
||||
#include "torch/csrc/autograd/engine.h"
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// This file defines assertion macros that work in both gtest and non-gtest
|
||||
// builds, and has some common includes.
|
||||
#include "torch/csrc/jit/ir.h"
|
||||
#include "torch/csrc/jit/operator.h"
|
||||
#include "torch/csrc/jit/ir/ir.h"
|
||||
#include "torch/csrc/jit/runtime/operator.h"
|
||||
|
||||
#if defined(USE_GTEST)
|
||||
#include <gtest/gtest.h>
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include <test/cpp/jit/test_utils.h>
|
||||
|
||||
#include <ATen/core/qualified_name.h>
|
||||
#include <torch/csrc/jit/import_source.h>
|
||||
#include <torch/csrc/jit/script/resolver.h>
|
||||
#include <torch/csrc/jit/serialization/import_source.h>
|
||||
#include <torch/csrc/jit/frontend/resolver.h>
|
||||
#include <torch/torch.h>
|
||||
|
||||
namespace torch {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <test/cpp/jit/test_base.h>
|
||||
#include <torch/csrc/jit/script/parser.h>
|
||||
#include <torch/csrc/jit/script/resolver.h>
|
||||
#include <torch/csrc/jit/frontend/parser.h>
|
||||
#include <torch/csrc/jit/frontend/resolver.h>
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
|
||||
#include "torch/csrc/jit/code_template.h"
|
||||
#include "torch/csrc/jit/frontend/code_template.h"
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/irparser.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/jit/ir/irparser.h>
|
||||
#include <torch/csrc/jit/passes/constant_pooling.h>
|
||||
#include <torch/csrc/jit/passes/constant_propagation.h>
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
|
||||
#include "torch/csrc/jit/custom_operator.h"
|
||||
#include "torch/csrc/jit/irparser.h"
|
||||
#include "torch/csrc/jit/passes/alias_analysis.h"
|
||||
#include "torch/csrc/jit/runtime/custom_operator.h"
|
||||
#include "torch/csrc/jit/ir/irparser.h"
|
||||
#include "torch/csrc/jit/ir/alias_analysis.h"
|
||||
#include "torch/csrc/jit/passes/dead_code_elimination.h"
|
||||
#include "torch/jit.h"
|
||||
|
||||
|
@ -4,16 +4,16 @@
|
||||
#include "ATen/core/interned_strings.h"
|
||||
#include "torch/csrc/autograd/generated/variable_factories.h"
|
||||
#include "torch/csrc/autograd/variable.h"
|
||||
#include "torch/csrc/jit/argument_spec.h"
|
||||
#include "torch/csrc/jit/attributes.h"
|
||||
#include "torch/csrc/jit/autodiff.h"
|
||||
#include "torch/csrc/jit/code_template.h"
|
||||
#include "torch/csrc/jit/custom_operator.h"
|
||||
#include "torch/csrc/jit/fuser/interface.h"
|
||||
#include "torch/csrc/jit/import.h"
|
||||
#include "torch/csrc/jit/irparser.h"
|
||||
#include "torch/csrc/jit/interpreter.h"
|
||||
#include "torch/csrc/jit/passes/alias_analysis.h"
|
||||
#include "torch/csrc/jit/runtime/argument_spec.h"
|
||||
#include "torch/csrc/jit/ir/attributes.h"
|
||||
#include "torch/csrc/jit/runtime/autodiff.h"
|
||||
#include "torch/csrc/jit/frontend/code_template.h"
|
||||
#include "torch/csrc/jit/runtime/custom_operator.h"
|
||||
#include "torch/csrc/jit/codegen/fuser/interface.h"
|
||||
#include "torch/csrc/jit/serialization/import.h"
|
||||
#include "torch/csrc/jit/ir/irparser.h"
|
||||
#include "torch/csrc/jit/runtime/interpreter.h"
|
||||
#include "torch/csrc/jit/ir/alias_analysis.h"
|
||||
#include "torch/csrc/jit/passes/common_subexpression_elimination.h"
|
||||
#include "torch/csrc/jit/passes/constant_propagation.h"
|
||||
#include "torch/csrc/jit/passes/create_autodiff_subgraphs.h"
|
||||
@ -24,8 +24,8 @@
|
||||
#include "torch/csrc/jit/passes/requires_grad_analysis.h"
|
||||
#include "torch/csrc/jit/passes/shape_analysis.h"
|
||||
#include "torch/csrc/jit/passes/utils/subgraph_utils.h"
|
||||
#include "torch/csrc/jit/symbolic_script.h"
|
||||
#include "torch/csrc/jit/tracer.h"
|
||||
#include "torch/csrc/jit/runtime/symbolic_script.h"
|
||||
#include "torch/csrc/jit/frontend/tracer.h"
|
||||
|
||||
|
||||
|
||||
@ -34,9 +34,9 @@
|
||||
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
#include "ATen/core/ivalue.h"
|
||||
#include "torch/csrc/jit/graph_executor.h"
|
||||
#include "torch/csrc/jit/script/ir_emitter.h"
|
||||
#include "torch/csrc/jit/script/module.h"
|
||||
#include "torch/csrc/jit/runtime/graph_executor.h"
|
||||
#include "torch/csrc/jit/frontend/ir_emitter.h"
|
||||
#include "torch/csrc/jit/api/module.h"
|
||||
|
||||
#include "onnx/onnx_pb.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
#include "torch/csrc/jit/graph_executor.h"
|
||||
#include "torch/csrc/jit/runtime/graph_executor.h"
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <test/cpp/jit/test_base.h>
|
||||
|
||||
#include <torch/csrc/jit/passes/inliner.h>
|
||||
#include <torch/csrc/jit/script/compilation_unit.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/api/compilation_unit.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
|
||||
const auto testSource = R"JIT(
|
||||
|
@ -3,9 +3,9 @@
|
||||
#include <test/cpp/jit/test_utils.h>
|
||||
|
||||
#include <ATen/core/qualified_name.h>
|
||||
#include <torch/csrc/jit/import.h>
|
||||
#include <torch/csrc/jit/import_source.h>
|
||||
#include <torch/csrc/jit/script/resolver.h>
|
||||
#include <torch/csrc/jit/serialization/import.h>
|
||||
#include <torch/csrc/jit/serialization/import_source.h>
|
||||
#include <torch/csrc/jit/frontend/resolver.h>
|
||||
#include <torch/torch.h>
|
||||
|
||||
namespace torch {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
#include "torch/csrc/jit/irparser.h"
|
||||
#include "torch/csrc/jit/ir/irparser.h"
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/irparser.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/jit/ir/irparser.h>
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <test/cpp/jit/test_base.h>
|
||||
#include <test/cpp/jit/test_utils.h>
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
#include "torch/csrc/jit/ir.h"
|
||||
#include "torch/csrc/jit/irparser.h"
|
||||
#include "torch/csrc/jit/ir/ir.h"
|
||||
#include "torch/csrc/jit/ir/irparser.h"
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <test/cpp/jit/test_base.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
#include <torch/csrc/autograd/generated/variable_factories.h>
|
||||
#include <torch/csrc/jit/mobile/import.h>
|
||||
#include <torch/csrc/jit/mobile/module.h>
|
||||
#include <torch/csrc/jit/import.h>
|
||||
#include <torch/csrc/jit/serialization/import.h>
|
||||
|
||||
// Tests go in torch::jit
|
||||
namespace torch {
|
||||
|
@ -8,20 +8,20 @@
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
|
||||
#include <torch/csrc/jit/passes/canonicalize.h>
|
||||
#include <torch/csrc/jit/type_hashing.h>
|
||||
#include <torch/csrc/jit/ir/type_hashing.h>
|
||||
#include "torch/csrc/autograd/generated/variable_factories.h"
|
||||
#include "torch/csrc/autograd/variable.h"
|
||||
#include "torch/csrc/jit/argument_spec.h"
|
||||
#include "torch/csrc/jit/attributes.h"
|
||||
#include "torch/csrc/jit/autodiff.h"
|
||||
#include "torch/csrc/jit/code_template.h"
|
||||
#include "torch/csrc/jit/custom_operator.h"
|
||||
#include "torch/csrc/jit/fuser/interface.h"
|
||||
#include "torch/csrc/jit/import.h"
|
||||
#include "torch/csrc/jit/interpreter.h"
|
||||
#include "torch/csrc/jit/irparser.h"
|
||||
#include "torch/csrc/jit/pass_manager.h"
|
||||
#include "torch/csrc/jit/passes/alias_analysis.h"
|
||||
#include "torch/csrc/jit/runtime/argument_spec.h"
|
||||
#include "torch/csrc/jit/ir/attributes.h"
|
||||
#include "torch/csrc/jit/runtime/autodiff.h"
|
||||
#include "torch/csrc/jit/frontend/code_template.h"
|
||||
#include "torch/csrc/jit/runtime/custom_operator.h"
|
||||
#include "torch/csrc/jit/codegen/fuser/interface.h"
|
||||
#include "torch/csrc/jit/serialization/import.h"
|
||||
#include "torch/csrc/jit/runtime/interpreter.h"
|
||||
#include "torch/csrc/jit/ir/irparser.h"
|
||||
#include "torch/csrc/jit/passes/pass_manager.h"
|
||||
#include "torch/csrc/jit/ir/alias_analysis.h"
|
||||
#include "torch/csrc/jit/passes/bailout_graph.h"
|
||||
#include "torch/csrc/jit/passes/common_subexpression_elimination.h"
|
||||
#include "torch/csrc/jit/passes/constant_propagation.h"
|
||||
@ -37,18 +37,18 @@
|
||||
#include "torch/csrc/jit/passes/requires_grad_analysis.h"
|
||||
#include "torch/csrc/jit/passes/shape_analysis.h"
|
||||
#include "torch/csrc/jit/passes/utils/subgraph_utils.h"
|
||||
#include "torch/csrc/jit/scope.h"
|
||||
#include "torch/csrc/jit/symbolic_script.h"
|
||||
#include "torch/csrc/jit/tracer.h"
|
||||
#include "torch/csrc/jit/ir/scope.h"
|
||||
#include "torch/csrc/jit/runtime/symbolic_script.h"
|
||||
#include "torch/csrc/jit/frontend/tracer.h"
|
||||
|
||||
#include "torch/csrc/autograd/engine.h"
|
||||
#include "torch/csrc/autograd/variable.h"
|
||||
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
#include <torch/script.h>
|
||||
#include "torch/csrc/jit/profiling_record.h"
|
||||
#include "torch/csrc/jit/script/ir_emitter.h"
|
||||
#include "torch/csrc/jit/script/module.h"
|
||||
#include "torch/csrc/jit/runtime/profiling_record.h"
|
||||
#include "torch/csrc/jit/frontend/ir_emitter.h"
|
||||
#include "torch/csrc/jit/api/module.h"
|
||||
#include "torch/jit.h"
|
||||
|
||||
#include "onnx/onnx_pb.h"
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <test/cpp/jit/test_base.h>
|
||||
#include <test/cpp/jit/test_utils.h>
|
||||
|
||||
#include <torch/csrc/jit/irparser.h>
|
||||
#include <torch/csrc/jit/ir/irparser.h>
|
||||
#include <torch/csrc/jit/passes/peephole.h>
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <torch/csrc/jit/export.h>
|
||||
#include <torch/csrc/jit/import.h>
|
||||
#include <torch/csrc/jit/import_source.h>
|
||||
#include <torch/csrc/jit/serialization/export.h>
|
||||
#include <torch/csrc/jit/serialization/import.h>
|
||||
#include <torch/csrc/jit/serialization/import_source.h>
|
||||
#include <torch/torch.h>
|
||||
|
||||
namespace torch {
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
#include <torch/jit.h>
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "torch/csrc/jit/custom_operator.h"
|
||||
#include "torch/csrc/jit/runtime/custom_operator.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "test/cpp/jit/test_utils.h"
|
||||
#include "torch/csrc/jit/subgraph_matcher.h"
|
||||
#include "torch/csrc/jit/ir/subgraph_matcher.h"
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <test/cpp/jit/test_base.h>
|
||||
#include <test/cpp/jit/test_utils.h>
|
||||
#include <torch/csrc/jit/subgraph_matcher.h>
|
||||
#include <torch/csrc/jit/ir/subgraph_matcher.h>
|
||||
#include <torch/csrc/jit/passes/subgraph_rewrite.h>
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
#include <torch/csrc/jit/testing/file_check.h>
|
||||
#include "test/cpp/jit/test_base.h"
|
||||
#include "torch/csrc/jit/autodiff.h"
|
||||
#include "torch/csrc/jit/interpreter.h"
|
||||
#include "torch/csrc/jit/irparser.h"
|
||||
#include "torch/csrc/jit/runtime/autodiff.h"
|
||||
#include "torch/csrc/jit/runtime/interpreter.h"
|
||||
#include "torch/csrc/jit/ir/irparser.h"
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "torch/csrc/utils/tensor_layouts.h"
|
||||
#include "torch/csrc/utils/tensor_new.h"
|
||||
#include "torch/csrc/utils/tensor_numpy.h"
|
||||
#include "torch/csrc/jit/tracer.h"
|
||||
#include "torch/csrc/jit/frontend/tracer.h"
|
||||
#include "torch/csrc/autograd/generated/variable_factories.h"
|
||||
#include "torch/csrc/utils/structseq.h"
|
||||
#include "torch/csrc/utils/cuda_lazy_init.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "torch/csrc/autograd/utils/python_arg_parsing.h"
|
||||
#include "torch/csrc/autograd/utils/error_messages.h"
|
||||
#include "torch/csrc/autograd/utils/wrap_outputs.h"
|
||||
#include "torch/csrc/jit/tracer.h"
|
||||
#include "torch/csrc/jit/frontend/tracer.h"
|
||||
#ifdef USE_CUDA
|
||||
#include "torch/csrc/cuda/Stream.h"
|
||||
#include "torch/csrc/cuda/Event.h"
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <c10/core/MemoryFormat.h>
|
||||
#include <torch/csrc/api/include/torch/detail/TensorDataContainer.h>
|
||||
#include <torch/csrc/autograd/variable.h>
|
||||
#include <torch/csrc/jit/tracer.h>
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/frontend/tracer.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
|
@ -77,36 +77,36 @@ libtorch_sources = [
|
||||
"torch/csrc/distributed/rpc/script_resp.cpp",
|
||||
"torch/csrc/distributed/rpc/types.cpp",
|
||||
"torch/csrc/distributed/rpc/utils.cpp",
|
||||
"torch/csrc/jit/autodiff.cpp",
|
||||
"torch/csrc/jit/attributes.cpp",
|
||||
"torch/csrc/jit/argument_spec.cpp",
|
||||
"torch/csrc/jit/constants.cpp",
|
||||
"torch/csrc/jit/custom_class.cpp",
|
||||
"torch/csrc/jit/node_hashing.cpp",
|
||||
"torch/csrc/jit/type_hashing.cpp",
|
||||
"torch/csrc/jit/export.cpp",
|
||||
"torch/csrc/jit/export_module.cpp",
|
||||
"torch/csrc/jit/pass_manager.cpp",
|
||||
"torch/csrc/jit/pickler.cpp",
|
||||
"torch/csrc/jit/unpickler.cpp",
|
||||
"torch/csrc/jit/graph_executor.cpp",
|
||||
"torch/csrc/jit/import.cpp",
|
||||
"torch/csrc/jit/import_legacy.cpp",
|
||||
"torch/csrc/jit/pickle.cpp",
|
||||
"torch/csrc/jit/import_export_helpers.cpp",
|
||||
"torch/csrc/jit/instruction.cpp",
|
||||
"torch/csrc/jit/interpreter.cpp",
|
||||
"torch/csrc/jit/ir.cpp",
|
||||
"torch/csrc/jit/irparser.cpp",
|
||||
"torch/csrc/jit/runtime/autodiff.cpp",
|
||||
"torch/csrc/jit/ir/attributes.cpp",
|
||||
"torch/csrc/jit/runtime/argument_spec.cpp",
|
||||
"torch/csrc/jit/ir/constants.cpp",
|
||||
"torch/csrc/jit/api/custom_class.cpp",
|
||||
"torch/csrc/jit/ir/node_hashing.cpp",
|
||||
"torch/csrc/jit/ir/type_hashing.cpp",
|
||||
"torch/csrc/jit/serialization/export.cpp",
|
||||
"torch/csrc/jit/serialization/export_module.cpp",
|
||||
"torch/csrc/jit/passes/pass_manager.cpp",
|
||||
"torch/csrc/jit/serialization/pickler.cpp",
|
||||
"torch/csrc/jit/serialization/unpickler.cpp",
|
||||
"torch/csrc/jit/runtime/graph_executor.cpp",
|
||||
"torch/csrc/jit/serialization/import.cpp",
|
||||
"torch/csrc/jit/serialization/import_legacy.cpp",
|
||||
"torch/csrc/jit/serialization/pickle.cpp",
|
||||
"torch/csrc/jit/serialization/import_export_helpers.cpp",
|
||||
"torch/csrc/jit/runtime/instruction.cpp",
|
||||
"torch/csrc/jit/runtime/interpreter.cpp",
|
||||
"torch/csrc/jit/ir/ir.cpp",
|
||||
"torch/csrc/jit/ir/irparser.cpp",
|
||||
"torch/csrc/jit/jit_log.cpp",
|
||||
"torch/csrc/jit/netdef_converter.cpp",
|
||||
"torch/csrc/jit/register_c10_ops.cpp",
|
||||
"torch/csrc/jit/subgraph_matcher.cpp",
|
||||
"torch/csrc/jit/symbolic_script.cpp",
|
||||
"torch/csrc/jit/profiling_graph_executor_impl.cpp",
|
||||
"torch/csrc/jit/profiling_record.cpp",
|
||||
"torch/csrc/jit/operator.cpp",
|
||||
"torch/csrc/jit/passes/alias_analysis.cpp",
|
||||
"torch/csrc/jit/runtime/register_c10_ops.cpp",
|
||||
"torch/csrc/jit/ir/subgraph_matcher.cpp",
|
||||
"torch/csrc/jit/runtime/symbolic_script.cpp",
|
||||
"torch/csrc/jit/runtime/profiling_graph_executor_impl.cpp",
|
||||
"torch/csrc/jit/runtime/profiling_record.cpp",
|
||||
"torch/csrc/jit/runtime/operator.cpp",
|
||||
"torch/csrc/jit/ir/alias_analysis.cpp",
|
||||
"torch/csrc/jit/passes/batch_mm.cpp",
|
||||
"torch/csrc/jit/passes/bailout_graph.cpp",
|
||||
"torch/csrc/jit/passes/canonicalize_ops.cpp",
|
||||
@ -134,7 +134,7 @@ libtorch_sources = [
|
||||
"torch/csrc/jit/passes/lower_graph.cpp",
|
||||
"torch/csrc/jit/passes/lower_tuples.cpp",
|
||||
"torch/csrc/jit/passes/peephole.cpp",
|
||||
"torch/csrc/jit/passes/python_print.cpp",
|
||||
"torch/csrc/jit/serialization/python_print.cpp",
|
||||
"torch/csrc/jit/passes/quantization.cpp",
|
||||
"torch/csrc/jit/passes/fuse_linear.cpp",
|
||||
"torch/csrc/jit/passes/remove_expands.cpp",
|
||||
@ -145,46 +145,46 @@ libtorch_sources = [
|
||||
"torch/csrc/jit/passes/tensorexpr_fuser.cpp",
|
||||
"torch/csrc/jit/passes/utils/subgraph_utils.cpp",
|
||||
"torch/csrc/jit/passes/utils/memory_dag.cpp",
|
||||
"torch/csrc/jit/print_handler.cpp",
|
||||
"torch/csrc/jit/register_prim_ops.cpp",
|
||||
"torch/csrc/jit/register_prim_ops_c10.cpp",
|
||||
"torch/csrc/jit/register_string_ops.cpp",
|
||||
"torch/csrc/jit/register_special_ops.cpp",
|
||||
"torch/csrc/jit/register_distributed_ops.cpp",
|
||||
"torch/csrc/jit/scope.cpp",
|
||||
"torch/csrc/jit/script/ir_emitter.cpp",
|
||||
"torch/csrc/jit/script/edit_distance.cpp",
|
||||
"torch/csrc/jit/script/logging.cpp",
|
||||
"torch/csrc/jit/script/convert_to_ssa.cpp",
|
||||
"torch/csrc/jit/script/exit_transforms.cpp",
|
||||
"torch/csrc/jit/script/inline_loop_condition.cpp",
|
||||
"torch/csrc/jit/script/canonicalize_modified_loop.cpp",
|
||||
"torch/csrc/jit/script/script_type_parser.cpp",
|
||||
"torch/csrc/jit/script/sugared_value.cpp",
|
||||
"torch/csrc/jit/script/schema_matching.cpp",
|
||||
"torch/csrc/jit/script/class_type.cpp",
|
||||
"torch/csrc/jit/script/parser.cpp",
|
||||
"torch/csrc/jit/script/jit_exception.cpp",
|
||||
"torch/csrc/jit/source_range_serialization.cpp",
|
||||
"torch/csrc/jit/runtime/print_handler.cpp",
|
||||
"torch/csrc/jit/runtime/register_prim_ops.cpp",
|
||||
"torch/csrc/jit/runtime/register_prim_ops_c10.cpp",
|
||||
"torch/csrc/jit/runtime/register_string_ops.cpp",
|
||||
"torch/csrc/jit/runtime/register_special_ops.cpp",
|
||||
"torch/csrc/jit/runtime/register_distributed_ops.cpp",
|
||||
"torch/csrc/jit/ir/scope.cpp",
|
||||
"torch/csrc/jit/frontend/ir_emitter.cpp",
|
||||
"torch/csrc/jit/frontend/edit_distance.cpp",
|
||||
"torch/csrc/jit/runtime/logging.cpp",
|
||||
"torch/csrc/jit/frontend/convert_to_ssa.cpp",
|
||||
"torch/csrc/jit/frontend/exit_transforms.cpp",
|
||||
"torch/csrc/jit/frontend/inline_loop_condition.cpp",
|
||||
"torch/csrc/jit/frontend/canonicalize_modified_loop.cpp",
|
||||
"torch/csrc/jit/frontend/script_type_parser.cpp",
|
||||
"torch/csrc/jit/frontend/sugared_value.cpp",
|
||||
"torch/csrc/jit/frontend/schema_matching.cpp",
|
||||
"torch/csrc/jit/ir/class_type.cpp",
|
||||
"torch/csrc/jit/frontend/parser.cpp",
|
||||
"torch/csrc/jit/runtime/jit_exception.cpp",
|
||||
"torch/csrc/jit/serialization/source_range_serialization.cpp",
|
||||
"torch/csrc/jit/testing/file_check.cpp",
|
||||
"torch/csrc/jit/import_source.cpp",
|
||||
"torch/csrc/jit/hooks_for_testing.cpp",
|
||||
"torch/csrc/jit/script/builtin_functions.cpp",
|
||||
"torch/csrc/jit/script/module.cpp",
|
||||
"torch/csrc/jit/script/module_save.cpp",
|
||||
"torch/csrc/jit/script/object.cpp",
|
||||
"torch/csrc/jit/script/string_to_type.cpp",
|
||||
"torch/csrc/jit/tracer.cpp",
|
||||
"torch/csrc/jit/fuser/kernel_cache.cpp",
|
||||
"torch/csrc/jit/fuser/compiler.cpp",
|
||||
"torch/csrc/jit/fuser/executor.cpp",
|
||||
"torch/csrc/jit/fuser/codegen.cpp",
|
||||
"torch/csrc/jit/fuser/fallback.cpp",
|
||||
"torch/csrc/jit/fuser/cpu/fused_kernel.cpp",
|
||||
"torch/csrc/jit/fuser/interface.cpp",
|
||||
"torch/csrc/jit/function.cpp",
|
||||
"torch/csrc/jit/vararg_functions.cpp",
|
||||
"torch/csrc/jit/update_graph_executor_opt.cpp",
|
||||
"torch/csrc/jit/serialization/import_source.cpp",
|
||||
"torch/csrc/jit/testing/hooks_for_testing.cpp",
|
||||
"torch/csrc/jit/frontend/builtin_functions.cpp",
|
||||
"torch/csrc/jit/api/module.cpp",
|
||||
"torch/csrc/jit/api/module_save.cpp",
|
||||
"torch/csrc/jit/api/object.cpp",
|
||||
"torch/csrc/jit/frontend/string_to_type.cpp",
|
||||
"torch/csrc/jit/frontend/tracer.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/kernel_cache.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/compiler.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/executor.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/codegen.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/fallback.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/cpu/fused_kernel.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/interface.cpp",
|
||||
"torch/csrc/jit/api/function.cpp",
|
||||
"torch/csrc/jit/runtime/vararg_functions.cpp",
|
||||
"torch/csrc/jit/python/update_graph_executor_opt.cpp",
|
||||
"torch/csrc/jit/mobile/function.cpp",
|
||||
"torch/csrc/jit/mobile/import.cpp",
|
||||
"torch/csrc/jit/mobile/module.cpp",
|
||||
@ -219,7 +219,7 @@ libtorch_sources = [
|
||||
libtorch_cuda_sources = [
|
||||
"torch/csrc/cuda/comm.cpp",
|
||||
"torch/csrc/cuda/nccl.cpp",
|
||||
"torch/csrc/jit/fuser/cuda/fused_kernel.cpp",
|
||||
"torch/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp",
|
||||
"torch/csrc/autograd/profiler_cuda.cpp",
|
||||
"torch/csrc/autograd/functions/comm.cpp",
|
||||
]
|
||||
@ -343,7 +343,7 @@ def add_torch_libs():
|
||||
"torch/csrc/distributed/rpc/python_functions.cpp",
|
||||
"torch/csrc/distributed/rpc/python_rpc_handler.cpp",
|
||||
"torch/csrc/distributed/rpc/request_callback_impl.cpp",
|
||||
"torch/csrc/jit/init.cpp",
|
||||
"torch/csrc/jit/python/init.cpp",
|
||||
"torch/csrc/jit/passes/inline_fork_wait.cpp",
|
||||
"torch/csrc/jit/passes/onnx.cpp",
|
||||
"torch/csrc/jit/passes/onnx/cast_all_constant_to_floating.cpp",
|
||||
@ -358,15 +358,15 @@ def add_torch_libs():
|
||||
"torch/csrc/jit/passes/onnx/prepare_inplace_ops_for_onnx.cpp",
|
||||
"torch/csrc/jit/passes/remove_inplace_ops.cpp",
|
||||
"torch/csrc/jit/passes/utils/check_alias_annotation.cpp",
|
||||
"torch/csrc/jit/python_arg_flatten.cpp",
|
||||
"torch/csrc/jit/python_custom_class.cpp",
|
||||
"torch/csrc/jit/python_interpreter.cpp",
|
||||
"torch/csrc/jit/python_ir.cpp",
|
||||
"torch/csrc/jit/python_tracer.cpp",
|
||||
"torch/csrc/jit/script/init.cpp",
|
||||
"torch/csrc/jit/script/concrete_module_type.cpp",
|
||||
"torch/csrc/jit/script/python_sugared_value.cpp",
|
||||
"torch/csrc/jit/script/python_tree_views.cpp",
|
||||
"torch/csrc/jit/python/python_arg_flatten.cpp",
|
||||
"torch/csrc/jit/python/python_custom_class.cpp",
|
||||
"torch/csrc/jit/python/python_interpreter.cpp",
|
||||
"torch/csrc/jit/python/python_ir.cpp",
|
||||
"torch/csrc/jit/python/python_tracer.cpp",
|
||||
"torch/csrc/jit/python/script_init.cpp",
|
||||
"torch/csrc/jit/frontend/concrete_module_type.cpp",
|
||||
"torch/csrc/jit/python/python_sugared_value.cpp",
|
||||
"torch/csrc/jit/python/python_tree_views.cpp",
|
||||
"torch/csrc/multiprocessing/init.cpp",
|
||||
"torch/csrc/onnx/init.cpp",
|
||||
"torch/csrc/serialization.cpp",
|
||||
|
@ -10,8 +10,8 @@ then
|
||||
python tools/clang_tidy.py \
|
||||
--paths torch/csrc \
|
||||
--diff HEAD \
|
||||
-g"-torch/csrc/jit/export.cpp" \
|
||||
-g"-torch/csrc/jit/import.cpp" \
|
||||
-g"-torch/csrc/jit/serialization/export.cpp" \
|
||||
-g"-torch/csrc/jit/serialization/import.cpp" \
|
||||
-j
|
||||
else
|
||||
echo "WARNING: Couldn't find clang-tidy executable."
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "torch/csrc/jit/operator.h"
|
||||
#include "torch/csrc/jit/custom_operator.h"
|
||||
#include "torch/csrc/jit/runtime/operator.h"
|
||||
#include "torch/csrc/jit/runtime/custom_operator.h"
|
||||
|
||||
#include "torch/csrc/autograd/profiler.h"
|
||||
#include "torch/csrc/autograd/generated/variable_factories.h"
|
||||
|
@ -68,7 +68,7 @@ set(TORCH_PYTHON_SRCS
|
||||
${TORCH_SRC_DIR}/csrc/autograd/python_legacy_variable.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/python_variable.cpp
|
||||
${TORCH_SRC_DIR}/csrc/autograd/python_variable_indexing.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/init.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/init.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/onnx.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/onnx/fixup_onnx_conditionals.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/onnx/fixup_onnx_loop.cpp
|
||||
@ -80,15 +80,15 @@ set(TORCH_PYTHON_SRCS
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/onnx/scalar_type_analysis.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/onnx/unpack_quantized_weights.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/passes/onnx/prepare_inplace_ops_for_onnx.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python_arg_flatten.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python_custom_class.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python_interpreter.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python_ir.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python_tracer.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/init.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/python_sugared_value.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/concrete_module_type.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/script/python_tree_views.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/python_arg_flatten.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/python_custom_class.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/python_interpreter.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/python_ir.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/python_tracer.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/script_init.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/python_sugared_value.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/frontend/concrete_module_type.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/python/python_tree_views.cpp
|
||||
${TORCH_SRC_DIR}/csrc/multiprocessing/init.cpp
|
||||
${TORCH_SRC_DIR}/csrc/onnx/init.cpp
|
||||
${TORCH_SRC_DIR}/csrc/utils/init.cpp
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <torch/csrc/THP_export.h>
|
||||
#include <torch/csrc/utils/auto_gil.h>
|
||||
#include <torch/csrc/jit/script/jit_exception.h>
|
||||
#include <torch/csrc/jit/runtime/jit_exception.h>
|
||||
#include <torch/csrc/WindowsTorchApiMacro.h>
|
||||
#include <c10/util/StringUtil.h>
|
||||
#include <ATen/detail/FunctionTraits.h>
|
||||
|
@ -40,9 +40,9 @@
|
||||
#include <torch/csrc/utils/tensor_memoryformats.h>
|
||||
#include <torch/csrc/utils/tensor_qschemes.h>
|
||||
#include <torch/csrc/utils/tensor_numpy.h>
|
||||
#include <torch/csrc/jit/python_tracer.h>
|
||||
#include <torch/csrc/jit/init.h>
|
||||
#include <torch/csrc/jit/python_ir.h>
|
||||
#include <torch/csrc/jit/python/python_tracer.h>
|
||||
#include <torch/csrc/jit/python/init.h>
|
||||
#include <torch/csrc/jit/python/python_ir.h>
|
||||
#include <torch/csrc/onnx/init.h>
|
||||
#include <torch/csrc/utils/init.h>
|
||||
#include <torch/csrc/api/include/torch/python/init.h>
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <torch/csrc/utils/python_tuples.h>
|
||||
|
||||
#include <torch/csrc/autograd/python_variable.h>
|
||||
#include <torch/csrc/jit/tracer.h>
|
||||
#include <torch/csrc/jit/frontend/tracer.h>
|
||||
|
||||
struct THPSize {
|
||||
PyTupleObject tuple;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <torch/csrc/WindowsTorchApiMacro.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <c10/core/Device.h>
|
||||
#include <torch/csrc/WindowsTorchApiMacro.h>
|
||||
#include <torch/types.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <torch/csrc/WindowsTorchApiMacro.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/jit.h>
|
||||
|
||||
#include <torch/csrc/jit/script/ir_emitter.h>
|
||||
#include <torch/csrc/jit/frontend/ir_emitter.h>
|
||||
#include <ATen/core/stack.h>
|
||||
|
||||
#include <memory>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/pickler.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickler.h>
|
||||
#include <torch/serialize.h>
|
||||
|
||||
#include <vector>
|
||||
|
@ -3,8 +3,8 @@
|
||||
#include <torch/types.h>
|
||||
#include <torch/utils.h>
|
||||
|
||||
#include <torch/csrc/jit/import.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/serialization/import.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
#include <caffe2/serialize/read_adapter_interface.h>
|
||||
#include <c10/util/Exception.h>
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
#include <torch/types.h>
|
||||
#include <torch/utils.h>
|
||||
|
||||
#include <torch/csrc/jit/export.h>
|
||||
#include <torch/csrc/jit/script/module.h>
|
||||
#include <torch/csrc/jit/serialization/export.h>
|
||||
#include <torch/csrc/jit/api/module.h>
|
||||
|
||||
#include <c10/util/Exception.h>
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
#include <torch/csrc/autograd/generated/Functions.h>
|
||||
#include <torch/csrc/autograd/functions/tensor.h>
|
||||
#include <torch/csrc/autograd/functions/basic_ops.h>
|
||||
#include <torch/csrc/jit/tracer.h>
|
||||
#include <torch/csrc/jit/constants.h>
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/frontend/tracer.h>
|
||||
#include <torch/csrc/jit/ir/constants.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
|
||||
#include <torch/csrc/utils/variadic.h>
|
||||
#include <torch/csrc/autograd/functions/utils.h>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#ifdef USE_DISTRIBUTED
|
||||
#include <torch/csrc/distributed/autograd/functions/sendrpc_backward.h>
|
||||
#endif
|
||||
#include <torch/csrc/jit/python_tracer.h>
|
||||
#include <torch/csrc/jit/python/python_tracer.h>
|
||||
#include <torch/csrc/utils/pybind.h>
|
||||
#include <torch/csrc/utils/python_strings.h>
|
||||
#include <torch/csrc/utils/python_numbers.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <torch/csrc/autograd/profiler.h>
|
||||
#include <torch/csrc/jit/code_template.h>
|
||||
#include <torch/csrc/jit/frontend/code_template.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <list>
|
||||
|
@ -17,9 +17,9 @@
|
||||
#include <torch/csrc/autograd/python_hook.h>
|
||||
#include <torch/csrc/autograd/saved_variable.h>
|
||||
#include <torch/csrc/autograd/python_anomaly_mode.h>
|
||||
#include <torch/csrc/jit/tracer.h>
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/python_tracer.h>
|
||||
#include <torch/csrc/jit/frontend/tracer.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/jit/python/python_tracer.h>
|
||||
#include <torch/csrc/DynamicTypes.h>
|
||||
#include <torch/csrc/Exceptions.h>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <torch/csrc/autograd/python_function.h>
|
||||
#include <torch/csrc/autograd/python_variable.h>
|
||||
#include <torch/csrc/tensor/python_tensor.h>
|
||||
#include <torch/csrc/jit/tracer.h>
|
||||
#include <torch/csrc/jit/frontend/tracer.h>
|
||||
|
||||
using namespace at;
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <torch/csrc/utils/python_strings.h>
|
||||
#include <torch/csrc/utils/python_arg_parser.h>
|
||||
#include <torch/csrc/utils/tensor_new.h>
|
||||
#include <torch/csrc/jit/tracer.h>
|
||||
#include <torch/csrc/jit/frontend/tracer.h>
|
||||
#include <ATen/NamedTensorUtils.h>
|
||||
|
||||
#include <ATen/ATen.h>
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include <torch/csrc/utils/python_compat.h>
|
||||
#include <torch/csrc/utils/python_numbers.h>
|
||||
#include <torch/csrc/utils/tensor_new.h>
|
||||
#include <torch/csrc/jit/tracer.h>
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/frontend/tracer.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/utils/tensor_types.h>
|
||||
|
||||
#include <ATen/DeviceGuard.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <ATen/cpp_custom_type_hack.h>
|
||||
#include <torch/csrc/autograd/record_function.h>
|
||||
#include <torch/csrc/jit/custom_operator.h>
|
||||
#include <torch/csrc/jit/runtime/custom_operator.h>
|
||||
|
||||
namespace caffe2 {
|
||||
// Required for cpp_custom_type_hack to work
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/onnx/onnx.h>
|
||||
#include <vector>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <torch/csrc/autograd/python_cpp_function.h>
|
||||
#include <torch/csrc/distributed/autograd/context/container.h>
|
||||
#include <torch/csrc/distributed/autograd/engine/dist_engine.h>
|
||||
#include <torch/csrc/jit/pybind_utils.h>
|
||||
#include <torch/csrc/jit/python/pybind_utils.h>
|
||||
#include <torch/csrc/python_headers.h>
|
||||
#include <torch/csrc/utils/object_ptr.h>
|
||||
#include <torch/csrc/utils/pybind.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/csrc/distributed/autograd/rpc_messages/cleanup_autograd_context_req.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/csrc/distributed/autograd/rpc_messages/propagate_gradients_req.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <c10/util/C++17.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/distributed/rpc/utils.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
#include <torch/csrc/utils/byte_order.h>
|
||||
|
||||
namespace torch {
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <torch/csrc/distributed/rpc/rref_context.h>
|
||||
#include <torch/csrc/distributed/rpc/torchscript_functions.h>
|
||||
#include <torch/csrc/distributed/rpc/types.h>
|
||||
#include <torch/csrc/jit/pybind_utils.h>
|
||||
#include <torch/csrc/jit/python/pybind_utils.h>
|
||||
#include <torch/csrc/utils/object_ptr.h>
|
||||
#include <torch/csrc/utils/pybind.h>
|
||||
#include <torch/csrc/utils/python_compat.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <torch/csrc/distributed/rpc/python_functions.h>
|
||||
#include <torch/csrc/distributed/rpc/python_rpc_handler.h>
|
||||
#include <torch/csrc/distributed/rpc/rref_context.h>
|
||||
#include <torch/csrc/jit/pybind_utils.h>
|
||||
#include <torch/csrc/jit/python/pybind_utils.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <torch/csrc/distributed/rpc/script_remote_call.h>
|
||||
#include <torch/csrc/distributed/rpc/script_resp.h>
|
||||
#include <torch/csrc/distributed/rpc/utils.h>
|
||||
#include <torch/csrc/jit/pybind_utils.h>
|
||||
#include <torch/csrc/jit/python/pybind_utils.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/csrc/distributed/rpc/python_remote_call.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <torch/csrc/distributed/rpc/message.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_command_base.h>
|
||||
#include <torch/csrc/distributed/rpc/types.h>
|
||||
#include <torch/csrc/jit/pickler.h>
|
||||
#include <torch/csrc/jit/serialization/pickler.h>
|
||||
#include <vector>
|
||||
|
||||
namespace torch {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/csrc/distributed/rpc/python_rpc_handler.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/jit/pybind_utils.h>
|
||||
#include <torch/csrc/jit/python/pybind_utils.h>
|
||||
#include <torch/csrc/utils/python_compat.h>
|
||||
|
||||
namespace torch {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <torch/csrc/distributed/rpc/message.h>
|
||||
#include <torch/csrc/distributed/rpc/types.h>
|
||||
#include <torch/csrc/jit/script/script_type_parser.h>
|
||||
#include <torch/csrc/jit/frontend/script_type_parser.h>
|
||||
#include <torch/csrc/utils/pybind.h>
|
||||
|
||||
namespace torch {
|
||||
@ -96,7 +96,7 @@ class PYBIND11_EXPORT PythonRpcHandler {
|
||||
|
||||
// Shared ptr to python compilation unit in jit, it is constructed in python
|
||||
// side (see _python_cu = torch._C.CompilationUnit() in jit/__init__.py)
|
||||
// and imported in C++ (see get_python_cu() in csrc/jit/pybind_utils.h).
|
||||
// and imported in C++ (see get_python_cu() in csrc/jit/python/pybind_utils.h).
|
||||
// We import the compilation unit here only once for less cost and thread
|
||||
// safety.
|
||||
std::shared_ptr<torch::jit::script::CompilationUnit> jitCompilationUnit_;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <torch/csrc/distributed/rpc/script_remote_call.h>
|
||||
#include <torch/csrc/distributed/rpc/script_resp.h>
|
||||
#include <torch/csrc/distributed/rpc/utils.h>
|
||||
#include <torch/csrc/jit/pybind_utils.h>
|
||||
#include <torch/csrc/jit/python/pybind_utils.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/csrc/distributed/rpc/rref_proto.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
|
||||
#include <limits>
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
#include <torch/csrc/distributed/rpc/message.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_command_base.h>
|
||||
#include <torch/csrc/distributed/rpc/types.h>
|
||||
#include <torch/csrc/jit/operator.h>
|
||||
#include <torch/csrc/jit/pickler.h>
|
||||
#include <torch/csrc/jit/runtime/operator.h>
|
||||
#include <torch/csrc/jit/serialization/pickler.h>
|
||||
#include <vector>
|
||||
|
||||
namespace torch {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <torch/csrc/distributed/rpc/script_call.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -3,8 +3,8 @@
|
||||
#include <c10/util/Optional.h>
|
||||
#include <torch/csrc/distributed/rpc/message.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_command_base.h>
|
||||
#include <torch/csrc/jit/operator.h>
|
||||
#include <torch/csrc/jit/pickler.h>
|
||||
#include <torch/csrc/jit/runtime/operator.h>
|
||||
#include <torch/csrc/jit/serialization/pickler.h>
|
||||
#include <vector>
|
||||
|
||||
namespace torch {
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
|
||||
#include <c10/util/C++17.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include <torch/csrc/distributed/rpc/script_call.h>
|
||||
#include <torch/csrc/distributed/rpc/types.h>
|
||||
#include <torch/csrc/jit/operator.h>
|
||||
#include <torch/csrc/jit/pickler.h>
|
||||
#include <torch/csrc/jit/runtime/operator.h>
|
||||
#include <torch/csrc/jit/serialization/pickler.h>
|
||||
#include <vector>
|
||||
|
||||
namespace torch {
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include <c10/util/C++17.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_agent.h>
|
||||
#include <torch/csrc/jit/pickle.h>
|
||||
#include <torch/csrc/jit/unpickler.h>
|
||||
#include <torch/csrc/jit/serialization/pickle.h>
|
||||
#include <torch/csrc/jit/serialization/unpickler.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <torch/csrc/distributed/rpc/message.h>
|
||||
#include <torch/csrc/distributed/rpc/rpc_command_base.h>
|
||||
#include <torch/csrc/jit/pickler.h>
|
||||
#include <torch/csrc/jit/serialization/pickler.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include <torch/csrc/distributed/rpc/script_call.h>
|
||||
#include <torch/csrc/distributed/rpc/script_remote_call.h>
|
||||
#include <torch/csrc/distributed/rpc/script_resp.h>
|
||||
#include <torch/csrc/jit/pickler.h>
|
||||
#include <torch/csrc/jit/unpickler.h>
|
||||
#include <torch/csrc/jit/serialization/pickler.h>
|
||||
#include <torch/csrc/jit/serialization/unpickler.h>
|
||||
|
||||
namespace torch {
|
||||
namespace distributed {
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include <c10/util/Exception.h>
|
||||
#include <torch/csrc/jit/function.h>
|
||||
#include <torch/csrc/jit/graph_executor.h>
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/source_range.h>
|
||||
#include <torch/csrc/jit/api/function.h>
|
||||
#include <torch/csrc/jit/runtime/graph_executor.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/jit/frontend/source_range.h>
|
||||
|
||||
#include <torch/csrc/WindowsTorchApiMacro.h>
|
||||
#include <torch/csrc/utils/memory.h>
|
@ -1,7 +1,7 @@
|
||||
#include <torch/csrc/jit/function.h>
|
||||
#include <torch/csrc/jit/api/function.h>
|
||||
#include <torch/csrc/jit/passes/inliner.h>
|
||||
|
||||
#include <torch/csrc/jit/script/error_report.h>
|
||||
#include <torch/csrc/jit/frontend/error_report.h>
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <torch/csrc/jit/graph_executor.h>
|
||||
#include <torch/csrc/jit/ir.h>
|
||||
#include <torch/csrc/jit/runtime/graph_executor.h>
|
||||
#include <torch/csrc/jit/ir/ir.h>
|
||||
#include <torch/csrc/utils/memory.h>
|
||||
#include <mutex>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user