use arch specific targets when possible (#2771)

This commit is contained in:
Awni Hannun
2025-11-14 20:04:18 -08:00
committed by GitHub
parent 3c622ddd1d
commit 1bf605d56d
4 changed files with 34 additions and 5 deletions

View File

@@ -89,7 +89,16 @@ class CMakeBuild(build_ext):
]
if build_stage == 2 and build_cuda:
# Last arch is always real and virtual for forward-compatibility
cuda_archs = ";".join(("70-real", "80-real", "90-real", "100-real", "120"))
cuda_archs = ";".join(
(
"75-real",
"80-real",
"90a-real",
"100a-real",
"120a-real",
"120-virtual",
)
)
cmake_args += [f"-DMLX_CUDA_ARCHITECTURES={cuda_archs}"]
# Some generators require explcitly passing config when building.