xuhuisheng / rocm-build

build scripts for ROCm
Apache License 2.0
181 stars 35 forks source link

[Question] Is it possible to have precompiled Kernels for Navi 14? #41

Open set-soft opened 1 year ago

set-soft commented 1 year ago

Environment

Hardware description
GPU RX5500XT
CPU Ryzen 5 2600
Software version
OS Debian GNU/Linux 11.7
ROCm 5.2
Python 3.9

What is the expected behavior

This is not a bug report, just a question.

As you correctly state "Please test override hsa version first. Then ROCm will use gfx1030 fatbin to run on gfx1012, which needn't re-compile". This is my case, I can fake my board to be gfx1030, things work. But Stable Diffusion WebUI takes around 3 minutes to compile the kernels after complaining:

MIOpen(HIP): Warning [SQLiteBase] Missing system database file: gfx1030_11.kdb Performance may degrade. Please follow instructions to install: https://github.com/ROCmSoftwarePlatform/MIOpen#installing-miopen-kernels-package

Of course I can't install gfx1030_11.kdb because it doesn't exist. I know almost nothing about the ROCm internals so perhaps I'm asking something ridiculous. Do you have such a .kdb? Is mandatory to have the actual GPU to compile them? Can I compile them using the actual GPU, but without needing to compile the whole ROCm (which could take hours in my system, assuming I can free enough disk)

Thanks in advance

xuhuisheng commented 1 year ago

@set-soft

I think this is an interesting question which I didn't awared before. The kdb should be a pre-compiled database that told miopen to find the right strategy to improve speeding for related net layer.

I didn't dig on kdb before, because I think it should be compiled on the runtime. But you are right, it may need to find out the real effects.

I cannot make a certain deadline, if I have any results, I will feed back here.

set-soft commented 1 year ago

Thanks you @xuhuisheng for even considering it! I appreciate your hard work!