mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
## 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> |
||
|---|---|---|
| .. | ||
| libtorch_agnostic_extension | ||
| no_python_abi_suffix_test | ||
| open_registration_extension/torch_openreg | ||
| python_agnostic_extension | ||
| self_compiler_include_dirs_test | ||
| torch_stable_test_extension | ||
| 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 | ||
| mps_extension.mm | ||
| mtia_extension.cpp | ||
| open_registration_extension.cpp | ||
| rng_extension.cpp | ||
| setup.py | ||
| torch_library.cu | ||
| xpu_extension.sycl | ||