Skip to content

Proto data dependent symbolics - #5077

Draft
CharlieL7 wants to merge 52 commits into
sym_slice_refactorfrom
proto_data_dependent_symbolics
Draft

Proto data dependent symbolics#5077
CharlieL7 wants to merge 52 commits into
sym_slice_refactorfrom
proto_data_dependent_symbolics

Conversation

@CharlieL7

Copy link
Copy Markdown
Collaborator

Motivation

  • Prototype of framework to handle data-dependent symbolic variables.

Technical Details

Changelog Category

Add a CHANGELOG.md entry for any option other than Not Applicable

    • Added: New functionality.
    • Changed: Changes to existing functionality.
    • Removed: Functionality or support that has been removed. (Compared to a previous release)
    • Optimized: Component performance that has been optimized or improved.
    • Resolved Issues: Known issues from a previous version that have been resolved.
    • Not Applicable: This PR is not to be included in the changelog.

Follow the LLVM AI Tool Use Policy for contributions using AI.

@CharlieL7
CharlieL7 requested a review from shivadbhavsar July 17, 2026 21:45
@CharlieL7 CharlieL7 self-assigned this Jul 17, 2026
@CharlieL7
CharlieL7 changed the base branch from sym_slice to develop July 21, 2026 18:57
Comment on lines +73 to +74
auto type = inputs.at(0).type();
auto k_val = std::get<int64_t>(k);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto type = inputs.at(0).type();
auto k_val = std::get<int64_t>(k);
auto type = inputs.at(0).type();
auto k_val = std::get<int64_t>(k);

Comment thread src/onnx/parse_topk.cpp
const shape k_shape{shape::int64_type, {1}};
auto k_lit = info.add_literal(literal{k_shape, {k}});
auto topk_ret = info.add_instruction(
make_op("topk", {{"k", k}, {"axis", axis}, {"largest", largest}}), args.at(0), k_lit);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
make_op("topk", {{"k", k}, {"axis", axis}, {"largest", largest}}), args.at(0), k_lit);
make_op("topk", {{"k", k}, {"axis", axis}, {"largest", largest}}),
args.at(0),
k_lit);

Comment thread src/onnx/parse_topk.cpp
Comment on lines +71 to +72
auto ret_val = info.add_instruction(make_op("get_tuple_elem", {{"index", 0}}), topk_ret);
auto ret_ind = info.add_instruction(make_op("get_tuple_elem", {{"index", 1}}), topk_ret);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto ret_val = info.add_instruction(make_op("get_tuple_elem", {{"index", 0}}), topk_ret);
auto ret_ind = info.add_instruction(make_op("get_tuple_elem", {{"index", 1}}), topk_ret);
auto ret_val =
info.add_instruction(make_op("get_tuple_elem", {{"index", 0}}), topk_ret);
auto ret_ind =
info.add_instruction(make_op("get_tuple_elem", {{"index", 1}}), topk_ret);

Comment thread src/onnx/parse_topk.cpp
// Constant `k`: use its value for the attribute; topk output is already the exact size.
int64_t k = arg_k.at<int>();
auto topk_ret = info.add_instruction(
make_op("topk", {{"k", k}, {"axis", axis}, {"largest", largest}}), args.at(0), args.at(1));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
make_op("topk", {{"k", k}, {"axis", axis}, {"largest", largest}}), args.at(0), args.at(1));
make_op("topk", {{"k", k}, {"axis", axis}, {"largest", largest}}),
args.at(0),
args.at(1));

Comment thread src/onnx/parse_topk.cpp
Comment on lines +85 to +86
auto ret_val = info.add_instruction(make_op("get_tuple_elem", {{"index", 0}}), topk_ret);
auto ret_ind = info.add_instruction(make_op("get_tuple_elem", {{"index", 1}}), topk_ret);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto ret_val = info.add_instruction(make_op("get_tuple_elem", {{"index", 0}}), topk_ret);
auto ret_ind = info.add_instruction(make_op("get_tuple_elem", {{"index", 1}}), topk_ret);
auto ret_val =
info.add_instruction(make_op("get_tuple_elem", {{"index", 0}}), topk_ret);
auto ret_ind =
info.add_instruction(make_op("get_tuple_elem", {{"index", 1}}), topk_ret);

Comment thread test/ref/topk.cpp
Comment on lines +199 to +200
auto kk = mm->add_literal(
migraphx::literal{migraphx::shape{migraphx::shape::int64_type, {1}}, {5}});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto kk = mm->add_literal(
migraphx::literal{migraphx::shape{migraphx::shape::int64_type, {1}}, {5}});
auto kk =
mm->add_literal(migraphx::literal{migraphx::shape{migraphx::shape::int64_type, {1}}, {5}});

Comment thread test/ref/topk.cpp
Comment on lines 202 to +203
auto r = mm->add_instruction(migraphx::make_op("topk", {{"axis", 1}, {"k", 5}, {"largest", 0}}),
data);
data, kk);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto r = mm->add_instruction(migraphx::make_op("topk", {{"axis", 1}, {"k", 5}, {"largest", 0}}),
data);
data, kk);
auto r = mm->add_instruction(
migraphx::make_op("topk", {{"axis", 1}, {"k", 5}, {"largest", 0}}), data, kk);

Comment thread test/rewrite_topk.cpp
Comment on lines +98 to +99
auto r2 = m2.add_instruction(
migraphx::make_op("topk", {{"k", 8}, {"axis", 0}}), valuer, k, idxr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto r2 = m2.add_instruction(
migraphx::make_op("topk", {{"k", 8}, {"axis", 0}}), valuer, k, idxr);
auto r2 =
m2.add_instruction(migraphx::make_op("topk", {{"k", 8}, {"axis", 0}}), valuer, k, idxr);

Comment thread test/rewrite_topk.cpp
Comment on lines +140 to +141
auto r2 = m2.add_instruction(
migraphx::make_op("topk", {{"k", 8}, {"axis", 1}}), valuer, k, idxr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto r2 = m2.add_instruction(
migraphx::make_op("topk", {{"k", 8}, {"axis", 1}}), valuer, k, idxr);
auto r2 =
m2.add_instruction(migraphx::make_op("topk", {{"k", 8}, {"axis", 1}}), valuer, k, idxr);

Comment thread test/rewrite_topk.cpp
Comment on lines +182 to +183
auto r2 = m2.add_instruction(
migraphx::make_op("topk", {{"k", 8}, {"axis", 0}}), valuer, k, idxr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto r2 = m2.add_instruction(
migraphx::make_op("topk", {{"k", 8}, {"axis", 0}}), valuer, k, idxr);
auto r2 =
m2.add_instruction(migraphx::make_op("topk", {{"k", 8}, {"axis", 0}}), valuer, k, idxr);

}

template <class E, MIGRAPHX_REQUIRES(is_bit_flag<E>{})>
constexpr E& operator|=(E& lhs, E rhs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
constexpr E& operator|=(E& lhs, E rhs)
constexpr E& operator|=(E & lhs, E rhs)

}

template <class E, MIGRAPHX_REQUIRES(is_bit_flag<E>{})>
constexpr E& operator&=(E& lhs, E rhs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
constexpr E& operator&=(E& lhs, E rhs)
constexpr E& operator&=(E & lhs, E rhs)

}

template <class E, MIGRAPHX_REQUIRES(is_bit_flag<E>{})>
constexpr E& operator^=(E& lhs, E rhs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
constexpr E& operator^=(E& lhs, E rhs)
constexpr E& operator^=(E & lhs, E rhs)

Comment thread src/onnx/parse_slice.cpp

op::slice::slice_mode get_slice_mode(slice_input_flags slice_flags)
{
switch (slice_flags)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
switch (slice_flags)
switch(slice_flags)

Comment thread src/onnx/parse_slice.cpp
Comment on lines +81 to +98
case slice_input_flags::none:
return op::slice::slice_mode::one_input;
case slice_input_flags::starts_input:
return op::slice::slice_mode::starts_input;
case slice_input_flags::ends_input:
return op::slice::slice_mode::ends_input;
case slice_input_flags::axes_input:
return op::slice::slice_mode::axes_input;
case (slice_input_flags::starts_input | slice_input_flags::ends_input):
return op::slice::slice_mode::starts_ends_input;
case (slice_input_flags::starts_input | slice_input_flags::axes_input):
return op::slice::slice_mode::starts_axes_input;
case (slice_input_flags::ends_input | slice_input_flags::axes_input):
return op::slice::slice_mode::ends_axes_input;
case (slice_input_flags::starts_input | slice_input_flags::ends_input | slice_input_flags::axes_input):
return op::slice::slice_mode::starts_ends_axes_input;
default:
MIGRAPHX_THROW("PARSE_SLICE: invalid slice_mode");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
case slice_input_flags::none:
return op::slice::slice_mode::one_input;
case slice_input_flags::starts_input:
return op::slice::slice_mode::starts_input;
case slice_input_flags::ends_input:
return op::slice::slice_mode::ends_input;
case slice_input_flags::axes_input:
return op::slice::slice_mode::axes_input;
case (slice_input_flags::starts_input | slice_input_flags::ends_input):
return op::slice::slice_mode::starts_ends_input;
case (slice_input_flags::starts_input | slice_input_flags::axes_input):
return op::slice::slice_mode::starts_axes_input;
case (slice_input_flags::ends_input | slice_input_flags::axes_input):
return op::slice::slice_mode::ends_axes_input;
case (slice_input_flags::starts_input | slice_input_flags::ends_input | slice_input_flags::axes_input):
return op::slice::slice_mode::starts_ends_axes_input;
default:
MIGRAPHX_THROW("PARSE_SLICE: invalid slice_mode");
case slice_input_flags::none: return op::slice::slice_mode::one_input;
case slice_input_flags::starts_input: return op::slice::slice_mode::starts_input;
case slice_input_flags::ends_input: return op::slice::slice_mode::ends_input;
case slice_input_flags::axes_input: return op::slice::slice_mode::axes_input;
case(slice_input_flags::starts_input | slice_input_flags::ends_input):
return op::slice::slice_mode::starts_ends_input;
case(slice_input_flags::starts_input | slice_input_flags::axes_input):
return op::slice::slice_mode::starts_axes_input;
case(slice_input_flags::ends_input | slice_input_flags::axes_input):
return op::slice::slice_mode::ends_axes_input;
case(slice_input_flags::starts_input | slice_input_flags::ends_input |
slice_input_flags::axes_input):
return op::slice::slice_mode::starts_ends_axes_input;
default: MIGRAPHX_THROW("PARSE_SLICE: invalid slice_mode");

Comment thread src/onnx/parse_slice.cpp
op::slice create_slice_operator()
{
op::slice slice_op;
slice_op.axes = axes;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
slice_op.axes = axes;
slice_op.axes = axes;

Comment thread src/onnx/parse_slice.cpp
Comment on lines +107 to +108
slice_op.ends = ends;
slice_op.mode = get_slice_mode(flags);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
slice_op.ends = ends;
slice_op.mode = get_slice_mode(flags);
slice_op.ends = ends;
slice_op.mode = get_slice_mode(flags);

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

format.py

[format.py] reported by reviewdog 🐶

throws_shape(
migraphx::make_op("slice", {{"starts", {0, 1, 2}}, {"mode", "ends_axes_input"}}),
input,
ends,
axes);


[format.py] reported by reviewdog 🐶

mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
l0,
starts,
ends);


[format.py] reported by reviewdog 🐶

mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
l0,
starts,
ends);


[format.py] reported by reviewdog 🐶

mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);


[format.py] reported by reviewdog 🐶

mm->add_instruction(
migraphx::make_op("slice", {{"starts", {-4}}, {"mode", "ends_axes_input"}}),
input,
ends,
axes);


[format.py] reported by reviewdog 🐶

mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);


[format.py] reported by reviewdog 🐶

auto slice_ins = m0.add_instruction(
migraphx::make_op("slice", {{"mode", "starts_ends_axes_input"}}),
input,
input_starts,
input_ends,
input_axes);

if(inputs.size() == 1)
{
if(any_sym(starts) or any_sym(ends))
MIGRAPHX_THROW("SLICE: Invalid attributes: symbolic in attribute for 1 input slice");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
MIGRAPHX_THROW("SLICE: Invalid attributes: symbolic in attribute for 1 input slice");
MIGRAPHX_THROW(
"SLICE: Invalid attributes: symbolic in attribute for 1 input slice");

if(inputs.size() == 2)
{
if(set_attributes == ends_axes)
std::vector<slice_mode> two_input_modes_not_axes = {slice_mode::starts_input, slice_mode::ends_input};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
std::vector<slice_mode> two_input_modes_not_axes = {slice_mode::starts_input, slice_mode::ends_input};
std::vector<slice_mode> two_input_modes_not_axes = {slice_mode::starts_input,
slice_mode::ends_input};

dds.at(axis) = {0, dds.at(axis).get_interval().max};
});
if(inputs[1].lens()[0] != axes.size())
MIGRAPHX_THROW("SLICE: input length (" + migraphx::to_string(inputs[1].lens()[0]) + ") does not match attribute length (" + migraphx::to_string(axes.size()) + ")");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
MIGRAPHX_THROW("SLICE: input length (" + migraphx::to_string(inputs[1].lens()[0]) + ") does not match attribute length (" + migraphx::to_string(axes.size()) + ")");
MIGRAPHX_THROW("SLICE: input length (" +
migraphx::to_string(inputs[1].lens()[0]) +
") does not match attribute length (" +
migraphx::to_string(axes.size()) + ")");

return shape::dynamic_dimension{0, dd.get_interval().max};
});
if(inputs[1].lens()[0] != starts.size())
MIGRAPHX_THROW("SLICE: input length (" + migraphx::to_string(inputs[1].lens()[0]) + ") does not match attribute length (" + migraphx::to_string(starts.size()) + ")");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
MIGRAPHX_THROW("SLICE: input length (" + migraphx::to_string(inputs[1].lens()[0]) + ") does not match attribute length (" + migraphx::to_string(starts.size()) + ")");
MIGRAPHX_THROW("SLICE: input length (" +
migraphx::to_string(inputs[1].lens()[0]) +
") does not match attribute length (" +
migraphx::to_string(starts.size()) + ")");

dds.at(axis) = {0, dds.at(axis).get_interval().max};
});
if(inputs[1].lens()[0] != axes.size())
MIGRAPHX_THROW("SLICE: input length (" + migraphx::to_string(inputs[1].lens()[0]) + ") does not match attribute length (" + migraphx::to_string(axes.size()) + ")");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
MIGRAPHX_THROW("SLICE: input length (" + migraphx::to_string(inputs[1].lens()[0]) + ") does not match attribute length (" + migraphx::to_string(axes.size()) + ")");
MIGRAPHX_THROW("SLICE: input length (" +
migraphx::to_string(inputs[1].lens()[0]) +
") does not match attribute length (" +
migraphx::to_string(axes.size()) + ")");

auto ends = m1.add_parameter("ends", idx_s);
auto sl =
m1.add_instruction(migraphx::make_op("slice", {{"axes", {2}}}), data, starts, ends);
auto sl = m1.add_instruction(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto sl = m1.add_instruction(
auto sl = m1.add_instruction(

auto ends = mm->add_parameter("ends", migraphx::shape{migraphx::shape::int32_type, {2}});
auto ret =
mm->add_instruction(migraphx::make_op("slice", {{"axes", {0, 1}}}), data, starts, ends);
auto ret = mm->add_instruction(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto ret = mm->add_instruction(
auto ret = mm->add_instruction(

auto ends = mm->add_parameter("ends", migraphx::shape{migraphx::shape::int32_type, {2}});
auto axes = mm->add_parameter("axes", migraphx::shape{migraphx::shape::int32_type, {2}});
auto ret = mm->add_instruction(migraphx::make_op("slice"), data, starts, ends, axes);
auto ret = mm->add_instruction(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto ret = mm->add_instruction(
auto ret = mm->add_instruction(

Comment on lines +41 to +54
val = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
val,
k);
ind = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
ind,
k);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
val = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
val,
k);
ind = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
ind,
k);
val = mm->add_instruction(
migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
val,
k);
ind = mm->add_instruction(
migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
ind,
k);

Comment on lines +75 to +88
val = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
val,
k);
ind = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
ind,
k);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
val = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
val,
k);
ind = mm->add_instruction(migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
ind,
k);
val = mm->add_instruction(
migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
val,
k);
ind = mm->add_instruction(
migraphx::make_op("slice",
{{"axes", {1}},
{"starts", {0}},
{"ends", migraphx::value::array{migraphx::to_value(k_var)}},
{"mode", "ends_input"}}),
ind,
k);

eddieliao and others added 2 commits July 22, 2026 15:37
Adds a pytest bridge to support running of CTest unit tests with pytest.
Fix the reference nonzero operator so it accepts and correctly reads non-standard input layouts such as transposed and broadcasted tensors.
@gh-app-migraphx-bot-pr-write

gh-app-migraphx-bot-pr-write Bot commented Jul 22, 2026

Copy link
Copy Markdown
Test Batch New Rate (d1c9f3) Old Rate (49f842) Diff Status
torchvision-resnet50 64 1,462.24 3,264.99 -55.21% 🔴
torchvision-resnet50_fp16 64 2,118.69 7,543.26 -71.91% 🔴
torchvision-densenet121 32 804.87 2,481.97 -67.57% 🔴
torchvision-densenet121_fp16 32 4,232.14 4,973.87 -14.91% 🔴
torchvision-inceptionv3 32 1,068.28 2,056.79 -48.06% 🔴
torchvision-inceptionv3_fp16 32 3,234.69 4,410.23 -26.65% 🔴
cadene-inceptionv4 16 276.57 818.54 -66.21% 🔴
cadene-resnext64x4 16 349.49 783.25 -55.38% 🔴
slim-mobilenet 64 4,188.07 8,354.09 -49.87% 🔴
slim-nasnetalarge 64 95.42 229.45 -58.42% 🔴
slim-resnet50v2 64 2,201.54 3,185.97 -30.90% 🔴
bert-mrpc-onnx 8 1,172.88 1,166.61 0.54%
bert-mrpc-tf 1 485.51 493.90 -1.70%
pytorch-examples-wlang-gru 1 320.00 475.08 -32.64% 🔴
pytorch-examples-wlang-lstm 1 229.96 379.26 -39.36% 🔴
torchvision-resnet50_1 1 1,041.76 1,034.33 0.72%
cadene-dpn92_1 1 169.95 443.17 -61.65% 🔴
cadene-resnext101_1 1 179.38 365.51 -50.92% 🔴
onnx-taau-downsample 1 843.43 849.29 -0.69%
dlrm-criteoterabyte 1 14.90 32.43 -54.06% 🔴
dlrm-criteoterabyte_fp16 1 25.17 52.12 -51.70% 🔴
agentmodel 1 8,673.33 9,423.56 -7.96% 🔴
unet_fp16 2 12.43 58.72 -78.83% 🔴
resnet50v1_fp16 1 198.51 1,365.56 -85.46% 🔴
resnet50v1_int8 1 251.21 1,661.41 -84.88% 🔴
bert_base_cased_fp16 64 341.85 1,098.85 -68.89% 🔴
bert_large_uncased_fp16 32 131.33 345.36 -61.97% 🔴
bert_large_fp16 1 193.77 205.27 -5.60% 🔴
distilgpt2_fp16 16 2,032.79 2,095.46 -2.99%
yolov5s 1 507.16 559.47 -9.35% 🔴
tinyllama 1 21.38 45.76 -53.29% 🔴
vicuna-fastchat 1 7.54 43.96 -82.86% 🔴
whisper-tiny-encoder 1 48.66 412.60 -88.21% 🔴
whisper-tiny-decoder 1 36.76 410.66 -91.05% 🔴
llama2_7b 1 4.23 20.82 -79.67% 🔴
qwen1.5-7b 1 23.58 23.50 0.36%
phi3-3.8b 1 26.83 26.68 0.56%
llama3-8b 1 21.44 21.73 -1.33%
whisper-large-encoder 1 5.33 10.14 -47.41% 🔴
whisper-large-decoder 1 107.58 107.31 0.26%
mistral-7b 1 23.53 23.75 -0.92%
FLUX.1-schnell 1 449.04 804.98 -44.22% 🔴

Regressions detected 🔴

@gh-app-migraphx-bot-pr-write

gh-app-migraphx-bot-pr-write Bot commented Jul 22, 2026

Copy link
Copy Markdown
Test Status Result
bert-mrpc-onnx PASSED: MIGraphX meets tolerance
bert-mrpc-tf PASSED: MIGraphX meets tolerance
pytorch-examples-wlang-gru PASSED: MIGraphX meets tolerance
pytorch-examples-wlang-lstm PASSED: MIGraphX meets tolerance
dlrm-criteoterabyte PASSED: MIGraphX meets tolerance
agentmodel PASSED: MIGraphX meets tolerance
unet PASSED: MIGraphX meets tolerance
resnet50v1 PASSED: MIGraphX meets tolerance
bert_base_cased_fp16 PASSED: MIGraphX meets tolerance
bert_large_uncased_fp16 🔴 FAILED: MIGraphX is not within tolerance - check verbose output
bert_large PASSED: MIGraphX meets tolerance
yolov5s PASSED: MIGraphX meets tolerance
tinyllama PASSED: MIGraphX meets tolerance
vicuna-fastchat PASSED: MIGraphX meets tolerance
whisper-tiny-encoder PASSED: MIGraphX meets tolerance
whisper-tiny-decoder PASSED: MIGraphX meets tolerance
distilgpt2_fp16 PASSED: MIGraphX meets tolerance
llama2_7b PASSED: MIGraphX meets tolerance
qwen1.5-7b PASSED: MIGraphX meets tolerance
phi3-3.8b PASSED: MIGraphX meets tolerance
llama3-8b PASSED: MIGraphX meets tolerance
whisper-large-encoder 🔴 FAILED: MIGraphX is not within tolerance - check verbose output
whisper-large-decoder PASSED: MIGraphX meets tolerance
mistral-7b PASSED: MIGraphX meets tolerance
FLUX.1-schnell PASSED: MIGraphX meets tolerance

dependabot Bot and others added 22 commits July 23, 2026 14:40
Macro builders were recently added to better manage composed ops when parsing from outside libraries. This extends the torch kit with a number of missing ops required to fully migrate torch_migraphx to use this builder framework.
Adds gfx115 to hipblaslt_supported_impl() so gfx1150/1151/1152/1153 (Strix Halo/Point, RDNA3.5) use the hipBLASLt GEMM path.
…nd update tests (#5090)

Rewrites the flash decoding kernel 2 recombination step in find_flash_decoding to use the exp-normalize form:

`O = sum(O' * exp(LSE - max)) / sum(exp(LSE - max))`

instead of normalizing weights first, then scaling and summing partial outputs. The result is mathematically equivalent but produces IR that fuses more cleanly downstream (e.g. with rewrite_broadcast in a follow-up PR).
Comment on lines +56 to +64
return info.add_instruction(
make_op(
"slice",
{{"axes", {0}},
{"starts", {0}},
{"ends", value::array{to_value(num_selected_var)}},
{"mode", "ends_input"}}),
indices,
num_selected);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
return info.add_instruction(
make_op(
"slice",
{{"axes", {0}},
{"starts", {0}},
{"ends", value::array{to_value(num_selected_var)}},
{"mode", "ends_input"}}),
indices,
num_selected);
return info.add_instruction(make_op("slice",
{{"axes", {0}},
{"starts", {0}},
{"ends", value::array{to_value(num_selected_var)}},
{"mode", "ends_input"}}),
indices,
num_selected);

Comment thread test/op_shape_test.cpp
Comment on lines +5376 to +5380
throws_shape(
migraphx::make_op("slice",
{{"ends", {2, 3, 4}}, {"axes", {0, 1, 2}}, {"mode", "starts_input"}}),
input,
starts);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
throws_shape(
migraphx::make_op("slice",
{{"ends", {2, 3, 4}}, {"axes", {0, 1, 2}}, {"mode", "starts_input"}}),
input,
starts);
throws_shape(migraphx::make_op(
"slice", {{"ends", {2, 3, 4}}, {"axes", {0, 1, 2}}, {"mode", "starts_input"}}),
input,
starts);

Comment thread test/op_shape_test.cpp
Comment on lines +5387 to +5391
throws_shape(
migraphx::make_op("slice",
{{"starts", {0, 1, 2}}, {"axes", {0, 1, 2}}, {"mode", "ends_input"}}),
input,
ends);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
throws_shape(
migraphx::make_op("slice",
{{"starts", {0, 1, 2}}, {"axes", {0, 1, 2}}, {"mode", "ends_input"}}),
input,
ends);
throws_shape(migraphx::make_op(
"slice", {{"starts", {0, 1, 2}}, {"axes", {0, 1, 2}}, {"mode", "ends_input"}}),
input,
ends);

Comment thread test/op_shape_test.cpp
Comment on lines +5398 to +5402
throws_shape(
migraphx::make_op("slice",
{{"starts", {0, 1, 2}}, {"ends", {3, 4, 4}}, {"mode", "axes_input"}}),
input,
axes);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
throws_shape(
migraphx::make_op("slice",
{{"starts", {0, 1, 2}}, {"ends", {3, 4, 4}}, {"mode", "axes_input"}}),
input,
axes);
throws_shape(migraphx::make_op(
"slice", {{"starts", {0, 1, 2}}, {"ends", {3, 4, 4}}, {"mode", "axes_input"}}),
input,
axes);

Comment thread test/op_shape_test.cpp
Comment on lines +5410 to +5414
throws_shape(
migraphx::make_op("slice", {{"axes", {0, 1, 2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
throws_shape(
migraphx::make_op("slice", {{"axes", {0, 1, 2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);
throws_shape(migraphx::make_op("slice", {{"axes", {0, 1, 2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);

Comment thread test/ref/slice.cpp
Comment on lines +122 to +126
mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
l0,
starts,
ends);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
l0,
starts,
ends);
mm->add_instruction(migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
l0,
starts,
ends);

Comment thread test/ref/slice.cpp
Comment on lines +264 to +268
mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);
mm->add_instruction(migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);

Comment thread test/ref/slice.cpp
Comment on lines +329 to +333
mm->add_instruction(
migraphx::make_op("slice", {{"starts", {-4}}, {"mode", "ends_axes_input"}}),
input,
ends,
axes);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
mm->add_instruction(
migraphx::make_op("slice", {{"starts", {-4}}, {"mode", "ends_axes_input"}}),
input,
ends,
axes);
mm->add_instruction(migraphx::make_op("slice", {{"starts", {-4}}, {"mode", "ends_axes_input"}}),
input,
ends,
axes);

Comment thread test/ref/slice.cpp
Comment on lines +361 to +365
mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
mm->add_instruction(
migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);
mm->add_instruction(migraphx::make_op("slice", {{"axes", {2}}, {"mode", "starts_ends_input"}}),
input,
starts,
ends);

Comment on lines 537 to +542
auto slice_ins = m0.add_instruction(
migraphx::make_op("slice"), input, input_starts, input_ends, input_axes);
migraphx::make_op("slice", {{"mode", "starts_ends_axes_input"}}),
input,
input_starts,
input_ends,
input_axes);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
auto slice_ins = m0.add_instruction(
migraphx::make_op("slice"), input, input_starts, input_ends, input_axes);
migraphx::make_op("slice", {{"mode", "starts_ends_axes_input"}}),
input,
input_starts,
input_ends,
input_axes);
auto slice_ins =
m0.add_instruction(migraphx::make_op("slice", {{"mode", "starts_ends_axes_input"}}),
input,
input_starts,
input_ends,
input_axes);

@CharlieL7
CharlieL7 changed the base branch from develop to sym_slice_refactor July 30, 2026 21:40
…into proto_data_dependent_symbolics"

This reverts commit 872fefa, reversing
changes made to 9a224a2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants