NVlabs / NVlabs/WarpConvNet

CUDA architecture parser accepts unsupported pre-Hopper a suffixes

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
228
Forks
20
PR merge metrics
No merged PRs in 30d

Description

The exact CUDA architecture parser validates the numeric base code but accepts an a suffix even for architectures that have no architecture-specific target.

Reproduced on main at f9474304bbfe94bf7ffe0f8dbbcc468c1ff0ceb1:

python -c "import build_arch; print(build_arch.parse_cuda_arch_token('8.0a').cubin_flag)"

Actual output:

-gencode=arch=compute_80a,code=sm_80a

The same problem affects 7.0a, 7.5a, 8.6a, 8.7a, and 8.9a, including compact/prefixed spellings and +PTX variants. These targets are absent from NVIDIA's supported architecture list.

Expected behavior: reject unsupported base/suffix combinations with CudaArchError before returning invalid compiler flags, and identify the original input in the error. Valid existing targets, including 9.0a, 10.0a, 10.3a, 12.0a, and 12.1a, should retain their exact compiler flags and explicit +PTX behavior.

The parser is independent of PyTorch, so this can be covered using the existing CPU-only parser tests. No CUDA compilation was performed for this report.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with build_arch.parse_cuda_arch_token and the existing CPU-only parser tests. Reproduce the 8.0a example, then cover unsupported pre-Hopper a combinations, compact or prefixed spellings, and +PTX variants. Done means these inputs raise CudaArchError identifying the original input while valid targets such as 9.0a and 10.0a retain their exact flags and +PTX behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.