[Issue]: `concat_op.axis >= 0` assertion violates onnx spec
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 333
- Forks
- 150
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 54
Description
Problem Description
When compiling certain onnx models via migraphx, an assertion is thrown from this line. I reproduced this on multiple of the SwinIR models from the vs-mlrt repo. However, the onnx spec states that valid axis values are "[-r, r-1] where r = rank(inputs)". Therefore, this assert violates the onnx spec, and the code needs to be updated to support negative axis values.
Operating System
CachyOS Linux 6.18.6
CPU
AMD Ryzen 9800x3d
GPU
AMD Radeon RX 7900 XTX
Other
No response
ROCm Version
ROCm 6.0.0
Steps to Reproduce
- Download the onnx-formatted SwinIR models from vs-mlrt
- Run the migraphx compilation command, e.g.
migraphx-driver compile --onnx /usr/lib/vapoursynth/models/swinir/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x2_GAN.onnx --gpu --optimize --binary --output /usr/lib/vapoursynth/models/swinir/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x2_GAN.onnx.1920x1080_fast_migx-2.14.0_AMD-Radeon-RX-7900-XTX_79bab741.mxr --input-dim @input 1 3 1080 1920
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
The dropdown for ROCm version only goes as high as 6.0, but I encountered this running ROCm 7.1.1. The dropdown needs updated in the issue template.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/simplify_reshapes.cpp around line 510 and compare the assertion with the ONNX Concat operator specification. Reproduce the failure with the provided migraphx-driver command and a SwinIR model; done means valid negative axis values no longer trigger the assertion during compilation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100