-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Original code:
# Add target compute capabilities to NVCC flags.
for capability in compute_capabilities:
num = capability.replace(".", "")
if num == '90':
num = '90a'
HAS_SM90 = True
CXX_FLAGS += ["-DHAS_SM90"]
if num == '80' or num == '86' or num == '87':
SAGE2PP_ENABLED = False
NVCC_FLAGS += ["-gencode", f"arch=compute_{num},code=sm_{num}"]
if capability.endswith("+PTX"):
NVCC_FLAGS += ["-gencode", f"arch=compute_{num},code=compute_{num}"]
Maybe it should be corrected to:
# Add target compute capabilities to NVCC flags.
for capability in compute_capabilities:
has_ptx = capability.endswith("+PTX")
if has_ptx:
num = capability.replace(".", "").replace("+PTX", "")
else:
num = capability.replace(".", "")
sass_num, ptx_num = num, num
if num == '90':
sass_num = '90a'
HAS_SM90 = True
CXX_FLAGS += ["-DHAS_SM90"]
if num == '80' or num == '86' or num == '87':
SAGE2PP_ENABLED = False
NVCC_FLAGS += ["-gencode", f"arch=compute_{sass_num},code=sm_{sass_num}"]
if has_ptx:
NVCC_FLAGS += ["-gencode", f"arch=compute_{ptx_num},code=compute_{ptx_num}"]
The corrected code is compatible with the 9.0+PTX architecture.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels