Skip to content

Commit 1def182

Browse files
authored
ONNX-TensorRT 9.3 Release (#955)
Signed-off-by: Kevin Chen <[email protected]>
1 parent 306247b commit 1def182

File tree

6 files changed

+23
-30
lines changed

6 files changed

+23
-30
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ add_definitions("-DSOURCE_LENGTH=${SOURCE_LENGTH}")
2828
# Version information
2929
#--------------------------------------------------
3030
set(ONNX2TRT_MAJOR 9)
31-
set(ONNX2TRT_MINOR 2)
31+
set(ONNX2TRT_MINOR 3)
3232
set(ONNX2TRT_PATCH 0)
3333
set(ONNX2TRT_VERSION "${ONNX2TRT_MAJOR}.${ONNX2TRT_MINOR}.${ONNX2TRT_PATCH}" CACHE STRING "ONNX2TRT version")
3434

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ Current supported ONNX operators are found in the [operator support matrix](docs
4848
### Dependencies
4949

5050
- [Protobuf >= 3.0.x](https://github.com/google/protobuf/releases)
51-
- [TensorRT 9.2](https://developer.nvidia.com/tensorrt)
52-
- [TensorRT 9.2 open source libaries] (https://github.com/NVIDIA/TensorRT/)
51+
- [TensorRT 9.3](https://developer.nvidia.com/tensorrt)
52+
- [TensorRT 9.3 open source libaries] (https://github.com/NVIDIA/TensorRT/)
5353

5454
### Building
5555

@@ -99,7 +99,7 @@ Refer to the link or run `polygraphy run -h` for more information on CLI options
9999

100100
Python bindings for the ONNX-TensorRT parser are packaged in the shipped `.whl` files.
101101

102-
TensorRT 9.2 supports ONNX release 1.14.0. Install it with:
102+
TensorRT 9.3 supports ONNX release 1.14.0. Install it with:
103103

104104
python3 -m pip install onnx==1.14.0
105105

builtin_op_importers.cpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,21 +1344,17 @@ NodeImportResult QuantDequantLinearHelper(IImporterContext* ctx, ::ONNX_NAMESPAC
13441344
{
13451345
if (newConstantInput(2))
13461346
{
1347-
//TRT-20277: after enabling ConstantInt8Validator to support Int8+Q, this constraint can be changed to allow Int8 zeropoint
1348-
//Right now, zero point is allowed to be only 0, hence there is no real usage of it, so no functionality change is expected
1349-
if (chosenDataType == DataType::kINT8 && isDQ)
1350-
{
1351-
// Zero-point verification.
1352-
auto zeroPoint = inputs.at(2).weights();
1353-
ASSERT_NODE(shiftIsAllZeros(zeroPoint),
1354-
"TensorRT only supports symmetric quantization. The zero point for the "
1355-
"QuantizeLinear/DequantizeLinear operator must be all zeros.",
1356-
node, nodeIdx, nvonnxparser::ErrorCode::kINVALID_NODE);
1357-
// Convert the zero-point to float because TRT uses float for zero-point.
1358-
auto fpZeroPoint = createZeroShifts(zeroPoint, ::ONNX_NAMESPACE::TensorProto::FLOAT, ctx);
1359-
fpZeroPoint.setName(zeroPoint.getName());
1360-
zeroPointInput = addConstantLayer(*ctx->network(), fpZeroPoint);
1361-
}
1347+
// Make sure that zero points are all zeros.
1348+
auto zeroPoint = inputs.at(2).weights();
1349+
ASSERT_NODE(shiftIsAllZeros(zeroPoint),
1350+
"TensorRT only supports symmetric quantization. The zero point for the "
1351+
"QuantizeLinear/DequantizeLinear operator must be all zeros.",
1352+
node, nodeIdx, nvonnxparser::ErrorCode::kINVALID_NODE);
1353+
1354+
// Convert the zero-point to float because TRT uses float for zero-point.
1355+
auto fpZeroPoint = createZeroShifts(zeroPoint, ::ONNX_NAMESPACE::TensorProto::FLOAT, ctx);
1356+
fpZeroPoint.setName(zeroPoint.getName());
1357+
zeroPointInput = addConstantLayer(*ctx->network(), fpZeroPoint);
13621358
}
13631359
else
13641360
{

docs/Changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
# ONNX-TensorRT Changelog
44

5-
# TensorRT 9.2 GA Release - 2023-12-4
5+
# TensorRT 9.3 GA Release - 2024-2-8
6+
For more details, see the 9.3 GA release notes for the fixes since 9.2 GA.
7+
8+
- Added native support for `INT32` and `INT64` types for `ArgMin` and `ArgMax` nodes
9+
- Fixed check for valid `zero_point` values in `QuantizeLinear` and `DequantizeLinear` nodes
10+
11+
# TensorRT 9.2 GA Release - 2023-11-8
612
For more details, see the 9.2 GA release notes for the fixes since 9.1 GA.
713

814
- Added support for `Hardmax`

docs/operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Supported ONNX Operators
44

5-
TensorRT 9.2 supports operators up to Opset 19. Latest information of ONNX operators can be found [here](https://github.com/onnx/onnx/blob/master/docs/Operators.md)
5+
TensorRT 9.3 supports operators up to Opset 19. Latest information of ONNX operators can be found [here](https://github.com/onnx/onnx/blob/master/docs/Operators.md)
66

77
TensorRT supports the following ONNX data types: DOUBLE, FLOAT32, FLOAT16, BFLOAT16, INT32, INT64, FP8, INT8, UINT8, and BOOL
88

onnx2trt_utils.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ NodeImportResult argMinMaxHelper(IImporterContext* ctx, const ::ONNX_NAMESPACE::
6666
CHECK(notInvalidType(inputs.at(0), {"UINT8"}));
6767
nvinfer1::ITensor* tensor = &convertToTensor(inputs.at(0), ctx);
6868

69-
bool needCast = tensor->getType() == nvinfer1::DataType::kINT32;
70-
if (needCast)
71-
{
72-
LOG_WARNING(
73-
"TensorRT is using FLOAT32 precision to run an INT32 ArgMax / ArgMin. Rounding errors may occur for large "
74-
"integer values");
75-
tensor = castHelper(ctx, tensor, nvinfer1::DataType::kFLOAT);
76-
}
77-
7869
// Get attributes.
7970
OnnxAttrs attrs(node, ctx);
8071
int32_t keepdims = attrs.get("keepdims", 1);

0 commit comments

Comments
 (0)