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

Re: sbuild schroot setup with amdgpu support



Hi Étienne,

The eventual cause of the build failure is a lack of error checking in the HIP CMake. You can see that the build log states that "ROCm Agent Enumurator Result: 1" to show that rocm_agent_enumerator returned failure, but the build code tried to parse the output anyway. It appears that this problem was fixed in ROCm 5.2 [1].

On 2022-07-16 15:11, Étienne Mollier wrote:
Looking through cmake files[2,3], it looks like I can set
variable OFFLOAD_ARCH_STR to something (gfx000 perhaps?) so i
don't need to go through the rocm_agent_enumerator run.  Would
that make sense for autobuilders without cards?

[2]: https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/debian/5.0.0-1_exp1/hip/tests/catch/CMakeLists.txt#L94
[3]: https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/debian/5.0.0-1_exp1/hip/tests/hit/HIT.cmake#L39

That variable does provide a workaround for ROCm 5.0, but the OFFLOAD_ARCH_STR you use will be passed to hipcc without modification. As such, you'd want to pass a valid argument string. For example, you could pass something like

    -DOFFLOAD_ARCH_STR=' --offload-arch=gfx803 --offload-arch=gfx906 --offload-arch=gfx1030 '

to build for a few selected architectures. In both ROCm 5.0 and ROCm 5.2, if you do not specify this variable, then the tests will attempt to build for whatever AMD GPU hardware is currently installed. In ROCm 5.2, if the hardware can't be detected, I believe it falls back to gfx803. In ROCm 5.0 if the hardware can't be detected, the build fails with the error you saw.

Sincerely,
Cory Bloor

[1]: https://github.com/ROCm-Developer-Tools/HIP/commit/d221fb6ebbe24d66855af8160687aa01b0112dec





Reply to: