Skip to content

Commit

Permalink
Allow to pass architectures like 90a, without being overriden
Browse files Browse the repository at this point in the history
Signed-off-by: aurianer <[email protected]>
  • Loading branch information
aurianer committed Sep 11, 2024
1 parent 40dda92 commit 1d74955
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build_tools/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ def setup_pytorch_extension(
)
)

if "80" in cuda_architectures:
nvcc_flags.extend(["-gencode", "arch=compute_80,code=sm_80"])
if "90" in cuda_architectures:
nvcc_flags.extend(["-gencode", "arch=compute_90,code=sm_90"])
for arch in cuda_architectures:
if arch_nb != "70":
arch_nb = arch.replace("sm_", "")
nvcc_flags.extend(["-gencode", f"arch=compute_{arch_nb},code={arch}"])

# Libraries
library_dirs = []
Expand Down

0 comments on commit 1d74955

Please sign in to comment.