LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   AMD ROCm support (https://www.linuxquestions.org/questions/slackware-14/amd-rocm-support-4175733461/)

gildbg 02-02-2024 12:25 PM

AMD ROCm support
 
Hi all,

any one was able to install AMD ROCm drivers from AMD site.They have support for other OS's like ubuntu, debian, feodora, redhat but not for slackware. I was trying some machine learning like Whisper but it's seem for most of them only NVIDIA is supported.

I was see a year ago some one was try to port them but without success.

kingbeowulf 02-05-2024 12:43 PM

Take a look here, from the SBO mailinglist:

Quote:

You can find them on my `rocm-5.5.1` branch on github[2]:

https://github.com/414n/slackbuilds.org/blob/rocm-5.5.1

...

[2]: the branch actually contains some WIP scripts/TODOs that I plan to
remove when all the issues are resolved.
I took a crack at it awhile back by then had a medical detour. 414n beat me to it in the meantime. I think he said he will eventually post the buildscripts to SBo once he works out all the kinks.

someusername 02-09-2024 10:38 AM

not my cup of tea, but this might be of interest: http://nhaehnle.blogspot.com/2024/02...m-scratch.html

gildbg 02-15-2024 02:16 AM

Well, I was able to install it and it's worked.

Nothing special for installation process, only one library which it's not part from slackware current need to be installed numactl.
I download all the packages for Ubuntu and write a small bash script which get all debs files, do alien package converter (https://joeyh.name/code/alien/) deb2txz on them and then installpkg.
All the files going to /opt directory so they are not messes with system's. Just need extra ld paths to be added.

It was good for me that I have Ubuntu on my hand so keep me easy to download the packages from official site.

slackartist 02-20-2024 11:34 PM

Yes running ubuntu and with a AVX-less cpu and radeon graphics card couldn't get pytorch to do good on ubuntu. In the end I settle with a docker solution and alienbobs docker packages. Here's what I could do on ubuntu with slackware with cpu only and onnx flags with this repo: https://github.com/fboulnois/stable-diffusion-docker

Until I can get the correct hardware. this is great still 8-D

one thought is how on earth did you get the kernel modules on slackware? I think I'd have to take the ubuntu kernel module and firmware and frankenstein the filesystem together to do it..

further testing on slackware and it seems the docker CLI image generator has a bit of overhead enough to crash my I3 processor on another computer. And on ubuntu running the official SD(no rocm) it doesn't.

downhomechunk 02-27-2024 12:56 PM

Quote:

Originally Posted by kingbeowulf (Post 6481585)
Take a look here, from the SBO mailinglist:



I took a crack at it awhile back by then had a medical detour. 414n beat me to it in the meantime. I think he said he will eventually post the buildscripts to SBo once he works out all the kinks.


I connected with some folks over at the unofficial slackware matrix chat who are working on the same. We've got the build scripts working all the way up to the last package, rocBLAS. I think we're pretty close to having a working sbo script. I'm going to check out your work to see if anything jumps out. I feel like we're just missing some deps, probably a little python thing or two.

https://codeberg.org/slacktoid/ROCm-...omment-1560367

The deb2tgz thought did occur to me, but it seemed too easy. I'm glad to read it worked for someone. Maybe that's the easiest answer?

Pithium 02-27-2024 02:33 PM

I got rocm 6.0.2 runtime to work on -current over the weekend, but am having issues testing the build environment. Here's a quick list of external deps that I needed to install:
  • msgpack-c
  • nlohmann_json
  • python3-cppheaderparser
  • python3-joblib
  • frugally-deep
  • functional-plus
  • numactl



rocBLAS is a beast to compile. IIRC that one will each up 50+GB of disk space if you try to compile for all GPU targets.
It also does some weird python stuff during the build process. You need msgpack and python-joblib to get it to build. MIopen is where I got stuck, but I'm not sure how necessary it is from a runtime perspective.

I'm going to sift through my packages and see if can pull the opencl runtime parts away from the development libraries. If all you want to do is run something like BOINC or phoronix benchmarks you don't need the entire rocm stack.

kingbeowulf 02-27-2024 07:02 PM

Quote:

Originally Posted by downhomechunk (Post 6486263)
I connected with some folks over at the unofficial slackware matrix chat who are working on the same. We've got the build scripts working all the way up to the last package, rocBLAS. I think we're pretty close to having a working sbo script. I'm going to check out your work to see if anything jumps out. I feel like we're just missing some deps, probably a little python thing or two.

https://codeberg.org/slacktoid/ROCm-...omment-1560367

The deb2tgz thought did occur to me, but it seemed too easy. I'm glad to read it worked for someone. Maybe that's the easiest answer?

Looking at the error
Code:

OSError: [Errno 8] Exec format error: '/opt/rocm/bin/hipcc.bat'
is the build trying to run a WINDOWS BATCH FILE???? can't be...

I'll be taking another look at this repo, 414n and pithium if I can dredge up the energy.

I just stumbled slacktoid stuff on codeberg just a few minutes ago. I'm not a fan for deb2tgz etc conversion. I think it's best for performance and stability to build on Slackware directly.

Pithium 02-27-2024 09:08 PM

Quote:

Originally Posted by kingbeowulf (Post 6486307)
Looking at the error
Code:

OSError: [Errno 8] Exec format error: '/opt/rocm/bin/hipcc.bat'
is the build trying to run a WINDOWS BATCH FILE???? can't be...

The .bat file is a launcher script for running the hipcc compiler on windows. There are equivalent versions for other platforms (e.g. linux). Basically their cmake infrastructure gets confused and references the windows helper script on linux.

Not a difficult fix, but I had to hunt through their cmake files. I've got a whole list of things that I need to write down but once I got it working I got distracted with running benchmarks ;)

Nille_kungen 02-28-2024 06:30 AM

Quote:

Originally Posted by Pithium (Post 6486272)
It also does some weird python stuff during the build process. You need msgpack and python-joblib to get it to build.

You should be able to skip the weird python stuff.
https://github.com/ROCm/rocBLAS/issu...ent-1620825360

In the same thread there is one user that needed to activate the virtual environment manually i would try if that solved the building in 15.0
https://github.com/ROCm/rocBLAS/issu...ent-1490777519

I wish i had more time right now to dive in to this since i do think ROCm i useful.

downhomechunk 02-28-2024 03:59 PM

Quote:

Originally Posted by kingbeowulf (Post 6486307)
Looking at the error
I just stumbled slacktoid stuff on codeberg just a few minutes ago. I'm not a fan for deb2tgz etc conversion. I think it's best for performance and stability to build on Slackware directly.

I was replying to an earlier comment about deb2tgz. I was surprised to see it worked. I wouldn't consider trying that for something this complex. But I'm with you, I want to get it built for slackware too.

gildbg 02-29-2024 03:29 AM

From a few days I think it's not necessary the whell to be reinvented if we ask gently AMD to release or made them open source the build scripts, order and necessary library to build the project for Ubuntu for examples. After that it's will be easy the packages to be maintained from some Slackware community. When first time I decide to use the ROCm it's take me almost a two days of preparation to find out information what packages I will need, creating lists and build scripts and orders. Then I realize currently for Slackware user this task takes a lots of time and energy so I get decision just to use Ubuntu packages with deb2tgz. I was think to write an email to AMD and ask them for build scripts and order but it's will be good for our community if someone with more experience to contact them.


All times are GMT -5. The time now is 11:38 PM.