Commit 03b20e8
authored
fix qdq utils issues and remove global cast replacements (#489)
## What does this PR do?
**Type of change:** Bug fix <!-- Use one of the following: Bug fix, new
feature, new example, new tests, documentation. -->
**Overview:** While attempting to `transformers`, `onnx`, `torch` and
`modelopt`, it is shown the following:
- Original `Reshape` - `Cast` - `Transpose` becomes `Reshape` -
`Transpose`, so there is no required `Cast` for int4
- Global cast replacement to FP16 is not required since it will affect
other Modules
## Usage
<!-- You can potentially add a usage example below. -->
```python
# Add a code snippet demonstrating how to use this
```
## Testing
<!-- Mention how have you tested your change if applicable. -->
## 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/TensorRT-Model-Optimizer/blob/main/CONTRIBUTING.md)**
and your commits are signed.
- **Is this change backward compatible?**: Yes <!--- If No, explain why.
-->
- **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/TensorRT-Model-Optimizer/blob/main/CHANGELOG.rst)?**:
No <!--- Only for new features, API changes, critical bug fixes or bw
breaking changes. -->
## Additional Information
<!-- E.g. related issue. -->
Signed-off-by: Luxiao Zheng <luxiaoz@nvidia.com>1 parent 2290533 commit 03b20e8
File tree
2 files changed
+323
-55
lines changed- modelopt/onnx/quantization
- tests/unit/onnx
2 files changed
+323
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | | - | |
| 1114 | + | |
1115 | 1115 | | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1121 | 1124 | | |
1122 | 1125 | | |
1123 | | - | |
1124 | | - | |
| 1126 | + | |
| 1127 | + | |
1125 | 1128 | | |
1126 | 1129 | | |
1127 | 1130 | | |
| |||
1138 | 1141 | | |
1139 | 1142 | | |
1140 | 1143 | | |
1141 | | - | |
| 1144 | + | |
1142 | 1145 | | |
1143 | 1146 | | |
1144 | 1147 | | |
| |||
1189 | 1192 | | |
1190 | 1193 | | |
1191 | 1194 | | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | 1195 | | |
1208 | 1196 | | |
1209 | 1197 | | |
| |||
1310 | 1298 | | |
1311 | 1299 | | |
1312 | 1300 | | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | 1301 | | |
1321 | 1302 | | |
1322 | 1303 | | |
| |||
0 commit comments