Skip to content

nvrtcCreateProgram only accepts lists #72

Closed
@leofang

Description

@leofang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priority - Should doenhancementAny code-related improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions