Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
6743461
Compile modes init version
pnikolic-amd Feb 24, 2026
58b364c
Removed passes for eager mod
pnikolic-amd Feb 25, 2026
755844d
Implement support for compile modes in mgx apis
pnikolic-amd Feb 27, 2026
63a9c15
Fix driver command and add compile mode to api
pnikolic-amd Mar 2, 2026
e3aec3a
Remove layout_convolution pass for eager mode
pnikolic-amd Mar 4, 2026
a152941
Add option for skiping benchmarks
pnikolic-amd Mar 27, 2026
f85f74e
Remove unecesary code
pnikolic-amd Apr 9, 2026
6461326
Refactor get passes to remove duplicates
pnikolic-amd Apr 9, 2026
91fd7bd
Fix missing argument
pnikolic-amd Apr 9, 2026
308e237
Merge develop
pnikolic-amd Apr 28, 2026
0f1169a
Fix merge passes
pnikolic-amd Apr 28, 2026
6a39c41
Updated types and setting
pnikolic-amd Apr 28, 2026
8f7bb08
Create pipeline factory to remove duplications and hadle passes list
pnikolic-amd Apr 28, 2026
1f76942
Context ptr fix
pnikolic-amd Apr 28, 2026
6719b2c
Clang foramt chages
pnikolic-amd Apr 28, 2026
0014161
Update copyright
pnikolic-amd Apr 28, 2026
99c72f2
Merge branch 'develop' into compile-modes
pnikolic-amd Apr 29, 2026
0160c2b
Adding compile modes to migraphx.h
pnikolic-amd Apr 29, 2026
b3f334f
Revert "Adding compile modes to migraphx.h"
pnikolic-amd May 11, 2026
f62d878
Merge branch 'develop' into compile-modes
pnikolic-amd May 11, 2026
df3b65d
Merge branch 'develop' into compile-modes
pnikolic-amd May 12, 2026
4130813
Update src/api/include/migraphx/migraphx.hpp
pnikolic-amd May 12, 2026
f01d575
Update tools/api/api.cpp
pnikolic-amd May 12, 2026
46e0756
Fix compile-modes CI failures: add missing C API declarations, fix na…
pnikolic-amd May 14, 2026
46dee31
Update src/api/include/migraphx/migraphx.h
pnikolic-amd May 14, 2026
9d5b0b0
Update src/api/include/migraphx/migraphx.hpp
pnikolic-amd May 14, 2026
9132684
Update tools/api/api.cpp
pnikolic-amd May 14, 2026
657acc1
API fixes
pnikolic-amd May 15, 2026
7b18952
Merge develop
pnikolic-amd May 15, 2026
d9cc0ad
Revert const auto
pnikolic-amd May 15, 2026
7de62a8
Merge fix
pnikolic-amd May 15, 2026
c3e2f7d
Revert pipeline factory
pnikolic-amd May 15, 2026
b0809be
Return pipelines
pnikolic-amd May 15, 2026
22aaaf6
Fix eager mode
pnikolic-amd May 15, 2026
bca3d94
Merge branch 'develop' into compile-modes
pnikolic-amd May 16, 2026
00453f4
Update src/api/api.cpp
pnikolic-amd May 16, 2026
c2fbcbf
Update src/targets/gpu/target.cpp
pnikolic-amd May 16, 2026
d0d58cc
Fix python bindings
pnikolic-amd May 18, 2026
18deaa8
Add unit tests for compile modes
pnikolic-amd May 20, 2026
cdaf448
Merge branch 'develop' into compile-modes
pnikolic-amd May 20, 2026
7394430
Update year
pnikolic-amd May 20, 2026
212591a
Add unit test to imrpove coverage, fix tidy error
pnikolic-amd May 20, 2026
dae9c54
Merge branch 'develop' into compile-modes
pnikolic-amd May 20, 2026
18cd797
Merge develop
pnikolic-amd May 27, 2026
ba3b464
Add support for eager mode in new pipelines for get passes function
pnikolic-amd May 27, 2026
eb6a350
Update src/targets/gpu/target.cpp
pnikolic-amd May 27, 2026
b93c8a6
Update src/targets/gpu/target.cpp
pnikolic-amd May 27, 2026
06aef33
Merge branch 'develop' into compile-modes
pnikolic-amd May 28, 2026
2c41af3
Merge branch 'develop' into compile-modes
pnikolic-amd May 29, 2026
2c2de32
Add tests for compile modes
pnikolic-amd Jun 2, 2026
3df2ce4
Test bug fix
pnikolic-amd Jun 2, 2026
0d7f4ea
Tests bug fix
pnikolic-amd Jun 2, 2026
7d34a4f
Merge branch 'develop' into compile-modes
pnikolic-amd Jun 2, 2026
f5566b0
Update test/gpu/compile_modes.cpp
pnikolic-amd Jun 2, 2026
ad63bdf
Update test/gpu/compile_modes.cpp
pnikolic-amd Jun 2, 2026
1826da6
Merge branch 'compile-modes' of https://github.com/ROCm/AMDMIGraphX i…
pnikolic-amd Jun 2, 2026
6af72d0
Merge develop
pnikolic-amd Jun 3, 2026
c987058
Update src/targets/gpu/compile_ops.cpp
pnikolic-amd Jun 3, 2026
0b1ee3b
Merge develop
pnikolic-amd Jun 4, 2026
3dce523
Removing unecessary static_cast, removing unecessary tests
pnikolic-amd Jun 5, 2026
56ee02d
Add second variat for every verify test to run in eager mode
pnikolic-amd Jun 5, 2026
599b930
Merge branch 'develop' into compile-modes
pnikolic-amd Jun 5, 2026
7d71fe7
Update src/compile_modes.cpp
pnikolic-amd Jun 5, 2026
7ba654d
Merge branch 'develop' into compile-modes
pnikolic-amd Jun 5, 2026
4f9e3fb
Update licence
pnikolic-amd Jun 5, 2026
327ff69
Merge branch 'develop' into compile-modes
pnikolic-amd Jun 5, 2026
15306c4
Update licence
pnikolic-amd Jun 5, 2026
03dacef
Merge branch 'compile-modes' of https://github.com/ROCm/AMDMIGraphX i…
pnikolic-amd Jun 8, 2026
ae8f775
Merge branch 'develop' into compile-modes
pnikolic-amd Jun 8, 2026
3418f19
Add passes for softmax in eager, add test for compile_modes
pnikolic-amd Jun 11, 2026
a27f54e
Merge branch 'develop' into compile-modes
pnikolic-amd Jun 11, 2026
f3b2c5f
Update src/targets/gpu/target.cpp
pnikolic-amd Jun 11, 2026
6d96d35
update fro licence
pnikolic-amd Jun 11, 2026
1178a67
Merge develop
pnikolic-amd Jul 29, 2026
e6f8fac
Update pipleine for eager mode
pnikolic-amd Aug 3, 2026
2c7d374
Skip some tests in eager mode
pnikolic-amd Aug 3, 2026
4a6665d
Update src/api/include/migraphx/migraphx.hpp
pnikolic-amd Aug 3, 2026
807ca67
Update src/include/migraphx/compile_options.hpp
pnikolic-amd Aug 3, 2026
f63d33b
Update src/py/migraphx_py.cpp
pnikolic-amd Aug 3, 2026
d22f478
Merge branch 'compile-modes' of https://github.com/ROCm/AMDMIGraphX i…
pnikolic-amd Aug 3, 2026
9874a76
Merge branch 'develop' into compile-modes
pnikolic-amd Aug 3, 2026
ab47383
Fix mispelling
pnikolic-amd Aug 3, 2026
d079644
Formating and remove test
pnikolic-amd Aug 4, 2026
5b25ce2
Generate api
pnikolic-amd Aug 4, 2026
16a9ff7
Merge branch 'develop' into compile-modes
pnikolic-amd Aug 4, 2026
5fc2665
Update test/verify/main.cpp
pnikolic-amd Aug 4, 2026
6771c9c
Update test/verify/run_verify.cpp
pnikolic-amd Aug 4, 2026
9198f2a
Remove skiping tests in eager mode, modify eager mode to not remove a…
pnikolic-amd Aug 6, 2026
b74f5c6
Merge branch 'develop' into compile-modes
pnikolic-amd Aug 6, 2026
5ef99b3
Update src/targets/gpu/target.cpp
pnikolic-amd Aug 6, 2026
0d567d7
Fix formatting
pnikolic-amd Aug 6, 2026
5c11284
Merge branch 'compile-modes' of https://github.com/ROCm/AMDMIGraphX i…
pnikolic-amd Aug 6, 2026
2f46744
Putting just necessary passes in eager mode for tests to pass
pnikolic-amd Aug 6, 2026
6c516a0
Foramting fixes
pnikolic-amd Aug 6, 2026
5c44724
Merge branch 'develop' into compile-modes
pnikolic-amd Aug 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ add_library(migraphx
color.cpp
common.cpp
common_dims.cpp
compile_modes.cpp
compile_src.cpp
convert_to_json.cpp
convolution.cpp
Expand Down Expand Up @@ -457,5 +458,3 @@ rocm_export_targets(
Threads
${MIGRAPHX_CONFIG_DEPENDS}
)


17 changes: 17 additions & 0 deletions src/api/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ static void set_exhaustive_tune_flag(compile_options& options, bool value)
options.exhaustive_tune = value;
}

static void set_compile_mode(compile_options& options, int8_t value)
{
options.compile_mode = convert_to_compile_mode(value);
}

// Parse the backend options from `options_json` and merge them into the
// compile options. See migraphx::set_backend_options for the merge semantics.
static void set_backend_options(compile_options& options, const char* options_json, va_list vlist)
Expand Down Expand Up @@ -2376,6 +2381,18 @@ migraphx_compile_options_set_exhaustive_tune_flag(migraphx_compile_options_t com
return api_error_result;
}

extern "C" migraphx_status
migraphx_compile_options_set_compile_mode(migraphx_compile_options_t compile_options, int8_t value)
{
auto api_error_result = migraphx::try_([&] {
if(compile_options == nullptr)
MIGRAPHX_THROW(migraphx_status_bad_param,
"Bad parameter compile_options: Null pointer");
migraphx::set_compile_mode((compile_options->object), (value));
});
return api_error_result;
}

extern "C" migraphx_status migraphx_compile_options_set_advance_backend_options(
migraphx_compile_options_t compile_options, const char* options_json, ...)
{
Expand Down
11 changes: 11 additions & 0 deletions src/api/include/migraphx/migraphx.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ typedef enum
} migraphx_shape_datatype_t;
#undef MIGRAPHX_SHAPE_GENERATE_ENUM_TYPES

typedef enum
{
migraphx_compile_mode_eager = 0,
migraphx_compile_mode_balanced = 50,
migraphx_compile_mode_max = 100,

} migraphx_compile_mode;

typedef struct migraphx_optimals* migraphx_optimals_t;
typedef const struct migraphx_optimals* const_migraphx_optimals_t;

Expand Down Expand Up @@ -627,6 +635,9 @@ migraphx_compile_options_set_fast_math(migraphx_compile_options_t compile_option
MIGRAPHX_C_EXPORT migraphx_status migraphx_compile_options_set_exhaustive_tune_flag(
migraphx_compile_options_t compile_options, bool value);

MIGRAPHX_C_EXPORT migraphx_status
migraphx_compile_options_set_compile_mode(migraphx_compile_options_t compile_options, int8_t value);

MIGRAPHX_C_EXPORT migraphx_status migraphx_compile_options_set_advance_backend_options(
migraphx_compile_options_t compile_options, const char* options_json, ...);

Expand Down
6 changes: 6 additions & 0 deletions src/api/include/migraphx/migraphx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,12 @@ struct compile_options : MIGRAPHX_HANDLE_BASE(compile_options)
call(&migraphx_compile_options_set_exhaustive_tune_flag, this->get_handle_ptr(), value);
}

/// Set compilation mode (0-100). 0 = fast compile, low performance.
/// 100 = best compile with max optimizations, best performance.
void set_compile_mode(int8_t value = migraphx_compile_mode_balanced)
{
call(&migraphx_compile_options_set_compile_mode, this->get_handle_ptr(), value);
}
/// Set backend-specific options that targets can read to configure
/// compilation. `json_str` is a relaxed JSON object (bare identifiers are
/// treated as strings) and accepts printf-style format specifiers followed
Expand Down
3 changes: 3 additions & 0 deletions src/api/migraphx.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ def compile_options(h):
h.method('set_exhaustive_tune_flag',
api.params(value='bool'),
invoke='migraphx::set_exhaustive_tune_flag($@)')
h.method('set_compile_mode',
api.params(value='int8_t'),
invoke='migraphx::set_compile_mode($@)')
h.method('set_advance_backend_options',
api.params(options_json='const char*', vlist='...'),
invoke='migraphx::set_backend_options($@)')
Expand Down
78 changes: 78 additions & 0 deletions src/compile_modes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* The MIT License (MIT)
*
* 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
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <migraphx/compile_modes.hpp>
#include <migraphx/errors.hpp>
#include <migraphx/functional.hpp>
#include <migraphx/logger.hpp>
#include <migraphx/stringutils.hpp>
#include <cstdlib>
#include <algorithm>
#include <array>

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {

compile_modes convert_to_compile_mode(uint8_t mode)
{
int clamped = std::clamp<int>(mode, 0, 100);
if(clamped != mode)
log::warn() << "Compile mode value " << mode << " out of range [0, 100], clamping to "
<< clamped;

static const std::array<compile_modes, 3> modes = {
compile_modes::eager, compile_modes::balanced, compile_modes::max};

// NOLINTNEXTLINE(readability-qualified-auto)
auto it = std::find_if(modes.begin(), modes.end(), [&](compile_modes m) {
return static_cast<int>(m) == clamped;
});
if(it != modes.end())
return *it;

log::warn() << "Compile mode value " << clamped
<< " does not match a known mode, using closest match";
return *std::min_element(modes.begin(), modes.end(), by(std::less<>{}, [&](compile_modes m) {
return std::abs(clamped - static_cast<int>(m));
}));
}

compile_modes convert_to_compile_mode(const std::string& mode)
{
auto lower = to_lower(mode);
if(lower == "eager")
return compile_modes::eager;
if(lower == "balanced")
return compile_modes::balanced;
if(lower == "max")
return compile_modes::max;

int val = std::stoi(mode);
if(val < 0 or val > 100)
log::warn() << "Compile mode value " << val << " out of range [0, 100], clamping to "
<< std::clamp(val, 0, 100);
return convert_to_compile_mode(std::clamp(val, 0, 100));
}

} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
8 changes: 8 additions & 0 deletions src/driver/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,14 @@ struct compiler
{"--exhaustive-tune"},
ap.help("Exhastively search for best tuning parameters for kernels"),
ap.set_value(true));
ap(co.compile_mode,
{"--compile-mode"},
ap.help("Set compilation mode: eager, balanced, max, or an integer 0-100"),
ap.write_action([](auto&, auto& x, const auto& params) {
if(params.empty())
throw std::runtime_error("Flag with no value.");
x = convert_to_compile_mode(params.back());
}));
ap(to_fp16, {"--fp16"}, ap.help("Quantize for fp16"), ap.set_value(true));
ap(to_bf16, {"--bf16"}, ap.help("Quantize for bf16"), ap.set_value(true));
ap(to_int8, {"--int8"}, ap.help("Quantize for int8"), ap.set_value(true));
Expand Down
47 changes: 47 additions & 0 deletions src/include/migraphx/compile_modes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* The MIT License (MIT)
*
* 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
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MIGRAPHX_GUARD_MIGRAPHX_COMPILE_MODES_HPP
#define MIGRAPHX_GUARD_MIGRAPHX_COMPILE_MODES_HPP

#include <migraphx/config.hpp>
#include <cstdint>
#include <string>

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {

enum class compile_modes
{
eager = 0,
balanced = 50,
max = 100
};

MIGRAPHX_EXPORT compile_modes convert_to_compile_mode(uint8_t mode);
MIGRAPHX_EXPORT compile_modes convert_to_compile_mode(const std::string& mode);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unit tests should be added for these functions.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

They are added in test/compile_modes.cpp


} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx

#endif // MIGRAPHX_GUARD_MIGRAPHX_COMPILE_MODES_HPP
2 changes: 2 additions & 0 deletions src/include/migraphx/compile_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_COMPILE_OPTIONS_HPP

#include <migraphx/config.hpp>
#include <migraphx/compile_modes.hpp>
#include <migraphx/tracer.hpp>
#include <migraphx/value.hpp>
#include <string>
Expand All @@ -44,6 +45,7 @@ struct compile_options
bool fast_math = true;
bool exhaustive_tune = false;

compile_modes compile_mode = compile_modes::balanced;
/**
* Backend-specific options keyed by name. Targets can read these to
* configure compilation in a way that is opaque to the core engine.
Expand Down
2 changes: 1 addition & 1 deletion src/include/migraphx/output_iterator.hpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/py/migraphx_py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <migraphx/op/builder/op_builder.hpp>
#include <migraphx/float8.hpp>
#include <migraphx/pass_manager.hpp>
#include <migraphx/compile_modes.hpp>
#include <migraphx/version.h>
#include <migraphx/iterator_for.hpp>
#ifdef HAVE_GPU
Expand Down Expand Up @@ -609,6 +610,11 @@ MIGRAPHX_PYBIND11_MODULE(migraphx, m)
},
py::keep_alive<0, 1>());

py::enum_<migraphx::compile_modes>(m, "compile_modes")
.value("eager", migraphx::compile_modes::eager)
.value("balanced", migraphx::compile_modes::balanced)
.value("max", migraphx::compile_modes::max);

py::class_<migraphx::program>(m, "program")
.def(py::init([]() { return migraphx::program(); }))
.def("get_parameter_names", &migraphx::program::get_parameter_names)
Expand All @@ -622,11 +628,13 @@ MIGRAPHX_PYBIND11_MODULE(migraphx, m)
bool offload_copy,
bool fast_math,
bool exhaustive_tune,
migraphx::compile_modes compile_mode,
const py::dict& advance_backend_options) {
migraphx::compile_options options;
options.offload_copy = offload_copy;
options.fast_math = fast_math;
options.exhaustive_tune = exhaustive_tune;
options.compile_mode = compile_mode;
for(auto opt : advance_backend_options)
{
auto key = py::str(opt.first).cast<std::string>();
Expand All @@ -639,6 +647,7 @@ MIGRAPHX_PYBIND11_MODULE(migraphx, m)
py::arg("offload_copy") = true,
py::arg("fast_math") = true,
py::arg("exhaustive_tune") = false,
py::arg("compile_mode") = migraphx::compile_modes::balanced,
py::arg("advance_backend_options") = py::dict())
.def(
"finalize",
Expand Down
12 changes: 7 additions & 5 deletions src/targets/gpu/compile_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ struct compile_plan
}

template <class Vector>
void add_compiles(Vector& compiles)
void add_compiles(Vector& compiles, bool skip_benchmark)
{
if(config.has_value())
{
Expand All @@ -359,7 +359,7 @@ struct compile_plan
problem_string() + "\n\n" + print_modules());
const bool dump_mxr =
not string_value_of(MIGRAPHX_GPU_DUMP_BENCHMARK_MXR{}).empty();
if(enabled(MIGRAPHX_SKIP_BENCHMARKING{}) or
if(skip_benchmark or enabled(MIGRAPHX_SKIP_BENCHMARKING{}) or
(ctx->is_cross_compile() and not dump_mxr) or solutions.size() == 1)
{
ctx->get_problem_cache().insert(preop.name(), problem, solutions.front());
Expand Down Expand Up @@ -547,7 +547,8 @@ static void par_compile(std::size_t n, F f)
struct compile_manager
{
std::vector<compile_plan> cps;
bool exhaustive = false;
bool exhaustive = false;
bool skip_benchmark = false;

template <class... Ts>
void add_plan(Ts&&... xs)
Expand All @@ -565,7 +566,7 @@ struct compile_manager
std::vector<std::function<void()>> compiles;
for(auto& cp : cps)
{
cp.add_compiles(compiles);
cp.add_compiles(compiles, skip_benchmark);
}
par_compile(compiles.size(), [&](auto i) { compiles[i](); });

Expand Down Expand Up @@ -634,7 +635,8 @@ void compile_ops::apply(module_pass_manager& mpm) const
bool is_root = &mpm.get_module() == mpm.get_root_module();
auto& m = mpm.get_module();
compile_manager cm;
cm.exhaustive = exhaustive_tune;
cm.exhaustive = exhaustive_tune;
cm.skip_benchmark = skip_benchmark;
// Find all precompile ops
for(auto ins : iterator_for(m))
{
Expand Down
1 change: 1 addition & 0 deletions src/targets/gpu/include/migraphx/gpu/compile_ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct MIGRAPHX_GPU_EXPORT compile_ops
{
context* ctx = nullptr;
bool exhaustive_tune = false;
bool skip_benchmark = false;
std::string name() const { return "gpu::compile_ops"; }
void apply(module_pass_manager& mpm) const;
};
Expand Down
Loading
Loading