Commit 7ff928a
[5868890][ONNX][Autocast] Fix: failure when checking input shape with unknown dimension (#859)
## What does this PR do?
**Type of change:** Bug fix
**Overview:** Skip unknown dimensions when comparing input shape in
model vs calibration data.
## Usage
```python
$ python -m modelopt.onnx.autocast --onnx_path=$MODEL_NAME.onnx --calibration_data=calib_data_10.npz
```
## Testing
See bug 5868890.
## Before your PR is "*Ready for review*"
<!-- If you haven't finished some of the above items you can still open
`Draft` PR. -->
- **Make sure you read and follow [Contributor
guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md)**
and your commits are signed.
- **Is this change backward compatible?**: Yes
- **Did you write any new necessary tests?**: No
- **Did you add or update any necessary documentation?**: No
- **Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?**:
No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Bug Fixes
* Enhanced input shape validation to properly handle dynamic tensor
dimensions, allowing more flexible dimension checking while maintaining
validation accuracy.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Aditional info
Regression introduced in
#652.
---------
Signed-off-by: gcunhase <4861122+gcunhase@users.noreply.github.com>1 parent 98b1108 commit 7ff928a
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
| |||
0 commit comments