Skip to content

Commit

Permalink
Bump ci rocm6.2 (#3340)
Browse files Browse the repository at this point in the history
  • Loading branch information
TedThemistokleous authored Sep 21, 2024
1 parent 8b992d7 commit ab5da3c
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 24 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ rocm_enable_clang_tidy(
-bugprone-easily-swappable-parameters
-bugprone-implicit-widening-of-multiplication-result
-bugprone-macro-parentheses
-bugprone-multi-level-implicit-pointer-conversion
-bugprone-signed-char-misuse
-bugprone-unchecked-optional-access
-bugprone-unused-local-non-trivial-variable
# Disable the aliased reserved identifiers
-cert-dcl37-c
-cert-dcl51-cpp
Expand All @@ -202,6 +204,7 @@ rocm_enable_clang_tidy(
clang-analyzer-alpha.cplusplus.MismatchedIterator
clang-analyzer-alpha.cplusplus.MisusedMovedObject
-bugprone-switch-missing-default-case
-bugprone-empty-catch
-clang-analyzer-optin.performance.Padding
-clang-diagnostic-deprecated-declarations
-clang-diagnostic-disabled-macro-expansion
Expand Down Expand Up @@ -241,12 +244,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 \
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
2 changes: 1 addition & 1 deletion test/bit_signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TEST_CASE(copy_slot)
migraphx::bit_signal<64> signals;
EXPECT(signals.nslots() == 0);
auto slot1 = signals.subscribe();
auto slot2 = slot1;
auto slot2 = slot1; // NOLINT
EXPECT(signals.nslots() == 2);
EXPECT(slot1.i != slot2.i);
EXPECT(slot1.valid());
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

0 comments on commit ab5da3c

Please sign in to comment.