pytorch/caffe2/core
Sebastian Messmer ed207b53ab c10::KernelFunction (#26337)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26337

- Factor out boxing and unboxing functionality from the c10 dispatcher into a c10::KernelFunction class
- Move that class and everything else it depends on into ATen/core/boxing
- This also allows us to get rid of c10::KernelCache. Instead, we now store a pointer to the unboxed functor in c10::KernelFunction.
- We're also getting rid of the DispatchTableEntry struct and instead store KernelFunction directly.
- To make this work, we need to change the dispatcher calling API from Dispatcher::lookup().callBoxed/callUnboxed and OperatorEntry::lookup().callBoxed/callUnboxed to Dispatcher::callBoxed/callUnboxed and OperatorEntry::callBoxed/callUnboxed.

ghstack-source-id: 90459911

Test Plan: unit tests

Differential Revision: D17416607

fbshipit-source-id: fd221f1d70eb3f1b4d33092eaa7e37d25684c934
2019-09-20 18:55:25 -07:00
..
hip
nomnigraph cleanup warnings 2019-08-12 16:12:30 -07:00
__init__.py
allocator.cc
allocator.h
asan.h
blob.h Adding quantized tensor shape/type info support for caffe2=>glow in caffe2 side (#18621) 2019-03-31 17:42:27 -07:00
blob_gpu_test.cc
blob_serialization.cc
blob_serialization.h fix -Wsign-compare warnings for some files inside c2 (#18123) 2019-03-19 10:39:20 -07:00
blob_serialization_gpu.cc
blob_serializer_base.h
blob_stats.cc
blob_stats.h
blob_test.cc
CMakeLists.txt get rid of protobuf dependencies (#25650) 2019-09-06 08:48:20 -07:00
common.cc
common.h Torch rename (#20774) 2019-06-12 20:12:34 -07:00
common_cudnn.cc
common_cudnn.h
common_gpu.cc switch to rocThrust for thrust/cub APIs (#25620) 2019-09-03 22:16:30 -07:00
common_gpu.h Torch rename (#20774) 2019-06-12 20:12:34 -07:00
common_omp.h
common_test.cc
context.cc
context.h
context_base.cc
context_base.h
context_gpu.cu Lightweight at-most-once logging for API usage (#20745) 2019-05-23 23:17:59 -07:00
context_gpu.h
context_gpu_test.cc
context_test.cc
cudnn_wrappers.h
db.cc
db.h Change message on unknown db type to be friendly (#17795) 2019-03-08 10:46:24 -08:00
event.cc
event.h
event_cpu.h
event_gpu.cc
event_gpu_test.cc
event_test.cc
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 c10::KernelFunction (#26337) 2019-09-20 18:55:25 -07:00
export_caffe2_op_to_c10.h c10::KernelFunction (#26337) 2019-09-20 18:55:25 -07:00
flags.h
graph.cc
graph.h
graph_test.cc
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
init_denormals.cc
init_intrinsics_check.cc cleanup warnings 2019-08-12 16:12:30 -07:00
init_omp.cc
init_test.cc
int8_serialization.cc
logging.h
macros.h
macros.h.in Revert D16929363: Revert D16048264: Add static dispatch mode to reduce mobile code size 2019-08-20 17:08:31 -07:00
memonger.cc
memonger.h
module.cc cleanup warnings 2019-08-12 16:12:30 -07:00
module.h cleanup warnings 2019-08-12 16:12:30 -07:00
module_test.cc
net.cc Lightweight at-most-once logging for API usage (#20745) 2019-05-23 23:17:59 -07:00
net.h Removing cyclic dependency (#20511) 2019-05-14 18:55:19 -07:00
net_async_base.cc Add batch id to tracer event (#21446) 2019-06-13 17:13:42 -07:00
net_async_base.h Allow TensorMethods.h to include Dispatcher.h (alternative) (#23888) 2019-09-04 01:35:19 -07:00
net_async_scheduling.cc add cancelAsyncCallback method to OperatorBase (#21492) 2019-06-06 20:57:12 -07:00
net_async_scheduling.h
net_async_task.cc
net_async_task.h
net_async_task_future.cc cleanup warnings 2019-08-12 16:12:30 -07:00
net_async_task_future.h
net_async_task_graph.cc
net_async_task_graph.h
net_async_tracing.cc Add batch id to tracer event (#21446) 2019-06-13 17:13:42 -07:00
net_async_tracing.h Add batch id to tracer event (#21446) 2019-06-13 17:13:42 -07:00
net_async_tracing_test.cc
net_dag_utils.cc Back out "Back out "[Caffe2] Fix device_option propagation"" (#25908) 2019-09-17 04:01:36 -07:00
net_dag_utils.h
net_dag_utils_test.cc
net_gpu_test.cc
net_parallel.cc Open registration for c10 thread pool (#17788) 2019-03-08 15:38:41 -08:00
net_parallel.h
net_simple.cc Back out "Back out "[Caffe2] Fix device_option propagation"" (#25908) 2019-09-17 04:01:36 -07:00
net_simple.h
net_simple_refcount.cc
net_simple_refcount.h
net_simple_refcount_test.cc
net_test.cc
numa.cc
numa.h
observer.h
observer_test.cc
operator.cc use feenableexcept when glibc is available (#22241) 2019-07-02 10:49:55 -07:00
operator.h tvm operator dynolog (#26295) 2019-09-18 18:37:17 -07:00
operator_gpu_test.cc
operator_gradient.h Fix "missing return statement" warning (#22216) 2019-06-25 16:57:42 -07:00
operator_schema.cc
operator_schema.h Verify def before infer fensor (#18129) 2019-03-22 06:36:25 -07:00
operator_schema_test.cc
operator_test.cc Register gradient op with engine (#21205) 2019-05-31 18:48:47 -07:00
parallel_net_test.cc
plan_executor.cc Fix spelling errors (#21665) 2019-06-13 15:21:55 -07:00
plan_executor.h
prof_dag_counters.cc Added engine information to the profiling result. (#20493) 2019-05-28 16:41:12 -07:00
prof_dag_counters.h
qtensor.cc
qtensor.h
qtensor_serialization.cc
qtensor_serialization.h
scope_guard.h
static_tracepoint.h
static_tracepoint_elfx86.h
stats.cc
stats.h
stats_test.cc
storage.h
tensor.cc Pass Variable into Caffe2 ops, by requiring that the Variable doesn't require grad (#22473) 2019-07-08 11:31:10 -07:00
tensor.h Call aten ops through c10 dispatcher (#23668) 2019-09-15 01:18:07 -07:00
tensor_impl.h
tensor_int8.cc
tensor_int8.h
test_utils.cc Fuse to individual operators to GatherFuse8BitRowwiseQuantFloatMulLengthElim (#25519) 2019-09-03 19:08:49 -07:00
test_utils.h Expose test utils (#20114) 2019-05-06 07:06:04 -07:00
timer.h
timer_test.cc
transform.cc
transform.h
transform_test.cc
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.cc
workspace.h Fix workspace destruction ordering (#23096) 2019-07-19 16:49:50 -07:00
workspace_test.cc