Skip to content

Commit acb0805

Browse files
authored
ONNX-TensorRT 21.02 release (#631)
Signed-off-by: Kevin Chen <[email protected]>
1 parent 8b5328f commit acb0805

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+696
-159
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve TRT
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
12+
<!-- A clear and concise description of the bug or issue. Please read our FAQ at docs/faq.md for answers to common issues -->
13+
14+
15+
## Environment
16+
17+
**TensorRT Version**:
18+
**ONNX-TensorRT Version / Branch**:
19+
**GPU Type**:
20+
**Nvidia Driver Version**:
21+
**CUDA Version**:
22+
**CUDNN Version**:
23+
**Operating System + Version**:
24+
**Python Version (if applicable)**:
25+
**TensorFlow + TF2ONNX Version (if applicable)**:
26+
**PyTorch Version (if applicable)**:
27+
**Baremetal or Container (if container which image + tag)**:
28+
29+
30+
## Relevant Files
31+
32+
<!-- Please include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.) -->
33+
34+
35+
## Steps To Reproduce
36+
37+
<!--
38+
Craft a minimal bug report following this guide - https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
39+
40+
Please include:
41+
* Exact steps/commands to build your repro
42+
* Exact steps/commands to run your repro
43+
* Full traceback of errors encountered
44+
-->

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ set(PARSER_LINKER_SCRIPT ${ONNX2TRT_ROOT}/libnvonnxparser.version)
4343
#--------------------------------------------------
4444
set(ONNX2TRT_MAJOR 7)
4545
set(ONNX2TRT_MINOR 2)
46-
set(ONNX2TRT_PATCH 1)
46+
set(ONNX2TRT_PATCH 2)
4747

4848
#--------------------------------------------------
4949
# Build configurations, global to all projects

Changelog.md

-19
This file was deleted.

ImporterContext.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -102,7 +102,7 @@ class ImporterContext final : public IImporterContext
102102
}
103103
virtual void insertRefitMap(std::string weightsName, std::string layerName, nvinfer1::WeightsRole role) override
104104
{
105-
(*mRefitMap)[weightsName] = WeightsPair_t{layerName, role};
105+
mRefitMap->insert({weightsName, WeightsPair_t{layerName, role}});
106106
}
107107
// This actually handles weights as well, but is named this way to be consistent with the tensors()
108108
virtual void registerTensor(TensorOrWeights tensor, const std::string& basename) override

LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MIT License
22

3-
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
4-
Copyright (c) 2020 Open Neural Network Exchange
3+
Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
4+
Copyright (c) 2021 Open Neural Network Exchange
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

LoopHelpers.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
/*
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
* DEALINGS IN THE SOFTWARE.
21+
*/
22+
123
#include "LoopHelpers.hpp"
224
#include "onnx2trt_utils.hpp"
325

LoopHelpers.hpp

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
/*
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
* DEALINGS IN THE SOFTWARE.
21+
*/
22+
123
#pragma once
224

325
#include <NvInfer.h>

ModelImporter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

ModelImporter.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

NvOnnxParser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

NvOnnxParser.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -132,7 +132,8 @@ class IParser
132132
* To obtain a better diagnostic, use the parseFromFile method below.
133133
*
134134
* \param serialized_onnx_model Pointer to the serialized ONNX model
135-
* \param serialized_onnx_model_size Size of the serialized ONNX model in bytes
135+
* \param serialized_onnx_model_size Size of the serialized ONNX model
136+
* in bytes
136137
* \param model_path Absolute path to the model file for loading external weights if required
137138
* \return true if the model was parsed successfully
138139
* \see getNbErrors() getError()

OnnxAttrs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

OnnxAttrs.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Parses ONNX models for execution with [TensorRT](https://developer.nvidia.com/te
44

55
See also the [TensorRT documentation](https://docs.nvidia.com/deeplearning/sdk/#inference).
66

7-
For the list of recent changes, see the [changelog](Changelog.md).
7+
For the list of recent changes, see the [changelog](docs/Changelog.md).
8+
9+
For a list of commonly seen issues and questions, see the [FAQ](docs/faq.md).
810

911
## Supported TensorRT Versions
1012

11-
Development on the Master branch is for the latest version of [TensorRT 7.2.1](https://developer.nvidia.com/nvidia-tensorrt-download) with full-dimensions and dynamic shape support.
13+
Development on the Master branch is for the latest version of [TensorRT 7.2.2](https://developer.nvidia.com/nvidia-tensorrt-download) with full-dimensions and dynamic shape support.
1214

1315
For previous versions of TensorRT, refer to their respective branches.
1416

@@ -33,15 +35,15 @@ For examples of usage of these APIs see:
3335

3436
## Supported Operators
3537

36-
Current supported ONNX operators are found in the [operator support matrix](operators.md).
38+
Current supported ONNX operators are found in the [operator support matrix](docs/operators.md).
3739

3840
# Installation
3941

4042
### Dependencies
4143

4244
- [Protobuf >= 3.0.x](https://github.com/google/protobuf/releases)
43-
- [TensorRT 7.2.1](https://developer.nvidia.com/tensorrt)
44-
- [TensorRT 7.2.1 open source libaries (master branch)](https://github.com/NVIDIA/TensorRT/)
45+
- [TensorRT 7.2.2](https://developer.nvidia.com/tensorrt)
46+
- [TensorRT 7.2.2 open source libaries (master branch)](https://github.com/NVIDIA/TensorRT/)
4547

4648
### Building
4749

@@ -84,7 +86,7 @@ Python bindings for the ONNX-TensorRT parser are packaged in the shipped `.whl`
8486

8587
python3 -m pip install <tensorrt_install_dir>/python/tensorrt-7.x.x.x-cp<python_ver>-none-linux_x86_64.whl
8688

87-
TensorRT 7.2.1 supports ONNX release 1.6.0. Install it with:
89+
TensorRT 7.2.2 supports ONNX release 1.6.0. Install it with:
8890

8991
python3 -m pip install onnx==1.6.0
9092

RNNHelpers.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
/*
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
* DEALINGS IN THE SOFTWARE.
21+
*/
22+
123
#include "RNNHelpers.hpp"
224
#include "LoopHelpers.hpp"
325
#include "onnx2trt_utils.hpp"

RNNHelpers.hpp

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
/*
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
* DEALINGS IN THE SOFTWARE.
21+
*/
22+
123
#pragma once
224

325
#include <NvInfer.h>

ShapeTensor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

ShapeTensor.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

ShapedWeights.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

ShapedWeights.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

Status.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

TensorOrWeights.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),

0 commit comments

Comments
 (0)