pytorch/torch/csrc/utils
Wang, Eikan 978b572652 Add registration API for torch.compile-eager (#121387)
This PR is a follow-up of RFC https://github.com/pytorch/pytorch/issues/115545.

In this PR, we intend to provide a registration API dedicated to eager-through-torch.compile. The major workflow of this API will be as follows.

- Load cache
- Check cache according to the input tensors
  - Cache Hit: Run the cached kernel directly
  - Cache Miss: Run the AOTI to produce kernel and run the produced kernel. If AOTI fails to produce the kernel, invoke the python fallback function.

Currently, this PR always fallback to python kernel now and cache mechanism will be implemented in another PR - https://github.com/pytorch/pytorch/pull/116368

Differential Revision: [D57164385](https://our.internmc.facebook.com/intern/diff/D57164385)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121387
Approved by: https://github.com/desertfire, https://github.com/jansel, https://github.com/zou3519, https://github.com/jgong5
2024-05-10 00:30:27 +00:00
..
byte_order.cpp
byte_order.h
cpp_stacktraces.cpp Revert "Fast standalone symbolize for unwinding (#123966)" 2024-04-25 10:04:48 +00:00
cpp_stacktraces.h Revert "Fast standalone symbolize for unwinding (#123966)" 2024-04-25 10:04:48 +00:00
cuda_enabled.h
device_lazy_init.cpp Avoid cuda init to FakeTensorMode (#124413) 2024-04-19 02:39:35 +00:00
device_lazy_init.h Avoid cuda init to FakeTensorMode (#124413) 2024-04-19 02:39:35 +00:00
disable_torch_function.cpp Revert "[Exception] [6/N] Remove use of torch::TypeError (#117964)" 2024-01-27 08:44:34 +00:00
disable_torch_function.h
init.cpp
init.h
invalid_arguments.cpp
invalid_arguments.h
nested.cpp
nested.h
numpy_stub.h
object_ptr.cpp
object_ptr.h
out_types.cpp
out_types.h
pybind.cpp Make c10::SymInt typecaster support scalar-like fake tensor (#117454) 2024-01-14 15:15:29 +00:00
pybind.h Fix refcount handling for dtype, layout and memory format (#125271) 2024-05-02 02:34:34 +00:00
pycfunction_helpers.h
pyobject_preservation.cpp
pyobject_preservation.h
python_arg_parser.cpp [TorchGen] Use std::optional in generated code (#121454) 2024-03-29 14:11:09 +00:00
python_arg_parser.h [codemod][lowrisk] Remove unused exception parameter from caffe2/caffe2/image/image_input_op.h (#123056) 2024-04-04 17:24:43 +00:00
python_compat.h
python_dispatch.cpp Add registration API for torch.compile-eager (#121387) 2024-05-10 00:30:27 +00:00
python_dispatch.h Add OpOverload.redispatch; use it in new custom ops API (#124089) 2024-04-18 12:48:04 +00:00
python_numbers.h [DeviceIndex][3/N] Use DeviceIndex in more places (#119635) 2024-02-12 21:31:27 +00:00
python_raii.h
python_scalars.h Avoid COW materialize in various operations (#119506) 2024-02-09 14:47:19 +00:00
python_strings.h
python_stub.h
python_symnode.cpp
python_symnode.h Add is_nested_int() (#119975) 2024-02-21 21:10:02 +00:00
python_torch_function_mode.h
python_tuples.h
pythoncapi_compat.h
schema_info.cpp
schema_info.h
six.h
structseq.cpp
structseq.h
tensor_apply.cpp [Exception] [3/N] Replace torch::NotImplementedError and torch::LinAlgError with C10 counterparts. (#116824) 2024-01-11 11:27:04 +00:00
tensor_apply.h
tensor_dtypes.cpp Add uint1 to uint7 dtypes (#117208) 2024-01-13 01:09:23 +00:00
tensor_dtypes.h
tensor_flatten.cpp
tensor_flatten.h
tensor_layouts.cpp
tensor_layouts.h
tensor_list.cpp Avoid COW materialize in various operations (#119506) 2024-02-09 14:47:19 +00:00
tensor_list.h
tensor_memoryformats.cpp Fix refcount handling for dtype, layout and memory format (#125271) 2024-05-02 02:34:34 +00:00
tensor_memoryformats.h Fix refcount handling for dtype, layout and memory format (#125271) 2024-05-02 02:34:34 +00:00
tensor_new.cpp Avoid cuda init to FakeTensorMode (#124413) 2024-04-19 02:39:35 +00:00
tensor_new.h Avoid cuda init to FakeTensorMode (#124413) 2024-04-19 02:39:35 +00:00
tensor_numpy.cpp special-case cuda array interface of zero size (#121458) 2024-03-18 15:21:38 +00:00
tensor_numpy.h [12/N] Apply clang-tidy and fix warnings in headers of torch/csrc (#116486) 2024-01-10 08:48:14 +00:00
tensor_qschemes.cpp
tensor_qschemes.h
tensor_types.cpp Add SparsePrivateUse1 in backend_to_string, layout_from_backend and check_base_legacy_new. (#119263) 2024-02-26 01:54:30 +00:00
tensor_types.h Add SparsePrivateUse1 in backend_to_string, layout_from_backend and check_base_legacy_new. (#119263) 2024-02-26 01:54:30 +00:00
throughput_benchmark-inl.h init tls grad_mode/local_dispatch_key set while fork new thread in (#113246) 2024-01-11 08:31:46 +00:00
throughput_benchmark.cpp
throughput_benchmark.h
torch_dispatch_mode.h Fix mypy issues in fake_tensor.py (#124428) 2024-04-26 15:35:53 +00:00
variadic.cpp
variadic.h [12/N] Apply clang-tidy and fix warnings in headers of torch/csrc (#116486) 2024-01-10 08:48:14 +00:00
verbose.cpp
verbose.h