Spaces:
Runtime error
A newer version of the Gradio SDK is available:
5.21.0
This is a guide to build RocBLAS based on the Rocm Official Resource.
You may have an amd GPU without official support on Rocm HIP SDK 5.7 OR if you are using intergrated GPU (igpu or APU) . and want it supported by HIP SDK on Windows. You may follow the guide below to build your rocBLAS
Extra: if you do not need build roclabs or already have library ,please skip this .
Make sure you have the follow software availbe on your PC ,otherwise ,you may fail to build the roclabs.
- Visual Studio 2022
- Python
- Strawberry Perl
- CMake
- Git
- HIP SDK ( mentioned in first step)
- Download
rocblas and Tensile ๏ผ download Tensile 4.38.0 for ROCm 5.7.0 ( latest) on windows)๏ผ replace
CMakeLists.txt
if you download thetensile 4.38.0
from release page please replacecmakeLists
inTensile/tree/develop/Tensile/Source/lib/CMakeLists.txt
with this CMakeLists.txt , put in same fold , eg ,rocm
( more information from rocm official guide )
Download Tensile-fix-fallback-arch-build.patch place in Tensile
folder .for example C:\ROCM\Tensile-rocm-5.7.0
open the terminal in Tensile-rocm-5.7.0
git apply Tensile-fix-fallback-arch-build.patch
in the rocm/rocBLAS , run
python rdeps.py
( if you encounter any mistakes , try to google and fix with it or try it again. using install.sh -d
in linux )
after done . try next step
python rmake.py -a "gfx1101;gfx1103" --lazy-library-loading --no-merge-architectures -t "C:\rocm\Tensile-rocm-5.7.0
thegfx1101,gfx1103
change to yourgpu or apu namber
You may want to build more gpu support,make sure by seperate with " ; ".
Upon successful compilation, rocblas.dll will be generated in the build\release\staging folder
. On my PC, the file path is C:\ROCM\rocBLAS-rocm-5.7.0\build\release\staging\rocblas.dll
In addition, some Tensile data files will also be produced in: C:\ROCM\rocBLAS-rocm-5.7.0\build\release\Tensile\library
To compile HIP SDK programs that use hipBLAS/rocBLAS, you gotta replace the rocblas.dll file in the SDK with the one you just made yourself, Then, Place rocblas.dll
into C:\Program Files\AMD\ROCm\5.7\bin
and the Tensile data files in the rocblas\library folder
, relative to the rocblas.dll
file (which is at C:\Program Files\AMD\ROCm\5.7\bin\rocblas\library
, innit?). Once that's done, your program should run smooth as silk on the designated graphics card"
Note: you need to change coresponding data inTensile/Common.py
in tensile library .change data in " globalParameters["SupportedISA"]"
and "CACHED_ASM_CAPS"
add data of yourgpu number
.and choose the simliar gpu achetecture. eg RND3
, then copy and put below with your gpu number and others availble gpu data . if you want more perfect , you may try to use the data availbe inrocBLAS\library\src\blas3\Tensile\Logic\asm_full
, change the data in their , eg, navi32,31 ,
you may build a new fold there namenavi 3x
, copy the files in navi32
to navi 3x
, then open the vs code or visual studio or any other code editor to replace the gpu number .save it . and use navi 3x
in your Tensile/Common.py
in terms of "CACHED_ASM_CAPS"
.
Note2 : on Linux (6.1.0 roclabs) ,you may need to edit more . search Processor
and gfx1102
(choose the supported card) in entire tensile folder,add your gpu number in wheregfx1102
shows.Then build again . More information avaialbe on rocm linux .However ,it is not recommended . There easier approach is using HSA_OVERRIDE_GFX_VERSION
eg, export HSA_OVERRIDE_GFX_VERSION=11.0.0
overide with support gpu.
All done . Have a good lucy and Hope you enjoy it!