Skip to content

Conversation

@isVoid
Copy link
Contributor

@isVoid isVoid commented Jan 13, 2026

Description

closes #156

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Jan 13, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@leofang leofang requested review from leofang and mdboom January 13, 2026 19:00
@leofang leofang added P0 High priority - Must do! feature New feature or request cuda.bindings Everything related to the cuda.bindings module labels Jan 13, 2026
@leofang leofang added this to the cuda-python 13-next, 12-next milestone Jan 13, 2026
@leofang
Copy link
Member

leofang commented Jan 13, 2026

FYI @rparolin all of these are generated code except for the tests. There is an internal MR targeting the codegen for this.

if err != nvrtc.nvrtcResult.NVRTC_SUCCESS:
raise RuntimeError(repr(err))

err, program_handle = nvrtc.nvrtcCreateProgram(CODE.encode(), b"", 0, [], [])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker for this PR, but I think we have some helper functions for NVRTC that can be used in cuda-bindings tests, so that we do not have to reimplement them in this file.

Copy link
Contributor Author

@isVoid isVoid Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I saw this pattern showed up in test_nvjitlink as well. Perhaps a shared fixture that returns an nvrtc artifact.

@leofang leofang added the to-be-backported Trigger the bot to raise a backport PR upon merge label Jan 15, 2026
@leofang
Copy link
Member

leofang commented Jan 15, 2026

/ok to test 8e75d8a

@github-actions

This comment has been minimized.

@leofang
Copy link
Member

leofang commented Jan 15, 2026

  • For test failures with wheels, we need to update this dependency:
    "cuda-toolkit[nvrtc,nvjitlink,nvvm]==13.*",
  • Please add docs:
    • Take a look at cuda_bindings/docs/source/api.rst to see how we add API references
    • Need to update the release notes for both 13.1.X (we'll decide later if we'd do 13.1.2 or 13.2.0) and 12.9.6

@isVoid
Copy link
Contributor Author

isVoid commented Jan 15, 2026

/ok to test 965c53b

@leofang
Copy link
Member

leofang commented Jan 15, 2026

E   cuda.bindings._internal.utils.FunctionNotFoundError: function nvFatbinAddTileIR is not found

Need to skip the tile IR test for nvFatbin < 13.1

@isVoid
Copy link
Contributor Author

isVoid commented Jan 15, 2026

stderr = b'gcc: No such file or directory\nnvcc fatal : Failed to preprocess host compiler properties.\n'

This shows in some CI environment there's nvcc installed but it's not properly setup due to missing host compiler.

@isVoid
Copy link
Contributor Author

isVoid commented Jan 15, 2026

/ok to test 4baeecd

@isVoid
Copy link
Contributor Author

isVoid commented Jan 16, 2026

/ok to test 4c2f3f3

@leofang
Copy link
Member

leofang commented Jan 16, 2026

stderr = b'gcc: No such file or directory\nnvcc fatal : Failed to preprocess host compiler properties.\n'

This shows in some CI environment there's nvcc installed but it's not properly setup due to missing host compiler.

Yup! See #1467 (comment).

[project.optional-dependencies]
all = [
"cuda-toolkit[nvrtc,nvjitlink,nvvm]==13.*",
"cuda-toolkit[nvrtc,nvjitlink,nvvm,nvfatbin]==13.*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kkraus14 this minds me a discussion we had a few months ago -- One day installing cuda-binding[all] would bring in the whole CTK 😂

@leofang
Copy link
Member

leofang commented Jan 16, 2026

LGTM! Thanks, @isVoid!

@leofang
Copy link
Member

leofang commented Jan 16, 2026

/ok to test 3e071e2

@leofang leofang enabled auto-merge (squash) January 16, 2026 15:01
@leofang leofang merged commit 1af5db9 into NVIDIA:main Jan 16, 2026
80 checks passed
@github-actions
Copy link

Backport failed for 12.9.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 12.9.x
git worktree add -d .worktree/backport-1467-to-12.9.x origin/12.9.x
cd .worktree/backport-1467-to-12.9.x
git switch --create backport-1467-to-12.9.x
git cherry-pick -x 1af5db98e2f39a11c3ebd82190ca63156e052a09

@leofang
Copy link
Member

leofang commented Jan 16, 2026

@isVoid because of #965 the backport bot does not work (a workflow file is touched). Could you manually cherry pick?

@github-actions
Copy link

Doc Preview CI
Preview removed because the pull request was closed or merged.

isVoid added a commit to isVoid/cuda-python that referenced this pull request Jan 16, 2026
* initial localized test

* add rest of APIs

* remove local skips

* regenerate for CUDA 13.1 and with tile IR API

* nvfatbinError -> nvFatbinError

* regenerate for get_error_string

* enable object creation and testing

* remove the LTOIR mismatching arch failure test

* encode a legal tileIR into test

* update the license year

* add an embedded tile program for re-generation

* license date: 2026

* cdef const char *

* add dependency for CI

* add TODO to locate nvcc file

* add documentation and release notes

* skip tileIR test for <13.1 installation

* add an nvcc smoke test to better determine compiler usability

* fix typo

* add nvfatbin.rst

---------

Co-authored-by: Michael Wang <[email protected]>
leofang pushed a commit that referenced this pull request Jan 16, 2026
* initial localized test

* add rest of APIs

* remove local skips

* regenerate for CUDA 13.1 and with tile IR API

* nvfatbinError -> nvFatbinError

* regenerate for get_error_string

* enable object creation and testing

* remove the LTOIR mismatching arch failure test

* encode a legal tileIR into test

* update the license year

* add an embedded tile program for re-generation

* license date: 2026

* cdef const char *

* add dependency for CI

* add TODO to locate nvcc file

* add documentation and release notes

* skip tileIR test for <13.1 installation

* add an nvcc smoke test to better determine compiler usability

* fix typo

* add nvfatbin.rst

---------

Co-authored-by: Michael Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module feature New feature or request P0 High priority - Must do! to-be-backported Trigger the bot to raise a backport PR upon merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add nvfatbin bindings

4 participants