[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: AMD ROCm packaging session followup notes

Great summary, Étienne.

Thanks Cordell for your time, don't hesitate to complement or
correct me;
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.

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

    [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.


 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.


Cory Bloor

docker run -it --device=/dev/dri --device=/dev/kfd      \
    --security-opt seccomp=unconfined                   \
    --group-add=video                                   \
    --group-add=render                                  \
    --net host
apt-get -qq update && apt-get -qq upgrade && apt-get -qq install build-essential cmake

# llvm-amdgpu
Build-Depends: python3

cmake -Sllvm -Bbuild -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_PROJECTS="clang;lld" \
make -C build
make -C build install

# rocm-cmake
Architecture: all

cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release \
make -C build
make -C build install

# rocm-device-libs
Build-Depends: rocm-cmake, llvm-amdgpu

cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_C_COMPILER=/usr/bin/clang \
#  -DCMAKE_PREFIX_PATH=$HOME/llvm-project/build
make -C build
make -C build install

# roct-thunk-interface
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 \
make -C build
make -C build install

# rocr-runtime
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 \
make -C build
make -C build install

# rocminfo
Depends: kmod, python3 (for rocm_agent_enumerator)

cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release \
make -C build
make -C build install

# comgr

cmake -Slib/comgr -Bbuild -DCMAKE_BUILD_TYPE=Release \
make -C build
make -C build install

Reply to: