Skip to content

Conversation

@klin2024
Copy link

@klin2024 klin2024 commented Feb 4, 2026

Motivation

Enable dynamic shape support for the Range operator,as MIGraphX currently fails when running SSDMobileNetV2_int8 due to a limitation in this node.

auto start_arg = args[0]->eval();
check_arg_empty(start_arg, "PARSE_RANGE: start arg dynamic shape is not supported");
auto limit_arg = args[1]->eval();
check_arg_empty(limit_arg, "PARSE_RANGE: limit arg dynamic shape is not supported");
auto delta_arg = args[2]->eval();
check_arg_empty(delta_arg, "PARSE_RANGE: delta arg dynamic shape is not supported");

Technical Details

Follow https://onnx.ai/onnx/operators/onnx__Range.html spec Implemented Range parsing and logic in range.hpp,parse_range.cpp.
Use hip_copy_to_gpu_alloc in lowering.cpp because allocates memory based on the runtime-determined should better than pre-allocating the maximum possible size.

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.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 7.69231% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/include/migraphx/op/range.hpp 4.17% 23 Missing ⚠️
src/onnx/parse_range.cpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4591      +/-   ##
===========================================
- Coverage    92.22%   92.15%   -0.07%     
===========================================
  Files          564      568       +4     
  Lines        27335    27518     +183     
===========================================
+ Hits         25209    25358     +149     
- Misses        2126     2160      +34     
Files with missing lines Coverage Δ
src/onnx/parse_range.cpp 91.67% <50.00%> (-4.33%) ⬇️
src/include/migraphx/op/range.hpp 4.17% <4.17%> (ø)

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant