Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ci rocm6.2 #3340

Merged
merged 53 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9291c01
Upgrade CI to 6.1.3
pfultz2 Aug 1, 2024
65cac2b
Build with clang to avoid linker errors with ubsan
pfultz2 Aug 3, 2024
c7d148f
Fix asan odr issues
pfultz2 Aug 4, 2024
f0ece94
Use same debug flags
pfultz2 Aug 4, 2024
2903290
Disable warning
pfultz2 Aug 5, 2024
79585c0
Add asan options
pfultz2 Aug 5, 2024
398adad
Just disable odr detection
pfultz2 Aug 5, 2024
be8b78a
Move to docker
pfultz2 Aug 5, 2024
de9b6b5
Set to 0
pfultz2 Aug 5, 2024
0cf5d32
Disable global reporting
pfultz2 Aug 5, 2024
2065d63
Use gcc for ASAN
pfultz2 Aug 7, 2024
00a658b
Switch back to clang
pfultz2 Aug 12, 2024
47a4480
Remove static since get_type_name is already static
pfultz2 Aug 12, 2024
b9386da
Try using a copy
pfultz2 Aug 12, 2024
ff70eb7
Format
pfultz2 Aug 12, 2024
15cbecf
log2 op (#3302)
aarushjain29 Aug 2, 2024
0d8e6a1
Update log2.cpp (#3338)
CharlieL7 Aug 2, 2024
72b7491
Bump ROCm version for CI and Docker to 6.2
Aug 2, 2024
2ede585
Update other dockers as well
Aug 2, 2024
d0d7593
Update CMakeLists.txt with changes from 6.1.3 update
Aug 5, 2024
a3f1ab5
Bitwise_and operator (#3321)
CharlieL7 Aug 5, 2024
a9c15f1
Stable Diffusion Models bump to torch 2.4.0 from 2.1.0 (#3344)
richagadgil Aug 6, 2024
32153b6
Fix reshapes when lowering for CPU backend (#3346)
umangyadav Aug 7, 2024
ba101e1
Allow multiple outputs for the MLIR + Pointwise fusions (#3299)
umangyadav Aug 7, 2024
e65760a
Use new args each time in eliminate_contiguous (#3345)
umangyadav Aug 8, 2024
51b5bca
Add ONNX parsing for SimplifiedLayerNormalization (#3129)
turneram Aug 8, 2024
eba3930
Update docker build with official released torch packages from repo.r…
Aug 9, 2024
a70ed4b
Merge branch 'develop' into bump_ci_rocm6.2
pfultz2 Aug 13, 2024
7b6da01
Merge branch 'develop' into bump_ci_rocm6.2
TedThemistokleous Aug 19, 2024
42d5160
remove changes from config and name headers
Aug 20, 2024
181489d
Regen files
TedThemistokleous Aug 21, 2024
a9911b5
Update license for files
TedThemistokleous Aug 22, 2024
588a329
Get around broken hipcc message for tidy/cppcheck
TedThemistokleous Aug 22, 2024
fc32fe7
Merge branch 'develop' into bump_ci_rocm6.2
causten Sep 11, 2024
73c846b
Remove export for hipCC executable
TedThemistokleous Sep 13, 2024
4619d7b
Merge branch 'develop' into bump_ci_rocm6.2
TedThemistokleous Sep 13, 2024
763c39b
Update hipcc line to env instead
TedThemistokleous Sep 13, 2024
94f10e7
Workaround for hipcc
Sep 16, 2024
ffcd9c0
Merge branch 'develop' into bump_ci_rocm6.2
TedThemistokleous Sep 16, 2024
942945e
Sed delete out hipconfig as well as apply change to other dockers as …
Sep 16, 2024
6fe2a02
remove workaround for hipcc from sles docker for now
Sep 17, 2024
c2bf0d2
Remove entire WIN32 block in hip-clang.cmake
Sep 17, 2024
93e28e8
Add or true to sles workaround
Sep 17, 2024
cbcb054
Add hip-runtime-amd to hip-clang docker to solve CI issue
Sep 17, 2024
af25026
Try additional libs to see if this gets past error with hipcc
Sep 18, 2024
6f82c0c
replace if with HIP_PLATFORM being set already as workaround
Sep 18, 2024
14268da
Write in updated HIP_PLATFORM statement
Sep 18, 2024
b7ec938
Remove libs that are not needed
Sep 18, 2024
af7a9fb
Manually install hipcc remove workaround
Sep 19, 2024
355f663
Update ignore from tidy
Sep 19, 2024
5053237
workaround not needed in Dockerfile
causten Sep 20, 2024
aba657c
disable tidy issues
Sep 20, 2024
0bb51fc
turn lint off from line 27
Sep 20, 2024
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
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ rocm_enable_clang_tidy(
clang-analyzer-alpha.cplusplus.MismatchedIterator
clang-analyzer-alpha.cplusplus.MisusedMovedObject
-bugprone-switch-missing-default-case
-bugprone-empty-catch
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

created #3470

-clang-analyzer-optin.performance.Padding
-clang-diagnostic-deprecated-declarations
-clang-diagnostic-disabled-macro-expansion
Expand Down Expand Up @@ -235,12 +236,15 @@ rocm_enable_clang_tidy(
-modernize-use-transparent-functors
-performance-avoid-endl
-performance-type-promotion-in-math-fn
-performance-enum-size
-readability-braces-around-statements
-readability-avoid-nested-conditional-operator
-readability-convert-member-functions-to-static
-readability-else-after-return
-readability-function-cognitive-complexity
-readability-identifier-length
-readability-named-parameter
-readability-redundant-member-init
-readability-redundant-string-init
-readability-suspicious-call-argument
-readability-uppercase-literal-suffix
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y software-properties-common gnupg2 --no-
curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -

# Add rocm repository
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/6.1.3/ jammy main > /etc/apt/sources.list.d/rocm.list'
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/6.2/ 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"
Expand Down
6 changes: 5 additions & 1 deletion hip-clang.docker
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG PREFIX=/usr/local
RUN dpkg --add-architecture i386

# Add rocm repository
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/6.1.3/ focal main > /etc/apt/sources.list.d/rocm.list'
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/6.2/ focal 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"
Expand All @@ -28,6 +28,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-
wget \
rocm-device-libs \
hip-dev \
hipcc \
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be added to the install_preqs.sh.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved via #3469

libnuma-dev \
miopen-hip \
rocblas \
Expand All @@ -44,6 +45,9 @@ RUN ldconfig
# 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 broken hip-clang
# RUN sed -i -e '/if(WIN32)/, /endif()/d' /opt/rocm/lib/cmake/hip/hip-config.cmake && sed -i -n 5p /opt/rocm/lib/cmake/hip/hip-config.cmake

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

Expand Down
2 changes: 1 addition & 1 deletion src/include/migraphx/layout_nhwc.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2023 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 13 additions & 10 deletions src/include/migraphx/operation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ auto operator==(const T& x, const U& y) -> decltype(x.name() == y.name())
} // namespace operation_operators

template <class T>
auto compute_shape_op(rank<3>, const T& x, const std::vector<shape>& inputs)
-> decltype(x.compute_shape(inputs))
auto compute_shape_op(rank<3>,
const T& x,
const std::vector<shape>& inputs) -> decltype(x.compute_shape(inputs))
{
return x.compute_shape(inputs);
}
Expand All @@ -148,8 +149,9 @@ auto compute_shape_op(rank<2>, const T& x, const std::vector<shape>& inputs)
}

template <class T>
auto compute_shape_op(rank<1>, const T& x, const std::vector<shape>& inputs)
-> decltype(x.compute_shape(inputs, {}))
auto compute_shape_op(rank<1>,
const T& x,
const std::vector<shape>& inputs) -> decltype(x.compute_shape(inputs, {}))
{
return x.compute_shape(inputs, {});
}
Expand Down Expand Up @@ -325,8 +327,8 @@ auto compute_op(rank<2>,
const shape& output,
const std::vector<argument>& inputs,
const std::vector<module_ref>&,
F)
-> decltype(x.compute(make_compute_output_shape(pack(x, output, inputs)), inputs))
F) -> decltype(x.compute(make_compute_output_shape(pack(x, output, inputs)),
inputs))
{
return x.compute(make_compute_output_shape(pack(x, output, inputs)), inputs);
}
Expand Down Expand Up @@ -383,8 +385,9 @@ auto is_context_free_op(rank<0>, const T&, const shape&, const std::vector<argum
-> std::false_type;

template <class T>
auto is_context_free_op(const T& x) -> decltype(is_context_free_op(
rank<1>{}, x, std::declval<const shape&>(), std::declval<std::vector<argument>>()))
auto is_context_free_op(const T& x)
-> decltype(is_context_free_op(
rank<1>{}, x, std::declval<const shape&>(), std::declval<std::vector<argument>>()))
{
return {};
}
Expand Down Expand Up @@ -1425,8 +1428,8 @@ inline shape compute_shape(const operation& op, const std::vector<shape>& inputs
}

template <class T>
inline auto compute_shape(const T& op, const std::vector<shape>& inputs)
-> decltype(op.compute_shape(inputs))
inline auto compute_shape(const T& op,
const std::vector<shape>& inputs) -> decltype(op.compute_shape(inputs))
{
return op.compute_shape(inputs);
}
Expand Down
5 changes: 3 additions & 2 deletions src/include/migraphx/pass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ MIGRAPHX_EXPORT module& get_module(module_pass_manager& mpm);
namespace detail {

template <class T>
auto module_pass_manager_apply(rank<1>, const T& x, module_pass_manager& mpm)
-> decltype(x.apply(get_module(mpm)))
auto module_pass_manager_apply(rank<1>,
const T& x,
module_pass_manager& mpm) -> decltype(x.apply(get_module(mpm)))
{
return x.apply(get_module(mpm));
}
Expand Down
14 changes: 7 additions & 7 deletions tools/docker/migraphx_with_onnxruntime_pytorch.docker
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ ARG PREFIX=/usr/local
RUN apt update && apt install -y wget

#Aquire and install ROCm
RUN wget https://repo.radeon.com/amdgpu-install/6.1.3/ubuntu/jammy/amdgpu-install_6.1.60103-1_all.deb
RUN apt install -y ./amdgpu-install_6.1.60103-1_all.deb
RUN amdgpu-install --usecase=rocm -y && rm amdgpu-install_6.1.60103-1_all.deb
RUN wget https://repo.radeon.com/amdgpu-install/6.2/ubuntu/jammy/amdgpu-install_6.2.60200-1_all.deb
RUN apt install -y ./amdgpu-install_6.2.60200-1_all.deb
RUN amdgpu-install --usecase=rocm -y && rm amdgpu-install_6.2.60200-1_all.deb

#Install MIGraphX from package manager
RUN apt install -y migraphx

#Pieces for Onnxruntime for ROCm and MIGraphX Execution Provider Support

RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1.3/onnxruntime_rocm-1.17.0-cp310-cp310-linux_x86_64.whl
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.2/onnxruntime_rocm-1.18.0-cp310-cp310-linux_x86_64.whl

#Pieces for pytorch
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1.3/pytorch_triton_rocm-2.1.0%2Brocm6.1.3.4d510c3a44-cp310-cp310-linux_x86_64.whl
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1.3/torch-2.1.2+rocm6.1.3-cp310-cp310-linux_x86_64.whl
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1.3/torchvision-0.16.1+rocm6.1.3-cp310-cp310-linux_x86_64.whl
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.2/pytorch_triton_rocm-2.2.0%2Brocm6.2.0.1d36d63aa0-cp310-cp310-linux_x86_64.whl
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.2/torch-2.2.1+rocm6.2.0-cp310-cp310-linux_x86_64.whl
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.2/torchvision-0.17.1+rocm6.2.0-cp310-cp310-linux_x86_64.whl

#Adjust final path for ability to use rocm components
ENV PATH=$PATH:/opt/rocm/bin/
Expand Down
3 changes: 3 additions & 0 deletions tools/docker/sles.docker
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ 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

# Workaround for broken hip-clang
RUN sed -i '/if(WIN32)/, /endif()/d' /opt/rocm/lib/cmake/hip/hip-config.cmake || true

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

Expand Down
2 changes: 1 addition & 1 deletion tools/docker/ubuntu_2204.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y gnupg2 --no-install-recommends curl &&
curl -fsSL http://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm-keyring.gpg

# Add rocm repository
RUN sh -c "echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] http://repo.radeon.com/rocm/apt/5.7 jammy main' > /etc/apt/sources.list.d/rocm.list"
RUN sh -c "echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] http://repo.radeon.com/rocm/apt/6.2 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"
Expand Down
Loading