-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Simplify dependencies to build using rbuild (#1233)
* Simplify dependencies to build * Set build_dev Use newer rbuild * Change the location of rocm-recipes * Move cmake to develop * Silence removal of non-existent files * Ignore pcre dependency since it isn't needed
- Loading branch information
Showing
7 changed files
with
49 additions
and
60 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,10 +62,10 @@ apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unau | |
rocm-device-libs \ | ||
rocm-opencl \ | ||
rocm-opencl-dev \ | ||
rocm-cmake \ | ||
rocblas \ | ||
zlib1g-dev \ | ||
kmod && \ | ||
apt-get remove -y rocm-cmake && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
|
@@ -79,35 +79,34 @@ ENV LANG=C.UTF-8 | |
RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb | ||
RUN dpkg -i dumb-init_*.deb && rm dumb-init_*.deb | ||
|
||
# Install cget | ||
RUN pip3 install cget | ||
# Install rbuild | ||
RUN pip3 install https://github.com/RadeonOpenCompute/rbuild/archive/6d78a0553babdaea8d2da5de15cbda7e869594b8.tar.gz | ||
|
||
# Add symlink to /opt/rocm | ||
RUN [ -d /opt/rocm ] || ln -sd $(realpath /opt/rocm-*) /opt/rocm | ||
|
||
# Make sure /opt/rcom is in the paths | ||
ENV PATH="/opt/rocm:${PATH}" | ||
|
||
# Build using hip-clang | ||
RUN cget -p $PREFIX init --cxx /opt/rocm/llvm/bin/clang++ --std=c++14 -DAMDGPU_TARGETS=${GPU_ARCH} | ||
|
||
# Add requirements files | ||
ADD rbuild.ini /rbuild.ini | ||
ADD requirements.txt /requirements.txt | ||
ADD dev-requirements.txt /dev-requirements.txt | ||
# Install dependencies | ||
RUN cget -p $PREFIX install pfultz2/rocm-recipes | ||
# Install a newer version of cmake for libMLIRMIOpen | ||
RUN cget -p $PREFIX install kitware/[email protected] | ||
|
||
ADD min-requirements.txt /min-requirements.txt | ||
RUN CXXFLAGS='-isystem $PREFIX/include' cget -p $PREFIX install -f /min-requirements.txt | ||
RUN if [ "$USE_FIN" = "ON" ]; then cget -p $PREFIX install nlohmann/json@350ff4f7ced7c4117eae2fb93df02823c8021fcb; fi | ||
RUN cget -p $PREFIX install danmar/cppcheck@dd05839a7e63ef04afd34711cb3e1e0ef742882f | ||
# TODO: Add --std=c++14 | ||
RUN if [ "$USE_FIN" = "ON" ]; then \ | ||
rbuild prepare -s fin -d $PREFIX -DAMDGPU_TARGETS=${GPU_ARCH}; \ | ||
else \ | ||
rbuild prepare -s develop -d $PREFIX -DAMDGPU_TARGETS=${GPU_ARCH}; \ | ||
fi | ||
|
||
# Install doc requirements | ||
ADD doc/requirements.txt /doc-requirements.txt | ||
RUN pip3 install -r /doc-requirements.txt | ||
|
||
# Use parallel job to accelerate tensile build | ||
# Workaround for Tensile with TargetID feature | ||
RUN if [ "$USE_TARGETID" = "ON" ] ; then export HIPCC_LINK_FLAGS_APPEND='-O3 -parallel-jobs=4' && export HIPCC_COMPILE_FLAGS_APPEND='-O3 -Wno-format-nonliteral -parallel-jobs=4' && rm /usr/bin/hipcc; fi | ||
RUN if [ "$USE_TARGETID" = "ON" ] ; then export HIPCC_LINK_FLAGS_APPEND='-O3 -parallel-jobs=4' && export HIPCC_COMPILE_FLAGS_APPEND='-O3 -Wno-format-nonliteral -parallel-jobs=4' && rm -f /usr/bin/hipcc; fi | ||
|
||
# install last released miopentensile in default (master), install latest commits when MIOTENSILE_VER="latest" (develop) | ||
RUN if [ "$USE_TARGETID" = "OFF" ] ; then echo "MIOpenTensile is not installed."; elif [ "$MIOTENSILE_VER" = "latest" ] ; then cget -p $PREFIX install ROCmSoftwarePlatform/MIOpenTensile@94a9047741d16a8eccd290131b78fb1aa69cdcdf; else cget -p $PREFIX install ROCmSoftwarePlatform/MIOpenTensile@94a9047741d16a8eccd290131b78fb1aa69cdcdf; fi | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pfultz2/rocm-recipes | ||
ROCm-Developer-Tools/[email protected] | ||
ROCmSoftwarePlatform/rocm-recipes | ||
RadeonOpenCompute/rocm-cmake@cdd0f632b3a65bd4411593bb827eb664e25c80bc --build | ||
-f requirements.txt | ||
# 1.90+ | ||
danmar/cppcheck@dd05839a7e63ef04afd34711cb3e1e0ef742882f |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
sqlite3,https://sqlite.org/2017/sqlite-autoconf-3170000.tar.gz -H sha256:a4e485ad3a16e054765baf6371826b5000beed07e626510896069c0bf013874c -X autotools -DCMAKE_POSITION_INDEPENDENT_CODE=On | ||
[email protected] -DCMAKE_POSITION_INDEPENDENT_CODE=On --build | ||
half,https://github.com/pfultz2/half/archive/1.12.0.tar.gz -X header -H sha256:0a08660b68abb176ebc2a0cdf8de46e3182a7f46c66443bb80dbfaaec98cf969 --build | ||
# This file should be removed in the future | ||
-f requirements.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[main] | ||
cxx = ${rocm_path}/llvm/bin/clang++ | ||
cc = ${rocm_path}/llvm/bin/clang | ||
deps = | ||
ROCmSoftwarePlatform/rocm-recipes | ||
-f requirements.txt | ||
|
||
[develop] | ||
cxx = ${rocm_path}/llvm/bin/clang++ | ||
cc = ${rocm_path}/llvm/bin/clang | ||
ignore = pcre | ||
deps = | ||
kitware/[email protected] | ||
-f dev-requirements.txt | ||
define = | ||
BUILD_DEV=On | ||
|
||
[fin] | ||
cxx = ${rocm_path}/llvm/bin/clang++ | ||
cc = ${rocm_path}/llvm/bin/clang | ||
ignore = pcre | ||
deps = | ||
ROCmSoftwarePlatform/rocm-recipes | ||
kitware/[email protected] | ||
-f dev-requirements.txt | ||
nlohmann/json@350ff4f7ced7c4117eae2fb93df02823c8021fcb | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
-f min-requirements.txt | ||
RadeonOpenCompute/rocm-cmake@cdd0f632b3a65bd4411593bb827eb664e25c80bc --build | ||
RadeonOpenCompute/clang-ocl@930015924b012c332d373535ff31a663b6ad2c64 | ||
ROCmSoftwarePlatform/MIOpenGEMM@0eb1257cfaef83ea155aabd67af4437c0028db48 | ||
ROCmSoftwarePlatform/rocBLAS@9790a8658341bc665c11c311129ad0dfc533d5c4 | ||
# ROCmSoftwarePlatform/MIOpenTensile@master | ||
sqlite3,https://sqlite.org/2017/sqlite-autoconf-3170000.tar.gz -H sha256:a4e485ad3a16e054765baf6371826b5000beed07e626510896069c0bf013874c -X autotools -DCMAKE_POSITION_INDEPENDENT_CODE=On | ||
boost@1.72 -DCMAKE_POSITION_INDEPENDENT_CODE=On --build | ||
half,https://github.com/pfultz2/half/archive/1.12.0.tar.gz -X header -H sha256:0a08660b68abb176ebc2a0cdf8de46e3182a7f46c66443bb80dbfaaec98cf969 --build |