Giter Club home page Giter Club logo

rocm-arch's Introduction

ROCm for Arch Linux AUR

This repository hosts a collection of Arch Linux PKGBUILDs for AMD ROCm Software that have yet to be added to the official Arch Linux repositories. All important ROCm packages are in the official Arch Linux repositories.

Installing from the AUR/Building from source

You can install any package listed here from the AUR. An example using the paru AUR helper.

paru -S <package-name>

Common issues

Please consult this list first before opening an issue.

Package X does not work

Please first check if your GPU is supported by ROCm. A complete list is found in the official documentation

Package X does not build on OS Y

We only support Arch Linux. If a package does not build, first consider building in a clean chroot. The AUR helper paru supports building in clean chroot. Call

paru --chroot

and follow the instructions. Afterward, you can build packages in a clean chroot by calling

paru --chroot -S <package-name>

hipcc errors with stack protector enabled

Some commonly used compiler flags are unsupported by clang (and thus hipcc) from rocm-llvm, including stack protection,

-fstack-protector-all
-fstack-protector-strong
-fstack-protector

See the official documentation for a full list.

OpenCL runtime for Polaris

To enable OpenCL support on Polaris GPUs (gfx800s) set

ROC_ENABLE_PRE_VEGA=1

as an environment variable.

For more helpful tips see the ArchWiki entry on ROCm, here.

Discussions/Support/Issues

For general concerns/comments/support we use Discussions. If you have issues specific to your setup or are having difficulties getting something to work, feel free to post there.

Use the issue tracker to report problems with the AUR packages. Use the issues page of the problematic package in the Arch Linux GitLab to report problems for the offical packages.

rocm-arch's People

Contributors

7910f6ba7ee4 avatar acxz avatar agravgaard avatar chriskitching avatar clapbr avatar darjankrijan avatar evilmav avatar fabiscafe avatar farnoy avatar fernandoblalves avatar helfio avatar holishing avatar illuhad avatar john-gee avatar jp-ellis avatar keyvank avatar lahwaacz avatar linedot avatar marcopompili avatar naetherm avatar neeshy avatar nquest avatar oleid avatar ranisalt avatar rigred avatar s-bernard avatar tpkessler avatar ulyssesrr avatar whoisroot avatar wuxxin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rocm-arch's Issues

[rocthrust] Typos

line 44 should be:
install -d "$pkgdir/etc/ld.so.conf.d"
Also missing makedep rocm-comgr:
Add the folling line as line 34:
-Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \

[rocm-dev] Cyclic dependency

rocprofiler needs the meta package rocm which itself depends on rocm-dev, which among other, lists rocprofiler as a dependency. Is the rocm-dev package really needed?

[rocr-runtime] build failure

Hi guys, I'm facing build failure, here's the log
rocr-runtime.log

However I think that the problem is the same described in this issue ROCm/ROCR-Runtime#47, indeed I tried building as they suggested

TEMP_INCLUDE_DIR=`mktemp -d`
cp -LR /opt/rocm/include/* ${TEMP_INCLUDE_DIR}
rm -f ${TEMP_INCLUDE_DIR}/hsa.h
rm -f ${TEMP_INCLUDE_DIR}/amd_hsa_*.h
mkdir build
cd build
cmake -DHSAKMT_INC_PATH:STRING=${TEMP_INCLUDE_DIR} \
-DHSAKMT_LIB_PATH:STRING=/opt/rocm/lib \
..
make

and it worked.
The problem seems to be that hsa headers in /opt/rocm/include are obsolete, whereas the updated one can be found in /opt/rocm/hsa/include.

(EDIT)

I implemented the workaround above in the PKGBUILD and now building with makepkg works fine.

[hipcub] hipcub depends on rocm-comgr to build

Should add it to makedep
Also need to insert this line to line 33
-Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \
Or else it gives the following error:

CMake Error at /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  By not providing "Findamd_comgr.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "amd_comgr", but CMake did not find one.

  Could not find a package configuration file provided by "amd_comgr" with
  any of the following names:

    amd_comgrConfig.cmake
    amd_comgr-config.cmake

  Add the installation prefix of "amd_comgr" to CMAKE_PREFIX_PATH or set
  "amd_comgr_DIR" to a directory containing one of the above files.  If
  "amd_comgr" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  /opt/rocm/hip/lib/cmake/hip/hip-config.cmake:78 (find_dependency)
  cmake/VerifyCompiler.cmake:63 (find_package)
  CMakeLists.txt:47 (include)

hip-hcc dependency issue

Hi, I noticed that hip-hcc should depend on rocm-comgr.

Building hip-hcc without rocm-comgr results an failure:

CMake Error at CMakeLists.txt:349 (find_package):                           
  Could not find a package configuration file provided by "amd_comgr" with  
  any of the following names:                                               
                                                                            
    amd_comgrConfig.cmake                                                   
    amd_comgr-config.cmake                                                  
                                                                            
  Add the installation prefix of "amd_comgr" to CMAKE_PREFIX_PATH or set    
  "amd_comgr_DIR" to a directory containing one of the above files.  If     
  "amd_comgr" provides a separate development package or SDK, be sure it has
  been installed.                                                           

rocm-cmake PKGBUILD cannot work in it's current state

The current PKGBUILD of rocm-cmake tries to write to a root directory during the package phase.
This is forbidden by the PKGBUILD as it is not writing to the fakeroot $pkgdir directory.

==> Making package: rocm-cmake 3.0.0-1 (Sun Mar  8 08:47:30 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found roc-3.0.0.tar.gz
==> Validating source files with sha256sums...
    roc-3.0.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting roc-3.0.0.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rgr/code/PKGBUILDS/rocm-arch/rocm-cmake/src/build
==> Entering fakeroot environment...
==> Starting package()...
Install the project...
-- Install configuration: ""
-- Up-to-date: /opt/rocm/./share
-- Up-to-date: /opt/rocm/./share/rocm
-- Up-to-date: /opt/rocm/./share/rocm/cmake
-- Installing: /opt/rocm/./share/rocm/cmake/ROCMPackageConfigHelpers.cmake
CMake Error at cmake_install.cmake:41 (file):
  file INSTALL cannot copy file
  "/home/rgr/code/PKGBUILDS/rocm-arch/rocm-cmake/src/rocm-cmake-roc-3.0.0/share/rocm/cmake/ROCMPackageConfigHelpers.cmake"
  to "/opt/rocm/./share/rocm/cmake/ROCMPackageConfigHelpers.cmake":
  Permission denied.


make: *** [Makefile:86: install] Error 1
==> ERROR: A failure occurred in package().
    Aborting...

Instead I suggest changing the PKGBUILD to this older (but correct) code

# Original build: fermyon <[email protected]>
# Maintainer: Markus Näther <[email protected]>
pkgname=rocm-cmake
pkgver=3.0.0
pkgrel=1
pkgdesc="cmake modules for common build tasks needed for the ROCM software stack"
arch=(x86_64)
url="https://github.com/RadeonOpenCompute/rocm-cmake"
license=(MIT)
makedepends=(git cmake)
conflicts=(rocm-cmake-git)
source=("https://github.com/RadeonOpenCompute/rocm-cmake/archive/roc-$pkgver.tar.gz")
sha256sums=('9393fd534a100e8da55f44d0625337d76f3c7890e0297fe690c9e7d384b205ef')

build() {
    cd "$srcdir/${pkgname}-roc-${pkgver}"
    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX="$pkgdir/opt/rocm" ..
}

package() {
    cd "$srcdir/${pkgname}-roc-${pkgver}/build"
    cmake --build . --target install
}

Specifically note the line

    cmake -DCMAKE_INSTALL_PREFIX="$pkgdir/opt/rocm" ..

Which sets the $pkgdir value as makepkg will otherwise attempt to write to the root /opt/rocm path.

[rock-dkms] upstream package updated

AMD updated the version of their deb package:

diff --git a/PKGBUILD b/PKGBUILD
index 100faeb..aeb6da3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Olaf Leidinger <[email protected]>
 pkgname=rock-dkms
-pkgver=3.1.35
-_pkgver=3.1-35
+pkgver=3.1.44
+_pkgver=3.1-44
 pkgrel=1
 pkgdesc="Linux AMD GPU kernel driver from ROC in DKMS format."
 arch=('any')
@@ -11,7 +11,7 @@ depends=('dkms>=1.95')
 backup=('etc/modprobe.d/blacklist-radeon.conf')
 options=('!strip' '!emptydirs')
 source=("http://repo.radeon.com/rocm/apt/debian/pool/main/r/rock-dkms/rock-dkms_${_pkgver}_all.deb")
-sha256sums=('21f6caf7ffc4ef29a6cde7353fd9e2d0fc97d9e9755c62bc6af7a736126925c2')
+sha256sums=('6d79b2162d1c0dc925afa62103f6fe28618c851dd345abf28cbb1346288d4a53')
 
 package() {
   cd "$srcdir"

Add everybody to each package's list of co-maintainers

This includes: naetherm, neeshy, rsa

So far we have:

  • aomp
  • atmi
  • clang-ocl
  • comgr
  • hcc
  • hcc-git
  • hip
  • hipblas
  • hip-clang
  • hipcub
  • hip-git
  • hip-hcc
  • hip-nvcc
  • hipsparse
  • hsa-amd-aqlprofile
  • hsa-ext-rocr
  • hsa-rocr
  • hsa-rocr-git
  • hsakmt-roct
  • hsakmt-roct-git
  • llvm-amdgpu
  • llvm-roc
  • migraphx
  • miopen
  • miopengemm
  • mivisionx
  • rccl
  • rocalution
  • rocblas
  • rocfft
  • rock-dkms
  • rock-dkms-git
  • rocm-bandwidth-test
  • rocm-dev
  • rocm-device-libs
  • rocm-dkms
  • rocm-clang-ocl
  • rocm-cmake
  • rocm-cmake-git
  • rocm-comgr
  • rocm-libs
  • rocm-opencl-runtime
  • rocm-smi
  • rocm-smi-lib
  • rocm-utils
  • rocm-validation-suite
  • rocminfo
  • rocprim
  • rocprofiler
  • rocr-debug-agent
  • rocrand
  • rocr-runtime-git
  • rocsparse
  • rocthrust
  • roctracer

[hcc] HCC build failure

I have the following error during building
ln: failed to create symbolic link '/home/lasercat/Downloads/rocm-arch-master/hcc/pkg/hcc/usr/bin/bin': File exists
Possibly caused by:

ln -s "/opt/rocm/hcc/bin/$fn" "$pkgdir/usr/bin/$fn"

I changed to

  for _fn in hcc hcc-config; do
    ln -s "/opt/rocm/hcc/bin/$_fn" "$pkgdir/usr/bin/$_fn";
  done

and it can then generate a package(not sure whether the built package works properly tho).

[hcc] Add python to makedepends

The llvm dependency (at least) requires python to build. This should be added to makedepends to support tools that build in a clean chroot (e.g. aur sync --chroot).

I think this is the only missing build dependency, though I can't be completely certain due to the hcc build failing for the reason reported in #25. At the very least, the configure step passes when this is added.

Discussion on package maintainance

Thought I would make an issue chain since it is easier to follow.

So first thing first is to get all ROCm related packages in this repo

Once we have all the packages in this repo, it would be nice if we can get some CI going with this and automatic syncing with the AUR.

  • CI
  • automatic syncing to the AUR

Having binary packages for these PKGBUILDs seems like a really good idea as well, especially since some of them take forever, looking at you llvm. We can talk to the arch4edu folks and request binary packages for our repo. Associated request: arch4edu/arch4edu#60

  • binary packages

Once we get a significant number of binary packages, let's also try to upstream ArchLinux installation instructions for using the binary repo and these PKGBUILDs. Upstream PR to add instructions on installing ROCm on Arch: RadeonOpenCompute/ROCm_Documentation#73
Note: Since AMD does not officially support Arch Linux, they cannot add the instructions to their repo however, they did create a community FAQ here based on the above PR. Checking this off.

  • add upstream instructions

With regards to documentation, I think it would be nice if someone can flesh out the ArchWiki section for ROCm here.
For a more concrete documentation plan, see: #204

  • flesh out ROCm entry on the ArchWiki

We also should get all the packages under one maintainer, so as to prevent each other from pushing to the AUR outside of this repo. (Maybe this step should be done after we automate the syncing.)

  • Put packages under one maintainer

After the builds work we should also get the test suites working, to actually confirm the working status of our packages. This also might help us pinpoint other errors like runtime performance.

  • Add check() functions in PKGBUILDs

[rocprim] does not build

The line for cmake lacks a backslash:

diff --git a/rocprim/PKGBUILD b/rocprim/PKGBUILD
index 3fa2a65..81535eb 100644
--- a/rocprim/PKGBUILD
+++ b/rocprim/PKGBUILD
@@ -27,7 +27,7 @@ build() {
   cmake -DCMAKE_BUILD_TYPE=Release \
         -DCMAKE_INSTALL_PREFIX=/opt/rocm/rocprim \
         -DBUILD_TEST=OFF \
-        -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr
+        -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \
         "$srcdir/rocPRIM-$pkgver"
   make
 }

Change install to versioned directory path

https://rocm-documentation.readthedocs.io/en/latest/Current_Release_Notes/Current-Release-Notes.html#before-you-begin

Please see above first ^^

Currently this project is still using the /opt/rocm directory structure while upstream has changed to using a versioned path of /opt/rocm-3.1.0 as an example.

I've noticed that several of the upstream code snippets use hard coded /opt/rocm-$version paths now and it would be unwise to manually git patch around that. We should just adopt this into the current project to make maintenance easier long term.

[hcc] build failure

Hello, I'm facing build failure while building hcc on manjaro 5.5.6-1. Compilation stops at the following point:

[1661/5463] Building CXX object compiler/projects/compiler-rt/lib/sanitizer_c...RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cpp.o FAILED: compiler/projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cpp.o /usr/bin/c++ -DHAVE_RPC_XDR_H=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Icompiler/projects/compiler-rt/lib/sanitizer_common -I/home/andrea/build/hcc/src/hcc-roc-hcc-2.10.0/compiler-rt/lib/sanitizer_common -Iinclude -I/home/andrea/build/hcc/src/hcc-roc-hcc-2.10.0/include -I/home/andrea/build/hcc/src/hcc-roc-hcc-2.10.0/compiler/include -I/usr/include/libxml2 -Icompiler/include -I/home/andrea/build/hcc/src/hcc-roc-hcc-2.10.0/compiler-rt/lib/sanitizer_common/.. -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++14 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++14 -Wno-unused-parameter -O3 -DNDEBUG -m32 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -Wframe-larger-than=570 -MD -MT compiler/projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cpp.o -MF compiler/projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cpp.o.d -o compiler/projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cpp.o -c /home/andrea/build/hcc/src/hcc-roc-hcc-2.10.0/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
In file included from /home/andrea/build/hcc/src/hcc-roc-hcc-2.10.0/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:162: /home/andrea/build/hcc/src/hcc-roc-hcc-2.10.0/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:342:72: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ [-Wnarrowing] 342 | typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1] |

thanks in advance for the awesome job you are doing!

[rocprofiler] CMake variables `NOTFOUND`

This issue is similar to #46
Again, rocm is listed as dependency. When removed, the configuration step fails:

---------Install-Dir: /opt/rocm/rocprofiler/rocprofiler
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HSA_KMT_LIB
    linked by target "ctrl" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0/test
    linked by target "standalone_test" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0/test
    linked by target "intercept_test" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0/test
HSA_RUNTIME_LIB
    linked by target "rocprofiler64" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0
    linked by target "tool" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0/test
    linked by target "ctrl" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0/test
    linked by target "standalone_test" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0/test
    linked by target "intercept_test" in directory /home/torsten/pkg/rocm-arch/rocprofiler/src/rocprofiler-roc-3.1.0/test

-- Configuring incomplete, errors occurred!

[roctracer] CMake variables `NOTFOUND`

The PKGBUILD script for roctracer lists 'rocm' as a dependency. However, there's no such package. If I replace it with rocm-cmake, the configuration with cmake fails:

---------Install-Dir: /opt/rocm/roctracer/roctracer
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HSA_KMT_LIB
    linked by target "ctrl" in directory /home/torsten/pkg/rocm-arch/roctracer/src/roctracer-roc-3.1.0/test/hsa/test
HSA_RUNTIME_LIB
    linked by target "roctracer64" in directory /home/torsten/pkg/rocm-arch/roctracer/src/roctracer-roc-3.1.0
    linked by target "tracer_tool" in directory /home/torsten/pkg/rocm-arch/roctracer/src/roctracer-roc-3.1.0/test
    linked by target "ctrl" in directory /home/torsten/pkg/rocm-arch/roctracer/src/roctracer-roc-3.1.0/test/hsa/test

-- Configuring incomplete, errors occurred!

[rocm-opencl-runtime] devendor

Currently, rocm-opencl-runtime clones it's own copy of rocm-cmake. It should be modified to use rocm-cmake as a makedepend instead.

Thank you!

I would like to thank you for your fantastic work! It's the first time (ROCm 3.1) I'm able to compile nearly all packages. Keep up your great work.

[llvm-roc] Uses too much RAM

# building LLVM/Clang requires ~1.5G per unit                               
THREADS=$(( ($(getconf _PHYS_PAGES) * $(getconf PAGESIZE)) / 1610612736 ))  

Is quite wrong. My PC almost just died (was freezing like crazy because of swap storm). Ok, I've got 24 threads (AMD 3900x), so maybe some people get protected from this. Anyway, it was particularly nasty with the last link at 100%. Some ld tasks at the end take over 4GB of RAM.

With 4.5GB instead of 1.5, my system survived…

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.