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

SystemError in cudaOverlay Function (Python): More Keyword List Entries than Format Specifiers #1868

Open
yunlongwangsd opened this issue Jun 19, 2024 · 1 comment

Comments

@yunlongwangsd
Copy link

yunlongwangsd commented Jun 19, 2024

Description

I encountered an issue when I ran through Jetson Inference tutorials using the Python code examples. In all inference tasks using cudaOverlay function from the jetson_utils library, there is an error message indicated "More keyword list entries (5) than format specifiers (4)".

Diagnosis

The issue does not exist while running C++ code examples of the same tasks, indicating that the problem may be with the python binding of those Jetson util functions.

Fix

In utils/python/bindings/PyCUDA.cpp, the original arguments parsing code in PyCUDA_Overlay function was:

if( !PyArg_ParseTupleAndKeywords(args, kwds, "OO|ff", kwlist, &pyInput, &pyOutput, &x, &y, &stream))
    return NULL;

I modified it to:

if( !PyArg_ParseTupleAndKeywords(args, kwds, "OO|ffK", kwlist, &pyInput, &pyOutput, &x, &y, &stream))
    return NULL;

It adds the fifth optional argument to match the signature. Make sure to rebuild before applying the change.

I hope this information is helpful. Thank you!

@dusty-nv
Copy link
Owner

Ah thanks @yunlongwangsd, I had been adding support for cudaStreams to jetson-utils earlier this week and missed this - patched it in 6f26ba5 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants