[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Notes about ROCm on RDNA2



Hello,

On 2022-07-10 18:49, Cordell Bloor wrote:
LLVM treats the gfx1030 - gfx1036 targets identically. It generates code objects with different processor ids stamped in the metadata, but the executable code is all the same. In fact, if you tell libhsakmt to report the device as being gfx1030, any of the gfx103x GPUs will be able to load and execute code compiled for gfx1030. This can be done by setting an environment variable [1]:

    export HSA_OVERRIDE_GFX_VERSION=10.3.0

There are a few other cases that appear to be similar. It's documented that gfx900, gfx902, gfx909 and gfx90c use the same instruction set [1]. Additionally, gfx1011 and gfx1012 also share an instruction set [2]. None of these architectures are officially supported, but there's at least one in each group that is likely to work.

The gfx900 architecture was officially supported until recently. It has not been tested for a few releases, but it likely still functions correctly. The gfx1011 architecture was never officially supported and, as far as I know, official support is not on the roadmap. However, there were numerous fixes made for gfx1011 in ROCm 5.2, so it is likely to work as well.

I wonder if the other architectures would work too. If so, it might be possible for Debian to support users on gfx900, gfx902, gfx909, gfx90c, gfx1011 and gfx1012 just by building for gfx900 and gfx1011. Users on gfx902, gfx909 and gfx90c would use HSA_OVERRIDE_GFX_VERSION=9.0.0, and users on gfx1012 would use HSA_OVERRIDE_GFX_VERSION=10.1.1.

I don't have the hardware necessary to test this theory, but it's certainly an interesting idea!

Sincerely,
Cory Bloor

[1]: https://llvm.org/docs/AMDGPU/AMDGPUAsmGFX900.html
[2]: https://llvm.org/docs/AMDGPU/AMDGPUAsmGFX1011.html


Reply to: