Great summary, Étienne.
Thank you for taking the meeting. The time was arranged to be convenient for Japan and Canada, so it was rather extraordinary that you came from Europe. Your English is also a lot better than my French. Je allé à l'école française, mais je oublie beaucoup.Thanks Cordell for your time, don't hesitate to complement or correct me;
Upon closer inspection, I see that you wanted me to complement
you. I suppose I can do that too.
I think one source of
confusion is that there seem to be distinct Github teams
involved in the various ROCm components. I gathered some
components on RadeonOpenCompute [1], and some other such as
the HIP compiler in ROCm-Developer-Tools [2]. There might
be other locations, I didn't manage to locate rocclr for
instance.
[1]: https://github.com/RadeonOpenCompute/
[2]: https://github.com/ROCm-Developer-Tools/
There is also https://github.com/ROCmSoftwarePlatform/Generally speaking, the lowest-level components are found under
RadeonOpenCompute, the middle-of-the-stack components are found
under ROCm-Developer-Tools and the high-level libraries and
frameworks are found under ROCmSoftwarePlatform.
I didn't manage to locate rocclr for instance.
https://github.com/ROCm-Developer-Tools/ROCclr
Q: In which order to build the different components?
A: This is still not entirely clear, but trying to package
targets will eventualy reveal dependency trees (hopefully
without loops involved).
There won't be any loops involved.
It's not a minimal dependency tree, but I've attached a file with the tarball URLs, build commands and packages that I used to build the first few components (up to and including comgr) on the Debian unstable docker image. I didn't isolate the packages from each other as I was building them, so anything installed in an earlier stage _could_ be a dependency for a later stage (but few actually are).
Going through the file from top to bottom defines one possible
(serialized) build order. Attempting each step in an isolated
environment would quickly lead you to the actual minimal tree.
Sincerely,
Cory Bloor
docker run -it --device=/dev/dri --device=/dev/kfd \
--security-opt seccomp=unconfined \
--group-add=video \
--group-add=render \
--net host
debian:unstable
apt-get -qq update && apt-get -qq upgrade && apt-get -qq install build-essential cmake
# llvm-amdgpu
https://github.com/RadeonOpenCompute/llvm-project/archive/refs/tags/rocm-4.5.0.tar.gz
Build-Depends: python3
cmake -Sllvm -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" \
-DCMAKE_INSTALL_PREFIX=/usr
make -C build
make -C build install
# rocm-cmake
https://github.com/RadeonOpenCompute/rocm-cmake/archive/refs/tags/rocm-4.5.0.tar.gz
Build-Depends:
Architecture: all
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make -C build
make -C build install
# rocm-device-libs
https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/refs/tags/rocm-4.5.0.tar.gz
Build-Depends: rocm-cmake, llvm-amdgpu
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_INSTALL_PREFIX=/usr
# -DCMAKE_PREFIX_PATH=$HOME/llvm-project/build
make -C build
make -C build install
# roct-thunk-interface
https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/archive/refs/tags/rocm-4.5.0.tar.gz
Build-Depends: libnuma-dev, pkg-config, libdrm-dev
Depends: Presumably the runtime versions of libnuma-dev and libdrm-dev?
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make -C build
make -C build install
# rocr-runtime
https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/refs/tags/rocm-4.5.0.tar.gz
Build-Depends: llvm-amdgpu, rocm-device-libs, libelf-dev, xxd
Depends: Presumably the runtime version of libelf-dev?
# NOTE: Does not build if assertions are disabled.
cmake -Ssrc -Bbuild \
-DCMAKE_INSTALL_PREFIX=/usr
make -C build
make -C build install
# rocminfo
https://github.com/RadeonOpenCompute/rocminfo/archive/refs/tags/rocm-4.5.0.tar.gz
Depends: kmod, python3 (for rocm_agent_enumerator)
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make -C build
make -C build install
# comgr
https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/refs/tags/rocm-4.5.0.tar.gz
cmake -Slib/comgr -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make -C build
make -C build install