Files
Model-Optimizer/tests/unit
Gwena Cunha b286165362 [5680954][ONNX][Autocast] Fix 0-dim scalar constant issue (#691)
## What does this PR do?

**Type of change:** Bug fix

**Overview:** Ops with 0-dim scalar constants were being forced to have
shape of 1 instead of 0. This PR fixes that issue.

## Usage

```python
$ python -m modelopt.onnx.autocast --onnx_path=$MODEL_NAME.onnx
```

## Testing
Added unittest.

## 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?**: Yes
- **Did you add or update any necessary documentation?**: No
- **Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?**:
No

Signed-off-by: gcunhase <4861122+gcunhase@users.noreply.github.com>
2025-12-18 10:12:58 -05:00
..
2025-04-03 10:31:41 +05:30