Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
benchmark:
uses: ROCmSoftwarePlatform/actions/.github/workflows/benchmarks.yml@main
with:
rocm_version: 7.1.1
rocm_version: 7.2.2
script_repo: migraphx-benchmark/benchmark-utils
result_path: /usr/share/migraphx/test-results
result_repo: ROCm/comparison-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=====ROCM INFO=====
ROCM_VERSION : '7.1.1'
ROCM_VERSION : '7.2.2'
Comment thread
causten marked this conversation as resolved.
#default ROCm version to be used
ROCM_BASE_IMAGE : 'rocm/dev-ubuntu-22.04'
#base image from dockerhub to be used
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
rocm_release:
description: ROCm Version
required: true
default: '7.1.1'
default: '7.2.2'
performance_reports_repo:
description: Repository where performance reports are stored
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rocm-image-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
release:
uses: ROCm/migraphx-benchmark/.github/workflows/rocm-release.yml@main
with:
rocm_release: ${{ github.event.inputs.rocm_release || '7.1.1' }}
rocm_release: ${{ github.event.inputs.rocm_release || '7.2.2' }}
benchmark-utils_repo: ${{ github.event.inputs.benchmark-utils_repo || 'ROCm/migraphx-benchmark-utils' }}
base_image: ${{ github.event.inputs.base_image || 'rocm/dev-ubuntu-22.04' }}
docker_image: ${{ github.event.inputs.docker_image || 'rocm-migraphx' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unreleased_rocm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
rocm_release:
description: Use tuned MIOpen database for ROCm release
required: true
default: '7.1.1'
default: '7.2.2'
performance_reports_repo:
description: Repository where performance reports are stored
required: true
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ rocm_enable_clang_tidy(
-cppcoreguidelines-misleading-capture-default-by-value
-cppcoreguidelines-missing-std-forward
-cppcoreguidelines-pro-bounds-array-to-pointer-decay
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access
Comment thread
causten marked this conversation as resolved.
Outdated
-cppcoreguidelines-pro-bounds-constant-array-index
Comment on lines 207 to 209
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

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

This newly added clang-tidy check line is indented with a tab. The project generally uses spaces in CMakeLists.txt, and mixed whitespace can cause noisy diffs and editor/CI formatting issues. Replace the tab with spaces to match the surrounding indentation.

Copilot uses AI. Check for mistakes.
-cppcoreguidelines-pro-bounds-pointer-arithmetic
-cppcoreguidelines-pro-type-member-init
Expand All @@ -211,6 +212,7 @@ rocm_enable_clang_tidy(
-cppcoreguidelines-pro-type-vararg
-cppcoreguidelines-special-member-functions
-cppcoreguidelines-use-default-member-init
-cppcoreguidelines-use-enum-class
-cppcoreguidelines-virtual-class-destructor
-google-readability-*
-google-runtime-int
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ RUN dpkg --add-architecture i386

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

# Add rocm repository
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/7.1.1/ jammy main > /etc/apt/sources.list.d/rocm.list'
RUN sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/7.2.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 All @@ -23,7 +24,7 @@ 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"

# Install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-utils \
bison \
build-essential \
Expand Down Expand Up @@ -70,9 +71,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-
rm -rf /var/lib/apt/lists/*

# Install pytorch
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.8.0%2Brocm7.1.1.lw.gitcba8b9d2-cp310-cp310-linux_x86_64.whl\
https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.24.0%2Brocm7.1.1.gitb919bd0c-cp310-cp310-linux_x86_64.whl\
https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.4.0%2Brocm7.1.1.git0cace8d2-cp310-cp310-linux_x86_64.whl
RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.2/torch-2.8.0%2Brocm7.2.2.lw.gitd733adb1-cp310-cp310-linux_x86_64.whl \
https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.2/torchvision-0.24.0%2Brocm7.2.2.gitb919bd0c-cp310-cp310-linux_x86_64.whl \
https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.2/triton-3.4.0%2Brocm7.2.2.git0cace8d2-cp310-cp310-linux_x86_64.whl

# add this for roctracer dependencies
RUN pip3 install CppHeaderParser
Expand Down
11 changes: 8 additions & 3 deletions hip-clang.docker
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@ ARG PREFIX=/usr/local
# 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
Comment thread
causten marked this conversation as resolved.
Outdated


# Add rocm repository
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/7.1.1/ jammy main > /etc/apt/sources.list.d/rocm.list'
RUN sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/7.2.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"

# Install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-utils \
build-essential \
cmake \
curl \
gdb \
git \
lcov \
Expand Down
112 changes: 28 additions & 84 deletions src/api/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ namespace migraphx {
static thread_local bool disable_exception_catch = false; // NOLINT

extern "C" MIGRAPHX_C_EXPORT void migraphx_test_private_disable_exception_catch(bool b)
{
disable_exception_catch = b;
}
{ disable_exception_catch = b; }
#endif

template <class F>
Expand Down Expand Up @@ -147,69 +145,47 @@ static void set_offload_copy(compile_options& options, bool value) { options.off
static void set_fast_math(compile_options& options, bool value) { options.fast_math = value; }

static void set_exhaustive_tune_flag(compile_options& options, bool value)
{
options.exhaustive_tune = value;
}
{ options.exhaustive_tune = value; }

static void set_file_format(file_options& options, const char* format) { options.format = format; }

static void set_default_dim_value(onnx_options& options, size_t value)
{
options.default_dim_value = value;
}
{ options.default_dim_value = value; }

static void set_default_dyn_dim_value(onnx_options& options, const shape::dynamic_dimension& dd)
{
options.default_dyn_dim_value = dd;
}
{ options.default_dyn_dim_value = dd; }

static void set_default_loop_iterations(onnx_options& options, int64_t value)
{
options.max_loop_iterations = value;
}
{ options.max_loop_iterations = value; }

static void set_external_data_path(onnx_options& options, const char* external_data_path)
{
options.external_data_path = std::string(external_data_path);
}
{ options.external_data_path = std::string(external_data_path); }

static void set_limit_loop_iterations(onnx_options& options, int64_t value)
{
options.limit_max_iterations = value;
}
{ options.limit_max_iterations = value; }

static void set_use_debug_symbols(onnx_options& options, bool value)
{
options.use_debug_symbols = value;
}
{ options.use_debug_symbols = value; }

static void set_nhwc(tf_options& options, bool is_nhwc) { options.is_nhwc = is_nhwc; }

static void set_default_dim_value(tf_options& options, size_t value) { options.batch_size = value; }

static void
set_input_parameter_shape(onnx_options& options, const char* name, std::vector<std::size_t> dims)
{
options.map_input_dims[std::string(name)] = std::move(dims);
}
{ options.map_input_dims[std::string(name)] = std::move(dims); }

static void set_dyn_input_parameter_shape(onnx_options& options,
const char* name,
std::vector<shape::dynamic_dimension> dyn_dims)
{
options.map_dyn_input_dims[std::string(name)] = std::move(dyn_dims);
}
{ options.map_dyn_input_dims[std::string(name)] = std::move(dyn_dims); }

static void
set_input_parameter_shape(tf_options& options, const char* name, std::vector<std::size_t> dims)
{
options.map_input_dims[std::string(name)] = std::move(dims);
}
{ options.map_input_dims[std::string(name)] = std::move(dims); }

static void set_output_names(tf_options& options, std::vector<const char*> names)
{
options.output_node_names = std::vector<std::string>(names.begin(), names.end());
}
{ options.output_node_names = std::vector<std::string>(names.begin(), names.end()); }

static std::vector<argument>
run_async(program& p, const parameter_map& params, void* s, std::string_view name)
Expand All @@ -229,9 +205,7 @@ static std::vector<const char*> get_names(const std::unordered_map<std::string,

template <class T>
static std::set<T> make_set(const T* x, std::size_t n)
{
return {x, x + n};
}
{ return {x, x + n}; }

static void quantize_fp16_with_op_names(program& prog, std::vector<std::string>& names)
{
Expand Down Expand Up @@ -260,14 +234,10 @@ struct quantize_int8_options
};

static void add_op_name(quantize_int8_options& options, const char* name)
{
options.op_names.insert(name);
}
{ options.op_names.insert(name); }

static void add_calibration_data(quantize_int8_options& options, const parameter_map& data)
{
options.calibration.push_back(data);
}
{ options.calibration.push_back(data); }

static void quantize_int8_wrap(program& prog, const target& t, quantize_int8_options& options)
{
Expand All @@ -285,14 +255,10 @@ struct quantize_fp8_options
};

static void add_calibration_data(quantize_fp8_options& options, const parameter_map& data)
{
options.calibration.push_back(data);
}
{ options.calibration.push_back(data); }

static void quantize_fp8_wrap(program& prog, const target& t, quantize_fp8_options& options)
{
migraphx::quantize_fp8(prog, t, options.calibration);
}
{ migraphx::quantize_fp8(prog, t, options.calibration); }

static size_t get_onnx_operators_size() { return migraphx::get_onnx_operators().size(); }

Expand Down Expand Up @@ -327,9 +293,7 @@ static operation create_op(const char* name, const char* attributes, va_list vli

template <class T>
static bool equal(const T& x, const T& y)
{
return x == y;
}
{ return x == y; }

static std::vector<argument> run(program& p, const parameter_map& params) { return p.eval(params); }

Expand All @@ -340,9 +304,7 @@ static void print_program(const program& p) { std::cout << p << std::endl; }
static void print_module(const module& m) { std::cout << m << std::endl; }

static migraphx::instruction_ref add_allocation(module& m, const migraphx::shape& s)
{
return m.add_instruction(migraphx::make_op("allocate", {{"shape", migraphx::to_value(s)}}), {});
}
{ return m.add_instruction(migraphx::make_op("allocate", {{"shape", migraphx::to_value(s)}}), {}); }
Comment thread
causten marked this conversation as resolved.

struct experimental_custom_op
{
Expand All @@ -358,58 +320,42 @@ struct custom_operation

template <class Self, class F>
static auto reflect(Self&, F)
{
return pack();
}
{ return pack(); }

value attributes() const
{
return {{"custom_op", true}, {"target", op.runs_on_offload_target() ? "gpu" : "cpu"}};
}
{ return {{"custom_op", true}, {"target", op.runs_on_offload_target() ? "gpu" : "cpu"}}; }
Comment thread
causten marked this conversation as resolved.

CustomOp op;
std::string name() const { return op.xobject.name; }

shape compute_shape(std::vector<shape> inputs) const
{
return op.compute_shape(std::move(inputs));
}
{ return op.compute_shape(std::move(inputs)); }

// TODO: Compute method with module_args
argument
compute(migraphx::context ctx, migraphx::shape output_shape, std::vector<argument> inputs) const
{
return op.compute(std::move(ctx), std::move(output_shape), std::move(inputs));
}
{ return op.compute(std::move(ctx), std::move(output_shape), std::move(inputs)); }

std::vector<std::size_t> output_alias(std::vector<shape> inputs) const
{
return op.output_alias(std::move(inputs));
}
{ return op.output_alias(std::move(inputs)); }

bool runs_on_offload_target() const { return op.runs_on_offload_target(); }
};

template <class CustomOp>
static void register_custom_op(const CustomOp& op)
{
register_op(custom_operation<CustomOp>{op});
}
{ register_op(custom_operation<CustomOp>{op}); }

static migraphx::context get_context(const program& p) { return p.get_context(); }

} // namespace migraphx

template <class T, class U, class Target = std::remove_pointer_t<T>>
static Target* object_cast(U* x)
{
return reinterpret_cast<Target*>(x);
}
{ return reinterpret_cast<Target*>(x); }
template <class T, class U, class Target = std::remove_pointer_t<T>>
static const Target* object_cast(const U* x)
{
return reinterpret_cast<const Target*>(x);
}
{ return reinterpret_cast<const Target*>(x); }

template <class T, class... Ts, class Target = std::remove_pointer_t<T>>
static Target* allocate(Ts&&... xs)
Expand All @@ -436,9 +382,7 @@ struct manage_generic_ptr

manage_generic_ptr(void* pdata, const char* obj_tname, C pcopier, D pdeleter)
: data(nullptr), obj_typename(obj_tname), copier(pcopier), deleter(pdeleter)
{
copier(&data, pdata);
}
{ copier(&data, pdata); }

manage_generic_ptr(const manage_generic_ptr& rhs)
: data(nullptr), obj_typename(rhs.obj_typename), copier(rhs.copier), deleter(rhs.deleter)
Expand Down
Loading
Loading