Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4b874e9
set therock docker to 7.13
causten Jun 2, 2026
02eb46e
rebase merge
causten Jun 29, 2026
4a33d5b
updates from review
causten Jun 11, 2026
2b99bc5
Review Comments and improved packaging
causten Jun 12, 2026
95c06bf
fix ASAN and add back tbb
causten Jun 12, 2026
d46f5ed
sles fixups
causten Jun 12, 2026
b2062a0
fixups
causten Jun 12, 2026
1752d9a
tidy issues
causten Jun 15, 2026
0eb9aa7
update Jenkins to MI300 and newer
causten Jun 22, 2026
bcff450
Add new gfx targets
causten Jun 23, 2026
af8b994
use built version of rocm-cmake
causten Jun 29, 2026
f59ad70
fix SLES CI: add CMAKE_PREFIX_PATH=/usr/local so rocm-cmake is found
causten Jul 7, 2026
5fd06be
disable 7.13 tests
causten Jul 7, 2026
ba77cd3
resolve cppcheck and tidy /usr/local failure
causten Jul 13, 2026
c42edbd
Allow rocMLIR to be used for hipRTC debug tests
causten Jul 13, 2026
9f8b92b
7.14 and ort support
causten Jul 16, 2026
2157cf0
quick fixes
causten Jul 16, 2026
475c9b0
copilot
causten Jul 16, 2026
da9b507
add back tests
causten Jul 17, 2026
ddee6e8
reduce affected files
causten Jul 17, 2026
4a73bc0
files no longer in PR
causten Jul 17, 2026
170560d
files no longer in PR
causten Jul 17, 2026
b100786
7.14 unit test issues
causten Jul 18, 2026
a24d0e9
temp disable test in the name of progress
causten Jul 18, 2026
da5d4e8
skip test only on gfx1201
causten Jul 18, 2026
e2795bb
CI fixes
causten Jul 19, 2026
0d18824
Tidy issues
causten Jul 19, 2026
24cc94a
Refactor
pfultz2 Jul 27, 2026
c397c38
Install pipx from pip
pfultz2 Jul 27, 2026
ef54b36
Fix doc installation
pfultz2 Jul 27, 2026
e74e85d
Update hip-clang docker
pfultz2 Jul 27, 2026
b42e79d
Fix sles docker
pfultz2 Jul 27, 2026
ebe13d3
Fix hip-clang
pfultz2 Jul 27, 2026
5b2b24e
Remove cmake prefix path
pfultz2 Jul 27, 2026
df6821b
Install clang-format
pfultz2 Jul 27, 2026
a79b3c0
Install apps to global
pfultz2 Jul 28, 2026
29efc7e
Merge
pfultz2 Jul 28, 2026
20d7acb
Fix missing global flag
pfultz2 Jul 28, 2026
69ab77c
Show cache directories
pfultz2 Jul 28, 2026
a5a0cbb
Fix ort docker
pfultz2 Jul 29, 2026
b184510
Merge branch 'develop' into bumpci7_13
pfultz2 Jul 30, 2026
bbac04e
Use -l flag
pfultz2 Jul 31, 2026
36e4edf
Merge branch 'bumpci7_13' of github.com:ROCm/AMDMIGraphX into bumpci7_13
pfultz2 Jul 31, 2026
8f446c2
Remove flag
pfultz2 Aug 4, 2026
4cea119
Merge branch 'develop' into bumpci7_13
pfultz2 Aug 5, 2026
dea39d4
Merge
pfultz2 Aug 6, 2026
2caa6ca
Fix ort dockerfile
pfultz2 Aug 6, 2026
e517ba1
Merge branch 'develop' into bumpci7_13
causten Aug 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Full documentation for MIGraphX is available at
### Added

* Added `ArrayFeatureExtractor` ONNX operator support (#4742).
* Added support for building against ROCm 7.13 and newer using TheRock (#4952)
* Added YOLO26 object detection example notebook.
* Added `auto_pad` attribute support for the ONNX `ConvTranspose` operator, supporting `SAME_UPPER`, `SAME_LOWER`, and `VALID` padding modes for static shapes (#4638).
* Added a dedicated logger for MIGraphX.
Expand Down
18 changes: 18 additions & 0 deletions CMakeLists.txt

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the clang_tidy flags being changed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these are new warnings from newer cland tidy version. We should address these in a seperate PR.

Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ endif()
rocm_enable_clang_tidy(
CHECKS
bugprone-*
-bugprone-std-namespace-modification
cert-*
clang-analyzer-*
clang-diagnostic-*
Expand All @@ -212,11 +213,16 @@ rocm_enable_clang_tidy(
-bugprone-crtp-constructor-accessibility
-bugprone-derived-method-shadowing-base-method
-bugprone-easily-swappable-parameters
-bugprone-exception-escape
-bugprone-fold-init-type
-bugprone-implicit-widening-of-multiplication-result
-bugprone-macro-parentheses
-bugprone-nondeterministic-pointer-iteration-order
-bugprone-random-generator-seed
-bugprone-return-const-ref-from-parameter
-bugprone-signed-bitwise
-bugprone-signed-char-misuse
-bugprone-std-exception-baseclass
-bugprone-unchecked-optional-access
-bugprone-unintended-char-ostream-output
# Disable the aliased reserved identifiers
Expand Down Expand Up @@ -271,21 +277,30 @@ rocm_enable_clang_tidy(
-misc-const-correctness
-misc-include-cleaner
-misc-macro-parentheses
-misc-multiple-inheritance
-misc-no-recursion
-misc-override-with-different-visibility
-misc-use-internal-linkage
-modernize-avoid-c-style-cast
-modernize-concat-nested-namespaces
-modernize-pass-by-value
-modernize-type-traits
-modernize-use-default-member-init
-modernize-use-nodiscard
-modernize-use-override
-modernize-use-scoped-lock
-modernize-use-string-view
-modernize-use-structured-binding
-modernize-use-trailing-return-type
-modernize-use-transparent-functors
-performance-avoid-endl
-performance-faster-string-find
-performance-prefer-single-char-overloads
-performance-type-promotion-in-math-fn
-performance-enum-size
-performance-use-std-move
-readability-braces-around-statements
-readability-inconsistent-ifelse-braces
-readability-container-size-empty
-readability-avoid-nested-conditional-operator
-readability-convert-member-functions-to-static
Expand All @@ -294,10 +309,13 @@ rocm_enable_clang_tidy(
-readability-identifier-length
-readability-math-missing-parentheses
-readability-named-parameter
-readability-redundant-lambda-parameter-list
-readability-redundant-member-init
-readability-redundant-parentheses
-readability-redundant-qualified-alias
-readability-redundant-string-init
-readability-suspicious-call-argument
-readability-trailing-comma
-readability-uppercase-literal-suffix
-readability-use-concise-preprocessor-directives
-*-avoid-c-arrays
Expand Down
140 changes: 78 additions & 62 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,57 @@
FROM ubuntu:22.04
# MIGraphX build environment with TheRock (amdrocm-*) deb packages.
#
# Build args:
# ROCM_VERSION ROCm release version for versioned package names (e.g. 7.13)
# GPU_ARCH GPU architecture family (e.g. gfx120x, gfx94x)
# USE_WHL Set to a non-empty value to install ROCm from Python
# wheels (pip) instead of system packages
# INDEX_URL pip --index-url used when installing ROCm from wheels
# (only effective together with USE_WHL)
#
# Build:
# docker build --build-arg GPU_ARCH=<gpu_arch> \
# --build-arg ROCM_VERSION=<rocm_version> \
# -t migraphx-therock .
#
# Run:
# docker run -it --device=/dev/kfd --device=/dev/dri --group-add video \
# -v $(pwd):/code/AMDMIGraphX migraphx-therock
#
# Build MIGraphX inside the container:
# cd /code/AMDMIGraphX
# rbuild build -d depend -B build
#

FROM ubuntu:24.04

ARG PREFIX=/usr/local
# ROCm release version (used in versioned package names, e.g. amdrocm-developer-tools7.13)
ARG ROCM_VERSION="7.14"
# GPU architecture family (e.g. gfx942, gfx120x); leave empty for arch-independent packages
ARG GPU_ARCH=""
# Install location for the prebuilt MIGraphX dependencies.
ARG PREFIX=/usr/local
# Install the MIGraphX build prerequisites (system packages + ROCm components).
# Set USE_WHL to any non-empty value to install ROCm from Python wheels instead
# of system packages (passes --whl to the prereqs script).
ARG USE_WHL=""
# pip index URL for the wheel-based ROCm install (only used when USE_WHL is set).
ARG INDEX_URL="https://repo.amd.com/rocm/whl-multi-arch/"

# Support multiarch
RUN dpkg --add-architecture i386

# Install rocm key
RUN apt-get update && apt-get install -y software-properties-common gnupg2 --no-install-recommends curl && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/keyrings/rocm.gpg
curl -fsSL https://repo.amd.com/rocm/packages/gpg/rocm.gpg | gpg --dearmor -o /etc/apt/keyrings/amdrocm.gpg

# Add rocm repository
RUN sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/7.2.3/ jammy main > /etc/apt/sources.list.d/rocm.list'

# From docs.amd.com for installing rocm. Needed to install properly
RUN sh -c "echo 'Package: *\nPin: release o=repo.radeon.com\nPin-priority: 600' > /etc/apt/preferences.d/rocm-pin-600"

# rocgdb doesn't work on 22.04, workaround by installing the older python packages that are in 20.04
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/keyrings/amdrocm.gpg] https://repo.amd.com/rocm/packages-multi-arch/ubuntu2404 stable main > /etc/apt/sources.list.d/rocm.list'

# Add LLVM repository for Clang 17 (ROCm 7.x ships with Clang 20 which has ODR false positives in ASAN)
RUN curl -sL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
add-apt-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-17 main"

# Install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
Expand All @@ -44,84 +74,69 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-full \
libpython3.8 \
wget \
rocm-device-libs \
hip-dev \
libnuma-dev \
miopen-hip \
libomp-17-dev \
rocblas \
hipfft \
hipsolver \
rocthrust \
rocrand \
rocprofiler-sdk \
hipsparse \
rccl \
rocm-smi-lib \
rocminfo \
roctracer-dev \
hipcub \
hipblas \
hipify-clang \
hiprand-dev \
hipsparselt \
hsa-amd-aqlprofile \
half \
libssl-dev \
zlib1g-dev && \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing packages here, like clang-17.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While checking the ASAN issue I'm going to go with a suggested workaround using the clang version provided by TheRock since clang-17 didn't have a fix. runtime ASAN_OPTIONS=detect_odr_violation=0, or compile-time -mllvm -asan-use-private-alias=1 + use_odr_indicator=1.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtime ASAN_OPTIONS=detect_odr_violation=0, or compile-time -mllvm -asan-use-private-alias=1 + use_odr_indicator=1.

That workaround never fixed the issue in the past.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is just making more unnecessary changes in this PR. This PR should only focus on updating to rocm 7.13, it shouldn't be making these change. The docker file should have a minimal amount of changes with most of the changes in install_preqs.sh file.

apt-get clean && \
rm -rf /var/lib/apt/lists/*


# Install pytorch
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.3/torch-2.8.0%2Brocm7.2.3.lw.git2742f6d1-cp310-cp310-linux_x86_64.whl \
https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.3/torchvision-0.24.0%2Brocm7.2.3.gitb919bd0c-cp310-cp310-linux_x86_64.whl \
https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.3/triton-3.4.0%2Brocm7.2.3.git0cace8d2-cp310-cp310-linux_x86_64.whl

Comment thread
causten marked this conversation as resolved.
# add this for roctracer dependencies
RUN pip3 install CppHeaderParser

# Workaround broken rocm packages
RUN ln -s /opt/rocm-* /opt/rocm
RUN echo "/opt/rocm/lib" > /etc/ld.so.conf.d/rocm.conf
RUN echo "/opt/rocm/llvm/lib" > /etc/ld.so.conf.d/rocm-llvm.conf
RUN ldconfig

# ATT library
RUN wget -O /opt/rocm/lib/librocprof-trace-decoder.so https://github.com/ROCm/rocprof-trace-decoder/raw/7e58204a955e5787b9b38087f3ad502f07ff78ef/releases/linux_glibc_2_28_x86_64/librocprof-trace-decoder.so
Comment thread
causten marked this conversation as resolved.

# Workaround broken miopen cmake files
RUN sed -i 's,;/usr/lib/x86_64-linux-gnu/librt.so,,g' /opt/rocm/lib/cmake/miopen/miopen-targets.cmake

# Workaround for distributions running cmake < 3.25
RUN sed -i -e 's/^block/if(COMMAND block)\nblock/g' -e 's/^endblock/endblock\(\)\nendif/g' /opt/rocm/lib/cmake/hipblaslt/hipblaslt-config.cmake

RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

ENV PIP_BREAK_SYSTEM_PACKAGES=1

# Install dependencies
ADD dev-requirements.txt /dev-requirements.txt
ADD requirements.txt /requirements.txt
ADD rbuild.ini /rbuild.ini

# Location where onnx unit tests models are cached
ENV ONNX_HOME=/.onnx
RUN mkdir -p $ONNX_HOME/models && chmod 777 $ONNX_HOME/models

COPY ./tools/install_prereqs.sh /
COPY ./tools/requirements-py.txt /requirements-py.txt
RUN /install_prereqs.sh /usr/local / && rm /install_prereqs.sh && rm /requirements-py.txt
RUN ./install_prereqs.sh \
--rocm-version ${ROCM_VERSION} \
${GPU_ARCH:+--gpu ${GPU_ARCH}} \
--index-url ${INDEX_URL} \
${USE_WHL:+--whl}
RUN rm /install_prereqs.sh && rm /*.txt
RUN test -f /usr/local/hash || exit 1

# Workaround broken rocm packages
RUN echo "/opt/rocm/lib" > /etc/ld.so.conf.d/rocm.conf
RUN echo "/opt/rocm/llvm/lib" > /etc/ld.so.conf.d/rocm-llvm.conf
RUN ldconfig

# Manually remove rocm-cmake, since it shouldnt be installed in the first place
RUN rm -rf /opt/rocm/share/rocmcmakebuildtools

# Install pytorch
RUN pip3 install --index-url "${INDEX_URL}" \
"torch==2.11.0+rocm${ROCM_VERSION}.0" \
"torchvision==0.26.0+rocm${ROCM_VERSION}.0" \
"torchaudio==2.11.0+rocm${ROCM_VERSION}.0"

# Location where onnx unit tests models are cached
ENV ONNX_HOME=/.onnx
RUN mkdir -p $ONNX_HOME/models && chmod 777 $ONNX_HOME/models

# Install yapf
RUN pip3 install yapf==0.28.0
RUN pipx install --global yapf==0.28.0

# Install clang format
RUN pipx install --global clang-format==22.1.5

# Install doc requirements
ADD docs/sphinx/requirements.txt /doc-requirements.txt
RUN pip3 install -r /doc-requirements.txt
# pip rejects extras in a constraints file (the pip-compile output pins
# pyjwt[crypto]), and extras carry no meaning in a constraint, so strip them to
# pin the sphinx install.
RUN sed 's/\[[^][]*\]//' /doc-requirements.txt > /doc-constraints.txt && \
pipx install --global sphinx --pip-args="-c /doc-constraints.txt" && \
rm /doc-constraints.txt
RUN pipx inject --global sphinx -r /doc-requirements.txt

# Install latest ccache version
RUN cget -p $PREFIX install facebook/zstd@v1.4.5 -X subdir -DCMAKE_DIR=build/cmake
Expand All @@ -139,3 +154,4 @@ ENV UBSAN_OPTIONS=print_stacktrace=1
# See: https://github.com/google/sanitizers/issues/1017
ENV ASAN_OPTIONS=detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
RUN ln -s /opt/rocm/llvm/bin/llvm-symbolizer /usr/bin/llvm-symbolizer
Comment thread
causten marked this conversation as resolved.

Loading
Loading