Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvrtcCreateProgram only accepts lists #72

Closed
leofang opened this issue Jul 5, 2024 · 1 comment
Closed

nvrtcCreateProgram only accepts lists #72

leofang opened this issue Jul 5, 2024 · 1 comment
Labels
enhancement Any code-related improvements P1 Medium priority - Should do

Comments

@leofang
Copy link
Member

leofang commented Jul 5, 2024

I think this is a defect likely in the codegen:

  File "/home/leof/dev/cuda_py/cuda/py/compiler.py", line 20, in __init__
    nvrtc.nvrtcCreateProgram(code.encode(), b"default", 0, (), ()))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Argument 'headers' has incorrect type (expected list, got tuple)

which hard-codes the argument types to be a list:

def nvrtcCreateProgram(char* src, char* name, int numHeaders, list headers, list includeNames):

We should do some housekeeping and check other such instances. We don't need to unnecessarily constrain the type of an iterable unless there's a good reason.

@github-actions github-actions bot added the triage Needs the team's attention label Jul 5, 2024
@leofang leofang added P1 Medium priority - Should do enhancement Any code-related improvements and removed triage Needs the team's attention labels Jul 9, 2024
@vzhurba01
Copy link
Collaborator

Fixed with 12.6 release, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any code-related improvements P1 Medium priority - Should do
Projects
None yet
Development

No branches or pull requests

2 participants