Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Enable cpp core guidlines checks. #3723

Merged
merged 9 commits into from
Jan 4, 2025
Merged
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ rocm_enable_clang_tidy(
-clang-diagnostic-disabled-macro-expansion
-clang-diagnostic-extern-c-compat
-clang-diagnostic-unused-command-line-argument
-cppcoreguidelines-avoid-capture-default-when-capturing-this
-cppcoreguidelines-avoid-const-or-ref-data-members
-cppcoreguidelines-avoid-do-while
-cppcoreguidelines-explicit-virtual-functions
Expand All @@ -222,7 +221,6 @@ rocm_enable_clang_tidy(
-cppcoreguidelines-pro-type-reinterpret-cast
-cppcoreguidelines-pro-type-union-access
-cppcoreguidelines-pro-type-vararg
-cppcoreguidelines-rvalue-reference-param-not-moved
-cppcoreguidelines-special-member-functions
-cppcoreguidelines-use-default-member-init
-cppcoreguidelines-virtual-class-destructor
Expand Down
2 changes: 1 addition & 1 deletion src/include/migraphx/program.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct MIGRAPHX_EXPORT program
std::size_t batch = 1,
bool detailed = false) const;

void mark(const parameter_map& params, marker&& m);
void mark(const parameter_map& params, marker m);

value to_value() const;
void from_value(const value& v);
Expand Down
3 changes: 1 addition & 2 deletions src/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,13 +887,12 @@ std::string perf_group(instruction_ref ins, bool detailed)
return result;
}

void program::mark(const parameter_map& params, marker&& m)
void program::mark(const parameter_map& params, marker m)
{
auto& ctx = this->impl->contexts;
// Run once by itself
eval(params);
this->finish();
// Start marking
m.mark_start(*this);
generic_eval(*this, ctx, params, [&](auto ins, auto f) {
argument result;
Expand Down
2 changes: 1 addition & 1 deletion test/ref/add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ TEST_CASE(fp32_fp16_test)
return p;
};

auto test_case = [&](std::vector<std::string>&& op_names) {
auto test_case = [&](const std::vector<std::string>& op_names) {
std::vector<float> gold_res = {2.0, 4.0, 6.0, 8.0, 10.0, 12.0};
auto p = create_program();
migraphx::quantize_fp16(p, op_names);
Expand Down
Loading