distribution icon indicating copy to clipboard operation
distribution copied to clipboard

Compile PyTorch with USE_VULKAN=1

Open OpenSourceAnarchist opened this issue 1 year ago • 2 comments

Given the abysmal state of ROCM on Linux, and especially Clear Linux, there is a workaround using Vulkan that is GPU-agnostic and a potential path to better and more unified support for all consumer compute cases.

This can be done by modifying https://github.com/clearlinux-pkgs/pytorch based on the following: https://pytorch.org/tutorials/prototype/vulkan_workflow.html

For Linux: USE_VULKAN=1 USE_VULKAN_SHADERC_RUNTIME=1 USE_VULKAN_WRAPPER=0 python setup.py install

In this case, I would really appreciate rebuilding pytorch with USE_VULKAN=1 USE_VULKAN_SHADERC_RUNTIME=1 (and whatever option is correct with USE_VULKAN_WRAPPER=0 or =1 for Clear's build system) so that we can support users like me trying to make use of our RDNA cards... plus it works for Intel iGPUs too, in case there's any worries about this only helping AMD users! :))

Thoughts? Thanks for considering it!

OpenSourceAnarchist avatar Jul 10 '23 15:07 OpenSourceAnarchist