pytorch/test/cpp_extensions
KarhouTam 375f3e3a61 [OpenReg][Docs] Correct docs about openreg usage example. (#163235)
## Why this PR?
I've tried to follow the guidance of the `OpenReg` [usage example](https://github.com/pytorch/pytorch/tree/main/test/cpp_extensions/open_registration_extension/torch_openreg/third_party/openreg) and found that the command for compiling `example.cpp` (`g++ -o out example/example.cpp -L ./build -lopenreg`) is not compatible with my `gcc` (v11.4).

Since I installed my `gcc` through `apt install build-essential`, and I think that's a common way to install `gcc` for a few developers? I believe it's necessary to slightly modify the command to add `-I ./` to explicitly indicate the header file search path.

## What I've changed?
- I added `-I ./` to correctly search for `./include/openreg.h`.
- I also added a `pwd` comment for better readability and removed unused imports in `example/example.cpp`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/163235
Approved by: https://github.com/FFFrog, https://github.com/albanD

Co-authored-by: Jiawei Li <ljw1101.vip@gmail.com>
2025-09-23 06:16:45 +00:00
..
libtorch_agnostic_extension [STABLE ABI] Add clone method to torch::stable::Tensor (#161896) 2025-09-22 20:39:24 +00:00
no_python_abi_suffix_test
open_registration_extension/torch_openreg [OpenReg][Docs] Correct docs about openreg usage example. (#163235) 2025-09-23 06:16:45 +00:00
python_agnostic_extension xpu: test py_limited_api with SyclExtension (#162546) 2025-09-12 21:57:01 +00:00
self_compiler_include_dirs_test
torch_stable_test_extension Error when TORCH_STABLE_ONLY is defined in TensorBase.h (#161658) 2025-08-28 04:36:31 +00:00
torch_test_cpp_extension
cpp_c10d_extension.cpp
cpp_c10d_extension.hpp
cpp_frontend_extension.cpp
cublas_extension.cpp
cuda_dlink_extension_add.cu
cuda_dlink_extension_add.cuh
cuda_dlink_extension_kernel.cu
cuda_dlink_extension.cpp
cuda_extension_kernel.cu
cuda_extension_kernel2.cu
cuda_extension.cpp
cuda_extension.cu
cudnn_extension.cpp
cusolver_extension.cpp
dangling_impl_extension.cpp
doubler.h
extension.cpp
identity.cpp
jit_extension.cpp
jit_extension2.cpp
maia_extension.cpp [MAIA] [Autocast] Enable autocast on MAIA device (#148511) 2025-03-18 03:46:22 +00:00
mps_extension.mm
mtia_extension.cpp Fix mtia_extension.cpp setDevice() to correctly set current_device (#149398) 2025-03-31 06:07:22 +00:00
open_registration_extension.cpp [OpenReg][1/N] Migrate cpp_extensions_open_device_registration to OpenReg (#156588) 2025-06-26 03:59:50 +00:00
rng_extension.cpp
setup.py xpu: support sycl with torch.utils.cpp_extension APIs (#132945) 2025-02-16 16:50:59 +00:00
torch_library.cu
xpu_extension.sycl xpu: support sycl with torch.utils.cpp_extension APIs (#132945) 2025-02-16 16:50:59 +00:00