Skip to content

Request: Open-CL / Vulkan / Metal support #341

Closed as not planned
Closed as not planned

Description

@guymarshall

Is your feature request related to a problem? Please describe.
I have an AMD GPU so I cannot take advantage of the CUDA running.

Describe the solution you'd like
I would love either an Open-CL or a Vulkan running mode (or both) if possible.

Describe alternatives you've considered
I have tried compiling to CUDA and then running a translation layer to Open-CL but the performance isn't what I expected.

Additional context
None.

Activity

  1. nicolas-abril commented on May 17, 2024

    @nicolas-abril
    Collaborator

    We do plan porting to other platforms soon. We just want to first have one very solid implementation and CUDA happened to be the best/easiest to do it first.

  2. added
    enhancement
    on May 17, 2024
  3. guymarshall commented on May 17, 2024

    @guymarshall
    Author

    No worries! Very impressive project, I am looking forward to using it in the future.

  4. jlucaso1 commented on May 17, 2024

    @jlucaso1
  5. joshuarossi commented on May 18, 2024

    @joshuarossi

    hoping for metal support (it seemed like the cpu benchmarks were already on mac)

  6. MrAmbiG commented on May 18, 2024

    @MrAmbiG

    Is your feature request related to a problem? Please describe. I have an AMD GPU so I cannot take advantage of the CUDA running.

    Describe the solution you'd like I would love either an Open-CL or a Vulkan running mode (or both) if possible.

    Describe alternatives you've considered I have tried compiling to CUDA and then running a translation layer to Open-CL but the performance isn't what I expected.

    Additional context None.

    I think you mean AMD ROCM. ROCM is AMD's alternative to CUDA for nvidia. vulkan is for older GPUs. so finally it should look like
    bend run-ro <file.hvm> # uses the ROCM interpreter (massively parallel)

  7. Bjohnson131 commented on May 18, 2024

    @Bjohnson131

    I think you mean AMD ROCM. ROCM is AMD's alternative to CUDA for nvidia. vulkan is for older GPUs. so finally it should look like bend run-ro <file.hvm> # uses the ROCM interpreter (massively parallel)

    You may be mistaken- Vulkan as a standard was released 8 years ago, and modern drivers only coming out in 2019 or later. (https://en.wikipedia.org/wiki/Vulkan)

    On ROCm, it is not what we want. ROCm is a software stack specifically for AMD Graphics cards. CUDA, on the other hand is not a software stack. AMD's equivalent to Nvidia's CUDA is indeed OpenCL, or alternatively Vulkan. Vulkan specializes in graphics, where OpenCL is more general.

    In any case fwiw OpenCL support would be appreciated, as it also would have the benefit of supporting intel GPUs.

  8. changed the title [-]Open-CL or Vulkan support?[/-] [+]Request: Open-CL / Vulkan support[/+] on May 18, 2024
  9. h9419 commented on May 18, 2024

    @h9419

    We do plan porting to other platforms soon. We just want to first have one very solid implementation and CUDA happened to be the best/easiest to do it first.

    If that is the case, I recommend reading the documentation of HIP Porting Guide as you write your CUDA. Main difference is to account for possible warp size of 64 instead of always assuming 32 and you are almost good to go with ROCm support

  10. nonetrix commented on May 19, 2024

    @nonetrix

    Vulkan would be great, in my experience Vulkan and ROCm are about the same actually and Vulkan has much broader support. I think it's the future personally once someone writes a nice wrapper around it that takes the role of CUDA or ROCm instead of being more generalized, I am not sure if it is the case with Vulkan vs CUDA I'd like to know honestly same with Vulkan and OpenVINO or whatever it is. But if Vulkan is so good at least on AMD, seems like no brainier just to implement that, not sure what the benefits of ROCm would be other than ease of development perhaps please correct me but seems to be my perspective as a user

  11. imxade commented on May 19, 2024

    @imxade

    This request belongs to HVM ?

  12. TheSimicSlaw commented on May 19, 2024

    @TheSimicSlaw

    I have an AMD gpu, so for the moment using the CUDA interpreter is off the table, but would the C interpreter still be usable?

  13. haslo commented on May 20, 2024

    @haslo

    ...and Metal? 🥹

    Is that this ticket too or does it need another one?

  14. nicolas-abril commented on May 20, 2024

    @nicolas-abril
    Collaborator

    ...and Metal? 🥹

    Yes

  15. changed the title [-]Request: Open-CL / Vulkan support[/-] [+]Request: Open-CL / Vulkan / Metal support[/+] on May 20, 2024
  16. LeaveNhA commented on May 21, 2024

    @LeaveNhA

    I cannot wait for Metal support! 😇

  17. MrAmbiG commented on May 22, 2024

    @MrAmbiG

    I think you mean AMD ROCM. ROCM is AMD's alternative to CUDA for nvidia. vulkan is for older GPUs. so finally it should look like bend run-ro <file.hvm> # uses the ROCM interpreter (massively parallel)

    You may be mistaken- Vulkan as a standard was released 8 years ago, and modern drivers only coming out in 2019 or later. (https://en.wikipedia.org/wiki/Vulkan)

    On ROCm, it is not what we want. ROCm is a software stack specifically for AMD Graphics cards. CUDA, on the other hand is not a software stack. AMD's equivalent to Nvidia's CUDA is indeed OpenCL, or alternatively Vulkan. Vulkan specializes in graphics, where OpenCL is more general.

    In any case fwiw OpenCL support would be appreciated, as it also would have the benefit of supporting intel GPUs.

    AMD vulkan (derived from mantle) api, is not limited to AMD GPUs, one can use it with NVIDIA's Nsight suite of development tools where as nvidia CUDA is designed specifically for nvidia GPUs, just like ROCM was designed with AMD GPUs in mind. So if you want a low level access to the gpu which isn't specifically designed with any gpu vendor in mind, you would choose vulkan api, if you want to specifically target AMD GPUs (especially the newer ones) ROCM is a better choice. However for this project I do support you prioritizing vulkan api over others because that would not only give a low level access to the GPU but it supports all 3 vendors. Intel does list https://www.intel.com/content/www/us/en/support/articles/000005524/graphics.html vulkan api as a supported api for their GPUs.

    Vendor OpenCL Vulkan API ROCM CUDA
    Intel Yes Yes No No
    Nvidia Yes Yes No Yes
    AMD Yes Yes Yes No
    Technology Open Source
    ROCm Yes
    CUDA No
    Vulkan API Yes
    OpenCL Yes
  18. guymarshall commented on May 22, 2024

    @guymarshall
    Author

    I think you mean AMD ROCM. ROCM is AMD's alternative to CUDA for nvidia. vulkan is for older GPUs. so finally it should look like bend run-ro <file.hvm> # uses the ROCM interpreter (massively parallel)

    You may be mistaken- Vulkan as a standard was released 8 years ago, and modern drivers only coming out in 2019 or later. (https://en.wikipedia.org/wiki/Vulkan)
    On ROCm, it is not what we want. ROCm is a software stack specifically for AMD Graphics cards. CUDA, on the other hand is not a software stack. AMD's equivalent to Nvidia's CUDA is indeed OpenCL, or alternatively Vulkan. Vulkan specializes in graphics, where OpenCL is more general.
    In any case fwiw OpenCL support would be appreciated, as it also would have the benefit of supporting intel GPUs.

    AMD vulkan (derived from mantle) api, is not limited to AMD GPUs, one can use it with NVIDIA's Nsight suite of development tools where as nvidia CUDA is designed specifically for nvidia GPUs, just like ROCM was designed with AMD GPUs in mind. So if you want a low level access to the gpu which isn't specifically designed with any gpu vendor in mind, you would choose vulkan api, if you want to specifically target AMD GPUs (especially the newer ones) ROCM is a better choice. However for this project I do support you prioritizing vulkan api over others because that would not only give a low level access to the GPU but it supports all 3 vendors. Intel does list https://www.intel.com/content/www/us/en/support/articles/000005524/graphics.html vulkan api as a supported api for their GPUs.
    Vendor OpenCL Vulkan API ROCM CUDA
    Intel Yes Yes No No
    Nvidia Yes Yes No Yes
    AMD Yes Yes Yes No
    Technology Open Source
    ROCm Yes
    CUDA No
    Vulkan API Yes
    OpenCL Yes

    I was going to say I thought Vulkan would be the best option not this ROCm but what do I know!

  19. R-Goc commented on May 25, 2024

    @R-Goc

    I think that things like support for different runtimes would benefit from becoming a tracking issue. OpenCL is probably the best next step, as it has the best support across platforms. While vulkan has a compute element, it is notoriously a pain to write, and it seems slower than OpenCL from what I can find.

  20. ElliottDyson commented on Jul 21, 2024

    @ElliottDyson

    Intel specific support would also be great (when you do look to expand to different platforms)

  21. negentropi commented on Jan 30, 2026

    @negentropi

    wow, 1.5y ago now. still need to say plz metal

  22. anacrolix commented on Feb 2, 2026

    @anacrolix

    Get an AI to add it at this point...

  23. negentropi commented on Feb 2, 2026

    @negentropi

    Get an AI to add it at this point...

    codex

  24. andersonpem commented on Jul 3, 2026

    @andersonpem

    Can't wait for metal support! :)

  25. negentropi commented on Jul 5, 2026

    @negentropi

    still waiting. eh fine, @codex resolve this, make no mistake

  26. VictorTaelin commented on Sep 16, 2026

    @VictorTaelin
    Contributor

    Bend is being reorganized. This repository (bendlang/bend) now belongs to Bend 2, a new implementation written from scratch, coming soon. Bend 1 lives on with its full history at https://github.com/HigherOrderCO/Bend1. We are closing every Bend 1 issue and pull request here: if this one still applies to Bend 1, please re-open it there.

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

    HVMenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions