You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DISCUSS] Add DLDeviceType value for OpenGL buffer? #183
Motivation: I'm looking to add DLPack interoperability to the Perl Data Language (PDL - https://pdl.perl.org/ if interested). That currently only supports CPU-based memory, so that's fine. But PDL is about to start handling OpenGL buffers to keep computation on the GPU where possible, and it would be great to be able to describe that in DLPack terms.
Therefore, I would very much like to add a DLDeviceType enum value called (probably) kDLOpenGL. Will that be acceptable? (There may need to be two, kDLOpenGLTexture, kDLOpenGLVBO)
given the modern gpus are moving towards webgpu and vulkan, and opengl generally do not have good compute shader coverge, i think it is better to skip opengl here
@tqchen Does this mean OpenCL will be getting removed? I am fully aware of Vulkan and WebGPU, but neither are universally available. OpenGL is more or less universally available.
sorry, that was a typo. The main issue here is that legacy opengl do not have compute shader coverage that aligns with the latest gpu programming models, and when they do, likely vulkan or webgpu will be available on the platform.
So in the pov of machine learning needs(which is what dlpack focuses on) i think it is better to keep focus on opencl/vulkan/webgpu.
Are you saying the focus will be undermined by adding two values to an enum?
I don't know what "legacy" OpenGL is. OpenGL has compute shaders. If one has Vulkan etc, then with the right extensions one can convert an OpenGL handle, and then one can describe it with DLPack. Until DLPack agrees to add these two enums, one cannot describe these OpenGL objects natively with DLPack.
Activity
tqchen commentedon Mar 21, 2026
given the modern gpus are moving towards webgpu and vulkan, and opengl generally do not have good compute shader coverge, i think it is better to skip opengl here
mohawk2 commentedon Mar 22, 2026
@tqchen Does this mean OpenCL will be getting removed? I am fully aware of Vulkan and WebGPU, but neither are universally available. OpenGL is more or less universally available.
The ask here is to add two values to an
enum.tqchen commentedon Mar 23, 2026
sorry, that was a typo. The main issue here is that legacy opengl do not have compute shader coverage that aligns with the latest gpu programming models, and when they do, likely vulkan or webgpu will be available on the platform.
So in the pov of machine learning needs(which is what dlpack focuses on) i think it is better to keep focus on opencl/vulkan/webgpu.
mohawk2 commentedon Mar 29, 2026
Are you saying the focus will be undermined by adding two values to an
enum?I don't know what "legacy" OpenGL is. OpenGL has compute shaders. If one has Vulkan etc, then with the right extensions one can convert an OpenGL handle, and then one can describe it with DLPack. Until DLPack agrees to add these two enums, one cannot describe these OpenGL objects natively with DLPack.