NVIDIA / NVIDIA/nvImageCodec

Build system rejects valid CMAKE CUDA_ARCHITECTURES inputs

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

Nobody has claimed this yet.

bug
Dominant language
Jupyter Notebook
Stars
159
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Version

0.5.0, 0.6.0

Describe the bug.

The custom CUDA_ARCHITECTURES validator doesn't accept all of the standard CMAKE cuda architecture expressions. For example, the following error message is not correct:

-- CUDA targeted archs: 
CMake Error at CMakeLists.txt:283 (message):
  None of the provided CUDA architectures
  ({50-real;52-real;60-real;61-real;70-real;75-real;80-real;86-real;89-real;90a-real;100f-real;103f-real;120a-real;121f-real;121-virtual})
  is supported by
  /home/conda/feedstock_root/build_artifacts/nvimgcodec_1757428707123/_build_env/bin/nvcc,
  use one or more of: 50;60;70;80;90


-- Configuring incomplete, errors occurred!

50-real;60-real;70-real;80-real;90a-real are all a subset of 50;60;70;80;90, so it doesn't make sense that these CUDA targets would not be allowed.

In addition to not recognizing that these are valid targets, the following issues are related:

  1. It seems that this function is trying to check compiler args before they are passed to the compiler. This is redundant error checking. Why not just let the compiler check its own arguments? Then you don't need to update this logic as new compilers become available.

  2. Does it make sense that there would be an upper limit on allowed CUDA targets? Why would the source code not be forward compatible?

  3. If there truly is a lower/upper limit on supported CUDA target architectures. Why not just use the existing __CUDA_ARCH__ macros which are already in use in this code base? Something like:

#if __CUDA_ARCH__ < 500
  #error "Only compute capability 5.0+ is supported."
#endif
Minimum reproducible example

Environment details

Relevant log output

Other/Misc.

No response

Check for duplicates
  • I have searched the open bugs/issues and have found no duplicates for this bug 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 in cmake/CUDA_utils.cmake around the custom CUDA_ARCHITECTURES validator at line 111, then inspect the related error handling in CMakeLists.txt around line 283. Compare the validator with CMake's documented architecture expressions and determine the expected behavior for suffixes such as -real, -virtual, and -f. Done means valid standard expressions are accepted without incorrect rejection.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.