LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Its possible install AMD Rocm in slackware ? (https://www.linuxquestions.org/questions/slackware-14/its-possible-install-amd-rocm-in-slackware-4175638428/)

USUARIONUEVO 09-14-2018 11:36 PM

Its possible install AMD Rocm in slackware ?
 
This is a simply question , its possible ?

https://github.com/RadeonOpenCompute/ROCm

Thanks !

business_kid 09-15-2018 03:32 PM

I presume it's windoze code, but there's source code. AMD thinks of these things.

Now, after you compile it (and I presume it's standard Ansi C code) you can tell us, can't you? I guess the source code is for MacOS & Linux. If you can't compile it, you can amuse us all by telling us what unhelpful errors it threw at you; and when we stop laughing, we'll make suggestions :-).

linuxtinker 09-15-2018 11:11 PM

Quote:

Originally Posted by business_kid (Post 5903819)
I presume it's windoze code, but there's source code. AMD thinks of these things.

Now, after you compile it (and I presume it's standard Ansi C code) you can tell us, can't you? I guess the source code is for MacOS & Linux. If you can't compile it, you can amuse us all by telling us what unhelpful errors it threw at you; and when we stop laughing, we'll make suggestions :-).




Did you even look at the link before you posted your babble?


taken for the readme file:


bassplayer69 09-16-2018 08:28 AM

@linuxtinker,

Quote:

Ubuntu Support - Installing from a Debian repository
perhaps you can repackage the .deb package and try to installing it? That's after installing any dependencies it first requires.

USUARIONUEVO 09-16-2018 03:34 PM

Quote:

Originally Posted by bassplayer69 (Post 5904013)
@linuxtinker,



perhaps you can repackage the .deb package and try to installing it? That's after installing any dependencies it first requires.

I try one time, but no lucky , its go to /opt/Rocm , and probably needs some ld.so.conf line or something to say the system where are the libraries.

bassplayer69 09-17-2018 05:34 AM

I took a quick look at the repository and do all of the packages in the main pool have to be installed or is there just one main package?

Code:

Index of /rocm/apt/debian/pool/main/
../
a/                                                14-Sep-2018 21:49                  -
c/                                                14-Sep-2018 21:49                  -
h/                                                14-Sep-2018 21:49                  -
m/                                                14-Sep-2018 21:49                  -
r/                                                14-Sep-2018 21:50                  -

There are a lot of .deb packages in those subdirectories. :)

Nille_kungen 09-17-2018 08:01 AM

I haven't tried it but you need to new 1.9 of rocm.
ROCm 1.9 is ABI compatible with KFD in upstream Linux kernels 4.17+, Upstream Linux kernels support the following GPUs in these releases: 4.17: Fiji, Polaris 10, Polaris 11 4.18: Fiji, Polaris 10, Polaris 11, Vega10
That means you need an 4.17+ kernel for compatibility with upstream AMDKFD preferably 4.18+.
There was patches for AMDKFD for the linux kernel but it didn't end up in 4.19 so it will hopefully be in the kernel after that.
https://lists.freedesktop.org/archiv...st/025719.html

Code:

ROCm 1.9 is ABI compatible with KFD in upstream Linux kernels.

Upstream Linux kernels support the following GPUs in these releases: 4.17: Fiji, Polaris 10, Polaris 11 4.18: Fiji, Polaris 10, Polaris 11, Vega10

Some ROCm features are not available in the upstream KFD:

    More system memory available to ROCm applications
    Interoperability between graphics and compute
    RDMA
    IPC

To try ROCm with an upstream kernel, install ROCm as normal, but do not install the rock-dkms package. Also add a udev rule to control /dev/kfd permissions:

echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rule

I do think it's possible to install rocm in slackware but it haven't tried it.

bassmadrigal 09-18-2018 03:21 PM

Looking at the AUR PKGBUILD for rocm, it looks like you could install it and its two dependencies using quite the slew of commands:

Code:

# Compile hsakmt-roct (dependency)
git clone https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git
cd ROCT-Thunk-Interface
git checkout rock-1.9.x
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm ..
make
make install
ln -s /opt/rocm/libhsakmt/include/libhsakmt /usr/include
echo "/opt/rocm/libhsakmt/lib" >> /etc/ld.so.conf
find `pwd` -name "*.pc" -exec install -D '{}' /opt/rocm/libhsakmt ';'
cd ../include
find . -name '*.h' -exec install -D '{}' /opt/rocm/libhsakmt/include/libhsakmt/{} ';'

# Compile hsa-rocr (dependency)
cd
git clone https://github.com/RadeonOpenCompute/ROCR-Runtime
cd ROCR-Runtime
git checkout roc-1.9.x
git remote add build-fix https://github.com/oleid/ROCR-Runtime.git
git fetch build-fix
git cherry-pick b68be8f5101f00b583797781606bf906de973fff
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm -DCMAKE_PREFIX_PATH=/opt/rocm/libhsakmt ../src && \
make
make install
ln -s /opt/rocm/hsa/include/hsa /usr/include
echo "/opt/rocm/hsa/lib" >> /etc/ld.so.conf

# Compile ROCM
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
~/bin/repo init -u https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git -b master -m opencl.xml
~/bin/repo sync
cd opencl
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/rocm/opencl ..
make
su
make install
mkdir /etc/OpenCL/vendors
echo "/opt/rocm/opencl/lib/libamdocl64.so" > /etc/OpenCL/vendors/rocm-opencl64.icd

I haven't tested any of this, so use at your own risk. These could also be adjusted to build a Slackware package, but I didn't take the time to do that.

EDIT: The dependencies were set to use the 1.8.x branch and the ROCM is set to use master. All were last updated in the AUR in June and I see they have 1.9.x branches out now, so the commands might need some tweaking if they need the newer branch.

EDIT2: Based on Nille_kungen's post below, I've updated the checkout commands to get 1.9.x

Nille_kungen 09-20-2018 05:22 AM

The 1.8 was never meant to be run on anything else then the distribution it was released for RHEL/CENTOS.
One of the biggest news with the 1.9 release is that it isn't as distro centric as the 1.8.
It was possible to get rocm 1.8 running on various distribution by patching in the missing parts for kernel drm and so on but i think there was things that wasn't working.
Anyone trying to run rocm should look at 1.9 och leave the older 1.8 to history, to bad i don't have any supported hardware else i would try it out myself.

bassmadrigal 09-20-2018 09:53 AM

Thanks for the heads up. I've updated the commands to checkout the 1.9.x branches.

USUARIONUEVO 09-22-2018 03:02 PM

Hi , thanks bassmadrigal for commands , i need change little line , because directory changes ..


I change this
Quote:

echo "/opt/rocm/libhsakmt/lib" >> /etc/ld.so.conf
to:
Quote:

echo "/opt/rocm/lib64/" >> /etc/ld.so.conf
directory changes , and suffix "64" , in the lib folder.

Thanks one more time, at least build fine , tomorrow i go to test the package.


All times are GMT -5. The time now is 01:11 AM.