-
Notifications
You must be signed in to change notification settings - Fork 76
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
cuLibraryLoadData
raises TypeError: 'int' object is not iterable
#73
Comments
I confirm this simple patch would make it work: diff --git a/cuda/cuda.pyx.in b/cuda/cuda.pyx.in
index 74f49d9..e46ea4b 100644
--- a/cuda/cuda.pyx.in
+++ b/cuda/cuda.pyx.in
@@ -21414,12 +21414,12 @@ def cuLibraryLoadData(code, jitOptions : Optional[List[CUjit_option]], jitOption
ccode = utils.HelperInputVoidPtr(code)
cdef void* ccode_ptr = <void*><void_ptr>ccode.cptr
cdef vector[ccuda.CUjit_option] cjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)]
- pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(numJitOptions, jitOptionsValues)]
+ pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)]
cdef utils.InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = utils.InputVoidPtrPtrHelper(pylist)
if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions))
if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions))
cdef vector[ccuda.CUlibraryOption] clibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)]
- pylist = [utils.HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(numLibraryOptions, libraryOptionValues)]
+ pylist = [utils.HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)]
cdef utils.InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = utils.InputVoidPtrPtrHelper(pylist)
if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions))
if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions))
@@ -46813,4 +46813,4 @@ def sizeof(objType):
{{if True}}
if objType == VdpOutputSurface:
return sizeof(ccuda.VdpOutputSurface){{endif}}
- raise TypeError("Unknown type: " + str(objType))
\ No newline at end of file
+ raise TypeError("Unknown type: " + str(objType)) |
leofang
added
P0
High priority - Must do!
and removed
triage
Needs the team's attention
labels
Jul 9, 2024
Fixed with 12.6 release, closing. |
This was referenced Oct 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This line is wrong:
https://github.com/NVIDIA/cuda-python/blob/b88592ae51c35af3bf1399a48d2180a6d9cec5cc/cuda/cuda.pyx.in#L21417
numJitOptions
is an int, so it cannot be iterated over. What's should have been there in the zip isjitOptions
.The text was updated successfully, but these errors were encountered: