Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieL7 committed Sep 19, 2023
1 parent cabbe1e commit 37f878a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/simplify_dyn_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct find_const_3in_slice
auto inputs = ins->inputs();
argument starts_arg = inputs.at(1)->eval();
argument ends_arg = inputs.at(2)->eval();
if(notstarts_arg.empty() and not ends_arg.empty())
if(not starts_arg.empty() and not ends_arg.empty())
{
std::vector<int64_t> starts_vec;
std::vector<int64_t> ends_vec;
Expand Down
4 changes: 2 additions & 2 deletions test/simplify_dyn_ops_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ TEST_CASE(const_slice_3input_dyn)
{
migraphx::module m0;
{
migraphx::shape s{migraphx::shape::float_type, {{3, 6}, {2, 4, {2, 4}}, {2, 4, {2, 4}}}};
migraphx::shape s{migraphx::shape::float_type, {{6, 6}, {2, 4, {2, 4}}, {2, 4, {2, 4}}}};
auto input = m0.add_parameter("data", s);
auto slice_ins = m0.add_instruction(
migraphx::make_op("slice", {{"starts", {0}}, {"ends", {3}}, {"axes", {0}}}), input);
Expand All @@ -195,7 +195,7 @@ TEST_CASE(const_slice_3input_dyn)

migraphx::module m1;
{
migraphx::shape s{migraphx::shape::float_type, {{3, 6}, {2, 4, {2, 4}}, {2, 4, {2, 4}}}};
migraphx::shape s{migraphx::shape::float_type, {{6, 6}, {2, 4, {2, 4}}, {2, 4, {2, 4}}}};
auto input = m1.add_parameter("data", s);
migraphx::shape s1{migraphx::shape::int32_type, {1}};
auto input_starts = m1.add_literal(migraphx::literal{s1, {0}});
Expand Down

0 comments on commit 37f878a

Please sign in to comment.