1
0
Fork 0

toolchain cleanups ...

main
Jeff Moe 2024-02-04 19:47:44 -07:00
parent 9eb0cbe06c
commit d5390c3a4c
8 changed files with 107 additions and 103 deletions

View File

@ -1,24 +1,25 @@
#!/bin/bash
rm -rf amdsmi
git clone https://github.com/ROCm/amdsmi
cd amdsmi/
# git checkout develop
git checkout rocm-6.0.2
rm -rf build
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
-DROCM_DIR=/opt/rocm \
-DCPACK_BINARY_DEB=ON \
-DCPACK_BINARY_STGZ=OFF \
-DCPACK_BINARY_TGZ=OFF \
-DCPACK_BINARY_TZ=OFF \
-DCPACK_GENERATOR=DEB \
-DCPACK_PACKAGE_CONTACT="Jeff Moe <moe@parrot.codes>" \
-DCPACK_SOURCE_TBZ2=OFF \
-DCPACK_SOURCE_TGZ=OFF \
-DCPACK_SOURCE_TZ=OFF \
-DCPACK_SOURCE_TXZ=OFF \
-DCPACK_GENERATOR=DEB \
-DCPACK_PACKAGE_CONTACT="Jeff Moe <moe@parrot.codes>"
-DCPACK_SOURCE_TZ=OFF \
-DROCM_DIR=/opt/rocm
ninja -C build package
sudo dpkg -i build/amd-smi-lib_24.2.0.99999-local_amd64.deb
sudo dpkg -i build/amd-smi-lib_23.4.2.99999-local_amd64.deb \
build/amd-smi-lib-tests_23.4.2.99999-local_amd64.deb

View File

@ -1,5 +1,9 @@
#!/bin/bash
# hip
git clone https://github.com/ROCm/HIP hip
# clr
rm -rf clr
git clone https://github.com/ROCm/clr
#export CLR_DIR="$(readlink -f clr)"
@ -7,9 +11,10 @@ git clone https://github.com/ROCm/clr
#export HIPCC_DIR="$(readlink -f hipcc)"
cd clr/
# develop branch fails (the main branch in their repo), needs this tag to build:
git checkout rocm-6.0.0
# git checkout rocm-6.0.0
# git checkout rocm-6.0.2
# git checkout rocm-6.0.x
# meh
virtualenv venv
source venv/bin/activate
pip install -U setuptools pip wheel
@ -30,6 +35,7 @@ cmake -B build -G Ninja \
-DCPACK_BINARY_TZ=OFF \
-DCPACK_SOURCE_TBZ2=OFF \
-DCPACK_SOURCE_TGZ=OFF \
-DCPACK_SOURCE_TXZ=OFF \
-DCPACK_SOURCE_TZ=OFF \
-DCPACK_GENERATOR=DEB \
-DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm \

View File

@ -1,23 +1,23 @@
#!/bin/bash
cd llvm-project/amd/device-libs
rm -rf build
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
-DCMAKE_PREFIX_PATH=/home/jebba/devel/ROCm/llvm-project/build \
-DCPACK_BINARY_DEB=ON \
-DCPACK_BINARY_STGZ=OFF \
-DCPACK_BINARY_TGZ=OFF \
-DCPACK_BINARY_TZ=OFF \
-DCPACK_GENERATOR=DEB \
-DCPACK_SOURCE_TBZ2=OFF \
-DCPACK_SOURCE_TGZ=OFF \
-DCPACK_SOURCE_TZ=OFF \
-DROCM_DIR=/opt/rocm \
-DCPACK_GENERATOR=DEB \
-DROCM_CCACHE_BUILD=ON \
-DCMAKE_PREFIX_PATH=/home/jebba/devel/ROCm/llvm-project/build \
-DClang_DIR=/usr/lib/cmake/clang \
-DLLVM_DIR=/usr/lib/cmake/llvm
-DLLVM_DIR=/usr/lib/cmake/llvm \
-DROCM_CCACHE_BUILD=ON \
-DROCM_DIR=/opt/rocm
ninja -C build package
sudo dpkg -i /home/jebba/devel/ROCm/llvm-project/amd/device-libs/build/rocm-device-libs_1.0.0.99999-local_amd64.deb
sudo dpkg -i build/rocm-device-libs_1.0.0.99999-local_amd64.deb

View File

@ -1,11 +1,7 @@
#!/bin/bash
rm -rf llvm-project
git clone --recursive https://github.com/ROCm/llvm-project
cd llvm-project/
git checkout amd-stg-open
rm -rf build/
cmake -S llvm -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
@ -13,28 +9,26 @@ cmake -S llvm -B build -G Ninja \
-DCPACK_BINARY_STGZ=OFF \
-DCPACK_BINARY_TGZ=OFF \
-DCPACK_BINARY_TZ=OFF \
-DCPACK_DEBIAN_PACKAGE_MAINTAINER="Jeff Moe <moe@parrot.codes>" \
-DCPACK_PACKAGE_CONTACT="Jeff Moe <moe@parrot.codes>" \
-DCPACK_SOURCE_STGZ=OFF \
-DCPACK_SOURCE_TBZ2=OFF \
-DCPACK_SOURCE_TGZ=OFF \
-DCPACK_SOURCE_TZ=OFF \
-DCPACK_SOURCE_STGZ=OFF \
-DLIBCLANG_BUILD_STATIC=ON \
-DLLVM_BUILD_BENCHMARKS=OFF \
-DLLVM_BUILD_TESTS=OFF \
-DLLVM_CCACHE_BUILD=ON \
-DLLVM_ENABLE_LLD=OFF \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld" \
-DLLVM_TARGETS_TO_BUILD="X86;host;AMDGPU" \
-DLLVM_ENABLE_Z3_SOLVER=ON \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_TOOL_LLDB_BUILD=OFF \
-DLLVM_TARGETS_TO_BUILD="X86;host;AMDGPU" \
-DLLVM_TOOL_COMPILER_RT_BUILD=ON \
-DLIBCLANG_BUILD_STATIC=ON \
-DLLVM_TOOL_COMPILER_RT_BUILD=ON \
-DCPACK_DEBIAN_PACKAGE_MAINTAINER="Jeff Moe <moe@parrot.codes>" \
-DCPACK_PACKAGE_CONTACT="Jeff Moe <moe@parrot.codes>"
-DLLVM_TOOL_LLDB_BUILD=OFF
ninja -C build package
sudo dpkg -i build/LLVM-18.0.0git-Linux.deb

View File

@ -1,11 +1,8 @@
#!/bin/bash
rm -rf rocm-cmake
git clone https://github.com/ROCm/rocm-cmake
cd rocm-cmake/
# git checkout develop
git checkout rocm-6.0.2
rm -rf build
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
@ -16,7 +13,8 @@ cmake -B build -G Ninja \
-DCPACK_SOURCE_TBZ2=OFF \
-DCPACK_SOURCE_TGZ=OFF \
-DCPACK_SOURCE_TXZ=OFF \
-DCPACK_SOURCE_TZ=OFF
-DCPACK_SOURCE_TZ=OFF \
-DROCM_DEP_ROCMCORE=OFF
ninja -C build package
sudo dpkg -i build/rocm-cmake_0.11.0-b04260e_amd64.deb
sudo dpkg -i build/rocm-cmake_0.11.0-5a34e72_amd64.deb

View File

@ -1,26 +1,26 @@
#!/bin/bash
rm -rf rocm-core
git clone https://github.com/ROCm/rocm-core
cd rocm-core/
# git checkout master
# git checkout remotes/origin/develop
git checkout rocm-6.0.2
rm -rf build
# VERSION 6.0.0, some version must be specified...
# A version must be specified...
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
-DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm \
-DCPACK_BINARY_DEB=ON \
-DCPACK_BINARY_STGZ=OFF \
-DCPACK_BINARY_TGZ=OFF \
-DCPACK_BINARY_TZ=OFF \
-DCPACK_GENERATOR=DEB \
-DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm \
-DCPACK_SOURCE_TBZ2=OFF \
-DCPACK_SOURCE_TGZ=OFF \
-DCPACK_SOURCE_TXZ=OFF \
-DCPACK_SOURCE_TXZ=OFF \
-DCPACK_SOURCE_TZ=OFF \
-DCPACK_SOURCE_TXZ=OFF \
-DCPACK_SOURCE_TXZ=OFF \
-DCPACK_GENERATOR=DEB \
-DROCM_VERSION=6.0.0
-DROCM_VERSION=6.0.2
ninja -C build package
sudo dpkg -i build/rocm-core_6.0.0.60000-local_amd64.deb
sudo dpkg -i build/rocm-core_6.0.2.60002-local_amd64.deb

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tinyrocs 0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-30 15:13-0700\n"
"POT-Creation-Date: 2024-02-04 19:00-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
@ -75,35 +75,39 @@ msgid ""
"other repos. For ``clr`` (OpenCL), the ``rocm-6.0.0`` tag was used."
msgstr ""
#: ../../../_source/toolchain.rst:40
#: ../../../_source/toolchain.rst:38
msgid "Latest upstream as of this is ``6.0.2``."
msgstr ""
#: ../../../_source/toolchain.rst:41
msgid "LLVM"
msgstr ""
#: ../../../_source/toolchain.rst:47
#: ../../../_source/toolchain.rst:48
msgid "rocm-core"
msgstr ""
#: ../../../_source/toolchain.rst:48
#: ../../../_source/toolchain.rst:49
msgid "Build ``rocm-core``."
msgstr ""
#: ../../../_source/toolchain.rst:55
#: ../../../_source/toolchain.rst:56
msgid "rocm-cmake"
msgstr ""
#: ../../../_source/toolchain.rst:56
#: ../../../_source/toolchain.rst:57
msgid "Build ``rocm-cmake``."
msgstr ""
#: ../../../_source/toolchain.rst:63
#: ../../../_source/toolchain.rst:64
msgid "amd-smi"
msgstr ""
#: ../../../_source/toolchain.rst:64
#: ../../../_source/toolchain.rst:65
msgid "Build ``amd-smi``."
msgstr ""
#: ../../../_source/toolchain.rst:69
#: ../../../_source/toolchain.rst:70
msgid ""
"After LLVM is built above, and the other packages, in particular ``rocm-"
"core``, perhaps ``device-libs`` can be built. In this build, the ``device-"
@ -111,148 +115,148 @@ msgid ""
"repo for device libs."
msgstr ""
#: ../../../_source/toolchain.rst:74
#: ../../../_source/toolchain.rst:75
msgid "``amd/hipcc`` --- HIP CC compiler (clang wrapper)."
msgstr ""
#: ../../../_source/toolchain.rst:76
#: ../../../_source/toolchain.rst:77
msgid "``amd/device-libs`` --- AMD device libs."
msgstr ""
#: ../../../_source/toolchain.rst:78
#: ../../../_source/toolchain.rst:79
msgid "``amd/comgr`` --- Code Object Manager."
msgstr ""
#: ../../../_source/toolchain.rst:82
#: ../../../_source/toolchain.rst:83
msgid "device-libs"
msgstr ""
#: ../../../_source/toolchain.rst:83
#: ../../../_source/toolchain.rst:84
msgid "Build ``device-libs``."
msgstr ""
#: ../../../_source/toolchain.rst:90
#: ../../../_source/toolchain.rst:91
msgid "roct-thunk-interface"
msgstr ""
#: ../../../_source/toolchain.rst:91
#: ../../../_source/toolchain.rst:92
msgid "Build ``roct-thunk-interface``."
msgstr ""
#: ../../../_source/toolchain.rst:98
#: ../../../_source/toolchain.rst:99
msgid "rocr-runtime"
msgstr ""
#: ../../../_source/toolchain.rst:99
#: ../../../_source/toolchain.rst:100
msgid ""
"Build ``rocr-runtime``. Needs hsakmtConfig.cmake from ROCT-Thunk-Interface "
"first."
msgstr ""
#: ../../../_source/toolchain.rst:105
#: ../../../_source/toolchain.rst:106
msgid ""
"For some reason, this is installing headers to ``/usr/hsa`` instead of ``/"
"opt/rocm``. It is ignoring the ``PREFIX``. Workaround..."
msgstr ""
#: ../../../_source/toolchain.rst:110
#: ../../../_source/toolchain.rst:111
msgid "comgr"
msgstr ""
#: ../../../_source/toolchain.rst:111
#: ../../../_source/toolchain.rst:112
msgid "Build ``comgr``."
msgstr ""
#: ../../../_source/toolchain.rst:113
#: ../../../_source/toolchain.rst:114
msgid ""
"Needs AMD device-libs built first. Needs hsa-runtime64Config.cmake first "
"from ROCR-Runtime"
msgstr ""
#: ../../../_source/toolchain.rst:121
msgid "clr"
msgstr ""
#: ../../../_source/toolchain.rst:122
msgid "OpenCL and more."
msgstr ""
#: ../../../_source/toolchain.rst:129
msgid "hipcc"
msgstr ""
#: ../../../_source/toolchain.rst:130
#: ../../../_source/toolchain.rst:123
msgid "hipcc built under clr. This seems better."
msgstr ""
#: ../../../_source/toolchain.rst:137
#: ../../../_source/toolchain.rst:130
msgid "rocminfo"
msgstr ""
#: ../../../_source/toolchain.rst:138
#: ../../../_source/toolchain.rst:131
msgid "Yes, ``rocminfo``"
msgstr ""
#: ../../../_source/toolchain.rst:145
msgid "rocBLAS"
#: ../../../_source/toolchain.rst:138
msgid "clr"
msgstr ""
#: ../../../_source/toolchain.rst:139
msgid "OpenCL and more."
msgstr ""
#: ../../../_source/toolchain.rst:146
msgid "rocBLAS"
msgstr ""
#: ../../../_source/toolchain.rst:147
msgid "Needed before hipBLAS."
msgstr ""
#: ../../../_source/toolchain.rst:148
#: ../../../_source/toolchain.rst:149
msgid "Set up this once:"
msgstr ""
#: ../../../_source/toolchain.rst:165
#: ../../../_source/toolchain.rst:166
msgid "rocprim"
msgstr ""
#: ../../../_source/toolchain.rst:166
#: ../../../_source/toolchain.rst:167
msgid "``rocprim``."
msgstr ""
#: ../../../_source/toolchain.rst:173
#: ../../../_source/toolchain.rst:174
msgid "rocsparse"
msgstr ""
#: ../../../_source/toolchain.rst:174
#: ../../../_source/toolchain.rst:175
msgid "``rocsparse``."
msgstr ""
#: ../../../_source/toolchain.rst:181
#: ../../../_source/toolchain.rst:182
msgid "rocsolver"
msgstr ""
#: ../../../_source/toolchain.rst:182
#: ../../../_source/toolchain.rst:183
msgid "``rocsolver`` for hipBLAS."
msgstr ""
#: ../../../_source/toolchain.rst:189
#: ../../../_source/toolchain.rst:190
msgid "hipBLAS"
msgstr ""
#: ../../../_source/toolchain.rst:190
#: ../../../_source/toolchain.rst:191
msgid "``hipBLAS`` plz."
msgstr ""
#: ../../../_source/toolchain.rst:197
#: ../../../_source/toolchain.rst:198
msgid "rocm-bandwidth-test"
msgstr ""
#: ../../../_source/toolchain.rst:198
#: ../../../_source/toolchain.rst:199
msgid "``rocm-bandwidth-test``."
msgstr ""
#: ../../../_source/toolchain.rst:205
#: ../../../_source/toolchain.rst:206
msgid "HOLD"
msgstr ""
#: ../../../_source/toolchain.rst:206
#: ../../../_source/toolchain.rst:207
msgid "Don't upgrade over these files. Debian has higher epochs."
msgstr ""
#: ../../../_source/toolchain.rst:208
#: ../../../_source/toolchain.rst:209
msgid "``apt-mark hold hipcc llvm rocm-cmake rocm-device-libs rocminfo``"
msgstr ""

View File

@ -35,6 +35,7 @@ LLVM, and the latest ``HEAD`` in the main branch (usually ``main`` or ``develop`
in the other repos. For ``clr`` (OpenCL), the ``rocm-6.0.0`` tag
was used.
Latest upstream as of this is ``6.0.2``.
LLVM
----
@ -117,14 +118,6 @@ Needs hsa-runtime64Config.cmake first from ROCR-Runtime
:language: bash
clr
---
OpenCL and more.
.. literalinclude:: _static/scripts/rocm-head/build-clr.sh
:language: bash
hipcc
-----
hipcc built under clr. This seems better.
@ -141,6 +134,14 @@ Yes, ``rocminfo``
:language: bash
clr
---
OpenCL and more.
.. literalinclude:: _static/scripts/rocm-head/build-clr.sh
:language: bash
rocBLAS
-------
Needed before hipBLAS.