pytorch/caffe2/core
Hao Lu 51bf7bed84 [caffe2] Allow memonger to optimize nets with inplace(enforced) ops (#46560)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46560

Follow-up for D24236604 (16c52d918b).

For nets that pass the schema check, memonger actually makes sure to preserve the inplaceness of operators if they are already inplace. So we can safely enable it for correct input nets.

(Note: this ignores all push blocking failures!)

Differential Revision: D24402482

fbshipit-source-id: a7e95cb0e3eb87adeac79b9b69eef207957b0bd5
2020-10-22 13:23:33 -07:00
..
hip Replace caffe2::DeviceGuard with c10::cuda::CUDAGuard (#17623) 2019-03-06 10:48:15 -08:00
nomnigraph Remove __future__ imports for legacy Python2 supports (#45033) 2020-09-23 17:57:02 -07:00
__init__.py remediation of S205607 2020-07-17 17:19:47 -07:00
allocator.cc unify c2 and TH allocator (#16892) 2019-02-12 21:16:34 -08:00
allocator.h unify c2 and TH allocator (#16892) 2019-02-12 21:16:34 -08:00
blob_gpu_test.cc Replace caffe2::DeviceGuard with c10::cuda::CUDAGuard (#17623) 2019-03-06 10:48:15 -08:00
blob_serialization_gpu.cc Remove template parameter from Tensor (#9939) 2018-07-27 10:56:39 -07:00
blob_serialization.cc [MemLeak] Fix memory leak from releasing unique ptr (#41883) 2020-07-22 16:54:19 -07:00
blob_serialization.h Fix typos, via a Levenshtein-type corrector (#31523) 2020-01-17 16:03:19 -08:00
blob_serializer_base.h Serialization takes pointers instead of Blob (#11925) 2018-10-17 11:50:34 -07:00
blob_stats.cc codemod -d caffe2 --extensions cc,h CaffeTypeId TypeIdentifier (#10166) 2018-08-02 11:54:30 -07:00
blob_stats.h Fix include paths for typeid.h (#13689) 2018-11-14 18:04:09 -08:00
blob_test.cc [caffe2] Enable copying for caffe2::Tensor (#36468) 2020-04-13 21:41:52 -07:00
blob.h Adding quantized tensor shape/type info support for caffe2=>glow in caffe2 side (#18621) 2019-03-31 17:42:27 -07:00
CMakeLists.txt Compile less legacy code when BUILD_CAFFE2 is set to False (take 2) (#44453) 2020-09-11 16:27:47 -07:00
common_cudnn.cc Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
common_cudnn.h Fix signed-unsigned warnings (#34791) 2020-03-19 00:29:56 -07:00
common_gpu.cc [c10/cuda] Reorganize device_count() and robustly surface ASAN warnings (#42249) 2020-08-05 11:39:31 -07:00
common_gpu.h Clarify timing of GetDeviceProperty() (#46715) 2020-10-22 11:29:31 -07:00
common_omp.h Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
common_test.cc Windows shared build (#13550) 2018-11-16 12:16:28 -08:00
common.cc [Caffe2] Enabling AMD GPU Backend for Caffe2 (#7955) 2018-06-04 09:04:30 -07:00
common.h fix windows clang attributes (#33959) 2020-03-02 13:20:51 -08:00
context_base.cc Remove Tensor.h, TensorMethods.h from src/core. (#27086) 2019-10-06 09:37:50 -07:00
context_base.h Fix is_fundamental template for MSVC (#30959) 2019-12-19 12:10:22 -08:00
context_gpu_test.cc Replace caffe2::DeviceGuard with c10::cuda::CUDAGuard (#17623) 2019-03-06 10:48:15 -08:00
context_gpu.cu [c10/cuda] Reorganize device_count() and robustly surface ASAN warnings (#42249) 2020-08-05 11:39:31 -07:00
context_gpu.h Do not throw from CUDAContext destructor (#34756) 2020-03-18 00:13:18 -07:00
context_test.cc unify c2 and TH allocator (#16892) 2019-02-12 21:16:34 -08:00
context.cc Change Tensor::CopyFrom to a simple double dispatch (#14268) 2018-11-28 15:45:37 -08:00
context.h caffe2: use at::mt19937 instead of std::mt19937 (10x speedup) (#43987) 2020-10-16 16:08:35 -07:00
cudnn_wrappers.h Replace caffe2::DeviceGuard with c10::cuda::CUDAGuard (#17623) 2019-03-06 10:48:15 -08:00
db.cc Properly format db.h and db.cc (#43027) 2020-08-24 18:29:45 -07:00
db.h Properly format db.h and db.cc (#43027) 2020-08-24 18:29:45 -07:00
distributions_stubs.h caffe2: use at::mt19937 instead of std::mt19937 (10x speedup) (#43987) 2020-10-16 16:08:35 -07:00
event_cpu.h Delete unnecessary include from allocator.cc/event_cpu.h 2018-09-19 16:45:54 -07:00
event_gpu_test.cc caffe2::DeviceType -> at::DeviceType (#11254) 2018-09-05 16:28:09 -07:00
event_gpu.cc Add error message if CUDA startup fails (#29670) 2019-11-13 16:48:40 -08:00
event_test.cc caffe2/event: allow multiple errors such as when cancelled (#31335) 2019-12-18 13:10:57 -08:00
event.cc caffe2/event: allow multiple errors such as when cancelled (#31335) 2019-12-18 13:10:57 -08:00
event.h Back out "Revert D20449887: [dt][caffe2] enable using smart exceptions in async nets" (#36172) 2020-04-13 11:31:52 -07:00
export_c10_op_to_caffe2.cc Rename caffe2<->c10 operator wrappers (#21322) 2019-06-07 13:48:10 -07:00
export_c10_op_to_caffe2.h Remove callBoxedWorkaround (#36850) 2020-04-24 23:13:31 -07:00
export_caffe2_op_to_c10.h [c10] Fix the hanlding for Caffe2 ops which return tensor list (#36841) 2020-04-18 13:30:43 -07:00
flags.h move flags to c10 (#12144) 2018-10-04 02:09:56 -07:00
graph_test.cc Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
graph.cc Replace direct include of caffe2.pb.h with an intermediary header caffe2_pb.h (#10946) 2018-08-28 11:57:08 -07:00
graph.h Replace direct include of caffe2.pb.h with an intermediary header caffe2_pb.h (#10946) 2018-08-28 11:57:08 -07:00
init_denormals.cc add denormal options (ftz and daz) 2018-12-20 17:04:39 -08:00
init_intrinsics_check.cc cleanup warnings 2019-08-12 16:12:30 -07:00
init_omp.cc Using c10 namespace across caffe2. (#12714) 2018-10-17 12:57:19 -07:00
init_test.cc Allow for registration after GlobalInit (#15876) 2019-01-10 09:35:33 -08:00
init.cc Update intra_inter_benchmark (#22051) 2019-06-21 23:06:27 -07:00
init.h Update intra_inter_benchmark (#22051) 2019-06-21 23:06:27 -07:00
int8_serialization.cc Fix include paths for typeid.h (#13689) 2018-11-14 18:04:09 -08:00
logging.h Moving logging from caffe2 to c10. (#12881) 2018-10-19 20:22:08 -07:00
macros.h Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
macros.h.in [pytorch] deprecate static dispatch (#43564) 2020-08-27 14:52:48 -07:00
memonger.cc [caffe2] Allow memonger to optimize nets with inplace(enforced) ops (#46560) 2020-10-22 13:23:33 -07:00
memonger.h [caffe2] Allow memonger to optimize nets with inplace(enforced) ops (#46560) 2020-10-22 13:23:33 -07:00
module_test.cc Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
module.cc Allow checking for cached module before asserting (#33954) 2020-03-02 15:43:50 -08:00
module.h cleanup warnings 2019-08-12 16:12:30 -07:00
net_async_base.cc Back out "Revert D20449887: [dt][caffe2] enable using smart exceptions in async nets" (#36172) 2020-04-13 11:31:52 -07:00
net_async_base.h Back out "Revert D20449887: [dt][caffe2] enable using smart exceptions in async nets" (#36172) 2020-04-13 11:31:52 -07:00
net_async_scheduling.cc [caffe2] adds Cancel to OperatorBase and NetBase (#44145) 2020-09-11 12:50:26 -07:00
net_async_scheduling.h caffe2/core/plan_executor: add cancellation of async nets on error + propagate exceptions via std::exception_ptr for stack traces (#31966) 2020-04-09 14:38:18 -07:00
net_async_task_future.cc Replace c10::guts::stuff with std::stuff (#30915) 2019-12-16 13:57:19 -08:00
net_async_task_future.h Back out "Revert D13043261: [caffe2] Task graph and task future abstractions in executor" 2018-12-10 19:30:58 -08:00
net_async_task_graph.cc Replace c10::guts::stuff with std::stuff (#30915) 2019-12-16 13:57:19 -08:00
net_async_task_graph.h Back out "Revert D13043261: [caffe2] Task graph and task future abstractions in executor" 2018-12-10 19:30:58 -08:00
net_async_task.cc Fix signed-unsigned warnings (#34791) 2020-03-19 00:29:56 -07:00
net_async_task.h Back out "Revert D13043261: [caffe2] Task graph and task future abstractions in executor" 2018-12-10 19:30:58 -08:00
net_async_tracing_test.cc AsyncNet: option for time based tracing and trace path (#13440) 2018-11-08 11:34:34 -08:00
net_async_tracing.cc Fix typos, via a Levenshtein-type corrector (#31523) 2020-01-17 16:03:19 -08:00
net_async_tracing.h Add batch id to tracer event (#21446) 2019-06-13 17:13:42 -07:00
net_dag_utils_test.cc New chaining/partitioning algorithm for async_scheduling for inference (#11957) 2018-10-08 12:24:52 -07:00
net_dag_utils.cc Fix typos (#30606) 2019-12-02 20:17:42 -08:00
net_dag_utils.h Back out "[nomnigraph][executor] computeChains with nomnigraph" (#15451) 2018-12-21 11:09:27 -08:00
net_gpu_test.cc Remove unused executors, part 3 (#14199) 2018-11-26 19:10:43 -08:00
net_parallel.cc Fix signed-unsigned warnings (#34791) 2020-03-19 00:29:56 -07:00
net_parallel.h TBB task graph (#15041) 2018-12-10 21:35:04 -08:00
net_simple_refcount_test.cc Remove unused executors, part 3 (#14199) 2018-11-26 19:10:43 -08:00
net_simple_refcount.cc Fix signed-unsigned warnings (#34791) 2020-03-19 00:29:56 -07:00
net_simple_refcount.h net_simple_refcount type to help experimentation with dynamic allocation. (#13370) 2018-10-31 15:59:16 -07:00
net_simple.cc Wait for all op types in SimpleNet (#39493) 2020-06-11 13:00:34 -07:00
net_simple.h Move registry fully to c10 (#12077) 2018-09-27 03:09:54 -07:00
net_test.cc Back out "Revert D20449887: [dt][caffe2] enable using smart exceptions in async nets" (#36172) 2020-04-13 11:31:52 -07:00
net.cc [caffe2] adds Cancel to OperatorBase and NetBase (#44145) 2020-09-11 12:50:26 -07:00
net.h [caffe2] adds Cancel to OperatorBase and NetBase (#44145) 2020-09-11 12:50:26 -07:00
numa.cc Move numa.{h, cc} to c10/util (#15024) 2018-12-12 12:21:10 -08:00
numa.h Move numa.{h, cc} to c10/util (#15024) 2018-12-12 12:21:10 -08:00
observer_test.cc Replace c10::guts::stuff with std::stuff (#30915) 2019-12-16 13:57:19 -08:00
observer.h Unify all *_EXPORT and *_IMPORT macros across c++ backend (#12019) 2018-09-25 17:41:05 -07:00
operator_gpu_test.cc caffe2::DeviceType -> at::DeviceType (#11254) 2018-09-05 16:28:09 -07:00
operator_gradient.h Fix "missing return statement" warning (#22216) 2019-06-25 16:57:42 -07:00
operator_schema_test.cc Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
operator_schema.cc Move OperatorSchema default inference function implementations to .cc… (#40845) 2020-07-01 11:42:52 -07:00
operator_schema.h Move OperatorSchema default inference function implementations to .cc… (#40845) 2020-07-01 11:42:52 -07:00
operator_test.cc Make msg() and msg_with_backtrace() private (#37094) 2020-05-04 11:54:34 -07:00
operator.cc Move OperatorBase::AddRelatedBlobInfo implementation to .cc file (#40844) 2020-07-01 11:48:15 -07:00
operator.h [caffe2] adds Cancel to OperatorBase and NetBase (#44145) 2020-09-11 12:50:26 -07:00
parallel_net_test.cc [Caffe2] Increase timing threshold to 50 ms on Windows (#37892) 2020-05-05 19:45:36 -07:00
plan_executor_test.cc caffe2/plan_executor: propagate exceptions from reporter substeps (#46424) 2020-10-16 12:28:57 -07:00
plan_executor.cc caffe2/plan_executor: propagate exceptions from reporter substeps (#46424) 2020-10-16 12:28:57 -07:00
plan_executor.h Remove unused feature: num PS tuning 2018-07-11 18:54:45 -07:00
prof_dag_counters.cc Fix signed-unsigned warnings (#34791) 2020-03-19 00:29:56 -07:00
prof_dag_counters.h Fix signed-unsigned warnings (#34791) 2020-03-19 00:29:56 -07:00
qtensor_serialization.cc Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
qtensor_serialization.h Guard all Caffe2 protobuf string serializations with CAFFE_ENFORCE (fixed reverted bug) (#12848) 2018-10-23 16:21:26 -07:00
qtensor.cc Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
qtensor.h rest of uses for deprecation of dims() in Tensor (#16118) 2019-01-18 11:52:12 -08:00
scope_guard.h Fix typos, via a Levenshtein-type corrector (#31523) 2020-01-17 16:03:19 -08:00
static_tracepoint_elfx86.h Fix typos, via a Levenshtein-type corrector (#31523) 2020-01-17 16:03:19 -08:00
static_tracepoint.h Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
stats_test.cc Add CAFFE_STATIC_EVENT to Stats (#9501) 2018-07-19 16:25:59 -07:00
stats.cc Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
stats.h Add full namespace resolution in CAFFE_DURATION (#12065) 2018-09-26 13:29:18 -07:00
storage.h Move files to/from c10/core and c10/util (#15316) 2019-01-10 16:22:22 -08:00
tensor_impl.h Remove Tensor.h, TensorMethods.h from src/core. (#27086) 2019-10-06 09:37:50 -07:00
tensor_int8.cc Fix include paths for typeid.h (#13689) 2018-11-14 18:04:09 -08:00
tensor_int8.h Replace direct include of caffe2.pb.h with an intermediary header caffe2_pb.h (#10946) 2018-08-28 11:57:08 -07:00
tensor.cc Remove datatype from Storage and StorageImpl (#38870) 2020-05-21 15:26:08 -07:00
tensor.h Remove hacky_wrapper from BackendSelect kernels (#44062) 2020-09-25 09:04:03 -07:00
test_utils.cc C++ C2/Glow operator unittest 2020-01-17 12:13:34 -08:00
test_utils.h C++ C2/Glow operator unittest 2020-01-17 12:13:34 -08:00
timer_test.cc Increase TimerTest tolerance to 20% on Windows (#35818) 2020-04-01 14:29:05 -07:00
timer.h Unify all *_EXPORT and *_IMPORT macros across c++ backend (#12019) 2018-09-25 17:41:05 -07:00
transform_test.cc fixup unit tests (#34105) 2020-03-03 10:33:21 -08:00
transform.cc Move registry fully to c10 (#12077) 2018-09-27 03:09:54 -07:00
transform.h Move registry fully to c10 (#12077) 2018-09-27 03:09:54 -07:00
types.cc Add support to serialize qtensor in JIT. (#23356) 2019-07-26 15:52:15 -07:00
types.h move GetDimFromOrderString to caffe2/core/types.h (#25671) 2019-09-05 04:32:04 -07:00
workspace_test.cc Print blob sizes on fatal signal (#10766) 2018-08-23 13:39:55 -07:00
workspace.cc Wait for all op types in SimpleNet (#39493) 2020-06-11 13:00:34 -07:00
workspace.h Fix typos, via a Levenshtein-type corrector (#31523) 2020-01-17 16:03:19 -08:00