This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt install git build-essential cmake libgtest-dev \ | |
rocm-cmake rocminfo libamd-comgr-dev libhsakmt-dev \ | |
libhsa-runtime-dev file hipcc | |
git clone https://github.com/ROCmSoftwarePlatform/rocRAND.git | |
cd rocRAND | |
git checkout rocm-5.2.0 | |
# These environment variables are needed for now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Build ROCm 5.2.0 on Ubuntu 20.04 | |
set -exuo pipefail | |
apt-get -qq update | |
apt-get -qq upgrade | |
apt-get -qq install build-essential cmake wget | |
WORKSPACE=$HOME # where to download and build the sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install basic tools | |
sudo apt install build-essential devscripts packaging-dev git vim dos2unix | |
# setup workspace to build in | |
mkdir hip | |
cd hip | |
gbp clone https://salsa.debian.org/rocm-team/rocm-hipamd.git | |
cd rocm-hipamd | |
gbp export-orig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <hip/hip_runtime.h> | |
/* | |
* Feature Test: Test if DPP is supported. Use DPP if supported; | |
* use fallback if not. | |
* | |
* Pros: Successful compilation by default. | |
* Maybe optimal performance by default? | |
* Cons: The compiler would have to provide some way to test if the | |
* necessary DPP functionality is supported. That might not exist yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ hipcc -c dpp-builtin.cpp --offload-arch=gfx906 | |
$ hipcc -c dpp-builtin.cpp --offload-arch=gfx1030 | |
error: Illegal instruction detected: Invalid dpp_ctrl value: broadcasts are not supported on GFX10+ | |
renamable $vgpr0 = V_MOV_B32_dpp undef $vgpr0(tied-def 0), killed $vgpr0, 323, 12, 15, 0, implicit $exec | |
1 error generated when compiling for gfx1030. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Ubuntu 20.04 example of using modules files generated by Spack | |
# See also https://spack.readthedocs.io/en/latest/module_file_support.html | |
sudo apt -y install git unzip openssl python3 python3-dev python3-distutils build-essential gfortran | |
git clone -b v0.18.0 https://github.com/spack/spack.git | |
# Here we would normally source spack/share/spack/setup-env.sh, | |
# but that's only really needed for `spack load`. We're going to | |
# use modules instead of `spack load`, so we can skip that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -exuo pipefail | |
apt-get -qq update | |
apt-get -qq upgrade | |
apt-get -qq install build-essential cmake python3 wget perl file \ | |
clang libclang-dev libamd-comgr-dev rocm-device-libs rocm-cmake libhsakmt-dev libhsa-runtime-dev \ | |
zlib1g-dev libnuma-dev mesa-common-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A build script for ROCm 5.0 on Debian Sid. Run this script in a | |
# docker container started with permissions like these: | |
# | |
# docker run -it --device=/dev/dri --device=/dev/kfd \ | |
# --security-opt seccomp=unconfined \ | |
# --group-add=video \ | |
# --net host \ | |
# debian:sid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(ExampleVcpkgIfort LANGUAGES CXX) | |
set(CMAKE_CXX_STANDARD 17) | |
find_package(fmt REQUIRED) | |
add_executable(ex example.cpp) | |
target_link_libraries(ex fmt::fmt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru a/rocSOLVER-rocm-4.5.2/library/src/CMakeLists.txt b/rocSOLVER-rocm-4.5.2/library/src/CMakeLists.txt | |
--- a/rocSOLVER-rocm-4.5.2/library/src/CMakeLists.txt 2021-10-11 12:24:22.000000000 -0600 | |
+++ b/rocSOLVER-rocm-4.5.2/library/src/CMakeLists.txt 2022-02-08 01:18:46.093325505 -0700 | |
@@ -251,16 +251,13 @@ | |
INCLUDE | |
${CMAKE_SOURCE_DIR}/library/include | |
${CMAKE_BINARY_DIR}/include | |
- PREFIX rocsolver | |
) | |