Skip to content

Commit

Permalink
Enable cpp core guidlines checks. (#3723)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylding-amd authored Jan 4, 2025
1 parent 13159b3 commit 5f9e048
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
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

0 comments on commit 5f9e048

Please sign in to comment.