pytorch/cmake
Wei Wang ab56e5add9 [CUDA][BUILD] Add back the capability to use env TORCH_CUDA_ARCH_LIST (#155314)
Add back the capability to use env TORCH_CUDA_ARCH_LIST to control how downstream projects (which uses find_package (torch)) build.

Follow up to: https://github.com/pytorch/pytorch/pull/152715

Before this PR,
On a CPU only machine, building a downstream project would ignore the TORCH_CUDA_ARCH_LIST setting (if set) and go straight to the auto GPU detection mode, in which case there would be no GPU detected and an excessive list of cuda architectures may be used. This also means that there is no way to build a binary that would be targeting a different SM on the current machine a developer is using.

After this PR,
TORCH_CUDA_ARCH_LIST is effective for developers to control explicitly which SM architectures to build.

p.s. I think this PR might have been the original intent of https://github.com/pytorch/pytorch/pull/152715

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155314
Approved by: https://github.com/janeyx99, https://github.com/eqy, https://github.com/atalman
2025-06-07 15:52:39 +00:00
..
External Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
Modules Remove torch XPU ABI=0 build logic for old compiler (#150095) 2025-06-06 13:13:19 +00:00
Modules_CUDA_fix Add scripts to check xrefs and urls (#151844) 2025-04-28 09:30:07 +00:00
public [CUDA][BUILD] Add back the capability to use env TORCH_CUDA_ARCH_LIST (#155314) 2025-06-07 15:52:39 +00:00
Allowlist.cmake
BuildVariables.cmake
Caffe2Config.cmake.in xpu: improve error handling and reporting in XPU cmake files (#149353) 2025-03-20 02:00:39 +00:00
cmake_uninstall.cmake.in
Codegen.cmake Fix Codegen.cmake warning (#153023) 2025-05-07 12:45:20 +00:00
DebugHelper.cmake
Dependencies.cmake [ROCm] Make optional features in LoadHIP better conditioned. (#155305) 2025-06-07 02:20:55 +00:00
FlatBuffers.cmake
IncludeSource.cpp.in
iOS.cmake [executorch] Update iOS toolchain with a modern cmake syntax. (#115799) 2023-12-15 00:51:30 +00:00
Metal.cmake [MPS] Support includes in metal objects (#145087) 2025-01-18 05:35:22 +00:00
MiscCheck.cmake Remove CAFFE2_USE_EXCEPTION_PTR (#147247) 2025-03-06 02:56:23 +00:00
prioritized_text.txt [Build] Add linker script optimization (#121975) 2024-04-09 20:22:25 +00:00
ProtoBuf.cmake Revert "Use 3.27 as the minimum CMake version (#153153)" 2025-05-31 02:14:24 +00:00
ProtoBufPatch.cmake
Summary.cmake Turn on compile with NVSHMEM (#154538) 2025-06-03 15:24:24 +00:00
TorchConfig.cmake.in [Build] Remove pre-CXX11 ABI logic from build script (#149888) 2025-03-25 03:17:16 +00:00
TorchConfigVersion.cmake.in
VulkanCodegen.cmake [BE][CMake] Use FindPython module (#124613) 2024-05-29 13:17:35 +00:00
VulkanDependencies.cmake