Generalize linux distro handling
Addresses this issue Generalize linux distro handling
On Fedora, /opt/rocm does not exist and the ROCm locations are determined by Fedora's packaging requirements. So add some logic to find these tools if the exiting logic fails and add some tests to make sure nothing breaks for other folks.
Honestly, a lot of the /opt/rocm paths could be replaced with @CMAKE_INSTALL_PREFIX@ with templating (see https://cmake.org/cmake/help/latest/command/configure_file.html)
Honestly, a lot of the /opt/rocm paths could be replaced with @CMAKE_INSTALL_PREFIX@ with templating (see https://cmake.org/cmake/help/latest/command/configure_file.html)
This sounds like a good idea for the cmake buildable rocm packages. I do not know if this applies to Tensile.
Hi @trixirt, thank you for your effort trying to improve the out-of-box user experience of ROCm on Fedora/CentOS, we really do appreciate it! However, after some discussions, we felt that this change does not align with ROCm's current support policy, since it wouldn't really make sense to push out-of-box support for Tensile on Fedora in particular when other parts of ROCm are not being officially supported. This might prompt demands for support on other unsupported OS too which will be out of our current development scope. We had to draw the line somewhere, and we reasoned that if a user were to get a piece of software running on an unsupported OS, some level of tinkering should be expected; hence allowing path customization through the ROCM_PATH variable should be sufficient for now.
At the time of writing, Fedora is doing independent distribution of ROCm that actually branches off from the official ROCm. I suggest trying to talk to the Fedora team for how to offer better out-of-box support for components such as Tensile on their OS for now.
Thank you for your understanding!