lamikr / rocm_sdk_builder

Other
113 stars 8 forks source link

Some fixes for Ubuntu 22.04 / Linux Mint 21 #45

Closed Stefan-Olt closed 3 weeks ago

Stefan-Olt commented 3 weeks ago

These are the patches I used to be able to compile on Linux Mint. I have not included libstdc++-12-dev in the list of packages to install, because I'm not sure if that breaks newer Ubuntu versions. The default cmake is also too old for some parts, it probably needs upgrading with pip

lamikr commented 3 weeks ago

For some reason on my build on virtual machine the MIOpen, AMDMiGraphX and rocWMMA did not need the linker scripts for me. Wondering could the extra cmake install you had been somehow caused some differences in linking.

I will anyway test now with your changes in with couple of distros and if it works, then I will take those in just in case as lld seems to behave more easy in some cases.

For the dependency issue: I have patch coming which will check if Mint version is 21 or Ubuntu version is 22.04 and in those cases install extra packages with "sudo apt install libstdc++-12-dev libgfortran-12-dev gfortran-12"

Stefan-Olt commented 3 weeks ago

Did everything compile with default cmake? I got an error that cmake is too old for onnxruntime

Checking for mint 21.x and Ubuntu 22.04 is very good idea.

lamikr commented 3 weeks ago

My Linux Mint build is not yet finished yet. I stopped when it started building magma, applied your patches and rebuild openmi, amdmigraphx and rocWMA again. So it's now on magma again and it takes propably 2-3 hours on my laptop to reach the onnxruntime phase.

Have you been able to test the build yet by running examples from docs/examples folder? They are just short one to test that jupyter-notebook, opencl, pytorch, onnxruntime integration, etc. works

Stefan-Olt commented 3 weeks ago

Yes, I run all tests, could not find any issue. Except I have to set HSA_OVERRIDE_GFX_VERSION=10.3.1, because I build for gfx1031, but I have a RX 6600 (gfx1032). gfx1032 is not supported by all components (I tried to add gfx1032 in the list, but at some point it fails because gfx1032 is unknown). Not sure if a build for gfx1032 would change anything (better performance?)

lamikr commented 3 weeks ago

That was good confirmation. I can try to check the 1032 at some point but I think at this point the more clearest way would be to remove the option of selecting gfx1032 from the configuration and instead recommend building for 1031 and then using the override flag.

Stefan-Olt commented 3 weeks ago

There is no option to select the gfx1032, I added it for me to see if it works. Result: It does not work, not all components recognize the gpu type gfx1032