pytorch/c10/core/impl
Yu, Guangye 31372fa842 Support generic stream/event on CUDA/HIP backend (#125757)
# Motivation
According to [#123611](https://github.com/pytorch/pytorch/pull/123611), we support generic stream/event on CUDA backend.

# Additional Context
new method/attribute on `torch.Event` for cuda
- torch.Event.event_id
- torch.Event.elapsed_time
- torch.Event.synchronize

new method on `c10::Event` on cuda backend
- c10.Event.event_id
- c10.Event.elapsed_time
- c10.Event.synchronize

Pull Request resolved: https://github.com/pytorch/pytorch/pull/125757
Approved by: https://github.com/albanD, https://github.com/jgong5, https://github.com/EikanWang
2024-05-10 13:34:09 +00:00
..
alloc_cpu.cpp Revert "[Environment Variable][1/N] Use thread-safe env variable API in c10 (#119449)" 2024-04-22 14:44:44 +00:00
alloc_cpu.h
COW.cpp Disallow {FakeTensor,FunctionalTensor}.data_ptr (#122514) 2024-03-26 23:55:42 +00:00
COW.h
COWDeleter.cpp
COWDeleter.h
DeviceGuardImplInterface.cpp
DeviceGuardImplInterface.h Support generic stream/event on CUDA/HIP backend (#125757) 2024-05-10 13:34:09 +00:00
FakeGuardImpl.h
GPUTrace.cpp
GPUTrace.h
HermeticPyObjectTLS.cpp
HermeticPyObjectTLS.h
InlineDeviceGuard.h
InlineEvent.h Support generic stream/event on CUDA/HIP backend (#125757) 2024-05-10 13:34:09 +00:00
InlineStreamGuard.h
LocalDispatchKeySet.cpp
LocalDispatchKeySet.h Preserve dispatch state across function tracing (#122073) 2024-04-10 18:57:01 +00:00
PyInterpreter.cpp Add OpOverload.redispatch; use it in new custom ops API (#124089) 2024-04-18 12:48:04 +00:00
PyInterpreter.h Add OpOverload.redispatch; use it in new custom ops API (#124089) 2024-04-18 12:48:04 +00:00
PyObjectSlot.cpp
PyObjectSlot.h
PythonDispatcherTLS.cpp
PythonDispatcherTLS.h
README-cow.md
README.md
SizesAndStrides.cpp
SizesAndStrides.h
TorchDispatchModeTLS.cpp Fix mypy issues in fake_tensor.py (#124428) 2024-04-26 15:35:53 +00:00
TorchDispatchModeTLS.h Fix mypy issues in fake_tensor.py (#124428) 2024-04-26 15:35:53 +00:00
VirtualGuardImpl.h Support generic stream/event on CUDA/HIP backend (#125757) 2024-05-10 13:34:09 +00:00

c10/core/impl provides headers for functionality that is only needed in very specific use-cases (e.g., you are defining a new device type), which are generally only needed by C10 or PyTorch code. If you are an ordinary end-user, you should not use headers in this folder. We permanently give NO backwards-compatibility guarantees for implementations in this folder.

Compare with c10/util, which provides functionality that is not directly related to being a deep learning library (e.g., C++20 polyfills), but may still be generally useful and visible to users.

(We don't call this c10/detail, because the detail namespace convention is for header private details. However, c10::impl may be utilized from external headers; it simply indicates that the functionality is not for end users.)