-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Labels
P0High priority - Must do!High priority - Must do!bugSomething isn't workingSomething isn't workingcuda.bindingsEverything related to the cuda.bindings moduleEverything related to the cuda.bindings module
Milestone
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Silent Failure
Component
cuda.bindings
Describe the bug
On cuda-bindings 12.9.3, cudaGraphicsGLRegisterImage reports cudaSuccess but returns a null handle.
This does not happen with cuda-bindings 12.9.2
How to Reproduce
PySide6 is used to create the OpenGL context and texture.
from cuda.bindings import runtime as cudart
from PySide6 import QtGui, QtOpenGL
class GLWidget(QtOpenGL.QOpenGLWindow):
def initializeGL(self):
self.m_texture = QtOpenGL.QOpenGLTexture(QtOpenGL.QOpenGLTexture.Target.Target2D)
self.m_texture.setFormat(QtOpenGL.QOpenGLTexture.TextureFormat.RGBA8_UNorm)
self.m_texture.setSize(512, 512)
self.m_texture.allocateStorage()
err, self.gfx_resource = cudart.cudaGraphicsGLRegisterImage(
self.m_texture.textureId(), self.m_texture.target().value,
cudart.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsWriteDiscard
)
error_name = cudart.cudaGetErrorName(err)[1].decode()
print(error_name, self.gfx_resource)
app = QtGui.QGuiApplication([])
win = GLWidget()
win.show()
# 12.9.2: cudaSuccess <cudaGraphicsResource_t 0x1b75dca8e90>
# 12.9.3: cudaSuccess <cudaGraphicsResource_t 0x0>Expected behavior
cudaGraphicsGLRegisterImage should return a valid handle upon cudaSuccess
Operating System
No response
nvidia-smi output
No response
Metadata
Metadata
Assignees
Labels
P0High priority - Must do!High priority - Must do!bugSomething isn't workingSomething isn't workingcuda.bindingsEverything related to the cuda.bindings moduleEverything related to the cuda.bindings module