Skip to content

Commit

Permalink
Allow to pass architectures like 90a, without being overriden (#1178)
Browse files Browse the repository at this point in the history
* Allow to pass architectures like 90a, without being overriden

Signed-off-by: aurianer <aurianer@cscs.ch>

* Review suggestion from @timmoon10

Signed-off-by: Tim Moon <4406448+timmoon10@users.noreply.github.com>

---------

Signed-off-by: aurianer <aurianer@cscs.ch>
Signed-off-by: Tim Moon <4406448+timmoon10@users.noreply.github.com>
Co-authored-by: Tim Moon <4406448+timmoon10@users.noreply.github.com>
  • Loading branch information
aurianer and timmoon10 authored Sep 24, 2024
1 parent a68acd7 commit 99af5c0
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.split(";"):
if arch == "70":
continue # Already handled
nvcc_flags.extend(["-gencode", f"arch=compute_{arch},code=sm_{arch}"])

# Libraries
library_dirs = []
Expand Down

0 comments on commit 99af5c0

Please sign in to comment.