Skip to content

[DISCUSS] Add DLDeviceType value for OpenGL buffer? #183

Closed

Description

@mohawk2

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)

Activity

  1. tqchen commented on Mar 21, 2026

    @tqchen
    Member

    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

  2. mohawk2 commented on Mar 22, 2026

    @mohawk2
    Author

    @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.

  3. tqchen commented on Mar 23, 2026

    @tqchen
    Member

    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.

  4. mohawk2 commented on Mar 29, 2026

    @mohawk2
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions