Commit 6b38a9ba authored by Khalique's avatar Khalique
Browse files

Merge branch 'develop' of https://github.com/ROCmSoftwarePlatform/AMDMIGraphX into broadcast_attr

parents 4e3ca586 ecbb4de5
......@@ -117,7 +117,9 @@ rocm_enable_cppcheck(
passedByValue
unusedStructMember
functionStatic
functionConst
functionConst:*program.*
shadowFunction
shadowVar
definePrefix:*test/include/test.hpp
FORCE
INCONCLUSIVE
......
......@@ -8,10 +8,16 @@ def rocmtestnode(variant, name, body) {
mkdir build
cd build
CXX=${compiler} CXXFLAGS='-Werror -Wno-fallback' cmake ${flags} ..
CTEST_PARALLEL_LEVEL=32 make -j32 generate all doc check
CTEST_PARALLEL_LEVEL=32 make -j32 generate all doc package check
"""
echo cmd
sh cmd
if (compiler == "hcc") {
// Only archive from master or develop
if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME == "master") {
archiveArtifacts artifacts: "build/*.deb", allowEmptyArchive: true, fingerprint: true
}
}
}
node(name) {
stage("checkout ${variant}") {
......
ignore:
- "test/"
......@@ -38,7 +38,7 @@
<message>
<id>definePrefix</id>
<severity>style</severity>
<summary>Macros must be prefixed with MIGRAPH_</summary>
<summary>Macros must be prefixed with MIGRAPHX_</summary>
</message>
</rule>
<rule>
......
......@@ -17,9 +17,9 @@ struct iterator_for_range
struct iterator
{
base_iterator i;
base_iterator operator*() { return i; }
base_iterator operator*() const { return i; }
base_iterator operator++() { return ++i; }
bool operator!=(const iterator& rhs) { return i != rhs.i; }
bool operator!=(const iterator& rhs) const { return i != rhs.i; }
};
iterator begin()
......
......@@ -214,7 +214,6 @@ void find_matches(program& p, Ms&&... ms)
bool match = false;
each_args(
[&](auto&& m) {
// cppcheck-suppress knownConditionTrueFalse
if(match)
return;
auto r = match_instruction(p, ins, m.matcher());
......
......@@ -955,8 +955,7 @@ struct scalar
shape compute_shape(std::vector<shape> inputs) const
{
assert(check_shapes{inputs}.has(1).only_dims(1).size() == 1);
auto t = inputs.at(0).type();
auto input = inputs.at(0);
auto t = inputs.at(0).type();
std::vector<std::size_t> strides(scalar_bcast.lens().size(), 0);
return {t, scalar_bcast.lens(), strides};
}
......
......@@ -54,6 +54,7 @@ void par_for_impl(std::size_t n, std::size_t threadsize, F f)
f(i);
}
});
// cppcheck-suppress unreadVariable
work += grainsize;
return result;
});
......
......@@ -84,7 +84,7 @@ struct memory_coloring_impl
{
return is_param(ins) && any_cast<builtin::param>(ins->get_operator()).parameter == "output";
}
bool is_allocate(const instruction_ref ins) { return ins->name() == allocation_op; }
bool is_allocate(const instruction_ref ins) const { return ins->name() == allocation_op; }
static bool is_outline(const instruction_ref ins) { return ins->name() == "@outline"; }
static bool is_literal(const instruction_ref ins) { return ins->name() == "@literal"; }
static bool is_check_context(const instruction_ref ins)
......
......@@ -344,7 +344,7 @@ void apply_conv_bias(context& ctx, program& p, match::matcher_result r)
Op cb{conv_op, input_ins->get_shape(), weights_ins->get_shape(), bias_ins->get_shape()};
// TODO: Insert ws allocation
auto ws = cb.get_workspace(ctx);
(void)ws;
p.replace_instruction(ins, cb, input_ins, weights_ins, old_ws_ins, bias_ins, alloc_ins);
}
......
......@@ -111,7 +111,7 @@ struct lhs_expression
struct capture
{
template <class T>
auto operator->*(const T& x)
auto operator->*(const T& x) const
{
return make_lhs_expression(x);
}
......
......@@ -296,7 +296,7 @@ TEST_CASE(max_test)
auto l0 = p.add_instruction(migraphx::op::max{}, input0, input1);
p.add_instruction(migraphx::op::max{}, l0, input2);
auto prog = migraphx::parse_onnx("max_test.onnx");
migraphx::parse_onnx("max_test.onnx");
}
TEST_CASE(acos_test)
......@@ -319,7 +319,7 @@ TEST_CASE(min_test)
auto l0 = p.add_instruction(migraphx::op::min{}, input0, input1);
p.add_instruction(migraphx::op::min{}, l0, input2);
auto prog = migraphx::parse_onnx("min_test.onnx");
migraphx::parse_onnx("min_test.onnx");
}
TEST_CASE(atan_test)
......@@ -558,7 +558,7 @@ TEST_CASE(group_conv_test)
migraphx::op::convolution op;
op.group = 4;
p.add_instruction(op, l0, l1);
auto prog = migraphx::parse_onnx("group_conv_test.onnx");
migraphx::parse_onnx("group_conv_test.onnx");
}
int main(int argc, const char* argv[]) { test::run(argc, argv); }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment