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( ...@@ -117,7 +117,9 @@ rocm_enable_cppcheck(
passedByValue passedByValue
unusedStructMember unusedStructMember
functionStatic functionStatic
functionConst functionConst:*program.*
shadowFunction
shadowVar
definePrefix:*test/include/test.hpp definePrefix:*test/include/test.hpp
FORCE FORCE
INCONCLUSIVE INCONCLUSIVE
......
...@@ -8,10 +8,16 @@ def rocmtestnode(variant, name, body) { ...@@ -8,10 +8,16 @@ def rocmtestnode(variant, name, body) {
mkdir build mkdir build
cd build cd build
CXX=${compiler} CXXFLAGS='-Werror -Wno-fallback' cmake ${flags} .. 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 echo cmd
sh 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) { node(name) {
stage("checkout ${variant}") { stage("checkout ${variant}") {
......
ignore:
- "test/"
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<message> <message>
<id>definePrefix</id> <id>definePrefix</id>
<severity>style</severity> <severity>style</severity>
<summary>Macros must be prefixed with MIGRAPH_</summary> <summary>Macros must be prefixed with MIGRAPHX_</summary>
</message> </message>
</rule> </rule>
<rule> <rule>
......
pfultz2/rocm-recipes pfultz2/rocm-recipes
pcre pcre
danmar/cppcheck@f965e5873 -DHAVE_RULES=1 danmar/cppcheck@575f62f39c1130f412d3cc11b0138c5057c451c0 -DHAVE_RULES=1
ROCm-Developer-Tools/HIP@fc22ef991ce7cb15821c8ccb4f03cdfc3e7e43cf ROCm-Developer-Tools/HIP@fc22ef991ce7cb15821c8ccb4f03cdfc3e7e43cf
python/cpython@v3.6.6 -X autotools -H sha256:92aa914572c695c0aeb01b0a214813f414da4b51a371234df514a74761f2bb36 python/cpython@v3.6.6 -X autotools -H sha256:92aa914572c695c0aeb01b0a214813f414da4b51a371234df514a74761f2bb36
-f requirements.txt -f requirements.txt
...@@ -17,9 +17,9 @@ struct iterator_for_range ...@@ -17,9 +17,9 @@ struct iterator_for_range
struct iterator struct iterator
{ {
base_iterator i; base_iterator i;
base_iterator operator*() { return i; } base_iterator operator*() const { return i; }
base_iterator operator++() { 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() iterator begin()
......
...@@ -214,7 +214,6 @@ void find_matches(program& p, Ms&&... ms) ...@@ -214,7 +214,6 @@ void find_matches(program& p, Ms&&... ms)
bool match = false; bool match = false;
each_args( each_args(
[&](auto&& m) { [&](auto&& m) {
// cppcheck-suppress knownConditionTrueFalse
if(match) if(match)
return; return;
auto r = match_instruction(p, ins, m.matcher()); auto r = match_instruction(p, ins, m.matcher());
......
...@@ -955,8 +955,7 @@ struct scalar ...@@ -955,8 +955,7 @@ struct scalar
shape compute_shape(std::vector<shape> inputs) const shape compute_shape(std::vector<shape> inputs) const
{ {
assert(check_shapes{inputs}.has(1).only_dims(1).size() == 1); assert(check_shapes{inputs}.has(1).only_dims(1).size() == 1);
auto t = inputs.at(0).type(); auto t = inputs.at(0).type();
auto input = inputs.at(0);
std::vector<std::size_t> strides(scalar_bcast.lens().size(), 0); std::vector<std::size_t> strides(scalar_bcast.lens().size(), 0);
return {t, scalar_bcast.lens(), strides}; return {t, scalar_bcast.lens(), strides};
} }
......
...@@ -54,6 +54,7 @@ void par_for_impl(std::size_t n, std::size_t threadsize, F f) ...@@ -54,6 +54,7 @@ void par_for_impl(std::size_t n, std::size_t threadsize, F f)
f(i); f(i);
} }
}); });
// cppcheck-suppress unreadVariable
work += grainsize; work += grainsize;
return result; return result;
}); });
......
...@@ -84,7 +84,7 @@ struct memory_coloring_impl ...@@ -84,7 +84,7 @@ struct memory_coloring_impl
{ {
return is_param(ins) && any_cast<builtin::param>(ins->get_operator()).parameter == "output"; 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_outline(const instruction_ref ins) { return ins->name() == "@outline"; }
static bool is_literal(const instruction_ref ins) { return ins->name() == "@literal"; } static bool is_literal(const instruction_ref ins) { return ins->name() == "@literal"; }
static bool is_check_context(const instruction_ref ins) 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) ...@@ -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()}; Op cb{conv_op, input_ins->get_shape(), weights_ins->get_shape(), bias_ins->get_shape()};
// TODO: Insert ws allocation // TODO: Insert ws allocation
auto ws = cb.get_workspace(ctx); auto ws = cb.get_workspace(ctx);
(void)ws;
p.replace_instruction(ins, cb, input_ins, weights_ins, old_ws_ins, bias_ins, alloc_ins); p.replace_instruction(ins, cb, input_ins, weights_ins, old_ws_ins, bias_ins, alloc_ins);
} }
......
...@@ -111,7 +111,7 @@ struct lhs_expression ...@@ -111,7 +111,7 @@ struct lhs_expression
struct capture struct capture
{ {
template <class T> template <class T>
auto operator->*(const T& x) auto operator->*(const T& x) const
{ {
return make_lhs_expression(x); return make_lhs_expression(x);
} }
......
...@@ -296,7 +296,7 @@ TEST_CASE(max_test) ...@@ -296,7 +296,7 @@ TEST_CASE(max_test)
auto l0 = p.add_instruction(migraphx::op::max{}, input0, input1); auto l0 = p.add_instruction(migraphx::op::max{}, input0, input1);
p.add_instruction(migraphx::op::max{}, l0, input2); 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) TEST_CASE(acos_test)
...@@ -319,7 +319,7 @@ TEST_CASE(min_test) ...@@ -319,7 +319,7 @@ TEST_CASE(min_test)
auto l0 = p.add_instruction(migraphx::op::min{}, input0, input1); auto l0 = p.add_instruction(migraphx::op::min{}, input0, input1);
p.add_instruction(migraphx::op::min{}, l0, input2); 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) TEST_CASE(atan_test)
...@@ -558,7 +558,7 @@ TEST_CASE(group_conv_test) ...@@ -558,7 +558,7 @@ TEST_CASE(group_conv_test)
migraphx::op::convolution op; migraphx::op::convolution op;
op.group = 4; op.group = 4;
p.add_instruction(op, l0, l1); 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); } 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