From 80c12c299b534e4657e539ca65790d8f90523dd3 Mon Sep 17 00:00:00 2001 From: causten Date: Mon, 20 Apr 2026 18:11:25 -0400 Subject: [PATCH 01/11] Bump CIO to 7.2.2 --- .github/workflows/benchmark.yaml | 2 +- .github/workflows/config.md | 2 +- .github/workflows/performance.yaml | 2 +- .github/workflows/rocm-image-release.yaml | 2 +- .github/workflows/unreleased_rocm.yaml | 2 +- Dockerfile | 8 ++++---- hip-clang.docker | 2 +- tools/docker/sles.docker | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 22d07ca7035..156e521b055 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -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 diff --git a/.github/workflows/config.md b/.github/workflows/config.md index 374f9cc6078..cbfef52e054 100644 --- a/.github/workflows/config.md +++ b/.github/workflows/config.md @@ -1,5 +1,5 @@ #=====ROCM INFO===== -ROCM_VERSION : '7.1.1' +ROCM_VERSION : '7.2.2' #default ROCm version to be used ROCM_BASE_IMAGE : 'rocm/dev-ubuntu-22.04' #base image from dockerhub to be used diff --git a/.github/workflows/performance.yaml b/.github/workflows/performance.yaml index 26fed3ef332..ef5eed2ab07 100644 --- a/.github/workflows/performance.yaml +++ b/.github/workflows/performance.yaml @@ -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 diff --git a/.github/workflows/rocm-image-release.yaml b/.github/workflows/rocm-image-release.yaml index adc86b0ddbc..260f95537fe 100644 --- a/.github/workflows/rocm-image-release.yaml +++ b/.github/workflows/rocm-image-release.yaml @@ -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' }} diff --git a/.github/workflows/unreleased_rocm.yaml b/.github/workflows/unreleased_rocm.yaml index dcb8d833f68..e1631f09a1f 100644 --- a/.github/workflows/unreleased_rocm.yaml +++ b/.github/workflows/unreleased_rocm.yaml @@ -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 diff --git a/Dockerfile b/Dockerfile index b35e15fa03d..920f6773f6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/7.1.1/ jammy main > /etc/apt/sources.list.d/rocm.list' +RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://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" @@ -70,9 +70,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 diff --git a/hip-clang.docker b/hip-clang.docker index e6021c2fce9..35808ce8816 100644 --- a/hip-clang.docker +++ b/hip-clang.docker @@ -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/7.1.1/ jammy main > /etc/apt/sources.list.d/rocm.list' +RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://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" diff --git a/tools/docker/sles.docker b/tools/docker/sles.docker index e1521a5bec4..bf1f2e0be7d 100644 --- a/tools/docker/sles.docker +++ b/tools/docker/sles.docker @@ -3,7 +3,7 @@ FROM registry.suse.com/suse/sle15:15.6 RUN sh -c 'echo -e "\ [rocm]\n\ name=rocm\n\ -baseurl=https://repo.radeon.com/rocm/zyp/7.1.1/main\n\ +baseurl=https://repo.radeon.com/rocm/zyp/7.2.2/main\n\ enabled=1\n\ gpgcheck=0\n\ gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key\n\ From c7e9ee8903aabe9288c4563469aad5bffa22d254 Mon Sep 17 00:00:00 2001 From: causten Date: Mon, 20 Apr 2026 22:48:57 -0400 Subject: [PATCH 02/11] fix global-constructors issue on SLES --- test/register_target.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/register_target.cpp b/test/register_target.cpp index e6146088a05..215390abf1d 100644 --- a/test/register_target.cpp +++ b/test/register_target.cpp @@ -41,5 +41,12 @@ struct auto_load_targets #endif } }; +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wglobal-constructors" +#endif [[maybe_unused]] static auto load_targets{auto_load_targets{}}; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } // namespace From 7148a54261d21fe8b67d6740133f73b12b4dc33f Mon Sep 17 00:00:00 2001 From: causten Date: Wed, 22 Apr 2026 11:50:08 -0400 Subject: [PATCH 03/11] Updated the generate files --- src/api/api.cpp | 112 ++------ src/include/migraphx/allocation_model.hpp | 33 +-- src/include/migraphx/concat_opt.hpp | 38 +-- src/include/migraphx/context.hpp | 91 ++---- src/include/migraphx/marker.hpp | 23 +- src/include/migraphx/operation.hpp | 319 ++++++---------------- src/include/migraphx/pass.hpp | 52 +--- src/include/migraphx/schedule_model.hpp | 38 +-- src/include/migraphx/stream_model.hpp | 43 +-- src/include/migraphx/target.hpp | 82 ++---- 10 files changed, 203 insertions(+), 628 deletions(-) diff --git a/src/api/api.cpp b/src/api/api.cpp index f6fac27b50b..04a7fd37715 100644 --- a/src/api/api.cpp +++ b/src/api/api.cpp @@ -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 @@ -147,41 +145,27 @@ 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; } @@ -189,27 +173,19 @@ static void set_default_dim_value(tf_options& options, size_t value) { options.b static void set_input_parameter_shape(onnx_options& options, const char* name, std::vector 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 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 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 names) -{ - options.output_node_names = std::vector(names.begin(), names.end()); -} +{ options.output_node_names = std::vector(names.begin(), names.end()); } static std::vector run_async(program& p, const parameter_map& params, void* s, std::string_view name) @@ -229,9 +205,7 @@ static std::vector get_names(const std::unordered_map static std::set 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& names) { @@ -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) { @@ -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(); } @@ -327,9 +293,7 @@ static operation create_op(const char* name, const char* attributes, va_list vli template static bool equal(const T& x, const T& y) -{ - return x == y; -} +{ return x == y; } static std::vector run(program& p, const parameter_map& params) { return p.eval(params); } @@ -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)}}), {}); } struct experimental_custom_op { @@ -358,43 +320,31 @@ struct custom_operation template 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"}}; } CustomOp op; std::string name() const { return op.xobject.name; } shape compute_shape(std::vector 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 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 output_alias(std::vector 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 static void register_custom_op(const CustomOp& op) -{ - register_op(custom_operation{op}); -} +{ register_op(custom_operation{op}); } static migraphx::context get_context(const program& p) { return p.get_context(); } @@ -402,14 +352,10 @@ static migraphx::context get_context(const program& p) { return p.get_context(); template > static Target* object_cast(U* x) -{ - return reinterpret_cast(x); -} +{ return reinterpret_cast(x); } template > static const Target* object_cast(const U* x) -{ - return reinterpret_cast(x); -} +{ return reinterpret_cast(x); } template > static Target* allocate(Ts&&... xs) @@ -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) diff --git a/src/include/migraphx/allocation_model.hpp b/src/include/migraphx/allocation_model.hpp index 7b6e2ab3fc8..ea77d81420d 100644 --- a/src/include/migraphx/allocation_model.hpp +++ b/src/include/migraphx/allocation_model.hpp @@ -130,7 +130,7 @@ struct allocation_model typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, allocation_model>{}>::type> - allocation_model& operator=(PrivateDetailTypeErasedT&& value) + allocation_model& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -250,9 +250,7 @@ struct allocation_model } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } @@ -261,22 +259,13 @@ struct allocation_model std::string copy() const override { return private_detail_te_value.copy(); } operation allocate(const shape& s) const override - { - - return private_detail_te_value.allocate(s); - } + { return private_detail_te_value.allocate(s); } operation preallocate(const shape& s, std::string id) const override - { - - return private_detail_te_value.preallocate(s, std::move(id)); - } + { return private_detail_te_value.preallocate(s, std::move(id)); } bool needs_out_params() const override - { - - return private_detail_te_value.needs_out_params(); - } + { return private_detail_te_value.needs_out_params(); } PrivateDetailTypeErasedT private_detail_te_value; }; @@ -292,9 +281,7 @@ struct allocation_model }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -315,15 +302,11 @@ struct allocation_model template inline const ValueType* any_cast(const allocation_model* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(allocation_model* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(allocation_model& x) diff --git a/src/include/migraphx/concat_opt.hpp b/src/include/migraphx/concat_opt.hpp index 2a24e0c367d..2a2db12dfc2 100644 --- a/src/include/migraphx/concat_opt.hpp +++ b/src/include/migraphx/concat_opt.hpp @@ -132,7 +132,7 @@ struct concat_optimization typename = typename std::enable_if< not std::is_same, concat_optimization>{}>::type> - concat_optimization& operator=(PrivateDetailTypeErasedT&& value) + concat_optimization& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -252,37 +252,23 @@ struct concat_optimization } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } std::string allocate() const override { return private_detail_te_value.allocate(); } optional get_concat(const operation& op) const override - { - - return private_detail_te_value.get_concat(op); - } + { return private_detail_te_value.get_concat(op); } bool supports_non_packed_output(instruction_ref ins, std::size_t axis) const override - { - - return private_detail_te_value.supports_non_packed_output(ins, axis); - } + { return private_detail_te_value.supports_non_packed_output(ins, axis); } bool supports_non_packed_input(instruction_ref ins, std::size_t axis) const override - { - - return private_detail_te_value.supports_non_packed_input(ins, axis); - } + { return private_detail_te_value.supports_non_packed_input(ins, axis); } allocation_model allocation() const override - { - - return private_detail_te_value.allocation(); - } + { return private_detail_te_value.allocation(); } PrivateDetailTypeErasedT private_detail_te_value; }; @@ -298,9 +284,7 @@ struct concat_optimization }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -321,15 +305,11 @@ struct concat_optimization template inline const ValueType* any_cast(const concat_optimization* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(concat_optimization* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(concat_optimization& x) diff --git a/src/include/migraphx/context.hpp b/src/include/migraphx/context.hpp index 29c939c07a5..0a9eb8163e7 100644 --- a/src/include/migraphx/context.hpp +++ b/src/include/migraphx/context.hpp @@ -52,9 +52,7 @@ struct context template value to_value_context(const T&) -{ - return value{}; -} +{ return value{}; } template void from_value_context(T&, const value&) @@ -63,9 +61,7 @@ void from_value_context(T&, const value&) template any_ptr get_queue_context(T&) -{ - return {}; -} +{ return {}; } template void wait_for_context(T&, any_ptr) @@ -104,70 +100,50 @@ struct context template static auto private_detail_te_default_to_value(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.to_value()) - { - return private_detail_te_self.to_value(); - } + { return private_detail_te_self.to_value(); } template static value private_detail_te_default_to_value(float, T&& private_detail_te_self) - { - return to_value_context(private_detail_te_self); - } + { return to_value_context(private_detail_te_self); } template static auto private_detail_te_default_from_value(char, T&& private_detail_te_self, const value& v) -> decltype(private_detail_te_self.from_value(v)) - { - private_detail_te_self.from_value(v); - } + { private_detail_te_self.from_value(v); } template static void private_detail_te_default_from_value(float, T&& private_detail_te_self, const value& v) - { - from_value_context(private_detail_te_self, v); - } + { from_value_context(private_detail_te_self, v); } template static auto private_detail_te_default_get_queue(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.get_queue()) - { - return private_detail_te_self.get_queue(); - } + { return private_detail_te_self.get_queue(); } template static any_ptr private_detail_te_default_get_queue(float, T&& private_detail_te_self) - { - return get_queue_context(private_detail_te_self); - } + { return get_queue_context(private_detail_te_self); } template static auto private_detail_te_default_wait_for(char, T&& private_detail_te_self, any_ptr queue) -> decltype(private_detail_te_self.wait_for(queue)) - { - private_detail_te_self.wait_for(queue); - } + { private_detail_te_self.wait_for(queue); } template static void private_detail_te_default_wait_for(float, T&& private_detail_te_self, any_ptr queue) - { - wait_for_context(private_detail_te_self, queue); - } + { wait_for_context(private_detail_te_self, queue); } template static auto private_detail_te_default_finish_on(char, T&& private_detail_te_self, any_ptr queue) -> decltype(private_detail_te_self.finish_on(queue)) - { - private_detail_te_self.finish_on(queue); - } + { private_detail_te_self.finish_on(queue); } template static void private_detail_te_default_finish_on(float, T&& private_detail_te_self, any_ptr queue) - { - finish_on_context(private_detail_te_self, queue); - } + { finish_on_context(private_detail_te_self, queue); } template struct private_te_unwrap_reference @@ -224,7 +200,7 @@ struct context typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, context>{}>::type> - context& operator=(PrivateDetailTypeErasedT&& value) + context& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -350,41 +326,24 @@ struct context } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } value to_value() const override - { - - return private_detail_te_default_to_value(char(0), private_detail_te_value); - } + { return private_detail_te_default_to_value(char(0), private_detail_te_value); } void from_value(const value& v) override - { - - private_detail_te_default_from_value(char(0), private_detail_te_value, v); - } + { private_detail_te_default_from_value(char(0), private_detail_te_value, v); } any_ptr get_queue() override - { - - return private_detail_te_default_get_queue(char(0), private_detail_te_value); - } + { return private_detail_te_default_get_queue(char(0), private_detail_te_value); } void wait_for(any_ptr queue) override - { - - private_detail_te_default_wait_for(char(0), private_detail_te_value, queue); - } + { private_detail_te_default_wait_for(char(0), private_detail_te_value, queue); } void finish_on(any_ptr queue) override - { - - private_detail_te_default_finish_on(char(0), private_detail_te_value, queue); - } + { private_detail_te_default_finish_on(char(0), private_detail_te_value, queue); } void finish() const override { private_detail_te_value.finish(); } @@ -402,9 +361,7 @@ struct context }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -425,15 +382,11 @@ struct context template inline const ValueType* any_cast(const context* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(context* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(context& x) diff --git a/src/include/migraphx/marker.hpp b/src/include/migraphx/marker.hpp index 18677ed3398..e980d82b813 100644 --- a/src/include/migraphx/marker.hpp +++ b/src/include/migraphx/marker.hpp @@ -113,7 +113,7 @@ struct marker typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, marker>{}>::type> - marker& operator=(PrivateDetailTypeErasedT&& value) + marker& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -225,17 +225,12 @@ struct marker } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } void mark_start(instruction_ref ins_ref) override - { - - private_detail_te_value.mark_start(ins_ref); - } + { private_detail_te_value.mark_start(ins_ref); } void mark_start(const program& prog) override { private_detail_te_value.mark_start(prog); } @@ -257,9 +252,7 @@ struct marker }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -280,15 +273,11 @@ struct marker template inline const ValueType* any_cast(const marker* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(marker* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(marker& x) diff --git a/src/include/migraphx/operation.hpp b/src/include/migraphx/operation.hpp index 82cb9f9cdd1..5c54ca79c9c 100644 --- a/src/include/migraphx/operation.hpp +++ b/src/include/migraphx/operation.hpp @@ -132,9 +132,7 @@ auto operator==(const T& x, const U& y) -> decltype(x.name() == y.name()) template auto compute_shape_op(rank<3>, const T& x, const std::vector& inputs) -> decltype(x.compute_shape(inputs)) -{ - return x.compute_shape(inputs); -} +{ return x.compute_shape(inputs); } template auto compute_shape_op(rank<2>, const T& x, const std::vector& inputs) @@ -150,9 +148,7 @@ auto compute_shape_op(rank<2>, const T& x, const std::vector& inputs) template auto compute_shape_op(rank<1>, const T& x, const std::vector& inputs) -> decltype(x.compute_shape(inputs, {})) -{ - return x.compute_shape(inputs, {}); -} +{ return x.compute_shape(inputs, {}); } template shape compute_shape_op(rank<0>, const T& x, const std::vector&) @@ -163,9 +159,7 @@ shape compute_shape_op(rank<0>, const T& x, const std::vector&) template shape compute_shape_op(const T& x, const std::vector& inputs) -{ - return compute_shape_op(rank<3>{}, x, inputs); -} +{ return compute_shape_op(rank<3>{}, x, inputs); } template auto mod_compute_shape_op(rank<1>, @@ -173,9 +167,7 @@ auto mod_compute_shape_op(rank<1>, const std::vector& inputs, const std::vector& mod_args) -> decltype(x.compute_shape(inputs, mod_args)) -{ - return x.compute_shape(inputs, mod_args); -} +{ return x.compute_shape(inputs, mod_args); } template shape mod_compute_shape_op(rank<0>, @@ -193,9 +185,7 @@ template shape mod_compute_shape_op(const T& x, const std::vector& inputs, const std::vector& mod_args) -{ - return mod_compute_shape_op(rank<1>{}, x, inputs, mod_args); -} +{ return mod_compute_shape_op(rank<1>{}, x, inputs, mod_args); } template auto compute_op(rank<1>, @@ -221,16 +211,12 @@ argument compute_op(rank<0>, const T& x, context&, const shape&, const std::vect template argument compute_op(const T& x, context& ctx, const shape& output_shape, const std::vector& input) -{ - return compute_op(rank<1>{}, x, ctx, output_shape, input); -} +{ return compute_op(rank<1>{}, x, ctx, output_shape, input); } template auto compute_op(rank<1>, const T& x, const shape& output_shape, const std::vector& input) -> decltype(x.compute(make_compute_output_shape(pack(x, output_shape, input)), input)) -{ - return x.compute(make_compute_output_shape(pack(x, output_shape, input)), input); -} +{ return x.compute(make_compute_output_shape(pack(x, output_shape, input)), input); } template argument compute_op(rank<0>, const T& x, const shape&, const std::vector&) @@ -241,9 +227,7 @@ argument compute_op(rank<0>, const T& x, const shape&, const std::vector argument compute_op(const T& x, const shape& output_shape, const std::vector& input) -{ - return compute_op(rank<1>{}, x, output_shape, input); -} +{ return compute_op(rank<1>{}, x, output_shape, input); } template auto compute_op(rank<1>, @@ -280,9 +264,7 @@ argument compute_op(const T& x, const std::vector& inputs, const std::vector& module_args, F f) -{ - return compute_op(rank<1>{}, x, output, inputs, module_args, std::move(f)); -} +{ return compute_op(rank<1>{}, x, output, inputs, module_args, std::move(f)); } template auto compute_op(rank<4>, @@ -329,9 +311,7 @@ auto compute_op(rank<2>, const std::vector&, F) // NOLINT -> decltype(x.compute(make_compute_output_shape(pack(x, output, inputs)), inputs)) -{ - return x.compute(make_compute_output_shape(pack(x, output, inputs)), inputs); -} +{ return x.compute(make_compute_output_shape(pack(x, output, inputs)), inputs); } template auto compute_op(rank<1>, @@ -369,9 +349,7 @@ argument compute_op(const T& x, const std::vector& inputs, const std::vector& module_args, F f) -{ - return compute_op(rank<4>{}, x, ctx, output, inputs, module_args, std::move(f)); -} +{ return compute_op(rank<4>{}, x, ctx, output, inputs, module_args, std::move(f)); } template auto is_context_free_op(rank<1>, @@ -388,9 +366,7 @@ auto is_context_free_op(rank<0>, const T&, const shape&, const std::vector auto is_context_free_op(const T& x) -> decltype(is_context_free_op( rank<1>{}, x, std::declval(), std::declval>())) -{ - return {}; -} +{ return {}; } template auto need_normalization_op(rank<1>, const T& x, const std::vector& inputs) @@ -402,23 +378,17 @@ auto need_normalization_op(rank<0>, const T&, const std::vector&) -> std: template auto need_normalization_op(const T& x) -> decltype(need_normalization_op(rank<1>{}, x, std::declval>())) -{ - return {}; -} +{ return {}; } template std::vector output_alias_op(const T&, const std::vector&) -{ - return {}; -} +{ return {}; } template auto finalize_op( rank<1>, T& x, context& ctx, const shape& output_shape, const std::vector& input) -> decltype(x.finalize(auto_any_cast(ctx), output_shape, input), void()) -{ - x.finalize(auto_any_cast(ctx), output_shape, input); -} +{ x.finalize(auto_any_cast(ctx), output_shape, input); } template void finalize_op(rank<0>, T&, context&, const shape&, const std::vector&) @@ -427,9 +397,7 @@ void finalize_op(rank<0>, T&, context&, const shape&, const std::vector&) template void finalize_op(T& x, context& ctx, const shape& output_shape, const std::vector& input) -{ - finalize_op(rank<1>{}, x, ctx, output_shape, input); -} +{ finalize_op(rank<1>{}, x, ctx, output_shape, input); } template auto has_finalize_op( @@ -446,44 +414,32 @@ auto has_finalize_op(const T&) -> decltype(has_finalize_op(rank<1>{}, std::declval(), std::declval(), std::declval>())) -{ - return {}; -} +{ return {}; } template auto compile_op( rank<1>, T& x, context& ctx, const shape& output_shape, const std::vector& input) -> decltype(x.compile(auto_any_cast(ctx), output_shape, input)) -{ - return x.compile(auto_any_cast(ctx), output_shape, input); -} +{ return x.compile(auto_any_cast(ctx), output_shape, input); } template value compile_op(rank<0>, T&, context&, const shape&, const std::vector&) -{ - return value::object{}; -} +{ return value::object{}; } template value compile_op(const T& x, context& ctx, const shape& output_shape, const std::vector& input) -{ - return compile_op(rank<1>{}, x, ctx, output_shape, input); -} +{ return compile_op(rank<1>{}, x, ctx, output_shape, input); } template value attributes_op(const T&) -{ - return value::object{}; -} +{ return value::object{}; } template value to_value_op(const T& x) -{ - return migraphx::to_value(x); -} +{ return migraphx::to_value(x); } template void from_value_op(T& x, const value& v) @@ -495,9 +451,7 @@ void from_value_op(T& x, const value& v) template lifetime get_lifetime_op(const T&) -{ - return lifetime::local; -} +{ return lifetime::local; } } // namespace detail @@ -564,70 +518,50 @@ struct operation template static auto private_detail_te_default_is_context_free(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.is_context_free()) - { - return private_detail_te_self.is_context_free(); - } + { return private_detail_te_self.is_context_free(); } template static bool private_detail_te_default_is_context_free(float, T&& private_detail_te_self) - { - return detail::is_context_free_op(private_detail_te_self); - } + { return detail::is_context_free_op(private_detail_te_self); } template static auto private_detail_te_default_need_normalization(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.need_normalization()) - { - return private_detail_te_self.need_normalization(); - } + { return private_detail_te_self.need_normalization(); } template static bool private_detail_te_default_need_normalization(float, T&& private_detail_te_self) - { - return detail::need_normalization_op(private_detail_te_self); - } + { return detail::need_normalization_op(private_detail_te_self); } template static auto private_detail_te_default_has_finalize(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.has_finalize()) - { - return private_detail_te_self.has_finalize(); - } + { return private_detail_te_self.has_finalize(); } template static bool private_detail_te_default_has_finalize(float, T&& private_detail_te_self) - { - return detail::has_finalize_op(private_detail_te_self); - } + { return detail::has_finalize_op(private_detail_te_self); } template static auto private_detail_te_default_get_lifetime(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.get_lifetime()) - { - return private_detail_te_self.get_lifetime(); - } + { return private_detail_te_self.get_lifetime(); } template static lifetime private_detail_te_default_get_lifetime(float, T&& private_detail_te_self) - { - return detail::get_lifetime_op(private_detail_te_self); - } + { return detail::get_lifetime_op(private_detail_te_self); } template static auto private_detail_te_default_output_alias(char, T&& private_detail_te_self, const std::vector& input) -> decltype(private_detail_te_self.output_alias(input)) - { - return private_detail_te_self.output_alias(input); - } + { return private_detail_te_self.output_alias(input); } template static std::vector private_detail_te_default_output_alias( float, T&& private_detail_te_self, const std::vector& input) - { - return detail::output_alias_op(private_detail_te_self, input); - } + { return detail::output_alias_op(private_detail_te_self, input); } template static auto private_detail_te_default_compile(char, @@ -636,9 +570,7 @@ struct operation const shape& output, const std::vector& input) -> decltype(private_detail_te_self.compile(ctx, output, input)) - { - return private_detail_te_self.compile(ctx, output, input); - } + { return private_detail_te_self.compile(ctx, output, input); } template static value private_detail_te_default_compile(float, @@ -646,9 +578,7 @@ struct operation context& ctx, const shape& output, const std::vector& input) - { - return detail::compile_op(private_detail_te_self, ctx, output, input); - } + { return detail::compile_op(private_detail_te_self, ctx, output, input); } template static auto private_detail_te_default_finalize(char, @@ -657,9 +587,7 @@ struct operation const shape& output, const std::vector& input) -> decltype(private_detail_te_self.finalize(ctx, output, input)) - { - private_detail_te_self.finalize(ctx, output, input); - } + { private_detail_te_self.finalize(ctx, output, input); } template static void private_detail_te_default_finalize(float, @@ -667,26 +595,20 @@ struct operation context& ctx, const shape& output, const std::vector& input) - { - detail::finalize_op(private_detail_te_self, ctx, output, input); - } + { detail::finalize_op(private_detail_te_self, ctx, output, input); } template static auto private_detail_te_default_compute_shape(char, T&& private_detail_te_self, const std::vector& input) -> decltype(private_detail_te_self.compute_shape(input)) - { - return private_detail_te_self.compute_shape(input); - } + { return private_detail_te_self.compute_shape(input); } template static shape private_detail_te_default_compute_shape(float, T&& private_detail_te_self, const std::vector& input) - { - return detail::compute_shape_op(private_detail_te_self, input); - } + { return detail::compute_shape_op(private_detail_te_self, input); } template static auto private_detail_te_default_compute_shape(char, @@ -694,18 +616,14 @@ struct operation const std::vector& inputs, const std::vector& mod_args) -> decltype(private_detail_te_self.compute_shape(inputs, mod_args)) - { - return private_detail_te_self.compute_shape(inputs, mod_args); - } + { return private_detail_te_self.compute_shape(inputs, mod_args); } template static shape private_detail_te_default_compute_shape(float, T&& private_detail_te_self, const std::vector& inputs, const std::vector& mod_args) - { - return detail::mod_compute_shape_op(private_detail_te_self, inputs, mod_args); - } + { return detail::mod_compute_shape_op(private_detail_te_self, inputs, mod_args); } template static auto private_detail_te_default_compute(char, @@ -714,9 +632,7 @@ struct operation const shape& output, const std::vector& input) -> decltype(private_detail_te_self.compute(ctx, output, input)) - { - return private_detail_te_self.compute(ctx, output, input); - } + { return private_detail_te_self.compute(ctx, output, input); } template static argument private_detail_te_default_compute(float, @@ -724,9 +640,7 @@ struct operation context& ctx, const shape& output, const std::vector& input) - { - return detail::compute_op(private_detail_te_self, ctx, output, input); - } + { return detail::compute_op(private_detail_te_self, ctx, output, input); } template static auto private_detail_te_default_compute(char, @@ -734,18 +648,14 @@ struct operation const shape& output, const std::vector& input) -> decltype(private_detail_te_self.compute(output, input)) - { - return private_detail_te_self.compute(output, input); - } + { return private_detail_te_self.compute(output, input); } template static argument private_detail_te_default_compute(float, T&& private_detail_te_self, const shape& output, const std::vector& input) - { - return detail::compute_op(private_detail_te_self, output, input); - } + { return detail::compute_op(private_detail_te_self, output, input); } template static auto private_detail_te_default_compute( @@ -757,9 +667,7 @@ struct operation std::function(module_ref&, const std::unordered_map&)> run) -> decltype(private_detail_te_self.compute(output, input, module_args, std::move(run))) - { - return private_detail_te_self.compute(output, input, module_args, std::move(run)); - } + { return private_detail_te_self.compute(output, input, module_args, std::move(run)); } template static argument private_detail_te_default_compute( @@ -786,9 +694,7 @@ struct operation std::function(module_ref&, const std::unordered_map&)> run) -> decltype(private_detail_te_self.compute(ctx, output, input, module_args, std::move(run))) - { - return private_detail_te_self.compute(ctx, output, input, module_args, std::move(run)); - } + { return private_detail_te_self.compute(ctx, output, input, module_args, std::move(run)); } template static argument private_detail_te_default_compute( @@ -808,43 +714,31 @@ struct operation template static auto private_detail_te_default_to_value(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.to_value()) - { - return private_detail_te_self.to_value(); - } + { return private_detail_te_self.to_value(); } template static value private_detail_te_default_to_value(float, T&& private_detail_te_self) - { - return detail::to_value_op(private_detail_te_self); - } + { return detail::to_value_op(private_detail_te_self); } template static auto private_detail_te_default_from_value(char, T&& private_detail_te_self, const value& v) -> decltype(private_detail_te_self.from_value(v)) - { - private_detail_te_self.from_value(v); - } + { private_detail_te_self.from_value(v); } template static void private_detail_te_default_from_value(float, T&& private_detail_te_self, const value& v) - { - detail::from_value_op(private_detail_te_self, v); - } + { detail::from_value_op(private_detail_te_self, v); } template static auto private_detail_te_default_attributes(char, T&& private_detail_te_self) -> decltype(private_detail_te_self.attributes()) - { - return private_detail_te_self.attributes(); - } + { return private_detail_te_self.attributes(); } template static value private_detail_te_default_attributes(float, T&& private_detail_te_self) - { - return detail::attributes_op(private_detail_te_self); - } + { return detail::attributes_op(private_detail_te_self); } template struct private_te_unwrap_reference @@ -952,7 +846,7 @@ struct operation typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, operation>{}>::type> - operation& operator=(PrivateDetailTypeErasedT&& value) + operation& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -1196,43 +1090,26 @@ struct operation } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } std::string name() const override { return private_detail_te_value.name(); } bool is_context_free() const override - { - - return private_detail_te_default_is_context_free(char(0), private_detail_te_value); - } + { return private_detail_te_default_is_context_free(char(0), private_detail_te_value); } bool need_normalization() const override - { - - return private_detail_te_default_need_normalization(char(0), private_detail_te_value); - } + { return private_detail_te_default_need_normalization(char(0), private_detail_te_value); } bool has_finalize() const override - { - - return private_detail_te_default_has_finalize(char(0), private_detail_te_value); - } + { return private_detail_te_default_has_finalize(char(0), private_detail_te_value); } lifetime get_lifetime() const override - { - - return private_detail_te_default_get_lifetime(char(0), private_detail_te_value); - } + { return private_detail_te_default_get_lifetime(char(0), private_detail_te_value); } std::vector output_alias(const std::vector& input) const override - { - - return private_detail_te_default_output_alias(char(0), private_detail_te_value, input); - } + { return private_detail_te_default_output_alias(char(0), private_detail_te_value, input); } value compile(context& ctx, const shape& output, const std::vector& input) override { @@ -1249,10 +1126,7 @@ struct operation } shape compute_shape(const std::vector& input) const override - { - - return private_detail_te_default_compute_shape(char(0), private_detail_te_value, input); - } + { return private_detail_te_default_compute_shape(char(0), private_detail_te_value, input); } shape compute_shape(const std::vector& inputs, const std::vector& mod_args) const override @@ -1304,22 +1178,13 @@ struct operation } value to_value() const override - { - - return private_detail_te_default_to_value(char(0), private_detail_te_value); - } + { return private_detail_te_default_to_value(char(0), private_detail_te_value); } void from_value(const value& v) override - { - - private_detail_te_default_from_value(char(0), private_detail_te_value, v); - } + { private_detail_te_default_from_value(char(0), private_detail_te_value, v); } value attributes() const override - { - - return private_detail_te_default_attributes(char(0), private_detail_te_value); - } + { return private_detail_te_default_attributes(char(0), private_detail_te_value); } std::ostream& operator_shift_left(std::ostream& os) const override { @@ -1347,9 +1212,7 @@ struct operation }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -1370,15 +1233,11 @@ struct operation template inline const ValueType* any_cast(const operation* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(operation* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(operation& x) @@ -1404,9 +1263,7 @@ inline bool operator!=(const operation& x, const operation& y) { return not(x == inline value compile(operation& op, context& ctx, const shape& output_shape, const std::vector& input) -{ - return op.compile(ctx, output_shape, input); -} +{ return op.compile(ctx, output_shape, input); } template inline value compile(operation& op, Context& ctx, const shape& output_shape, const std::vector& input) @@ -1417,76 +1274,56 @@ compile(operation& op, Context& ctx, const shape& output_shape, const std::vecto template inline auto compile(T& op, Context& ctx, const shape& output_shape, const std::vector& input) -> decltype(op.compile(ctx, ctx, output_shape, input)) -{ - return op.compile(ctx, ctx, output_shape, input); -} +{ return op.compile(ctx, ctx, output_shape, input); } inline shape compute_shape(const operation& op, const std::vector& inputs) -{ - return op.compute_shape(inputs); -} +{ return op.compute_shape(inputs); } template inline auto compute_shape(const T& op, const std::vector& inputs) -> decltype(op.compute_shape(inputs)) -{ - return op.compute_shape(inputs); -} +{ return op.compute_shape(inputs); } template inline auto compute_shape(const T& op, const std::vector& inputs) -> decltype(op.normalize_compute_shape(inputs)) -{ - return detail::compute_shape_op(op, inputs); -} +{ return detail::compute_shape_op(op, inputs); } inline shape compute_shape(const operation& op, const std::vector& inputs, const std::vector& mod_args) -{ - return op.compute_shape(inputs, mod_args); -} +{ return op.compute_shape(inputs, mod_args); } template inline auto compute_shape(const T& op, const std::vector& inputs, const std::vector& mod_args) -> decltype(op.compute_shape(inputs, mod_args)) -{ - return op.compute_shape(inputs, mod_args); -} +{ return op.compute_shape(inputs, mod_args); } template inline auto compute_shape(const T& op, const std::vector& inputs, const std::vector& mod_args) -> decltype(op.normalize_compute_shape(inputs, mod_args)) -{ - return detail::compute_shape_op(op, inputs, mod_args); -} +{ return detail::compute_shape_op(op, inputs, mod_args); } inline bool is_context_free(const operation& op) { return op.is_context_free(); } template bool is_context_free(const T& x) -{ - return detail::is_context_free_op(x); -} +{ return detail::is_context_free_op(x); } inline bool need_normalization(const operation& op) { return op.need_normalization(); } template bool need_normalization(const T& x) -{ - return detail::need_normalization_op(x); -} +{ return detail::need_normalization_op(x); } inline bool has_finalize(const operation& op) { return op.has_finalize(); } template bool has_finalize(const T& x) -{ - return detail::has_finalize_op(x); -} +{ return detail::has_finalize_op(x); } MIGRAPHX_EXPORT void migraphx_to_value(value& v, const operation& op); MIGRAPHX_EXPORT void migraphx_from_value(const value& v, operation& op); diff --git a/src/include/migraphx/pass.hpp b/src/include/migraphx/pass.hpp index 8efe5f5dea1..e21b0bcc3dd 100644 --- a/src/include/migraphx/pass.hpp +++ b/src/include/migraphx/pass.hpp @@ -64,9 +64,7 @@ namespace detail { template 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)); -} +{ return x.apply(get_module(mpm)); } template void module_pass_manager_apply(rank<0>, const T&, module_pass_manager&) @@ -75,9 +73,7 @@ void module_pass_manager_apply(rank<0>, const T&, module_pass_manager&) template void module_pass_manager_apply(const T& x, module_pass_manager& mpm) -{ - module_pass_manager_apply(rank<1>{}, x, mpm); -} +{ module_pass_manager_apply(rank<1>{}, x, mpm); } } // namespace detail @@ -103,29 +99,21 @@ struct pass static auto private_detail_te_default_apply(char, T&& private_detail_te_self, module_pass_manager& mpm) -> decltype(private_detail_te_self.apply(mpm)) - { - private_detail_te_self.apply(mpm); - } + { private_detail_te_self.apply(mpm); } template static void private_detail_te_default_apply(float, T&& private_detail_te_self, module_pass_manager& mpm) - { - migraphx::detail::module_pass_manager_apply(private_detail_te_self, mpm); - } + { migraphx::detail::module_pass_manager_apply(private_detail_te_self, mpm); } template static auto private_detail_te_default_apply(char, T&& private_detail_te_self, program& p) -> decltype(private_detail_te_self.apply(p)) - { - private_detail_te_self.apply(p); - } + { private_detail_te_self.apply(p); } template static void private_detail_te_default_apply(float, T&& private_detail_te_self, program& p) - { - migraphx::nop(private_detail_te_self, p); - } + { migraphx::nop(private_detail_te_self, p); } template struct private_te_unwrap_reference @@ -176,7 +164,7 @@ struct pass typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, pass>{}>::type> - pass& operator=(PrivateDetailTypeErasedT&& value) + pass& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -281,25 +269,17 @@ struct pass } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } std::string name() const override { return private_detail_te_value.name(); } void apply(module_pass_manager& mpm) const override - { - - private_detail_te_default_apply(char(0), private_detail_te_value, mpm); - } + { private_detail_te_default_apply(char(0), private_detail_te_value, mpm); } void apply(program& p) const override - { - - private_detail_te_default_apply(char(0), private_detail_te_value, p); - } + { private_detail_te_default_apply(char(0), private_detail_te_value, p); } PrivateDetailTypeErasedT private_detail_te_value; }; @@ -315,9 +295,7 @@ struct pass }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -338,15 +316,11 @@ struct pass template inline const ValueType* any_cast(const pass* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(pass* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(pass& x) diff --git a/src/include/migraphx/schedule_model.hpp b/src/include/migraphx/schedule_model.hpp index 24476af4240..f4dfbcc8470 100644 --- a/src/include/migraphx/schedule_model.hpp +++ b/src/include/migraphx/schedule_model.hpp @@ -138,7 +138,7 @@ struct schedule_model typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, schedule_model>{}>::type> - schedule_model& operator=(PrivateDetailTypeErasedT&& value) + schedule_model& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -258,37 +258,23 @@ struct schedule_model } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } std::size_t concurrency() const override { return private_detail_te_value.concurrency(); } void sched(module& m, instruction_ref ins, std::size_t n) const override - { - - private_detail_te_value.sched(m, ins, n); - } + { private_detail_te_value.sched(m, ins, n); } void wait(module& m, instruction_ref ins, std::size_t wait_id) const override - { - - private_detail_te_value.wait(m, ins, wait_id); - } + { private_detail_te_value.wait(m, ins, wait_id); } void record(module& m, instruction_ref ins, std::size_t wait_id) const override - { - - private_detail_te_value.record(m, ins, wait_id); - } + { private_detail_te_value.record(m, ins, wait_id); } std::size_t weight(const operation& op) const override - { - - return private_detail_te_value.weight(op); - } + { return private_detail_te_value.weight(op); } PrivateDetailTypeErasedT private_detail_te_value; }; @@ -304,9 +290,7 @@ struct schedule_model }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -327,15 +311,11 @@ struct schedule_model template inline const ValueType* any_cast(const schedule_model* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(schedule_model* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(schedule_model& x) diff --git a/src/include/migraphx/stream_model.hpp b/src/include/migraphx/stream_model.hpp index 1b1c178ac54..48bd0e4c00d 100644 --- a/src/include/migraphx/stream_model.hpp +++ b/src/include/migraphx/stream_model.hpp @@ -138,7 +138,7 @@ struct stream_model typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, stream_model>{}>::type> - stream_model& operator=(PrivateDetailTypeErasedT&& value) + stream_model& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -265,43 +265,26 @@ struct stream_model } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } std::size_t get_nstream() const override { return private_detail_te_value.get_nstream(); } std::size_t get_stream(instruction_ref ins) const override - { - - return private_detail_te_value.get_stream(ins); - } + { return private_detail_te_value.get_stream(ins); } std::size_t get_event_id(instruction_ref ins) const override - { - - return private_detail_te_value.get_event_id(ins); - } + { return private_detail_te_value.get_event_id(ins); } bool has_stream(instruction_ref ins) const override - { - - return private_detail_te_value.has_stream(ins); - } + { return private_detail_te_value.has_stream(ins); } bool is_record(instruction_ref ins) const override - { - - return private_detail_te_value.is_record(ins); - } + { return private_detail_te_value.is_record(ins); } bool is_wait(instruction_ref ins) const override - { - - return private_detail_te_value.is_wait(ins); - } + { return private_detail_te_value.is_wait(ins); } PrivateDetailTypeErasedT private_detail_te_value; }; @@ -317,9 +300,7 @@ struct stream_model }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -340,15 +321,11 @@ struct stream_model template inline const ValueType* any_cast(const stream_model* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(stream_model* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(stream_model& x) diff --git a/src/include/migraphx/target.hpp b/src/include/migraphx/target.hpp index 04dff5bc561..1f96a19ce55 100644 --- a/src/include/migraphx/target.hpp +++ b/src/include/migraphx/target.hpp @@ -108,21 +108,15 @@ argument target_allocate(T& x, const shape&) template argument copy_to_target(T&, const argument& arg) -{ - return arg; -} +{ return arg; } template argument copy_from_target(T&, const argument& arg) -{ - return arg; -} +{ return arg; } template supported_segments target_find_supported(T&, const_module_ref, support_metric) -{ - return {}; -} +{ return {}; } #ifdef TYPE_ERASED_DECLARATION @@ -156,62 +150,46 @@ struct target const_module_ref mod, support_metric m) -> decltype(private_detail_te_self.find_supported(mod, m)) - { - return private_detail_te_self.find_supported(mod, m); - } + { return private_detail_te_self.find_supported(mod, m); } template static supported_segments private_detail_te_default_find_supported(float, T&& private_detail_te_self, const_module_ref mod, support_metric m) - { - return target_find_supported(private_detail_te_self, mod, m); - } + { return target_find_supported(private_detail_te_self, mod, m); } template static auto private_detail_te_default_copy_to(char, T&& private_detail_te_self, const argument& input) -> decltype(private_detail_te_self.copy_to(input)) - { - return private_detail_te_self.copy_to(input); - } + { return private_detail_te_self.copy_to(input); } template static argument private_detail_te_default_copy_to(float, T&& private_detail_te_self, const argument& input) - { - return copy_to_target(private_detail_te_self, input); - } + { return copy_to_target(private_detail_te_self, input); } template static auto private_detail_te_default_copy_from(char, T&& private_detail_te_self, const argument& input) -> decltype(private_detail_te_self.copy_from(input)) - { - return private_detail_te_self.copy_from(input); - } + { return private_detail_te_self.copy_from(input); } template static argument private_detail_te_default_copy_from(float, T&& private_detail_te_self, const argument& input) - { - return copy_from_target(private_detail_te_self, input); - } + { return copy_from_target(private_detail_te_self, input); } template static auto private_detail_te_default_allocate(char, T&& private_detail_te_self, const shape& s) -> decltype(private_detail_te_self.allocate(s)) - { - return private_detail_te_self.allocate(s); - } + { return private_detail_te_self.allocate(s); } template static argument private_detail_te_default_allocate(float, T&& private_detail_te_self, const shape& s) - { - return target_allocate(private_detail_te_self, s); - } + { return target_allocate(private_detail_te_self, s); } template struct private_te_unwrap_reference @@ -273,7 +251,7 @@ struct target typename = private_te_constraints, typename = typename std::enable_if< not std::is_same, target>{}>::type> - target& operator=(PrivateDetailTypeErasedT&& value) + target& operator=(PrivateDetailTypeErasedT && value) { using std::swap; auto* derived = this->any_cast>(); @@ -407,19 +385,14 @@ struct target } std::shared_ptr clone() const override - { - return std::make_shared(private_detail_te_value); - } + { return std::make_shared(private_detail_te_value); } const std::type_info& type() const override { return typeid(private_detail_te_value); } std::string name() const override { return private_detail_te_value.name(); } std::vector get_passes(context& ctx, const compile_options& options) const override - { - - return private_detail_te_value.get_passes(ctx, options); - } + { return private_detail_te_value.get_passes(ctx, options); } context get_context() const override { return private_detail_te_value.get_context(); } @@ -431,22 +404,13 @@ struct target } argument copy_to(const argument& input) const override - { - - return private_detail_te_default_copy_to(char(0), private_detail_te_value, input); - } + { return private_detail_te_default_copy_to(char(0), private_detail_te_value, input); } argument copy_from(const argument& input) const override - { - - return private_detail_te_default_copy_from(char(0), private_detail_te_value, input); - } + { return private_detail_te_default_copy_from(char(0), private_detail_te_value, input); } argument allocate(const shape& s) const override - { - - return private_detail_te_default_allocate(char(0), private_detail_te_value, s); - } + { return private_detail_te_default_allocate(char(0), private_detail_te_value, s); } PrivateDetailTypeErasedT private_detail_te_value; }; @@ -462,9 +426,7 @@ struct target }; bool private_detail_te_handle_empty() const - { - return private_detail_te_handle_mem_var == nullptr; - } + { return private_detail_te_handle_mem_var == nullptr; } const private_detail_te_handle_base_type& private_detail_te_get_handle() const { @@ -485,15 +447,11 @@ struct target template inline const ValueType* any_cast(const target* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType* any_cast(target* x) -{ - return x->any_cast(); -} +{ return x->any_cast(); } template inline ValueType& any_cast(target& x) From bc52446e11bc239b68d4208eb02881e911bcbd02 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:19:49 +0000 Subject: [PATCH 04/11] Fix ROCm apt repo: use HTTPS + GPG keyring instead of HTTP + trusted=yes Agent-Logs-Url: https://github.com/ROCm/AMDMIGraphX/sessions/f89e0e03-5f06-4991-91c2-362fc2468784 Co-authored-by: causten <7440191+causten@users.noreply.github.com> --- Dockerfile | 7 ++++--- hip-clang.docker | 9 +++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 920f6773f6a..7a673af194c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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.2.2/ 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" @@ -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 \ diff --git a/hip-clang.docker b/hip-clang.docker index 35808ce8816..6764db7e72b 100644 --- a/hip-clang.docker +++ b/hip-clang.docker @@ -5,14 +5,19 @@ ARG PREFIX=/usr/local # Support multiarch RUN dpkg --add-architecture i386 +# Install rocm key +RUN apt-get update && apt-get install -y gnupg2 curl --no-install-recommends && \ + 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.2.2/ 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 \ From 8d53bd4646c1b7ccb917d25166e602f9267db18f Mon Sep 17 00:00:00 2001 From: Chris Austen Date: Thu, 23 Apr 2026 17:25:04 -0400 Subject: [PATCH 05/11] resolve CI failures --- CMakeLists.txt | 1 + test/register_target.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dbf5b604da8..3f339aa5271 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 -cppcoreguidelines-pro-bounds-constant-array-index -cppcoreguidelines-pro-bounds-pointer-arithmetic -cppcoreguidelines-pro-type-member-init diff --git a/test/register_target.cpp b/test/register_target.cpp index 215390abf1d..35be5964993 100644 --- a/test/register_target.cpp +++ b/test/register_target.cpp @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2015-2026 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 From e7129e0e886c2cd7f39733ded34a34bd2c12bf5b Mon Sep 17 00:00:00 2001 From: causten Date: Thu, 23 Apr 2026 18:24:30 -0400 Subject: [PATCH 06/11] fixup for hip-clang.docker --- hip-clang.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hip-clang.docker b/hip-clang.docker index 6764db7e72b..c73de18da17 100644 --- a/hip-clang.docker +++ b/hip-clang.docker @@ -6,10 +6,11 @@ ARG PREFIX=/usr/local RUN dpkg --add-architecture i386 # Install rocm key -RUN apt-get update && apt-get install -y gnupg2 curl --no-install-recommends && \ +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 + # 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.2/ jammy main > /etc/apt/sources.list.d/rocm.list' @@ -21,7 +22,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ apt-utils \ build-essential \ cmake \ - curl \ gdb \ git \ lcov \ From 5ecd9c9315516a795edfd4cded716a19b1cc94aa Mon Sep 17 00:00:00 2001 From: causten Date: Tue, 28 Apr 2026 12:54:08 -0400 Subject: [PATCH 07/11] clang tidy fixups --- CMakeLists.txt | 1 + src/include/migraphx/instruction_ref.hpp | 2 +- src/include/migraphx/optional.hpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f339aa5271..bd5a2bcf15d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,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 diff --git a/src/include/migraphx/instruction_ref.hpp b/src/include/migraphx/instruction_ref.hpp index 4c6b6876334..e2c2aafadb1 100644 --- a/src/include/migraphx/instruction_ref.hpp +++ b/src/include/migraphx/instruction_ref.hpp @@ -39,7 +39,7 @@ as_address(const std::list::iterator& ins) noexcept; MIGRAPHX_EXPORT const migraphx::instruction* as_address(const std::list::const_iterator& ins) noexcept; -#if defined(CPPCHECK) +#ifdef CPPCHECK using instruction_ref = std::list::iterator; #else struct instruction_ref : std::list::iterator diff --git a/src/include/migraphx/optional.hpp b/src/include/migraphx/optional.hpp index 5f3be003e00..b4d17b71a1e 100644 --- a/src/include/migraphx/optional.hpp +++ b/src/include/migraphx/optional.hpp @@ -26,7 +26,7 @@ #include -#if defined(CPPCHECK) +#ifdef CPPCHECK #define MIGRAPHX_HAS_OPTIONAL 1 #define MIGRAPHX_HAS_OPTIONAL_TS 1 #elif defined(_WIN32) From 4a988236d4c90ea2b009f9b81649cba7f315c76b Mon Sep 17 00:00:00 2001 From: Chris Austen Date: Tue, 28 Apr 2026 12:58:29 -0400 Subject: [PATCH 08/11] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Chris Austen --- CMakeLists.txt | 2 +- hip-clang.docker | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd5a2bcf15d..eedc3d48713 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,7 +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 + -cppcoreguidelines-pro-bounds-avoid-unchecked-container-access -cppcoreguidelines-pro-bounds-constant-array-index -cppcoreguidelines-pro-bounds-pointer-arithmetic -cppcoreguidelines-pro-type-member-init diff --git a/hip-clang.docker b/hip-clang.docker index c73de18da17..1caac8d198f 100644 --- a/hip-clang.docker +++ b/hip-clang.docker @@ -8,7 +8,9 @@ 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.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/keyrings/rocm.gpg && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Add rocm repository From cd37c8c22608feed0aa0a9905e06296e4cffff76 Mon Sep 17 00:00:00 2001 From: causten Date: Tue, 28 Apr 2026 19:29:20 -0400 Subject: [PATCH 09/11] update tidy --- CMakeLists.txt | 3 ++- src/include/migraphx/instruction_ref.hpp | 2 +- src/include/migraphx/optional.hpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eedc3d48713..2d0840f6ee6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,7 +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 + -cppcoreguidelines-pro-bounds-avoid-unchecked-container-access -cppcoreguidelines-pro-bounds-constant-array-index -cppcoreguidelines-pro-bounds-pointer-arithmetic -cppcoreguidelines-pro-type-member-init @@ -220,6 +220,7 @@ rocm_enable_clang_tidy( -misc-include-cleaner -misc-macro-parentheses -misc-no-recursion + -misc-override-with-different-visibility -modernize-concat-nested-namespaces -modernize-pass-by-value -modernize-type-traits diff --git a/src/include/migraphx/instruction_ref.hpp b/src/include/migraphx/instruction_ref.hpp index e2c2aafadb1..d5d0e29d43e 100644 --- a/src/include/migraphx/instruction_ref.hpp +++ b/src/include/migraphx/instruction_ref.hpp @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2015-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2015-2026 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 diff --git a/src/include/migraphx/optional.hpp b/src/include/migraphx/optional.hpp index b4d17b71a1e..7915c445da9 100644 --- a/src/include/migraphx/optional.hpp +++ b/src/include/migraphx/optional.hpp @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2015-2023 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2015-2026 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 From f0cd88c525fa78ba737a4140f1e9e6c6f7ecdc92 Mon Sep 17 00:00:00 2001 From: causten Date: Wed, 29 Apr 2026 01:35:41 -0400 Subject: [PATCH 10/11] quiet clang for this PR --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d0840f6ee6..6754df86786 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,6 +227,7 @@ rocm_enable_clang_tidy( -modernize-use-default-member-init -modernize-use-nodiscard -modernize-use-override + -modernize-use-scoped-lock -modernize-use-trailing-return-type -modernize-use-transparent-functors -performance-avoid-endl @@ -241,9 +242,11 @@ rocm_enable_clang_tidy( -readability-math-missing-parentheses -readability-named-parameter -readability-redundant-member-init + -readability-redundant-parentheses -readability-redundant-string-init -readability-suspicious-call-argument -readability-uppercase-literal-suffix + -readability-use-concise-preprocessor-directives -*-avoid-c-arrays -*-explicit-constructor -*-magic-numbers From 5a545674313c6dfb59c229c4ea9f72cacff43b9b Mon Sep 17 00:00:00 2001 From: Chris Austen Date: Wed, 29 Apr 2026 14:40:18 -0400 Subject: [PATCH 11/11] Suppress new clang-tidy warnings from LLVM bump Co-Authored-By: Claude Opus 4 (1M context) --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6754df86786..a7bb30583fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,6 +161,7 @@ rocm_enable_clang_tidy( performance-* readability-* -bugprone-crtp-constructor-accessibility + -bugprone-derived-method-shadowing-base-method -bugprone-easily-swappable-parameters -bugprone-implicit-widening-of-multiplication-result -bugprone-macro-parentheses @@ -168,6 +169,7 @@ rocm_enable_clang_tidy( -bugprone-return-const-ref-from-parameter -bugprone-signed-char-misuse -bugprone-unchecked-optional-access + -bugprone-unintended-char-ostream-output # Disable the aliased reserved identifiers -cert-dcl37-c -cert-dcl51-cpp @@ -217,6 +219,7 @@ rocm_enable_clang_tidy( -google-readability-* -google-runtime-int -google-runtime-references + -misc-const-correctness -misc-include-cleaner -misc-macro-parentheses -misc-no-recursion @@ -234,6 +237,7 @@ rocm_enable_clang_tidy( -performance-type-promotion-in-math-fn -performance-enum-size -readability-braces-around-statements + -readability-container-size-empty -readability-avoid-nested-conditional-operator -readability-convert-member-functions-to-static -readability-else-after-return