pytorch/test/cpp_extensions
Animesh Jain 971df458db Reland of "Python binding to set/get CUDA rng state offset" (#99565)
Why?
* To reduce the latency of hot path in https://github.com/pytorch/pytorch/pull/97377

Concern - I had to add `set_offset` in all instances of `GeneratorImpl`. I don't know if there is a better way.

~~~~
import torch
torch.cuda.manual_seed(123)
print(torch.cuda.get_rng_state())
torch.cuda.set_rng_state_offset(40)
print(torch.cuda.get_rng_state())

tensor([123,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
          0,   0], dtype=torch.uint8)
tensor([123,   0,   0,   0,   0,   0,   0,   0,  40,   0,   0,   0,   0,   0,
          0,   0], dtype=torch.uint8)
~~~~

Reland of https://github.com/pytorch/pytorch/pull/98965

(cherry picked from commit 8214fe07e8)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99565
Approved by: https://github.com/anijain2305
2023-04-20 15:42:25 +00:00
..
no_python_abi_suffix_test
self_compiler_include_dirs_test
torch_test_cpp_extension
cpp_c10d_extension.cpp
cpp_c10d_extension.hpp
cpp_frontend_extension.cpp
cublas_extension.cpp
cuda_dlink_extension.cpp
cuda_dlink_extension_add.cu
cuda_dlink_extension_add.cuh
cuda_dlink_extension_kernel.cu
cuda_extension.cpp
cuda_extension.cu
cuda_extension_kernel.cu
cuda_extension_kernel2.cu
cudnn_extension.cpp
cusolver_extension.cpp
dangling_impl_extension.cpp
doubler.h
extension.cpp Support large negative SymInt (#99157) 2023-04-15 22:43:51 +00:00
jit_extension.cpp
jit_extension2.cpp
open_registration_extension.cpp Add custom backend case for storage and automatically generate storage attributes. (#98478) 2023-04-17 19:18:39 +00:00
ort_extension.cpp
rng_extension.cpp Reland of "Python binding to set/get CUDA rng state offset" (#99565) 2023-04-20 15:42:25 +00:00
setup.py Fix shoud/shoudl typos (#97930) 2023-03-30 08:27:16 +00:00
torch_library.cu