codekingpro commited on
Commit
f864a1e
·
verified ·
1 Parent(s): 8b2c3bf

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .ai_context.md +29 -0
  2. Easy_Setup.bat +94 -0
  3. php/README.md +172 -0
  4. php/readme-redist-bins.txt +682 -0
  5. php/snapshot.txt +154 -0
  6. php/vcruntime140_1.dll +0 -0
  7. python/LICENSE.txt +645 -0
  8. python/get-pip.py +0 -0
  9. python/libffi-8.dll +0 -0
  10. python/python3.dll +0 -0
  11. python/python313._pth +5 -0
  12. python/select.pyd +0 -0
  13. sqlite_gui/bearer/qgenericbearer.dll +0 -0
  14. sqlite_gui/extensions/formats.dll +0 -0
  15. sqlite_gui/extensions/math.dll +0 -0
  16. svn/Licenses/APR License.txt +297 -0
  17. svn/Licenses/APR Util License.txt +404 -0
  18. svn/Licenses/OpenSSL License.txt +177 -0
  19. svn/Licenses/Subversion License.txt +262 -0
  20. svn/Licenses/ZLib License.txt +33 -0
  21. svn/bin/libsvn_diff-1.dll +0 -0
  22. svn/bin/libsvn_fs-1.dll +0 -0
  23. svn/bin/libsvn_fs_util-1.dll +0 -0
  24. svn/bin/svnadmin.exe +0 -0
  25. svn/bin/svnbench.exe +0 -0
  26. svn/bin/svndumpfilter.exe +0 -0
  27. svn/bin/svnfsfs.exe +0 -0
  28. svn/bin/svnlook.exe +0 -0
  29. svn/bin/svnmucc.exe +0 -0
  30. svn/bin/svnrdump.exe +0 -0
  31. svn/bin/svnsync.exe +0 -0
  32. svn/bin/svnversion.exe +0 -0
  33. svn/bin/vcruntime140_1.dll +0 -0
  34. tensorrt/doc/Acknowledgements.txt +0 -0
  35. tensorrt/doc/README.txt +31 -0
  36. tensorrt/include/NvInfer.h +0 -0
  37. tensorrt/include/NvInferImpl.h +1469 -0
  38. tensorrt/include/NvInferLegacyDims.h +206 -0
  39. tensorrt/include/NvInferPlugin.h +42 -0
  40. tensorrt/include/NvInferPluginBase.h +291 -0
  41. tensorrt/include/NvInferPluginUtils.h +204 -0
  42. tensorrt/include/NvInferRuntime.h +0 -0
  43. tensorrt/include/NvInferRuntimeBase.h +689 -0
  44. tensorrt/include/NvInferRuntimeCommon.h +322 -0
  45. tensorrt/include/NvInferRuntimePlugin.h +980 -0
  46. tensorrt/include/NvInferVersion.h +45 -0
  47. tensorrt/include/NvOnnxConfig.h +198 -0
  48. tensorrt/include/NvOnnxParser.h +657 -0
  49. tensorrt/include/impl/NvInferPythonPlugin.h +594 -0
  50. tensorrt/lib/nvinfer_dispatch_10.lib +0 -0
.ai_context.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🤖 AI AGENT OPERATING INSTRUCTIONS
2
+ ## Portable DevStation Pro (God-Tier Environment)
3
+
4
+ This environment is designed for high-performance AI, Game, and Software Engineering. Any AI agent (like Gemini, Cursor, or GPT) operating here MUST adhere to these professional standards.
5
+
6
+ ### 📍 Environment Context
7
+ - **Root Directory:** The current folder where this file resides (Dynamic Portable Root).
8
+ - **Activation:** Always assume `activate_env.bat` has been run or use full paths from the root.
9
+ - **Portability:** NEVER write to `C:\` or system registries. All data must stay within the root.
10
+
11
+ ### 🛠️ Mandatory Engineering Tools
12
+ When writing code, you MUST use these installed tools for quality control:
13
+ 1. **Linting/Analysis:** Use `ruff` (Python) and `cppcheck` (C++/CUDA).
14
+ 2. **Type Checking:** Use `mypy` for all Python code.
15
+ 3. **Formatting:** Use `black` for Python to maintain a professional look.
16
+ 4. **Testing:** All new features MUST have tests written in `pytest`.
17
+ 5. **Documentation:** Use `mkdocs` for project manuals and `doxygen` for code-level docs.
18
+
19
+ ### 🚀 High-Performance Libraries
20
+ - **Inference:** Prioritize `TensorRT 10.x` for NVIDIA GPU acceleration.
21
+ - **Deep Learning:** Use `cuDNN 9.22` with `CUDA 12.4`.
22
+ - **Compression:** Use `nvCOMP` for GPU-accelerated data handling.
23
+
24
+ ### 🎨 Coding Style
25
+ - **Aesthetics:** Code must be clean, modular, and well-commented.
26
+ - **Master Level:** Use advanced CUDA kernels and modern C++20/Python 3.13 features.
27
+
28
+ ---
29
+ *Note: This file ensures that any AI working in this environment maintains the "God-Tier" standard set during creation.*
Easy_Setup.bat ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+ title DEVSTATION PRO - ONE-CLICK SETUP
4
+ color 0B
5
+
6
+ :: Get Admin Rights
7
+ >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
8
+ if '%errorlevel%' NEQ '0' (
9
+ echo [INFO] Requesting Admin Rights for System Integration...
10
+ goto UACPrompt
11
+ ) else ( goto gotAdmin )
12
+ :UACPrompt
13
+ echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
14
+ echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
15
+ "%temp%\getadmin.vbs"
16
+ exit /B
17
+ :gotAdmin
18
+ if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
19
+
20
+ set "ROOT=%~dp0"
21
+ set "ROOT=%ROOT:~0,-1%"
22
+
23
+ :menu
24
+ cls
25
+ echo.
26
+ echo #######################################################
27
+ echo # #
28
+ echo # GOD-TIER PORTABLE DEVSTATION SETUP #
29
+ echo # #
30
+ echo #######################################################
31
+ echo.
32
+ echo [1] PERMANENT INSTALL (Add to System PATH)
33
+ echo - Tools will work in ANY terminal (CMD/PowerShell)
34
+ echo.
35
+ echo [2] TEMPORARY SESSION (No System Changes)
36
+ echo - Just open a temporary session with tools active
37
+ echo.
38
+ echo [3] PORTABLE SYNC (Fix Paths for New Drive)
39
+ echo - Use this if you moved the folder to a new drive
40
+ echo.
41
+ echo [4] UNINSTALL (Remove from System PATH)
42
+ echo - Clean all paths from your computer
43
+ echo.
44
+ echo [5] EXIT
45
+ echo.
46
+ set /p choice="ENTER CHOICE (1-5): "
47
+
48
+ if "%choice%"=="1" goto install
49
+ if "%choice%"=="2" goto temporary
50
+ if "%choice%"=="3" goto sync
51
+ if "%choice%"=="4" goto uninstall
52
+ if "%choice%"=="5" exit
53
+ goto menu
54
+
55
+ :temporary
56
+ echo.
57
+ echo [INFO] Launching Temporary Session...
58
+ start cmd /k "scripts\activate_env.bat"
59
+ goto menu
60
+
61
+ :install
62
+ echo.
63
+ echo [STEP 1] Syncing local paths...
64
+ set "MAMBA_ROOT_PREFIX=%ROOT%\micromamba_root"
65
+ "%ROOT%\micromamba\micromamba.exe" shell init -s cmd -p "%MAMBA_ROOT_PREFIX%" >nul 2>&1
66
+
67
+ echo [STEP 2] Building Global Path List...
68
+ :: Comprehensive paths for ALL tools (Dotnet at the front)
69
+ set "NP=%ROOT%\dotnet;%ROOT%\bin;%ROOT%\git\cmd;%ROOT%\git\bin;%ROOT%\node;%ROOT%\node24;%ROOT%\python;%ROOT%\python\Scripts;%ROOT%\cmake\bin;%ROOT%\rust\.cargo\bin;%ROOT%\go\bin;%ROOT%\cuda_toolkit\bin;%ROOT%\tensorrt\bin;%ROOT%\cudnn\bin\x64;%ROOT%\micromamba_root\Scripts;%ROOT%\micromamba_root\Library\bin;%ROOT%\micromamba_root\Library\usr\bin;%ROOT%\llvm\bin;%ROOT%\java\bin;%ROOT%\java21\bin;%ROOT%\php;%ROOT%\ffmpeg\bin;%ROOT%\svn\bin;%ROOT%\gh;%ROOT%\msbuild;%ROOT%\vulkan\Bin;%ROOT%\pgsql\bin;%ROOT%\sqlite;%ROOT%\directstorage\native\bin\x64"
70
+
71
+ echo [STEP 3] Injecting into User Environment...
72
+ :: Set Global Environment Variables permanently
73
+ powershell -NoProfile -Command "[Environment]::SetEnvironmentVariable('DEVTOOLS_ROOT', '%ROOT%', 'User'); [Environment]::SetEnvironmentVariable('JAVA_HOME', '%ROOT%\java', 'User'); [Environment]::SetEnvironmentVariable('DOTNET_ROOT', '%ROOT%\dotnet', 'User'); [Environment]::SetEnvironmentVariable('DOTNET_ROOT(x86)', '%ROOT%\dotnet', 'User'); [Environment]::SetEnvironmentVariable('DOTNET_MULTILEVEL_LOOKUP', '0', 'User'); [Environment]::SetEnvironmentVariable('DOTNET_NOLOGO', '1', 'User'); [Environment]::SetEnvironmentVariable('DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR', '%ROOT%\dotnet', 'User'); [Environment]::SetEnvironmentVariable('GOROOT', '%ROOT%\go', 'User'); [Environment]::SetEnvironmentVariable('RUSTUP_HOME', '%ROOT%\rust\.rustup', 'User'); [Environment]::SetEnvironmentVariable('CARGO_HOME', '%ROOT%\rust\.cargo', 'User'); [Environment]::SetEnvironmentVariable('CUDA_PATH', '%ROOT%\cuda_toolkit', 'User'); [Environment]::SetEnvironmentVariable('CUDA_HOME', '%ROOT%\cuda_toolkit', 'User'); [Environment]::SetEnvironmentVariable('TENSORRT_HOME', '%ROOT%\tensorrt', 'User'); [Environment]::SetEnvironmentVariable('CUDNN_HOME', '%ROOT%\cudnn', 'User'); $oldPath = [Environment]::GetEnvironmentVariable('Path', 'User'); $newPath = '%NP%;' + $oldPath; $uniquePath = ($newPath.Split(';') | Select-Object -Unique | Where-Object { $_ -ne '' -and $_ -notlike '*C:\Program Files\dotnet*' }) -join ';'; [Environment]::SetEnvironmentVariable('Path', $uniquePath, 'User')"
74
+
75
+ echo.
76
+ echo =======================================================
77
+ echo [SUCCESS] ALL TOOLS ARE NOW INTEGRATED SYSTEM-WIDE!
78
+ echo Please RESTART your terminal (CMD/PowerShell).
79
+ echo Try running 'nvcc --version' or 'python --version'.
80
+ echo =======================================================
81
+ pause
82
+ goto menu
83
+
84
+ :sync
85
+ echo.
86
+ echo [INFO] Synchronizing paths to %ROOT%...
87
+ call "scripts\Portable_Fixer.bat"
88
+ goto menu
89
+
90
+ :uninstall
91
+ echo.
92
+ echo [INFO] Launching Uninstaller...
93
+ call "scripts\Uninstall_Global_PATH.bat"
94
+ goto menu
php/README.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+ <a href="https://www.php.net">
3
+ <img
4
+ alt="PHP"
5
+ src="https://www.php.net/images/logos/new-php-logo.svg"
6
+ width="150">
7
+ </a>
8
+ </div>
9
+
10
+ # The PHP Interpreter
11
+
12
+ PHP is a popular general-purpose scripting language that is especially suited to
13
+ web development. Fast, flexible and pragmatic, PHP powers everything from your
14
+ blog to the most popular websites in the world. PHP is distributed under the
15
+ [PHP License v3.01](LICENSE).
16
+
17
+ [![Push](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg)](https://github.com/php/php-src/actions/workflows/push.yml)
18
+ [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/php.svg)](https://issues.oss-fuzz.com/issues?q=project:php)
19
+
20
+ ## Documentation
21
+
22
+ The PHP manual is available at [php.net/docs](https://www.php.net/docs).
23
+
24
+ ## Installation
25
+
26
+ ### Prebuilt packages and binaries
27
+
28
+ Prebuilt packages and binaries can be used to get up and running fast with PHP.
29
+
30
+ For Windows, the PHP binaries can be obtained from
31
+ [windows.php.net](https://windows.php.net). After extracting the archive the
32
+ `*.exe` files are ready to use.
33
+
34
+ For other systems, see the [installation chapter](https://www.php.net/install).
35
+
36
+ ### Building PHP source code
37
+
38
+ *For Windows, see [Build your own PHP on Windows](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2).*
39
+
40
+ For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For
41
+ a default build, you will additionally need libxml2 and libsqlite3.
42
+
43
+ On Ubuntu, you can install these using:
44
+
45
+ ```shell
46
+ sudo apt install -y pkg-config build-essential autoconf bison re2c libxml2-dev libsqlite3-dev
47
+ ```
48
+
49
+ On Fedora, you can install these using:
50
+
51
+ ```shell
52
+ sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-devel
53
+ ```
54
+
55
+ On MacOS, you can install these using `brew`:
56
+
57
+ ```shell
58
+ brew install autoconf bison re2c libiconv libxml2 sqlite
59
+ ```
60
+
61
+ or with `MacPorts`:
62
+
63
+ ```shell
64
+ sudo port install autoconf bison re2c libiconv libxml2 sqlite3
65
+ ```
66
+
67
+ Generate configure:
68
+
69
+ ```shell
70
+ ./buildconf
71
+ ```
72
+
73
+ Configure your build. `--enable-debug` is recommended for development, see
74
+ `./configure --help` for a full list of options.
75
+
76
+ ```shell
77
+ # For development
78
+ ./configure --enable-debug
79
+ # For production
80
+ ./configure
81
+ ```
82
+
83
+ Build PHP. To speed up the build, specify the maximum number of jobs using the
84
+ `-j` argument:
85
+
86
+ ```shell
87
+ make -j4
88
+ ```
89
+
90
+ The number of jobs should usually match the number of available cores, which
91
+ can be determined using `nproc`.
92
+
93
+ ## Testing PHP source code
94
+
95
+ PHP ships with an extensive test suite, the command `make test` is used after
96
+ successful compilation of the sources to run this test suite.
97
+
98
+ It is possible to run tests using multiple cores by setting `-jN` in
99
+ `TEST_PHP_ARGS` or `TESTS`:
100
+
101
+ ```shell
102
+ make TEST_PHP_ARGS=-j4 test
103
+ ```
104
+
105
+ Shall run `make test` with a maximum of 4 concurrent jobs: Generally the maximum
106
+ number of jobs should not exceed the number of cores available.
107
+
108
+ Use the `TEST_PHP_ARGS` or `TESTS` variable to test only specific directories:
109
+
110
+ ```shell
111
+ make TESTS=tests/lang/ test
112
+ ```
113
+
114
+ The [qa.php.net](https://qa.php.net) site provides more detailed info about
115
+ testing and quality assurance.
116
+
117
+ ## Installing PHP built from source
118
+
119
+ After a successful build (and test), PHP may be installed with:
120
+
121
+ ```shell
122
+ make install
123
+ ```
124
+
125
+ Depending on your permissions and prefix, `make install` may need superuser
126
+ permissions.
127
+
128
+ ## PHP extensions
129
+
130
+ Extensions provide additional functionality on top of PHP. PHP consists of many
131
+ essential bundled extensions. Additional extensions can be found in the PHP
132
+ Extension Community Library - [PECL](https://pecl.php.net).
133
+
134
+ ## Contributing
135
+
136
+ The PHP source code is located in the Git repository at
137
+ [github.com/php/php-src](https://github.com/php/php-src). Contributions are most
138
+ welcome by forking the repository and sending a pull request.
139
+
140
+ Discussions are done on GitHub, but depending on the topic can also be relayed
141
+ to the official PHP developer mailing list internals@lists.php.net.
142
+
143
+ New features require an RFC and must be accepted by the developers. See
144
+ [Request for comments - RFC](https://wiki.php.net/rfc) and
145
+ [Voting on PHP features](https://wiki.php.net/rfc/voting) for more information
146
+ on the process.
147
+
148
+ Bug fixes don't require an RFC. If the bug has a GitHub issue, reference it in
149
+ the commit message using `GH-NNNNNN`. Use `#NNNNNN` for tickets in the old
150
+ [bugs.php.net](https://bugs.php.net) bug tracker.
151
+
152
+ Fix GH-7815: php_uname doesn't recognise latest Windows versions
153
+ Fix #55371: get_magic_quotes_gpc() throws deprecation warning
154
+
155
+ See [Git workflow](https://wiki.php.net/vcs/gitworkflow) for details on how pull
156
+ requests are merged.
157
+
158
+ ### Guidelines for contributors
159
+
160
+ See further documents in the repository for more information on how to
161
+ contribute:
162
+
163
+ - [Contributing to PHP](/CONTRIBUTING.md)
164
+ - [PHP coding standards](/CODING_STANDARDS.md)
165
+ - [Internal documentation](https://php.github.io/php-src/)
166
+ - [Mailing list rules](/docs/mailinglist-rules.md)
167
+ - [PHP release process](/docs/release-process.md)
168
+
169
+ ## Credits
170
+
171
+ For the list of people who've put work into PHP, please see the
172
+ [PHP credits page](https://www.php.net/credits.php).
php/readme-redist-bins.txt ADDED
@@ -0,0 +1,682 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1. libmagic (ext/fileinfo) see ext/fileinfo/libmagic/LICENSE
2
+ 2. libmbfl (ext/mbstring) see ext/mbstring/libmbfl/LICENSE
3
+ 3. pcre2lib (ext/pcre)
4
+ 4. ext/standard crypt
5
+ 5. ext/standard crypt's blowfish implementation
6
+ 6. ext/standard/rand
7
+ 7. ext/standard/scanf
8
+ 8. ext/standard/strnatcmp.c
9
+ 9. ext/standard/uuencode
10
+ 10. main/snprintf.c
11
+ 11. main/strlcat
12
+ 12. main/strlcpy
13
+ 13. libgd (ext/gd)
14
+ 14. ext/phar portions of tar implementations
15
+ 15. ext/phar/zip.c portion extracted from libzip
16
+ 16. libbcmath (ext/bcmath) see ext/bcmath/libbcmath/LICENSE
17
+ 17. ext/mbstring/ucgendat portions based on the ucgendat.c from the OpenLDAP
18
+ 18. avifinfo (ext/standard/libavifinfo) see ext/standard/libavifinfo/LICENSE
19
+ 19. xxHash (ext/hash/xxhash)
20
+ 20. Lexbor (ext/lexbor/lexbor) see ext/lexbor/LICENSE
21
+ 21. Portions of libcperciva (ext/hash/hash_sha_{ni,sse2}.c) see the header in the source file
22
+ 22. uriparser (ext/uri/uriparser) see ext/uri/uriparser/COPYING
23
+
24
+ 3. pcre2lib (ext/pcre)
25
+
26
+ PCRE2 LICENCE
27
+ -------------
28
+
29
+ PCRE2 is a library of functions to support regular expressions whose syntax
30
+ and semantics are as close as possible to those of the Perl 5 language.
31
+
32
+ Releases 10.00 and above of PCRE2 are distributed under the terms of the "BSD"
33
+ licence, as specified below, with one exemption for certain binary
34
+ redistributions. The documentation for PCRE2, supplied in the "doc" directory,
35
+ is distributed under the same terms as the software itself. The data in the
36
+ testdata directory is not copyrighted and is in the public domain.
37
+
38
+ The basic library functions are written in C and are freestanding. Also
39
+ included in the distribution is a just-in-time compiler that can be used to
40
+ optimize pattern matching. This is an optional feature that can be omitted when
41
+ the library is built.
42
+
43
+
44
+ THE BASIC LIBRARY FUNCTIONS
45
+ ---------------------------
46
+
47
+ Written by: Philip Hazel
48
+ Email local part: ph10
49
+ Email domain: cam.ac.uk
50
+
51
+ University of Cambridge Computing Service,
52
+ Cambridge, England.
53
+
54
+ Copyright (c) 1997-2019 University of Cambridge
55
+ All rights reserved.
56
+
57
+
58
+ PCRE2 JUST-IN-TIME COMPILATION SUPPORT
59
+ --------------------------------------
60
+
61
+ Written by: Zoltan Herczeg
62
+ Email local part: hzmester
63
+ Email domain: freemail.hu
64
+
65
+ Copyright(c) 2010-2019 Zoltan Herczeg
66
+ All rights reserved.
67
+
68
+
69
+ STACK-LESS JUST-IN-TIME COMPILER
70
+ --------------------------------
71
+
72
+ Written by: Zoltan Herczeg
73
+ Email local part: hzmester
74
+ Email domain: freemail.hu
75
+
76
+ Copyright(c) 2009-2019 Zoltan Herczeg
77
+ All rights reserved.
78
+
79
+
80
+ THE "BSD" LICENCE
81
+ -----------------
82
+
83
+ Redistribution and use in source and binary forms, with or without
84
+ modification, are permitted provided that the following conditions are met:
85
+
86
+ * Redistributions of source code must retain the above copyright notices,
87
+ this list of conditions and the following disclaimer.
88
+
89
+ * Redistributions in binary form must reproduce the above copyright
90
+ notices, this list of conditions and the following disclaimer in the
91
+ documentation and/or other materials provided with the distribution.
92
+
93
+ * Neither the name of the University of Cambridge nor the names of any
94
+ contributors may be used to endorse or promote products derived from this
95
+ software without specific prior written permission.
96
+
97
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
98
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
99
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
100
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
101
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
102
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
103
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
104
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
105
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
106
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
107
+ POSSIBILITY OF SUCH DAMAGE.
108
+
109
+
110
+ EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES
111
+ ------------------------------------------
112
+
113
+ The second condition in the BSD licence (covering binary redistributions) does
114
+ not apply all the way down a chain of software. If binary package A includes
115
+ PCRE2, it must respect the condition, but if package B is software that
116
+ includes package A, the condition is not imposed on package B unless it uses
117
+ PCRE2 independently.
118
+
119
+ End
120
+
121
+
122
+ 4. ext/standard crypt
123
+
124
+ FreeSec: libcrypt for NetBSD
125
+
126
+ Copyright (c) 1994 David Burren
127
+ All rights reserved.
128
+
129
+ Redistribution and use in source and binary forms, with or without
130
+ modification, are permitted provided that the following conditions
131
+ are met:
132
+ 1. Redistributions of source code must retain the above copyright
133
+ notice, this list of conditions and the following disclaimer.
134
+ 2. Redistributions in binary form must reproduce the above copyright
135
+ notice, this list of conditions and the following disclaimer in the
136
+ documentation and/or other materials provided with the distribution.
137
+ 3. Neither the name of the author nor the names of other contributors
138
+ may be used to endorse or promote products derived from this software
139
+ without specific prior written permission.
140
+
141
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
142
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
143
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
144
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
145
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
146
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
147
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
148
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
149
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
150
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
151
+ SUCH DAMAGE.
152
+
153
+
154
+ 5. ext/standard crypt's blowfish implementation
155
+
156
+ The crypt_blowfish homepage is:
157
+
158
+ http://www.openwall.com/crypt/
159
+
160
+ This code comes from John the Ripper password cracker, with reentrant
161
+ and crypt(3) interfaces added, but optimizations specific to password
162
+ cracking removed.
163
+
164
+ Written by Solar Designer <solar at openwall.com> in 1998-2011.
165
+ No copyright is claimed, and the software is hereby placed in the public
166
+ domain. In case this attempt to disclaim copyright and place the software
167
+ in the public domain is deemed null and void, then the software is
168
+ Copyright (c) 1998-2011 Solar Designer and it is hereby released to the
169
+ general public under the following terms:
170
+
171
+ Redistribution and use in source and binary forms, with or without
172
+ modification, are permitted.
173
+
174
+ There's ABSOLUTELY NO WARRANTY, express or implied.
175
+
176
+ It is my intent that you should be able to use this on your system,
177
+ as part of a software package, or anywhere else to improve security,
178
+ ensure compatibility, or for any other purpose. I would appreciate
179
+ it if you give credit where it is due and keep your modifications in
180
+ the public domain as well, but I don't require that in order to let
181
+ you place this code and any modifications you make under a license
182
+ of your choice.
183
+
184
+ This implementation is mostly compatible with OpenBSD's bcrypt.c (prefix
185
+ "$2a$") by Niels Provos <provos at citi.umich.edu>, and uses some of his
186
+ ideas. The password hashing algorithm was designed by David Mazieres
187
+ <dm at lcs.mit.edu>. For more information on the level of compatibility,
188
+ please refer to the comments in BF_set_key() and to the crypt(3) man page
189
+ included in the crypt_blowfish tarball.
190
+
191
+ There's a paper on the algorithm that explains its design decisions:
192
+
193
+ http://www.usenix.org/events/usenix99/provos.html
194
+
195
+ Some of the tricks in BF_ROUND might be inspired by Eric Young's
196
+ Blowfish library (I can't be sure if I would think of something if I
197
+ hadn't seen his code).
198
+
199
+
200
+ 6. ext/standard/rand
201
+
202
+ The following php_mt_...() functions are based on a C++ class MTRand by
203
+ Richard J. Wagner. For more information see the web page at
204
+ http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html
205
+
206
+ Mersenne Twister random number generator -- a C++ class MTRand
207
+ Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
208
+ Richard J. Wagner v1.0 15 May 2003 rjwagner@writeme.com
209
+
210
+ The Mersenne Twister is an algorithm for generating random numbers. It
211
+ was designed with consideration of the flaws in various other generators.
212
+ The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
213
+ are far greater. The generator is also fast; it avoids multiplication and
214
+ division, and it benefits from caches and pipelines. For more information
215
+ see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html
216
+
217
+ Reference
218
+ M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
219
+ Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on
220
+ Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
221
+
222
+ Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
223
+ Copyright (C) 2000 - 2003, Richard J. Wagner
224
+ All rights reserved.
225
+
226
+ Redistribution and use in source and binary forms, with or without
227
+ modification, are permitted provided that the following conditions
228
+ are met:
229
+
230
+ 1. Redistributions of source code must retain the above copyright
231
+ notice, this list of conditions and the following disclaimer.
232
+
233
+ 2. Redistributions in binary form must reproduce the above copyright
234
+ notice, this list of conditions and the following disclaimer in the
235
+ documentation and/or other materials provided with the distribution.
236
+
237
+ 3. The names of its contributors may not be used to endorse or promote
238
+ products derived from this software without specific prior written
239
+ permission.
240
+
241
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
242
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
243
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
244
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
245
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
246
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
247
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
248
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
249
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
250
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
251
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
252
+
253
+
254
+ 7. ext/standard/scanf
255
+
256
+ scanf.c --
257
+
258
+ This file contains the base code which implements sscanf and by extension
259
+ fscanf. Original code is from TCL8.3.0 and bears the following copyright:
260
+
261
+ This software is copyrighted by the Regents of the University of
262
+ California, Sun Microsystems, Inc., Scriptics Corporation,
263
+ and other parties. The following terms apply to all files associated
264
+ with the software unless explicitly disclaimed in individual files.
265
+
266
+ The authors hereby grant permission to use, copy, modify, distribute,
267
+ and license this software and its documentation for any purpose, provided
268
+ that existing copyright notices are retained in all copies and that this
269
+ notice is included verbatim in any distributions. No written agreement,
270
+ license, or royalty fee is required for any of the authorized uses.
271
+ Modifications to this software may be copyrighted by their authors
272
+ and need not follow the licensing terms described here, provided that
273
+ the new terms are clearly indicated on the first page of each file where
274
+ they apply.
275
+
276
+ IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
277
+ FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
278
+ ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
279
+ DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
280
+ POSSIBILITY OF SUCH DAMAGE.
281
+
282
+ THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
283
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
284
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
285
+ IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
286
+ NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
287
+ MODIFICATIONS.
288
+
289
+ GOVERNMENT USE: If you are acquiring this software on behalf of the
290
+ U.S. government, the Government shall have only "Restricted Rights"
291
+ in the software and related documentation as defined in the Federal
292
+ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
293
+ are acquiring the software on behalf of the Department of Defense, the
294
+ software shall be classified as "Commercial Computer Software" and the
295
+ Government shall have only "Restricted Rights" as defined in Clause
296
+ 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
297
+ authors grant the U.S. Government and others acting in its behalf
298
+ permission to use and distribute the software in accordance with the
299
+ terms specified in this license.
300
+
301
+
302
+ 8. ext/standard/strnatcmp.c
303
+
304
+ strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
305
+ Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
306
+
307
+ This software is provided 'as-is', without any express or implied
308
+ warranty. In no event will the authors be held liable for any damages
309
+ arising from the use of this software.
310
+
311
+ Permission is granted to anyone to use this software for any purpose,
312
+ including commercial applications, and to alter it and redistribute it
313
+ freely, subject to the following restrictions:
314
+
315
+ 1. The origin of this software must not be misrepresented; you must not
316
+ claim that you wrote the original software. If you use this software
317
+ in a product, an acknowledgment in the product documentation would be
318
+ appreciated but is not required.
319
+ 2. Altered source versions must be plainly marked as such, and must not be
320
+ misrepresented as being the original software.
321
+ 3. This notice may not be removed or altered from any source distribution.
322
+
323
+
324
+ 9. ext/standard/uuencode
325
+
326
+ Portions of this code are based on Berkeley's uuencode/uudecode
327
+ implementation.
328
+
329
+ Copyright (c) 1983, 1993
330
+ The Regents of the University of California. All rights reserved.
331
+
332
+ Redistribution and use in source and binary forms, with or without
333
+ modification, are permitted provided that the following conditions
334
+ are met:
335
+ 1. Redistributions of source code must retain the above copyright
336
+ notice, this list of conditions and the following disclaimer.
337
+ 2. Redistributions in binary form must reproduce the above copyright
338
+ notice, this list of conditions and the following disclaimer in the
339
+ documentation and/or other materials provided with the distribution.
340
+ 3. All advertising materials mentioning features or use of this software
341
+ must display the following acknowledgement:
342
+ This product includes software developed by the University of
343
+ California, Berkeley and its contributors.
344
+ 4. Neither the name of the University nor the names of its contributors
345
+ may be used to endorse or promote products derived from this software
346
+ without specific prior written permission.
347
+
348
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
349
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
350
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
351
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
352
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
353
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
354
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
355
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
356
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
357
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
358
+ SUCH DAMAGE.
359
+
360
+
361
+ 10. main/snprintf.c
362
+
363
+ Copyright (c) 2002, 2006 Todd C. Miller <Todd.Miller@courtesan.com>
364
+
365
+ Permission to use, copy, modify, and distribute this software for any
366
+ purpose with or without fee is hereby granted, provided that the above
367
+ copyright notice and this permission notice appear in all copies.
368
+
369
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
370
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
371
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
372
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
373
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
374
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
375
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
376
+
377
+ Sponsored in part by the Defense Advanced Research Projects
378
+ Agency (DARPA) and Air Force Research Laboratory, Air Force
379
+ Materiel Command, USAF, under agreement number F39502-99-1-0512.
380
+
381
+ main/spprintf
382
+ Copyright (c) 1995-1998 The Apache Group. All rights reserved.
383
+
384
+ Redistribution and use in source and binary forms, with or without
385
+ modification, are permitted provided that the following conditions
386
+ are met:
387
+
388
+ 1. Redistributions of source code must retain the above copyright
389
+ notice, this list of conditions and the following disclaimer.
390
+
391
+ 2. Redistributions in binary form must reproduce the above copyright
392
+ notice, this list of conditions and the following disclaimer in
393
+ the documentation and/or other materials provided with the
394
+ distribution.
395
+
396
+ 3. All advertising materials mentioning features or use of this
397
+ software must display the following acknowledgment:
398
+ "This product includes software developed by the Apache Group
399
+ for use in the Apache HTTP server project (http://www.apache.org/)."
400
+
401
+ 4. The names "Apache Server" and "Apache Group" must not be used to
402
+ endorse or promote products derived from this software without
403
+ prior written permission.
404
+
405
+ 5. Redistributions of any form whatsoever must retain the following
406
+ acknowledgment:
407
+ "This product includes software developed by the Apache Group
408
+ for use in the Apache HTTP server project (http://www.apache.org/)."
409
+
410
+ THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
411
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
412
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
413
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
414
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
415
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
416
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
417
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
418
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
419
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
420
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
421
+ OF THE POSSIBILITY OF SUCH DAMAGE.
422
+ ====================================================================
423
+
424
+ This software consists of voluntary contributions made by many
425
+ individuals on behalf of the Apache Group and was originally based
426
+ on public domain software written at the National Center for
427
+ Supercomputing Applications, University of Illinois, Urbana-Champaign.
428
+ For more information on the Apache Group and the Apache HTTP server
429
+ project, please see <http://www.apache.org/>.
430
+
431
+ This code is based on, and used with the permission of, the
432
+ SIO stdio-replacement strx_* functions by Panos Tsirigotis
433
+ <panos@alumni.cs.colorado.edu> for xinetd.
434
+
435
+
436
+ 11. main/strlcat
437
+ 12. main/strlcpy
438
+
439
+ Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
440
+ All rights reserved.
441
+
442
+ Redistribution and use in source and binary forms, with or without
443
+ modification, are permitted provided that the following conditions
444
+ are met:
445
+ 1. Redistributions of source code must retain the above copyright
446
+ notice, this list of conditions and the following disclaimer.
447
+ 2. Redistributions in binary form must reproduce the above copyright
448
+ notice, this list of conditions and the following disclaimer in the
449
+ documentation and/or other materials provided with the distribution.
450
+ 3. The name of the author may not be used to endorse or promote products
451
+ derived from this software without specific prior written permission.
452
+
453
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
454
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
455
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
456
+ THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
457
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
458
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
459
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
460
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
461
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
462
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
463
+
464
+
465
+ 13. libgd (ext/gd)
466
+
467
+ * Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
468
+ 2002, 2003, 2004 by Cold Spring Harbor Laboratory. Funded under
469
+ Grant P41-RR02188 by the National Institutes of Health.
470
+
471
+ * Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
472
+ 2004 by Boutell.Com, Inc.
473
+
474
+ * Portions relating to GD2 format copyright 1999, 2000, 2001, 2002,
475
+ 2003, 2004 Philip Warner.
476
+
477
+ * Portions relating to PNG copyright 1999, 2000, 2001, 2002, 2003,
478
+ 2004 Greg Roelofs.
479
+
480
+ * Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002,
481
+ 2003, 2004 John Ellson (ellson@graphviz.org).
482
+
483
+ * Portions relating to gdft.c copyright 2001, 2002, 2003, 2004 John
484
+ Ellson (ellson@graphviz.org).
485
+
486
+ * Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
487
+ Pierre-Alain Joye (pierre@libgd.org).
488
+
489
+ * Portions relating to JPEG and to color quantization copyright
490
+ 2000, 2001, 2002, 2003, 2004, Doug Becker and copyright (C) 1994,
491
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas
492
+ G. Lane. This software is based in part on the work of the
493
+ Independent JPEG Group. See the file README-JPEG.TXT for more
494
+ information.
495
+
496
+ * Portions relating to GIF compression copyright 1989 by Jef
497
+ Poskanzer and David Rowley, with modifications for thread safety
498
+ by Thomas Boutell.
499
+
500
+ * Portions relating to GIF decompression copyright 1990, 1991, 1993
501
+ by David Koblas, with modifications for thread safety by Thomas
502
+ Boutell.
503
+
504
+ * Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004
505
+ Maurice Szmurlo and Johan Van den Brande.
506
+
507
+ * Portions relating to GIF animations copyright 2004 Jaakko Hyvätti
508
+ (jaakko.hyvatti@iki.fi)
509
+
510
+ Permission has been granted to copy, distribute and modify gd in
511
+ any context without fee, including a commercial application,
512
+ provided that this notice is present in user-accessible supporting
513
+ documentation.
514
+
515
+ This does not affect your ownership of the derived work itself,
516
+ and the intent is to assure proper credit for the authors of gd,
517
+ not to interfere with your productive use of gd. If you have
518
+ questions, ask. "Derived works" includes all programs that utilize
519
+ the library. Credit must be given in user-accessible
520
+ documentation.
521
+
522
+ This software is provided "AS IS." The copyright holders disclaim
523
+ all warranties, either express or implied, including but not
524
+ limited to implied warranties of merchantability and fitness for a
525
+ particular purpose, with respect to this code and accompanying
526
+ documentation.
527
+
528
+ Although their code does not appear in the current release, the
529
+ authors wish to thank David Koblas, David Rowley, and Hutchison
530
+ Avenue Software Corporation for their prior contributions.
531
+
532
+ END OF COPYRIGHT STATEMENT
533
+
534
+
535
+ 14. ext/phar portions of tar implementations
536
+
537
+ portions of tar implementations in ext/phar - phar_tar_octal() are based on an
538
+ implementation by Tim Kientzle from libarchive, licensed with this license:
539
+
540
+ Copyright (c) 2003-2007 Tim Kientzle
541
+ All rights reserved.
542
+
543
+ Redistribution and use in source and binary forms, with or without
544
+ modification, are permitted provided that the following conditions
545
+ are met:
546
+ 1. Redistributions of source code must retain the above copyright
547
+ notice, this list of conditions and the following disclaimer.
548
+ 2. Redistributions in binary form must reproduce the above copyright
549
+ notice, this list of conditions and the following disclaimer in the
550
+ documentation and/or other materials provided with the distribution.
551
+
552
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
553
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
554
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
555
+ IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
556
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
557
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
558
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
559
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
560
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
561
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
562
+
563
+
564
+ 15. ext/phar/zip.c portion extracted from libzip
565
+
566
+ zip_dirent.c -- read directory entry (local or central), clean dirent
567
+ Copyright (C) 1999, 2003, 2004, 2005 Dieter Baron and Thomas Klausner
568
+
569
+ This function is part of libzip, a library to manipulate ZIP archives.
570
+ The authors can be contacted at <nih@giga.or.at>
571
+
572
+ Redistribution and use in source and binary forms, with or without
573
+ modification, are permitted provided that the following conditions
574
+ are met:
575
+ 1. Redistributions of source code must retain the above copyright
576
+ notice, this list of conditions and the following disclaimer.
577
+ 2. Redistributions in binary form must reproduce the above copyright
578
+ notice, this list of conditions and the following disclaimer in
579
+ the documentation and/or other materials provided with the
580
+ distribution.
581
+ 3. The names of the authors may not be used to endorse or promote
582
+ products derived from this software without specific prior
583
+ written permission.
584
+
585
+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
586
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
587
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
588
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
589
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
590
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
591
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
592
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
593
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
594
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
595
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
596
+
597
+
598
+ 17. ext/mbstring/ucgendat portions based on the ucgendat.c from the OpenLDAP
599
+
600
+ The OpenLDAP Public License
601
+ Version 2.8, 17 August 2003
602
+
603
+ Redistribution and use of this software and associated documentation
604
+ ("Software"), with or without modification, are permitted provided
605
+ that the following conditions are met:
606
+
607
+ 1. Redistributions in source form must retain copyright statements
608
+ and notices,
609
+
610
+ 2. Redistributions in binary form must reproduce applicable copyright
611
+ statements and notices, this list of conditions, and the following
612
+ disclaimer in the documentation and/or other materials provided
613
+ with the distribution, and
614
+
615
+ 3. Redistributions must contain a verbatim copy of this document.
616
+
617
+ The OpenLDAP Foundation may revise this license from time to time.
618
+ Each revision is distinguished by a version number. You may use
619
+ this Software under terms of this license revision or under the
620
+ terms of any subsequent revision of the license.
621
+
622
+ THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
623
+ CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
624
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
625
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
626
+ SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
627
+ OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
628
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
629
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
630
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
631
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
632
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
633
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
634
+ POSSIBILITY OF SUCH DAMAGE.
635
+
636
+ The names of the authors and copyright holders must not be used in
637
+ advertising or otherwise to promote the sale, use or other dealing
638
+ in this Software without specific, written prior permission. Title
639
+ to copyright in this Software shall at all times remain with copyright
640
+ holders.
641
+
642
+ OpenLDAP is a registered trademark of the OpenLDAP Foundation.
643
+
644
+ Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
645
+ California, USA. All Rights Reserved. Permission to copy and
646
+ distribute verbatim copies of this document is granted.
647
+
648
+
649
+ 19. xxHash
650
+
651
+ xxHash - Extremely Fast Hash algorithm
652
+ Header File
653
+ Copyright (C) 2012-2020 Yann Collet
654
+
655
+ BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
656
+
657
+ Redistribution and use in source and binary forms, with or without
658
+ modification, are permitted provided that the following conditions are
659
+ met:
660
+
661
+ * Redistributions of source code must retain the above copyright
662
+ notice, this list of conditions and the following disclaimer.
663
+ * Redistributions in binary form must reproduce the above
664
+ copyright notice, this list of conditions and the following disclaimer
665
+ in the documentation and/or other materials provided with the
666
+ distribution.
667
+
668
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
669
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
670
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
671
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
672
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
673
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
674
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
675
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
676
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
677
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
678
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
679
+
680
+ You can contact the author at:
681
+ - xxHash homepage: https://www.xxhash.com
682
+ - xxHash source repository: https://github.com/Cyan4973/xxHash
php/snapshot.txt ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This snapshot was automatically generated on
2
+ Wed, 06 May 2026 09:36:45 +0000
3
+
4
+ Version: 8.5.6
5
+ Branch: HEAD
6
+ Build: C:\Users\runneradmin\AppData\Local\Temp\php-e122e17e-74ec-4483-853b-88ed221b3b3a\config\vs17\x64\obj\Release_TS
7
+
8
+ Built-in Extensions
9
+ ===========================
10
+ Core
11
+ bcmath
12
+ calendar
13
+ ctype
14
+ date
15
+ filter
16
+ hash
17
+ iconv
18
+ json
19
+ SPL
20
+ pcre
21
+ random
22
+ readline
23
+ Reflection
24
+ session
25
+ standard
26
+ mysqlnd
27
+ tokenizer
28
+ zlib
29
+ libxml
30
+ dom
31
+ PDO
32
+ openssl
33
+ SimpleXML
34
+ xml
35
+ xmlreader
36
+ xmlwriter
37
+ curl
38
+ ftp
39
+ sqlite3
40
+ Phar
41
+ mbstring
42
+ mysqli
43
+ zip
44
+
45
+
46
+ Dependency information:
47
+ Module: php_curl.dll
48
+ ===========================
49
+ libcrypto-3-x64.dll
50
+ libssl-3-x64.dll
51
+ libssh2.dll
52
+ nghttp2.dll
53
+ brotlidec.dll
54
+ libzstd.dll
55
+
56
+ Module: libssl-3-x64.dll
57
+ ===========================
58
+ libcrypto-3-x64.dll
59
+
60
+ Module: libssh2.dll
61
+ ===========================
62
+ libcrypto-3-x64.dll
63
+
64
+ Module: brotlidec.dll
65
+ ===========================
66
+ brotlicommon.dll
67
+
68
+ Module: php_enchant.dll
69
+ ===========================
70
+ libenchant2.dll
71
+
72
+ Module: libenchant2.dll
73
+ ===========================
74
+ glib-2.dll
75
+ gobject-2.dll
76
+ gmodule-2.dll
77
+
78
+ Module: gobject-2.dll
79
+ ===========================
80
+ glib-2.dll
81
+
82
+ Module: gmodule-2.dll
83
+ ===========================
84
+ glib-2.dll
85
+
86
+ Module: php_ftp.dll
87
+ ===========================
88
+ libcrypto-3-x64.dll
89
+ libssl-3-x64.dll
90
+
91
+ Module: php_ldap.dll
92
+ ===========================
93
+ libsasl.dll
94
+ libcrypto-3-x64.dll
95
+ libssl-3-x64.dll
96
+
97
+ Module: libsasl.dll
98
+ ===========================
99
+ libcrypto-3-x64.dll
100
+
101
+ Module: php_openssl.dll
102
+ ===========================
103
+ libcrypto-3-x64.dll
104
+ libssl-3-x64.dll
105
+
106
+ Module: php_sodium.dll
107
+ ===========================
108
+ libsodium.dll
109
+
110
+ Module: php_sqlite3.dll
111
+ ===========================
112
+ libsqlite3.dll
113
+
114
+ Module: php_intl.dll
115
+ ===========================
116
+ icuin77.dll
117
+ icuio77.dll
118
+ icuuc77.dll
119
+
120
+ Module: icuin77.dll
121
+ ===========================
122
+ icuuc77.dll
123
+
124
+ Module: icuuc77.dll
125
+ ===========================
126
+ icudt77.dll
127
+
128
+ Module: icuio77.dll
129
+ ===========================
130
+ icuuc77.dll
131
+ icuin77.dll
132
+
133
+ Module: php_pdo_pgsql.dll
134
+ ===========================
135
+ libpq.dll
136
+
137
+ Module: libpq.dll
138
+ ===========================
139
+ libssl-3-x64.dll
140
+ libcrypto-3-x64.dll
141
+
142
+ Module: php_pdo_sqlite.dll
143
+ ===========================
144
+ libsqlite3.dll
145
+
146
+ Module: php_pgsql.dll
147
+ ===========================
148
+ libpq.dll
149
+
150
+ Module: php_snmp.dll
151
+ ===========================
152
+ libcrypto-3-x64.dll
153
+ libssl-3-x64.dll
154
+
php/vcruntime140_1.dll ADDED
Binary file (49.8 kB). View file
 
python/LICENSE.txt ADDED
@@ -0,0 +1,645 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ A. HISTORY OF THE SOFTWARE
2
+ ==========================
3
+
4
+ Python was created in the early 1990s by Guido van Rossum at Stichting
5
+ Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands
6
+ as a successor of a language called ABC. Guido remains Python's
7
+ principal author, although it includes many contributions from others.
8
+
9
+ In 1995, Guido continued his work on Python at the Corporation for
10
+ National Research Initiatives (CNRI, see https://www.cnri.reston.va.us)
11
+ in Reston, Virginia where he released several versions of the
12
+ software.
13
+
14
+ In May 2000, Guido and the Python core development team moved to
15
+ BeOpen.com to form the BeOpen PythonLabs team. In October of the same
16
+ year, the PythonLabs team moved to Digital Creations, which became
17
+ Zope Corporation. In 2001, the Python Software Foundation (PSF, see
18
+ https://www.python.org/psf/) was formed, a non-profit organization
19
+ created specifically to own Python-related Intellectual Property.
20
+ Zope Corporation was a sponsoring member of the PSF.
21
+
22
+ All Python releases are Open Source (see https://opensource.org for
23
+ the Open Source Definition). Historically, most, but not all, Python
24
+ releases have also been GPL-compatible; the table below summarizes
25
+ the various releases.
26
+
27
+ Release Derived Year Owner GPL-
28
+ from compatible? (1)
29
+
30
+ 0.9.0 thru 1.2 1991-1995 CWI yes
31
+ 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
32
+ 1.6 1.5.2 2000 CNRI no
33
+ 2.0 1.6 2000 BeOpen.com no
34
+ 1.6.1 1.6 2001 CNRI yes (2)
35
+ 2.1 2.0+1.6.1 2001 PSF no
36
+ 2.0.1 2.0+1.6.1 2001 PSF yes
37
+ 2.1.1 2.1+2.0.1 2001 PSF yes
38
+ 2.1.2 2.1.1 2002 PSF yes
39
+ 2.1.3 2.1.2 2002 PSF yes
40
+ 2.2 and above 2.1.1 2001-now PSF yes
41
+
42
+ Footnotes:
43
+
44
+ (1) GPL-compatible doesn't mean that we're distributing Python under
45
+ the GPL. All Python licenses, unlike the GPL, let you distribute
46
+ a modified version without making your changes open source. The
47
+ GPL-compatible licenses make it possible to combine Python with
48
+ other software that is released under the GPL; the others don't.
49
+
50
+ (2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
51
+ because its license has a choice of law clause. According to
52
+ CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
53
+ is "not incompatible" with the GPL.
54
+
55
+ Thanks to the many outside volunteers who have worked under Guido's
56
+ direction to make these releases possible.
57
+
58
+
59
+ B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
60
+ ===============================================================
61
+
62
+ Python software and documentation are licensed under the
63
+ Python Software Foundation License Version 2.
64
+
65
+ Starting with Python 3.8.6, examples, recipes, and other code in
66
+ the documentation are dual licensed under the PSF License Version 2
67
+ and the Zero-Clause BSD license.
68
+
69
+ Some software incorporated into Python is under different licenses.
70
+ The licenses are listed with code falling under that license.
71
+
72
+
73
+ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
74
+ --------------------------------------------
75
+
76
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation
77
+ ("PSF"), and the Individual or Organization ("Licensee") accessing and
78
+ otherwise using this software ("Python") in source or binary form and
79
+ its associated documentation.
80
+
81
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
82
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
83
+ analyze, test, perform and/or display publicly, prepare derivative works,
84
+ distribute, and otherwise use Python alone or in any derivative version,
85
+ provided, however, that PSF's License Agreement and PSF's notice of copyright,
86
+ i.e., "Copyright (c) 2001-2024 Python Software Foundation; All Rights Reserved"
87
+ are retained in Python alone or in any derivative version prepared by Licensee.
88
+
89
+ 3. In the event Licensee prepares a derivative work that is based on
90
+ or incorporates Python or any part thereof, and wants to make
91
+ the derivative work available to others as provided herein, then
92
+ Licensee hereby agrees to include in any such work a brief summary of
93
+ the changes made to Python.
94
+
95
+ 4. PSF is making Python available to Licensee on an "AS IS"
96
+ basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
97
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
98
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
99
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
100
+ INFRINGE ANY THIRD PARTY RIGHTS.
101
+
102
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
103
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
104
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
105
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
106
+
107
+ 6. This License Agreement will automatically terminate upon a material
108
+ breach of its terms and conditions.
109
+
110
+ 7. Nothing in this License Agreement shall be deemed to create any
111
+ relationship of agency, partnership, or joint venture between PSF and
112
+ Licensee. This License Agreement does not grant permission to use PSF
113
+ trademarks or trade name in a trademark sense to endorse or promote
114
+ products or services of Licensee, or any third party.
115
+
116
+ 8. By copying, installing or otherwise using Python, Licensee
117
+ agrees to be bound by the terms and conditions of this License
118
+ Agreement.
119
+
120
+
121
+ BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
122
+ -------------------------------------------
123
+
124
+ BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
125
+
126
+ 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
127
+ office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
128
+ Individual or Organization ("Licensee") accessing and otherwise using
129
+ this software in source or binary form and its associated
130
+ documentation ("the Software").
131
+
132
+ 2. Subject to the terms and conditions of this BeOpen Python License
133
+ Agreement, BeOpen hereby grants Licensee a non-exclusive,
134
+ royalty-free, world-wide license to reproduce, analyze, test, perform
135
+ and/or display publicly, prepare derivative works, distribute, and
136
+ otherwise use the Software alone or in any derivative version,
137
+ provided, however, that the BeOpen Python License is retained in the
138
+ Software, alone or in any derivative version prepared by Licensee.
139
+
140
+ 3. BeOpen is making the Software available to Licensee on an "AS IS"
141
+ basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
142
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
143
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
144
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
145
+ INFRINGE ANY THIRD PARTY RIGHTS.
146
+
147
+ 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
148
+ SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
149
+ AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
150
+ DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
151
+
152
+ 5. This License Agreement will automatically terminate upon a material
153
+ breach of its terms and conditions.
154
+
155
+ 6. This License Agreement shall be governed by and interpreted in all
156
+ respects by the law of the State of California, excluding conflict of
157
+ law provisions. Nothing in this License Agreement shall be deemed to
158
+ create any relationship of agency, partnership, or joint venture
159
+ between BeOpen and Licensee. This License Agreement does not grant
160
+ permission to use BeOpen trademarks or trade names in a trademark
161
+ sense to endorse or promote products or services of Licensee, or any
162
+ third party. As an exception, the "BeOpen Python" logos available at
163
+ http://www.pythonlabs.com/logos.html may be used according to the
164
+ permissions granted on that web page.
165
+
166
+ 7. By copying, installing or otherwise using the software, Licensee
167
+ agrees to be bound by the terms and conditions of this License
168
+ Agreement.
169
+
170
+
171
+ CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
172
+ ---------------------------------------
173
+
174
+ 1. This LICENSE AGREEMENT is between the Corporation for National
175
+ Research Initiatives, having an office at 1895 Preston White Drive,
176
+ Reston, VA 20191 ("CNRI"), and the Individual or Organization
177
+ ("Licensee") accessing and otherwise using Python 1.6.1 software in
178
+ source or binary form and its associated documentation.
179
+
180
+ 2. Subject to the terms and conditions of this License Agreement, CNRI
181
+ hereby grants Licensee a nonexclusive, royalty-free, world-wide
182
+ license to reproduce, analyze, test, perform and/or display publicly,
183
+ prepare derivative works, distribute, and otherwise use Python 1.6.1
184
+ alone or in any derivative version, provided, however, that CNRI's
185
+ License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
186
+ 1995-2001 Corporation for National Research Initiatives; All Rights
187
+ Reserved" are retained in Python 1.6.1 alone or in any derivative
188
+ version prepared by Licensee. Alternately, in lieu of CNRI's License
189
+ Agreement, Licensee may substitute the following text (omitting the
190
+ quotes): "Python 1.6.1 is made available subject to the terms and
191
+ conditions in CNRI's License Agreement. This Agreement together with
192
+ Python 1.6.1 may be located on the internet using the following
193
+ unique, persistent identifier (known as a handle): 1895.22/1013. This
194
+ Agreement may also be obtained from a proxy server on the internet
195
+ using the following URL: http://hdl.handle.net/1895.22/1013".
196
+
197
+ 3. In the event Licensee prepares a derivative work that is based on
198
+ or incorporates Python 1.6.1 or any part thereof, and wants to make
199
+ the derivative work available to others as provided herein, then
200
+ Licensee hereby agrees to include in any such work a brief summary of
201
+ the changes made to Python 1.6.1.
202
+
203
+ 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
204
+ basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
205
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
206
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
207
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
208
+ INFRINGE ANY THIRD PARTY RIGHTS.
209
+
210
+ 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
211
+ 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
212
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
213
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
214
+
215
+ 6. This License Agreement will automatically terminate upon a material
216
+ breach of its terms and conditions.
217
+
218
+ 7. This License Agreement shall be governed by the federal
219
+ intellectual property law of the United States, including without
220
+ limitation the federal copyright law, and, to the extent such
221
+ U.S. federal law does not apply, by the law of the Commonwealth of
222
+ Virginia, excluding Virginia's conflict of law provisions.
223
+ Notwithstanding the foregoing, with regard to derivative works based
224
+ on Python 1.6.1 that incorporate non-separable material that was
225
+ previously distributed under the GNU General Public License (GPL), the
226
+ law of the Commonwealth of Virginia shall govern this License
227
+ Agreement only as to issues arising under or with respect to
228
+ Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
229
+ License Agreement shall be deemed to create any relationship of
230
+ agency, partnership, or joint venture between CNRI and Licensee. This
231
+ License Agreement does not grant permission to use CNRI trademarks or
232
+ trade name in a trademark sense to endorse or promote products or
233
+ services of Licensee, or any third party.
234
+
235
+ 8. By clicking on the "ACCEPT" button where indicated, or by copying,
236
+ installing or otherwise using Python 1.6.1, Licensee agrees to be
237
+ bound by the terms and conditions of this License Agreement.
238
+
239
+ ACCEPT
240
+
241
+
242
+ CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
243
+ --------------------------------------------------
244
+
245
+ Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
246
+ The Netherlands. All rights reserved.
247
+
248
+ Permission to use, copy, modify, and distribute this software and its
249
+ documentation for any purpose and without fee is hereby granted,
250
+ provided that the above copyright notice appear in all copies and that
251
+ both that copyright notice and this permission notice appear in
252
+ supporting documentation, and that the name of Stichting Mathematisch
253
+ Centrum or CWI not be used in advertising or publicity pertaining to
254
+ distribution of the software without specific, written prior
255
+ permission.
256
+
257
+ STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
258
+ THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
259
+ FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
260
+ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
261
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
262
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
263
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
264
+
265
+ ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION
266
+ ----------------------------------------------------------------------
267
+
268
+ Permission to use, copy, modify, and/or distribute this software for any
269
+ purpose with or without fee is hereby granted.
270
+
271
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
272
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
273
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
274
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
275
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
276
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
277
+ PERFORMANCE OF THIS SOFTWARE.
278
+
279
+
280
+
281
+ Additional Conditions for this Windows binary build
282
+ ---------------------------------------------------
283
+
284
+ This program is linked with and uses Microsoft Distributable Code,
285
+ copyrighted by Microsoft Corporation. The Microsoft Distributable Code
286
+ is embedded in each .exe, .dll and .pyd file as a result of running
287
+ the code through a linker.
288
+
289
+ If you further distribute programs that include the Microsoft
290
+ Distributable Code, you must comply with the restrictions on
291
+ distribution specified by Microsoft. In particular, you must require
292
+ distributors and external end users to agree to terms that protect the
293
+ Microsoft Distributable Code at least as much as Microsoft's own
294
+ requirements for the Distributable Code. See Microsoft's documentation
295
+ (included in its developer tools and on its website at microsoft.com)
296
+ for specific details.
297
+
298
+ Redistribution of the Windows binary build of the Python interpreter
299
+ complies with this agreement, provided that you do not:
300
+
301
+ - alter any copyright, trademark or patent notice in Microsoft's
302
+ Distributable Code;
303
+
304
+ - use Microsoft's trademarks in your programs' names or in a way that
305
+ suggests your programs come from or are endorsed by Microsoft;
306
+
307
+ - distribute Microsoft's Distributable Code to run on a platform other
308
+ than Microsoft operating systems, run-time technologies or application
309
+ platforms; or
310
+
311
+ - include Microsoft Distributable Code in malicious, deceptive or
312
+ unlawful programs.
313
+
314
+ These restrictions apply only to the Microsoft Distributable Code as
315
+ defined above, not to Python itself or any programs running on the
316
+ Python interpreter. The redistribution of the Python interpreter and
317
+ libraries is governed by the Python Software License included with this
318
+ file, or by other licenses as marked.
319
+
320
+
321
+
322
+ --------------------------------------------------------------------------
323
+
324
+ This program, "bzip2", the associated library "libbzip2", and all
325
+ documentation, are copyright (C) 1996-2019 Julian R Seward. All
326
+ rights reserved.
327
+
328
+ Redistribution and use in source and binary forms, with or without
329
+ modification, are permitted provided that the following conditions
330
+ are met:
331
+
332
+ 1. Redistributions of source code must retain the above copyright
333
+ notice, this list of conditions and the following disclaimer.
334
+
335
+ 2. The origin of this software must not be misrepresented; you must
336
+ not claim that you wrote the original software. If you use this
337
+ software in a product, an acknowledgment in the product
338
+ documentation would be appreciated but is not required.
339
+
340
+ 3. Altered source versions must be plainly marked as such, and must
341
+ not be misrepresented as being the original software.
342
+
343
+ 4. The name of the author may not be used to endorse or promote
344
+ products derived from this software without specific prior written
345
+ permission.
346
+
347
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
348
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
349
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
350
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
351
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
352
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
353
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
354
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
355
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
356
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
357
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
358
+
359
+ Julian Seward, jseward@acm.org
360
+ bzip2/libbzip2 version 1.0.8 of 13 July 2019
361
+
362
+ --------------------------------------------------------------------------
363
+
364
+ libffi - Copyright (c) 1996-2022 Anthony Green, Red Hat, Inc and others.
365
+ See source files for details.
366
+
367
+ Permission is hereby granted, free of charge, to any person obtaining
368
+ a copy of this software and associated documentation files (the
369
+ ``Software''), to deal in the Software without restriction, including
370
+ without limitation the rights to use, copy, modify, merge, publish,
371
+ distribute, sublicense, and/or sell copies of the Software, and to
372
+ permit persons to whom the Software is furnished to do so, subject to
373
+ the following conditions:
374
+
375
+ The above copyright notice and this permission notice shall be
376
+ included in all copies or substantial portions of the Software.
377
+
378
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
379
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
380
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
381
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
382
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
383
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
384
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
385
+
386
+
387
+ Apache License
388
+ Version 2.0, January 2004
389
+ https://www.apache.org/licenses/
390
+
391
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
392
+
393
+ 1. Definitions.
394
+
395
+ "License" shall mean the terms and conditions for use, reproduction,
396
+ and distribution as defined by Sections 1 through 9 of this document.
397
+
398
+ "Licensor" shall mean the copyright owner or entity authorized by
399
+ the copyright owner that is granting the License.
400
+
401
+ "Legal Entity" shall mean the union of the acting entity and all
402
+ other entities that control, are controlled by, or are under common
403
+ control with that entity. For the purposes of this definition,
404
+ "control" means (i) the power, direct or indirect, to cause the
405
+ direction or management of such entity, whether by contract or
406
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
407
+ outstanding shares, or (iii) beneficial ownership of such entity.
408
+
409
+ "You" (or "Your") shall mean an individual or Legal Entity
410
+ exercising permissions granted by this License.
411
+
412
+ "Source" form shall mean the preferred form for making modifications,
413
+ including but not limited to software source code, documentation
414
+ source, and configuration files.
415
+
416
+ "Object" form shall mean any form resulting from mechanical
417
+ transformation or translation of a Source form, including but
418
+ not limited to compiled object code, generated documentation,
419
+ and conversions to other media types.
420
+
421
+ "Work" shall mean the work of authorship, whether in Source or
422
+ Object form, made available under the License, as indicated by a
423
+ copyright notice that is included in or attached to the work
424
+ (an example is provided in the Appendix below).
425
+
426
+ "Derivative Works" shall mean any work, whether in Source or Object
427
+ form, that is based on (or derived from) the Work and for which the
428
+ editorial revisions, annotations, elaborations, or other modifications
429
+ represent, as a whole, an original work of authorship. For the purposes
430
+ of this License, Derivative Works shall not include works that remain
431
+ separable from, or merely link (or bind by name) to the interfaces of,
432
+ the Work and Derivative Works thereof.
433
+
434
+ "Contribution" shall mean any work of authorship, including
435
+ the original version of the Work and any modifications or additions
436
+ to that Work or Derivative Works thereof, that is intentionally
437
+ submitted to Licensor for inclusion in the Work by the copyright owner
438
+ or by an individual or Legal Entity authorized to submit on behalf of
439
+ the copyright owner. For the purposes of this definition, "submitted"
440
+ means any form of electronic, verbal, or written communication sent
441
+ to the Licensor or its representatives, including but not limited to
442
+ communication on electronic mailing lists, source code control systems,
443
+ and issue tracking systems that are managed by, or on behalf of, the
444
+ Licensor for the purpose of discussing and improving the Work, but
445
+ excluding communication that is conspicuously marked or otherwise
446
+ designated in writing by the copyright owner as "Not a Contribution."
447
+
448
+ "Contributor" shall mean Licensor and any individual or Legal Entity
449
+ on behalf of whom a Contribution has been received by Licensor and
450
+ subsequently incorporated within the Work.
451
+
452
+ 2. Grant of Copyright License. Subject to the terms and conditions of
453
+ this License, each Contributor hereby grants to You a perpetual,
454
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
455
+ copyright license to reproduce, prepare Derivative Works of,
456
+ publicly display, publicly perform, sublicense, and distribute the
457
+ Work and such Derivative Works in Source or Object form.
458
+
459
+ 3. Grant of Patent License. Subject to the terms and conditions of
460
+ this License, each Contributor hereby grants to You a perpetual,
461
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
462
+ (except as stated in this section) patent license to make, have made,
463
+ use, offer to sell, sell, import, and otherwise transfer the Work,
464
+ where such license applies only to those patent claims licensable
465
+ by such Contributor that are necessarily infringed by their
466
+ Contribution(s) alone or by combination of their Contribution(s)
467
+ with the Work to which such Contribution(s) was submitted. If You
468
+ institute patent litigation against any entity (including a
469
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
470
+ or a Contribution incorporated within the Work constitutes direct
471
+ or contributory patent infringement, then any patent licenses
472
+ granted to You under this License for that Work shall terminate
473
+ as of the date such litigation is filed.
474
+
475
+ 4. Redistribution. You may reproduce and distribute copies of the
476
+ Work or Derivative Works thereof in any medium, with or without
477
+ modifications, and in Source or Object form, provided that You
478
+ meet the following conditions:
479
+
480
+ (a) You must give any other recipients of the Work or
481
+ Derivative Works a copy of this License; and
482
+
483
+ (b) You must cause any modified files to carry prominent notices
484
+ stating that You changed the files; and
485
+
486
+ (c) You must retain, in the Source form of any Derivative Works
487
+ that You distribute, all copyright, patent, trademark, and
488
+ attribution notices from the Source form of the Work,
489
+ excluding those notices that do not pertain to any part of
490
+ the Derivative Works; and
491
+
492
+ (d) If the Work includes a "NOTICE" text file as part of its
493
+ distribution, then any Derivative Works that You distribute must
494
+ include a readable copy of the attribution notices contained
495
+ within such NOTICE file, excluding those notices that do not
496
+ pertain to any part of the Derivative Works, in at least one
497
+ of the following places: within a NOTICE text file distributed
498
+ as part of the Derivative Works; within the Source form or
499
+ documentation, if provided along with the Derivative Works; or,
500
+ within a display generated by the Derivative Works, if and
501
+ wherever such third-party notices normally appear. The contents
502
+ of the NOTICE file are for informational purposes only and
503
+ do not modify the License. You may add Your own attribution
504
+ notices within Derivative Works that You distribute, alongside
505
+ or as an addendum to the NOTICE text from the Work, provided
506
+ that such additional attribution notices cannot be construed
507
+ as modifying the License.
508
+
509
+ You may add Your own copyright statement to Your modifications and
510
+ may provide additional or different license terms and conditions
511
+ for use, reproduction, or distribution of Your modifications, or
512
+ for any such Derivative Works as a whole, provided Your use,
513
+ reproduction, and distribution of the Work otherwise complies with
514
+ the conditions stated in this License.
515
+
516
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
517
+ any Contribution intentionally submitted for inclusion in the Work
518
+ by You to the Licensor shall be under the terms and conditions of
519
+ this License, without any additional terms or conditions.
520
+ Notwithstanding the above, nothing herein shall supersede or modify
521
+ the terms of any separate license agreement you may have executed
522
+ with Licensor regarding such Contributions.
523
+
524
+ 6. Trademarks. This License does not grant permission to use the trade
525
+ names, trademarks, service marks, or product names of the Licensor,
526
+ except as required for reasonable and customary use in describing the
527
+ origin of the Work and reproducing the content of the NOTICE file.
528
+
529
+ 7. Disclaimer of Warranty. Unless required by applicable law or
530
+ agreed to in writing, Licensor provides the Work (and each
531
+ Contributor provides its Contributions) on an "AS IS" BASIS,
532
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
533
+ implied, including, without limitation, any warranties or conditions
534
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
535
+ PARTICULAR PURPOSE. You are solely responsible for determining the
536
+ appropriateness of using or redistributing the Work and assume any
537
+ risks associated with Your exercise of permissions under this License.
538
+
539
+ 8. Limitation of Liability. In no event and under no legal theory,
540
+ whether in tort (including negligence), contract, or otherwise,
541
+ unless required by applicable law (such as deliberate and grossly
542
+ negligent acts) or agreed to in writing, shall any Contributor be
543
+ liable to You for damages, including any direct, indirect, special,
544
+ incidental, or consequential damages of any character arising as a
545
+ result of this License or out of the use or inability to use the
546
+ Work (including but not limited to damages for loss of goodwill,
547
+ work stoppage, computer failure or malfunction, or any and all
548
+ other commercial damages or losses), even if such Contributor
549
+ has been advised of the possibility of such damages.
550
+
551
+ 9. Accepting Warranty or Additional Liability. While redistributing
552
+ the Work or Derivative Works thereof, You may choose to offer,
553
+ and charge a fee for, acceptance of support, warranty, indemnity,
554
+ or other liability obligations and/or rights consistent with this
555
+ License. However, in accepting such obligations, You may act only
556
+ on Your own behalf and on Your sole responsibility, not on behalf
557
+ of any other Contributor, and only if You agree to indemnify,
558
+ defend, and hold each Contributor harmless for any liability
559
+ incurred by, or claims asserted against, such Contributor by reason
560
+ of your accepting any such warranty or additional liability.
561
+
562
+ END OF TERMS AND CONDITIONS
563
+
564
+ This software is copyrighted by the Regents of the University of
565
+ California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
566
+ Corporation and other parties. The following terms apply to all files
567
+ associated with the software unless explicitly disclaimed in
568
+ individual files.
569
+
570
+ The authors hereby grant permission to use, copy, modify, distribute,
571
+ and license this software and its documentation for any purpose, provided
572
+ that existing copyright notices are retained in all copies and that this
573
+ notice is included verbatim in any distributions. No written agreement,
574
+ license, or royalty fee is required for any of the authorized uses.
575
+ Modifications to this software may be copyrighted by their authors
576
+ and need not follow the licensing terms described here, provided that
577
+ the new terms are clearly indicated on the first page of each file where
578
+ they apply.
579
+
580
+ IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
581
+ FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
582
+ ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
583
+ DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
584
+ POSSIBILITY OF SUCH DAMAGE.
585
+
586
+ THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
587
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
588
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
589
+ IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
590
+ NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
591
+ MODIFICATIONS.
592
+
593
+ GOVERNMENT USE: If you are acquiring this software on behalf of the
594
+ U.S. government, the Government shall have only "Restricted Rights"
595
+ in the software and related documentation as defined in the Federal
596
+ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
597
+ are acquiring the software on behalf of the Department of Defense, the
598
+ software shall be classified as "Commercial Computer Software" and the
599
+ Government shall have only "Restricted Rights" as defined in Clause
600
+ 252.227-7014 (b) (3) of DFARs. Notwithstanding the foregoing, the
601
+ authors grant the U.S. Government and others acting in its behalf
602
+ permission to use and distribute the software in accordance with the
603
+ terms specified in this license.
604
+
605
+ This software is copyrighted by the Regents of the University of
606
+ California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
607
+ Corporation, Apple Inc. and other parties. The following terms apply to
608
+ all files associated with the software unless explicitly disclaimed in
609
+ individual files.
610
+
611
+ The authors hereby grant permission to use, copy, modify, distribute,
612
+ and license this software and its documentation for any purpose, provided
613
+ that existing copyright notices are retained in all copies and that this
614
+ notice is included verbatim in any distributions. No written agreement,
615
+ license, or royalty fee is required for any of the authorized uses.
616
+ Modifications to this software may be copyrighted by their authors
617
+ and need not follow the licensing terms described here, provided that
618
+ the new terms are clearly indicated on the first page of each file where
619
+ they apply.
620
+
621
+ IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
622
+ FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
623
+ ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
624
+ DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
625
+ POSSIBILITY OF SUCH DAMAGE.
626
+
627
+ THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
628
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
629
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
630
+ IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
631
+ NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
632
+ MODIFICATIONS.
633
+
634
+ GOVERNMENT USE: If you are acquiring this software on behalf of the
635
+ U.S. government, the Government shall have only "Restricted Rights"
636
+ in the software and related documentation as defined in the Federal
637
+ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
638
+ are acquiring the software on behalf of the Department of Defense, the
639
+ software shall be classified as "Commercial Computer Software" and the
640
+ Government shall have only "Restricted Rights" as defined in Clause
641
+ 252.227-7013 (b) (3) of DFARs. Notwithstanding the foregoing, the
642
+ authors grant the U.S. Government and others acting in its behalf
643
+ permission to use and distribute the software in accordance with the
644
+ terms specified in this license.
645
+
python/get-pip.py ADDED
The diff for this file is too large to render. See raw diff
 
python/libffi-8.dll ADDED
Binary file (39.7 kB). View file
 
python/python3.dll ADDED
Binary file (72.5 kB). View file
 
python/python313._pth ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ python313.zip
2
+ .
3
+
4
+ # Uncomment to run site.main() automatically
5
+ import site
python/select.pyd ADDED
Binary file (33.1 kB). View file
 
sqlite_gui/bearer/qgenericbearer.dll ADDED
Binary file (53.2 kB). View file
 
sqlite_gui/extensions/formats.dll ADDED
Binary file (23.6 kB). View file
 
sqlite_gui/extensions/math.dll ADDED
Binary file (37.9 kB). View file
 
svn/Licenses/APR License.txt ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+
204
+
205
+ APACHE PORTABLE RUNTIME SUBCOMPONENTS:
206
+
207
+ The Apache Portable Runtime includes a number of subcomponents with
208
+ separate copyright notices and license terms. Your use of the source
209
+ code for the these subcomponents is subject to the terms and
210
+ conditions of the following licenses.
211
+
212
+ From strings/apr_fnmatch.c, include/apr_fnmatch.h, misc/unix/getopt.c,
213
+ file_io/unix/mktemp.c, strings/apr_strings.c:
214
+
215
+ /*
216
+ * Copyright (c) 1987, 1993, 1994
217
+ * The Regents of the University of California. All rights reserved.
218
+ *
219
+ * Redistribution and use in source and binary forms, with or without
220
+ * modification, are permitted provided that the following conditions
221
+ * are met:
222
+ * 1. Redistributions of source code must retain the above copyright
223
+ * notice, this list of conditions and the following disclaimer.
224
+ * 2. Redistributions in binary form must reproduce the above copyright
225
+ * notice, this list of conditions and the following disclaimer in the
226
+ * documentation and/or other materials provided with the distribution.
227
+ * 3. All advertising materials mentioning features or use of this software
228
+ * must display the following acknowledgement:
229
+ * This product includes software developed by the University of
230
+ * California, Berkeley and its contributors.
231
+ * 4. Neither the name of the University nor the names of its contributors
232
+ * may be used to endorse or promote products derived from this software
233
+ * without specific prior written permission.
234
+ *
235
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
236
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
237
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
238
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
239
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
240
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
241
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
242
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
243
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
244
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
245
+ * SUCH DAMAGE.
246
+
247
+ From network_io/unix/inet_ntop.c, network_io/unix/inet_pton.c:
248
+
249
+ /* Copyright (c) 1996 by Internet Software Consortium.
250
+ *
251
+ * Permission to use, copy, modify, and distribute this software for any
252
+ * purpose with or without fee is hereby granted, provided that the above
253
+ * copyright notice and this permission notice appear in all copies.
254
+ *
255
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
256
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
257
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
258
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
259
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
260
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
261
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
262
+ * SOFTWARE.
263
+
264
+ From dso/aix/dso.c:
265
+
266
+ * Based on libdl (dlfcn.c/dlfcn.h) which is
267
+ * Copyright (c) 1992,1993,1995,1996,1997,1988
268
+ * Jens-Uwe Mager, Helios Software GmbH, Hannover, Germany.
269
+ *
270
+ * Not derived from licensed software.
271
+ *
272
+ * Permission is granted to freely use, copy, modify, and redistribute
273
+ * this software, provided that the author is not construed to be liable
274
+ * for any results of using the software, alterations are clearly marked
275
+ * as such, and this notice is not modified.
276
+
277
+ From strings/apr_strnatcmp.c, include/apr_strings.h:
278
+
279
+ strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
280
+ Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
281
+
282
+ This software is provided 'as-is', without any express or implied
283
+ warranty. In no event will the authors be held liable for any damages
284
+ arising from the use of this software.
285
+
286
+ Permission is granted to anyone to use this software for any purpose,
287
+ including commercial applications, and to alter it and redistribute it
288
+ freely, subject to the following restrictions:
289
+
290
+ 1. The origin of this software must not be misrepresented; you must not
291
+ claim that you wrote the original software. If you use this software
292
+ in a product, an acknowledgment in the product documentation would be
293
+ appreciated but is not required.
294
+ 2. Altered source versions must be plainly marked as such, and must not be
295
+ misrepresented as being the original software.
296
+ 3. This notice may not be removed or altered from any source distribution.
297
+
svn/Licenses/APR Util License.txt ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+
204
+
205
+ APACHE PORTABLE RUNTIME SUBCOMPONENTS:
206
+
207
+ The Apache Portable Runtime includes a number of subcomponents with
208
+ separate copyright notices and license terms. Your use of the source
209
+ code for the these subcomponents is subject to the terms and
210
+ conditions of the following licenses.
211
+
212
+ For the include\apr_md5.h component:
213
+ /*
214
+ * This is work is derived from material Copyright RSA Data Security, Inc.
215
+ *
216
+ * The RSA copyright statement and Licence for that original material is
217
+ * included below. This is followed by the Apache copyright statement and
218
+ * licence for the modifications made to that material.
219
+ */
220
+
221
+ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
222
+ rights reserved.
223
+
224
+ License to copy and use this software is granted provided that it
225
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
226
+ Algorithm" in all material mentioning or referencing this software
227
+ or this function.
228
+
229
+ License is also granted to make and use derivative works provided
230
+ that such works are identified as "derived from the RSA Data
231
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
232
+ mentioning or referencing the derived work.
233
+
234
+ RSA Data Security, Inc. makes no representations concerning either
235
+ the merchantability of this software or the suitability of this
236
+ software for any particular purpose. It is provided "as is"
237
+ without express or implied warranty of any kind.
238
+
239
+ These notices must be retained in any copies of any part of this
240
+ documentation and/or software.
241
+ */
242
+
243
+ For the passwd\apr_md5.c component:
244
+
245
+ /*
246
+ * This is work is derived from material Copyright RSA Data Security, Inc.
247
+ *
248
+ * The RSA copyright statement and Licence for that original material is
249
+ * included below. This is followed by the Apache copyright statement and
250
+ * licence for the modifications made to that material.
251
+ */
252
+
253
+ /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
254
+ */
255
+
256
+ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
257
+ rights reserved.
258
+
259
+ License to copy and use this software is granted provided that it
260
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
261
+ Algorithm" in all material mentioning or referencing this software
262
+ or this function.
263
+
264
+ License is also granted to make and use derivative works provided
265
+ that such works are identified as "derived from the RSA Data
266
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
267
+ mentioning or referencing the derived work.
268
+
269
+ RSA Data Security, Inc. makes no representations concerning either
270
+ the merchantability of this software or the suitability of this
271
+ software for any particular purpose. It is provided "as is"
272
+ without express or implied warranty of any kind.
273
+
274
+ These notices must be retained in any copies of any part of this
275
+ documentation and/or software.
276
+ */
277
+ /*
278
+ * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0
279
+ * MD5 crypt() function, which is licenced as follows:
280
+ * ----------------------------------------------------------------------------
281
+ * "THE BEER-WARE LICENSE" (Revision 42):
282
+ * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
283
+ * can do whatever you want with this stuff. If we meet some day, and you think
284
+ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
285
+ * ----------------------------------------------------------------------------
286
+ */
287
+
288
+ For the crypto\apr_md4.c component:
289
+
290
+ * This is derived from material copyright RSA Data Security, Inc.
291
+ * Their notice is reproduced below in its entirety.
292
+ *
293
+ * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
294
+ * rights reserved.
295
+ *
296
+ * License to copy and use this software is granted provided that it
297
+ * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
298
+ * Algorithm" in all material mentioning or referencing this software
299
+ * or this function.
300
+ *
301
+ * License is also granted to make and use derivative works provided
302
+ * that such works are identified as "derived from the RSA Data
303
+ * Security, Inc. MD4 Message-Digest Algorithm" in all material
304
+ * mentioning or referencing the derived work.
305
+ *
306
+ * RSA Data Security, Inc. makes no representations concerning either
307
+ * the merchantability of this software or the suitability of this
308
+ * software for any particular purpose. It is provided "as is"
309
+ * without express or implied warranty of any kind.
310
+ *
311
+ * These notices must be retained in any copies of any part of this
312
+ * documentation and/or software.
313
+ */
314
+
315
+ For the include\apr_md4.h component:
316
+
317
+ *
318
+ * This is derived from material copyright RSA Data Security, Inc.
319
+ * Their notice is reproduced below in its entirety.
320
+ *
321
+ * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
322
+ * rights reserved.
323
+ *
324
+ * License to copy and use this software is granted provided that it
325
+ * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
326
+ * Algorithm" in all material mentioning or referencing this software
327
+ * or this function.
328
+ *
329
+ * License is also granted to make and use derivative works provided
330
+ * that such works are identified as "derived from the RSA Data
331
+ * Security, Inc. MD4 Message-Digest Algorithm" in all material
332
+ * mentioning or referencing the derived work.
333
+ *
334
+ * RSA Data Security, Inc. makes no representations concerning either
335
+ * the merchantability of this software or the suitability of this
336
+ * software for any particular purpose. It is provided "as is"
337
+ * without express or implied warranty of any kind.
338
+ *
339
+ * These notices must be retained in any copies of any part of this
340
+ * documentation and/or software.
341
+ */
342
+
343
+ For the test\testmd4.c component:
344
+
345
+ *
346
+ * This is derived from material copyright RSA Data Security, Inc.
347
+ * Their notice is reproduced below in its entirety.
348
+ *
349
+ * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
350
+ * rights reserved.
351
+ *
352
+ * RSA Data Security, Inc. makes no representations concerning either
353
+ * the merchantability of this software or the suitability of this
354
+ * software for any particular purpose. It is provided "as is"
355
+ * without express or implied warranty of any kind.
356
+ *
357
+ * These notices must be retained in any copies of any part of this
358
+ * documentation and/or software.
359
+ */
360
+
361
+ For the xml\expat\conftools\install-sh component:
362
+
363
+ #
364
+ # install - install a program, script, or datafile
365
+ # This comes from X11R5 (mit/util/scripts/install.sh).
366
+ #
367
+ # Copyright 1991 by the Massachusetts Institute of Technology
368
+ #
369
+ # Permission to use, copy, modify, distribute, and sell this software and its
370
+ # documentation for any purpose is hereby granted without fee, provided that
371
+ # the above copyright notice appear in all copies and that both that
372
+ # copyright notice and this permission notice appear in supporting
373
+ # documentation, and that the name of M.I.T. not be used in advertising or
374
+ # publicity pertaining to distribution of the software without specific,
375
+ # written prior permission. M.I.T. makes no representations about the
376
+ # suitability of this software for any purpose. It is provided "as is"
377
+ # without express or implied warranty.
378
+ #
379
+
380
+ For the expat xml parser component:
381
+
382
+ Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
383
+ and Clark Cooper
384
+
385
+ Permission is hereby granted, free of charge, to any person obtaining
386
+ a copy of this software and associated documentation files (the
387
+ "Software"), to deal in the Software without restriction, including
388
+ without limitation the rights to use, copy, modify, merge, publish,
389
+ distribute, sublicense, and/or sell copies of the Software, and to
390
+ permit persons to whom the Software is furnished to do so, subject to
391
+ the following conditions:
392
+
393
+ The above copyright notice and this permission notice shall be included
394
+ in all copies or substantial portions of the Software.
395
+
396
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
397
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
398
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
399
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
400
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
401
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
402
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
403
+
404
+ ====================================================================
svn/Licenses/OpenSSL License.txt ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ https://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
svn/Licenses/Subversion License.txt ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+
204
+
205
+ SUBVERSION SUBCOMPONENTS:
206
+
207
+ Subversion includes a number of subcomponents with separate copyright
208
+ notices and license terms. Your use of the source code for the these
209
+ subcomponents is subject to the terms and conditions of the following
210
+ licenses.
211
+
212
+ For portions of the Python bindings test suite at
213
+ subversion/bindings/swig/python/tests/trac/:
214
+
215
+ I. Licensed to the Apache Software Foundation (ASF) under one
216
+ or more contributor license agreements. See the NOTICE file
217
+ distributed with this work for additional information
218
+ regarding copyright ownership. The ASF licenses this file
219
+ to you under the Apache License, Version 2.0 (the
220
+ "License"); you may not use this file except in compliance
221
+ with the License. You may obtain a copy of the License at
222
+
223
+ http://www.apache.org/licenses/LICENSE-2.0
224
+
225
+ Unless required by applicable law or agreed to in writing,
226
+ software distributed under the License is distributed on an
227
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
228
+ KIND, either express or implied. See the License for the
229
+ specific language governing permissions and limitations
230
+ under the License.
231
+
232
+ II. Copyright (C) 2003, 2004, 2005 Edgewall Software
233
+ Copyright (C) 2003, 2004, 2005 Jonas Borgström <jonas@edgewall.com>
234
+ Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
235
+
236
+ All rights reserved.
237
+
238
+ Redistribution and use in source and binary forms, with or without
239
+ modification, are permitted provided that the following conditions
240
+ are met:
241
+
242
+ 1. Redistributions of source code must retain the above copyright
243
+ notice, this list of conditions and the following disclaimer.
244
+ 2. Redistributions in binary form must reproduce the above copyright
245
+ notice, this list of conditions and the following disclaimer in the
246
+ the documentation and/or other materials provided with the
247
+ distribution.
248
+ 3. The name of the author may not be used to endorse or promote
249
+ products derived from this software without specific prior written
250
+ permission.
251
+
252
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS
253
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
254
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
255
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
256
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
257
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
258
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
259
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
260
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
261
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
262
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
svn/Licenses/ZLib License.txt ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright notice:
2
+
3
+ (C) 1995-2004 Jean-loup Gailly and Mark Adler
4
+
5
+ This software is provided 'as-is', without any express or implied
6
+ warranty. In no event will the authors be held liable for any damages
7
+ arising from the use of this software.
8
+
9
+ Permission is granted to anyone to use this software for any purpose,
10
+ including commercial applications, and to alter it and redistribute it
11
+ freely, subject to the following restrictions:
12
+
13
+ 1. The origin of this software must not be misrepresented; you must not
14
+ claim that you wrote the original software. If you use this software
15
+ in a product, an acknowledgment in the product documentation would be
16
+ appreciated but is not required.
17
+ 2. Altered source versions must be plainly marked as such, and must not be
18
+ misrepresented as being the original software.
19
+ 3. This notice may not be removed or altered from any source distribution.
20
+
21
+ Jean-loup Gailly Mark Adler
22
+ jloup@gzip.org madler@alumni.caltech.edu
23
+
24
+ If you use the zlib library in a product, we would appreciate *not*
25
+ receiving lengthy legal documents to sign. The sources are provided
26
+ for free but without warranty of any kind. The library has been
27
+ entirely written by Jean-loup Gailly and Mark Adler; it does not
28
+ include third-party code.
29
+
30
+ If you redistribute modified sources, we would appreciate that you include
31
+ in the file ChangeLog history information documenting your changes. Please
32
+ read the FAQ for more information on the distribution of modified source
33
+ versions.
svn/bin/libsvn_diff-1.dll ADDED
Binary file (84 kB). View file
 
svn/bin/libsvn_fs-1.dll ADDED
Binary file (47.1 kB). View file
 
svn/bin/libsvn_fs_util-1.dll ADDED
Binary file (21.5 kB). View file
 
svn/bin/svnadmin.exe ADDED
Binary file (95.7 kB). View file
 
svn/bin/svnbench.exe ADDED
Binary file (60.4 kB). View file
 
svn/bin/svndumpfilter.exe ADDED
Binary file (38.4 kB). View file
 
svn/bin/svnfsfs.exe ADDED
Binary file (43 kB). View file
 
svn/bin/svnlook.exe ADDED
Binary file (67.6 kB). View file
 
svn/bin/svnmucc.exe ADDED
Binary file (32.8 kB). View file
 
svn/bin/svnrdump.exe ADDED
Binary file (47.1 kB). View file
 
svn/bin/svnsync.exe ADDED
Binary file (54.3 kB). View file
 
svn/bin/svnversion.exe ADDED
Binary file (24.1 kB). View file
 
svn/bin/vcruntime140_1.dll ADDED
Binary file (49.8 kB). View file
 
tensorrt/doc/Acknowledgements.txt ADDED
The diff for this file is too large to render. See raw diff
 
tensorrt/doc/README.txt ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === NVIDIA TensorRT ===
2
+
3
+ NVIDIA® TensorRT™ is a C++ library that facilitates high-performance inference
4
+ on NVIDIA GPUs. TensorRT takes a trained network, which consists of a network
5
+ definition and a set of trained parameters, and produces a highly optimized
6
+ runtime engine that performs inference for that network. TensorRT provides APIs
7
+ using C++ and Python that help to express deep learning models using the Network
8
+ Definition API or load a pre-defined model using the parsers that allow TensorRT
9
+ to optimize and run them on an NVIDIA GPU. TensorRT applies graph optimizations,
10
+ layer fusion, among other optimizations, while also finding the fastest
11
+ implementation of that model leveraging a diverse collection of highly optimized
12
+ kernels. TensorRT also supplies a runtime that you can use to execute this
13
+ network on NVIDIA’s GPUs.
14
+
15
+ For more information about TensorRT, visit https://developer.nvidia.com/tensorrt.
16
+
17
+ In previous TensorRT releases, PDF documentation was included inside the TensorRT
18
+ package. The PDF documentation has been removed from the package in favor of
19
+ online documentation, which is updated regularly. Online documentation can be
20
+ found at https://docs.nvidia.com/deeplearning/tensorrt/latest/index.html.
21
+
22
+ For details on TensorRT's license agreement, visit https://docs.nvidia.com/deeplearning/tensorrt/latest/reference/sla.html.
23
+
24
+ === References ===
25
+
26
+ Quick Start Guide: https://docs.nvidia.com/deeplearning/tensorrt/latest/getting-started/quick-start-guide.html
27
+ Release Notes: https://docs.nvidia.com/deeplearning/tensorrt/latest/getting-started/release-notes.html
28
+ Support Matrix: https://docs.nvidia.com/deeplearning/tensorrt/latest/getting-started/support-matrix.html
29
+ Installation Guide: https://docs.nvidia.com/deeplearning/tensorrt/latest/installing-tensorrt/overview.html
30
+ C++ API: https://docs.nvidia.com/deeplearning/tensorrt/latest/inference-library/c-api-docs.html
31
+ Python API: https://docs.nvidia.com/deeplearning/tensorrt/latest/inference-library/python-api-docs.html
tensorrt/include/NvInfer.h ADDED
The diff for this file is too large to render. See raw diff
 
tensorrt/include/NvInferImpl.h ADDED
@@ -0,0 +1,1469 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_IMPL_H
19
+ #define NV_INFER_IMPL_H
20
+
21
+ #include "NvInferLegacyDims.h"
22
+ #include "NvInferRuntimeCommon.h"
23
+
24
+ // @cond SuppressDoxyWarnings
25
+
26
+ namespace nvinfer1
27
+ {
28
+
29
+ class ILogger;
30
+
31
+ namespace v_1_0
32
+ {
33
+ class IProgressMonitor;
34
+ } // namespace v_1_0
35
+ using IProgressMonitor = v_1_0::IProgressMonitor;
36
+
37
+ namespace v_1_0
38
+ {
39
+ class IAlgorithmSelector;
40
+ } // namespace v_1_0
41
+ using IAlgorithmSelector = v_1_0::IAlgorithmSelector;
42
+
43
+ namespace v_1_0
44
+ {
45
+ class IProfiler;
46
+ } // namespace v_1_0
47
+ using IProfiler = v_1_0::IProfiler;
48
+
49
+ namespace v_1_0
50
+ {
51
+ class IOutputAllocator;
52
+ } // namespace v_1_0
53
+ using IOutputAllocator = v_1_0::IOutputAllocator;
54
+
55
+ namespace v_1_0
56
+ {
57
+ class IDebugListener;
58
+ } // namespace v_1_0
59
+ using IDebugListener = v_1_0::IDebugListener;
60
+
61
+ class IActivationLayer;
62
+ class IAlgorithm;
63
+ class IAlgorithmContext;
64
+ class IAlgorithmIOInfo;
65
+ class IAlgorithmVariant;
66
+ class IAssertionLayer;
67
+ class IAttention;
68
+ class IBuilder;
69
+ class IBuilderConfig;
70
+ class IConcatenationLayer;
71
+ class IConditionLayer;
72
+ class IConstantLayer;
73
+ class IConvolutionLayer;
74
+ class ICudaEngine;
75
+ class ICumulativeLayer;
76
+ class IDeconvolutionLayer;
77
+ class IDequantizeLayer;
78
+ class IDimensionExpr;
79
+ class IDynamicQuantizeLayer;
80
+ class IEinsumLayer;
81
+ class IElementWiseLayer;
82
+ class IEngineInspector;
83
+ class IExecutionContext;
84
+ class IFillLayer;
85
+ class IGatherLayer;
86
+ class IGridSampleLayer;
87
+ class IHostMemory;
88
+ class IIdentityLayer;
89
+ class ICastLayer;
90
+ class IIfConditional;
91
+ class IIfConditionalInputLayer;
92
+ class IIfConditionalOutputLayer;
93
+ class IInt8Calibrator;
94
+ class IIteratorLayer;
95
+ class IKVCacheUpdateLayer;
96
+ class ILayer;
97
+ class ILoop;
98
+ class ILoopOutputLayer;
99
+ class ILRNLayer;
100
+ class IMatrixMultiplyLayer;
101
+ class IMoELayer;
102
+ class IDistCollectiveLayer;
103
+ class INetworkDefinition;
104
+ class INormalizationLayer;
105
+ class INMSLayer;
106
+ class INonZeroLayer;
107
+ class IOneHotLayer;
108
+ class IOptimizationProfile;
109
+ class IPaddingLayer;
110
+ class IParametricReLULayer;
111
+ class IPlugin;
112
+ class IPluginExt;
113
+ class IPluginFactory;
114
+ class IPluginLayer;
115
+ class IPluginRegistry;
116
+ class IPluginV2Layer;
117
+ class IRotaryEmbeddingLayer;
118
+ class IRuntimeConfig;
119
+
120
+ namespace v_1_0
121
+ {
122
+ class IPluginV3;
123
+ } // namespace v_1_0
124
+ using IPluginV3 = v_1_0::IPluginV3;
125
+
126
+ namespace v_1_0
127
+ {
128
+ class IStreamReader;
129
+ class IStreamWriter;
130
+ } // namespace v_1_0
131
+ using IStreamReader = v_1_0::IStreamReader;
132
+ using IStreamWriter = v_1_0::IStreamWriter;
133
+ namespace v_1_0
134
+ {
135
+ class IStreamReaderV2;
136
+ } // namespace v_1_0
137
+ using IStreamReaderV2 = v_1_0::IStreamReaderV2;
138
+
139
+ class IPluginV3Layer;
140
+ class IPoolingLayer;
141
+ class IQuantizeLayer;
142
+ class IRaggedSoftMaxLayer;
143
+ class IRecurrenceLayer;
144
+ class IReduceLayer;
145
+ class IRefitter;
146
+ class IResizeLayer;
147
+ class IReverseSequenceLayer;
148
+ class IRuntime;
149
+ class IScaleLayer;
150
+ class IScatterLayer;
151
+ class ISelectLayer;
152
+ class ISerializationConfig;
153
+ class IShapeLayer;
154
+ class IShuffleLayer;
155
+ class ISliceLayer;
156
+ class ISoftMaxLayer;
157
+ class ISqueezeLayer;
158
+ class ITensor;
159
+
160
+ namespace v_1_0
161
+ {
162
+ struct TimingCacheKey;
163
+ struct TimingCacheValue;
164
+ } // namespace v_1_0
165
+ using TimingCacheKey = v_1_0::TimingCacheKey;
166
+ using TimingCacheValue = v_1_0::TimingCacheValue;
167
+
168
+ class ITimingCache;
169
+ class ITopKLayer;
170
+ class ITripLimitLayer;
171
+ class IUnaryLayer;
172
+ class IUnsqueezeLayer;
173
+ struct Permutation;
174
+ class Weights;
175
+
176
+ enum class ActivationType : int32_t;
177
+ enum class AttentionNormalizationOp : int32_t;
178
+ enum class BoundingBoxFormat : int32_t;
179
+ enum class BuilderFlag : int32_t;
180
+ enum class CalibrationAlgoType : int32_t;
181
+ enum class CumulativeOperation : int32_t;
182
+ enum class DeviceType : int32_t;
183
+ enum class DimensionOperation : int32_t;
184
+ enum class ElementWiseOperation : int32_t;
185
+ enum class EngineCapability : int32_t;
186
+ enum class FillOperation : int32_t;
187
+ enum class GatherMode : int32_t;
188
+ enum class KVCacheMode : int32_t;
189
+ enum class LayerInformationFormat : int32_t;
190
+ enum class LayerType : int32_t;
191
+ enum class LoopOutput : int32_t;
192
+ enum class MatrixOperation : int32_t;
193
+ enum class MemoryPoolType : int32_t;
194
+ enum class MoEActType : int32_t;
195
+ enum class NetworkDefinitionCreationFlag : int32_t;
196
+ enum class OptProfileSelector : int32_t;
197
+ enum class PaddingMode : int32_t;
198
+ enum class PoolingType : int32_t;
199
+ enum class ProfilingVerbosity : int32_t;
200
+ enum class QuantizationFlag : int32_t;
201
+ enum class ReduceOperation : int32_t;
202
+ enum class CollectiveOperation : int32_t;
203
+ enum class ResizeCoordinateTransformation : int32_t;
204
+ enum class InterpolationMode : int32_t;
205
+ enum class ResizeRoundMode : int32_t;
206
+ enum class ResizeSelector : int32_t;
207
+ enum class ScaleMode : int32_t;
208
+ enum class ScatterMode : int32_t;
209
+ enum class SampleMode : int32_t;
210
+ enum class SerializationFlag : int32_t;
211
+ enum class TensorIOMode : int32_t;
212
+ enum class TensorLocation : int32_t;
213
+ enum class TopKOperation : int32_t;
214
+ enum class TripLimit : int32_t;
215
+ enum class UnaryOperation : int32_t;
216
+ enum class WeightsRole : int32_t;
217
+ enum class PreviewFeature : int32_t;
218
+ enum class HardwareCompatibilityLevel : int32_t;
219
+ enum class ExecutionContextAllocationStrategy : int32_t;
220
+ enum class RuntimePlatform : int32_t;
221
+ enum class TilingOptimizationLevel : int32_t;
222
+ enum class EngineStat : int32_t;
223
+
224
+
225
+ using TacticSources = uint32_t;
226
+ using TensorFormats = uint32_t;
227
+ using BuilderFlags = uint32_t;
228
+ using NetworkDefinitionCreationFlags = uint32_t;
229
+ using QuantizationFlags = uint32_t;
230
+ using TempfileControlFlags = uint32_t;
231
+ using SerializationFlags = uint32_t;
232
+
233
+ //!
234
+ //! \file NvInferImpl.h
235
+ //!
236
+ //! This file contains definitions for API methods that cross the shared library boundary. These
237
+ //! methods must not be called directly by applications; they should only be called through the
238
+ //! API classes.
239
+ //!
240
+
241
+ namespace apiv
242
+ {
243
+
244
+ class VRoot
245
+ {
246
+ public:
247
+ virtual ~VRoot() noexcept = default;
248
+ };
249
+
250
+ class VHostMemory : public VRoot
251
+ {
252
+ public:
253
+ virtual void* data() const noexcept = 0;
254
+ virtual std::size_t size() const noexcept = 0;
255
+ virtual DataType type() const noexcept = 0;
256
+ };
257
+
258
+ class VDimensionExpr : public VRoot
259
+ {
260
+ public:
261
+ virtual bool isConstant() const = 0;
262
+ virtual int64_t getConstantValue() const = 0;
263
+ virtual bool isSizeTensor() const = 0;
264
+ };
265
+
266
+ class VExprBuilder : public VRoot
267
+ {
268
+ public:
269
+ virtual IDimensionExpr const* constant(int64_t value) = 0;
270
+ virtual IDimensionExpr const* operation(
271
+ DimensionOperation op, IDimensionExpr const& first, IDimensionExpr const& second)
272
+ = 0;
273
+ virtual IDimensionExpr const* declareSizeTensor(
274
+ int32_t outputIndex, IDimensionExpr const& opt, IDimensionExpr const& upper)
275
+ = 0;
276
+ };
277
+
278
+ class VRuntime : public VRoot
279
+ {
280
+ public:
281
+ virtual IRuntime* getPImpl() noexcept = 0;
282
+ virtual nvinfer1::ICudaEngine* deserializeCudaEngine(void const* blob, std::size_t size) noexcept = 0;
283
+ virtual nvinfer1::ICudaEngine* deserializeCudaEngine(IStreamReader& streamReader) noexcept = 0;
284
+ virtual void setDLACore(int32_t dlaCore) noexcept = 0;
285
+ virtual int32_t getDLACore() const noexcept = 0;
286
+ virtual int32_t getNbDLACores() const noexcept = 0;
287
+ virtual void setGpuAllocator(IGpuAllocator* allocator) noexcept = 0;
288
+ virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
289
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
290
+ virtual ILogger* getLogger() const noexcept = 0;
291
+ virtual bool setMaxThreads(int32_t maxThreads) noexcept = 0;
292
+ virtual int32_t getMaxThreads() const noexcept = 0;
293
+ virtual void setTemporaryDirectory(char const*) noexcept = 0;
294
+ virtual char const* getTemporaryDirectory() const noexcept = 0;
295
+ virtual void setTempfileControlFlags(TempfileControlFlags) noexcept = 0;
296
+ virtual TempfileControlFlags getTempfileControlFlags() const noexcept = 0;
297
+ virtual IPluginRegistry& getPluginRegistry() noexcept = 0;
298
+ virtual void setPluginRegistryParent(IPluginRegistry* parent) noexcept = 0;
299
+ virtual IRuntime* loadRuntime(char const* path) noexcept = 0;
300
+ virtual void setEngineHostCodeAllowed(bool allowed) noexcept = 0;
301
+ virtual bool getEngineHostCodeAllowed() const noexcept = 0;
302
+ // Added in TensorRT version 10.7
303
+ virtual nvinfer1::ICudaEngine* deserializeCudaEngineV2(IStreamReaderV2& streamReader) noexcept = 0;
304
+ };
305
+
306
+ class VRefitter : public VRoot
307
+ {
308
+ public:
309
+ virtual IRefitter* getPImpl() noexcept = 0;
310
+ virtual bool setWeights(char const* layerName, WeightsRole role, const Weights weights) noexcept = 0;
311
+ virtual bool refitCudaEngine() noexcept = 0;
312
+ virtual int32_t getMissing(int32_t size, char const** layerNames, WeightsRole* roles) noexcept = 0;
313
+ virtual int32_t getAll(int32_t size, char const** layerNames, WeightsRole* roles) noexcept = 0;
314
+ virtual bool setDynamicRange(char const* tensorName, float min, float max) noexcept = 0;
315
+ virtual float getDynamicRangeMin(char const* tensorName) const noexcept = 0;
316
+ virtual float getDynamicRangeMax(char const* tensorName) const noexcept = 0;
317
+ virtual int32_t getTensorsWithDynamicRange(int32_t size, char const** tensorNames) const noexcept = 0;
318
+ virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
319
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
320
+ virtual bool setNamedWeights(char const* name, Weights weights) noexcept = 0;
321
+ virtual int32_t getMissingWeights(int32_t size, char const** weightsNames) noexcept = 0;
322
+ virtual int32_t getAllWeights(int32_t size, char const** weightsNames) noexcept = 0;
323
+ virtual ILogger* getLogger() const noexcept = 0;
324
+ virtual bool setMaxThreads(int32_t maxThreads) noexcept = 0;
325
+ virtual int32_t getMaxThreads() const noexcept = 0;
326
+ virtual bool setNamedWeightsWithLocation(char const* name, Weights weights, TensorLocation location) noexcept = 0;
327
+ virtual Weights getNamedWeights(char const* weightsName) const noexcept = 0;
328
+ virtual TensorLocation getWeightsLocation(char const* weightsName) const noexcept = 0;
329
+ virtual bool unsetNamedWeights(char const* weightsName) noexcept = 0;
330
+ virtual void setWeightsValidation(bool weightsValidation) noexcept = 0;
331
+ virtual bool getWeightsValidation() const noexcept = 0;
332
+ virtual bool refitCudaEngineAsync(cudaStream_t stream) noexcept = 0;
333
+ virtual Weights getWeightsPrototype(char const* weightsName) const noexcept = 0;
334
+ };
335
+
336
+ class VOptimizationProfile : public VRoot
337
+ {
338
+ public:
339
+ virtual bool setDimensions(char const* inputName, OptProfileSelector select, Dims const& dims) noexcept = 0;
340
+ virtual Dims getDimensions(char const* inputName, OptProfileSelector select) const noexcept = 0;
341
+ virtual bool setShapeValues(
342
+ char const* inputName, OptProfileSelector select, int32_t const* values, int32_t nbValues) noexcept = 0;
343
+ virtual int32_t getNbShapeValues(char const* inputName) const noexcept = 0;
344
+ virtual int32_t const* getShapeValues(char const* inputName, OptProfileSelector select) const noexcept = 0;
345
+ virtual bool setExtraMemoryTarget(float target) noexcept = 0;
346
+ virtual float getExtraMemoryTarget() const noexcept = 0;
347
+ virtual bool isValid() const noexcept = 0;
348
+ // Added in TensorRT 10.11
349
+ TRT_NODISCARD virtual bool setShapeValuesV2(
350
+ char const* inputName, OptProfileSelector select, int64_t const* values, int32_t nbValues) noexcept = 0;
351
+ TRT_NODISCARD virtual int64_t const* getShapeValuesV2(
352
+ char const* inputName, OptProfileSelector select) const noexcept = 0;
353
+ };
354
+
355
+ class VCudaEngine : public VRoot
356
+ {
357
+ public:
358
+ virtual ICudaEngine* getPImpl() noexcept = 0;
359
+ virtual int32_t getNbLayers() const noexcept = 0;
360
+ virtual IHostMemory* serialize() const noexcept = 0;
361
+ virtual IExecutionContext* createExecutionContext(ExecutionContextAllocationStrategy strategy) noexcept = 0;
362
+ virtual IExecutionContext* createExecutionContextWithoutDeviceMemory() noexcept = 0;
363
+ virtual size_t getDeviceMemorySize() const noexcept = 0;
364
+ virtual bool isRefittable() const noexcept = 0;
365
+ virtual char const* getName() const noexcept = 0;
366
+ virtual int32_t getNbOptimizationProfiles() const noexcept = 0;
367
+ virtual int32_t const* getProfileTensorValues(
368
+ char const* tensorName, int32_t profileIndex, OptProfileSelector select) const noexcept = 0;
369
+ virtual EngineCapability getEngineCapability() const noexcept = 0;
370
+ virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
371
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
372
+ virtual bool hasImplicitBatchDimension() const noexcept = 0;
373
+ virtual TacticSources getTacticSources() const noexcept = 0;
374
+ virtual ProfilingVerbosity getProfilingVerbosity() const noexcept = 0;
375
+ virtual IEngineInspector* createEngineInspector() const noexcept = 0;
376
+ virtual Dims getTensorShape(char const* tensorName) const noexcept = 0;
377
+ virtual DataType getTensorDataType(char const* tensorName) const noexcept = 0;
378
+ virtual TensorLocation getTensorLocation(char const* tensorName) const noexcept = 0;
379
+ virtual bool isShapeInferenceIO(char const* tensorName) const noexcept = 0;
380
+ virtual TensorIOMode getTensorIOMode(char const* tensorName) const noexcept = 0;
381
+ virtual int32_t getTensorBytesPerComponent(char const* tensorName) const noexcept = 0;
382
+ virtual int32_t getTensorComponentsPerElement(char const* tensorName) const noexcept = 0;
383
+ virtual TensorFormat getTensorFormat(char const* tensorName) const noexcept = 0;
384
+ virtual char const* getTensorFormatDesc(char const* tensorName) const noexcept = 0;
385
+ virtual int32_t getTensorVectorizedDim(char const* tensorName) const noexcept = 0;
386
+ virtual Dims getProfileShape(
387
+ char const* tensorName, int32_t profileIndex, OptProfileSelector select) const noexcept = 0;
388
+ virtual int32_t getNbIOTensors() const noexcept = 0;
389
+ virtual char const* getIOTensorName(int32_t index) const noexcept = 0;
390
+ virtual HardwareCompatibilityLevel getHardwareCompatibilityLevel() const noexcept = 0;
391
+ virtual int32_t getNbAuxStreams() const noexcept = 0;
392
+
393
+ virtual int32_t getTensorBytesPerComponentV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
394
+ virtual int32_t getTensorComponentsPerElementV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
395
+ virtual TensorFormat getTensorFormatV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
396
+ virtual char const* getTensorFormatDescV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
397
+ virtual int32_t getTensorVectorizedDimV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
398
+
399
+ virtual ISerializationConfig* createSerializationConfig() noexcept = 0;
400
+ virtual IHostMemory* serializeWithConfig(ISerializationConfig& config) const noexcept = 0;
401
+
402
+ virtual size_t getDeviceMemorySizeForProfile(int32_t profileIndex) const noexcept = 0;
403
+ virtual IRefitter* createRefitter(ILogger& logger) noexcept = 0;
404
+
405
+ virtual bool setWeightStreamingBudget(int64_t gpuMemoryBudget) noexcept = 0;
406
+ virtual int64_t getWeightStreamingBudget() const noexcept = 0;
407
+ virtual int64_t getMinimumWeightStreamingBudget() const noexcept = 0;
408
+ virtual int64_t getStreamableWeightsSize() const noexcept = 0;
409
+
410
+ virtual bool isDebugTensor(char const* name) const noexcept = 0;
411
+
412
+ // Added in TensorRT 10.1
413
+ virtual bool setWeightStreamingBudgetV2(int64_t gpuMemoryBudget) noexcept = 0;
414
+ virtual int64_t getWeightStreamingBudgetV2() const noexcept = 0;
415
+ virtual int64_t getWeightStreamingAutomaticBudget() const noexcept = 0;
416
+ virtual int64_t getWeightStreamingScratchMemorySize() const noexcept = 0;
417
+ virtual int64_t getDeviceMemorySizeV2() const noexcept = 0;
418
+ virtual int64_t getDeviceMemorySizeForProfileV2(int32_t profileIndex) const noexcept = 0;
419
+ // Added in TensorRT 10.11
420
+ TRT_NODISCARD virtual int64_t const* getProfileTensorValuesV2(
421
+ char const* tensorName, int32_t profileIndex, OptProfileSelector select) const noexcept = 0;
422
+ TRT_NODISCARD virtual IExecutionContext* createExecutionContextWithRuntimeConfig(
423
+ IRuntimeConfig* runtimeConfig) noexcept = 0;
424
+ TRT_NODISCARD virtual IRuntimeConfig* createRuntimeConfig() noexcept = 0;
425
+ TRT_NODISCARD virtual int64_t getEngineStat(EngineStat stat) const noexcept = 0;
426
+ // Added in TensorRT 10.15
427
+ TRT_NODISCARD virtual char const* getAliasedInputTensor(char const* tensorName) const noexcept = 0;
428
+ };
429
+
430
+ class VExecutionContext : public VRoot
431
+ {
432
+ public:
433
+ virtual IExecutionContext* getPImpl() noexcept = 0;
434
+ virtual void setDebugSync(bool sync) noexcept = 0;
435
+ virtual bool getDebugSync() const noexcept = 0;
436
+ virtual void setProfiler(IProfiler*) noexcept = 0;
437
+ virtual IProfiler* getProfiler() const noexcept = 0;
438
+ virtual ICudaEngine const& getEngine() const noexcept = 0;
439
+ virtual void setName(char const* name) noexcept = 0;
440
+ virtual char const* getName() const noexcept = 0;
441
+ virtual void setDeviceMemory(void* memory) noexcept = 0;
442
+ virtual int32_t getOptimizationProfile() const noexcept = 0;
443
+ virtual bool allInputDimensionsSpecified() const noexcept = 0;
444
+ virtual bool allInputShapesSpecified() const noexcept = 0;
445
+ virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
446
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
447
+ virtual bool executeV2(void* const* bindings) noexcept = 0;
448
+ virtual bool setOptimizationProfileAsync(int32_t profileIndex, cudaStream_t stream) noexcept = 0;
449
+ virtual void setEnqueueEmitsProfile(bool enqueueEmitsProfile) noexcept = 0;
450
+ virtual bool getEnqueueEmitsProfile() const noexcept = 0;
451
+ virtual bool reportToProfiler() const noexcept = 0;
452
+ virtual bool setInputShape(char const* tensorName, Dims const& dims) noexcept = 0;
453
+ virtual Dims getTensorShape(char const* tensorName) const noexcept = 0;
454
+ virtual Dims getTensorStrides(char const* tensorName) const noexcept = 0;
455
+ virtual bool setTensorAddress(char const* tensorName, void* data) noexcept = 0;
456
+ virtual void const* getTensorAddress(char const* tensorName) const noexcept = 0;
457
+ virtual bool setInputTensorAddress(char const* tensorName, void const* data) noexcept = 0;
458
+ virtual bool setOutputTensorAddress(char const* tensorName, void* data) noexcept = 0;
459
+ virtual int32_t inferShapes(int32_t nbMaxNames, char const** tensorNames) noexcept = 0;
460
+ virtual bool setInputConsumedEvent(cudaEvent_t event) noexcept = 0;
461
+ virtual cudaEvent_t getInputConsumedEvent() const noexcept = 0;
462
+ virtual void* getOutputTensorAddress(char const* tensorName) const noexcept = 0;
463
+ virtual bool setOutputAllocator(char const* tensorName, IOutputAllocator* outputAllocator) noexcept = 0;
464
+ virtual IOutputAllocator* getOutputAllocator(char const* name) noexcept = 0;
465
+ virtual int64_t getMaxOutputSize(char const* tensorName) const noexcept = 0;
466
+ virtual bool setTemporaryStorageAllocator(IGpuAllocator* allocator) noexcept = 0;
467
+ virtual IGpuAllocator* getTemporaryStorageAllocator() const noexcept = 0;
468
+ virtual bool enqueueV3(cudaStream_t stream) noexcept = 0;
469
+ virtual void setPersistentCacheLimit(size_t size) noexcept = 0;
470
+ virtual size_t getPersistentCacheLimit() const noexcept = 0;
471
+ virtual bool setNvtxVerbosity(ProfilingVerbosity verbosity) noexcept = 0;
472
+ virtual ProfilingVerbosity getNvtxVerbosity() const noexcept = 0;
473
+ virtual void setAuxStreams(cudaStream_t* auxStreams, int32_t nbStreams) noexcept = 0;
474
+ virtual bool setDebugListener(IDebugListener* listener) noexcept = 0;
475
+ virtual IDebugListener* getDebugListener() noexcept = 0;
476
+ virtual bool setTensorDebugState(char const* name, bool flag) noexcept = 0;
477
+ virtual bool getDebugState(char const* name) const noexcept = 0;
478
+ virtual bool setAllTensorsDebugState(bool flag) noexcept = 0;
479
+ virtual size_t updateDeviceMemorySizeForShapes() noexcept = 0;
480
+ virtual void setDeviceMemoryV2(void* memory, int64_t size) noexcept = 0;
481
+ TRT_NODISCARD virtual IRuntimeConfig* getRuntimeConfig() const noexcept = 0;
482
+ virtual bool setUnfusedTensorsDebugState(bool flag) noexcept = 0;
483
+ virtual bool getUnfusedTensorsDebugState() const noexcept = 0;
484
+ #if ENABLE_FEATURE_DISABLE_RUNTIME_ALLOCATION
485
+ virtual bool isStreamCapturable(cudaStream_t stream) const noexcept = 0;
486
+ #endif // ENABLE_FEATURE_DISABLE_RUNTIME_ALLOCATION
487
+ virtual bool setCommunicator(void* communicator) noexcept = 0;
488
+ };
489
+
490
+ class VEngineInspector : public VRoot
491
+ {
492
+ public:
493
+ virtual IEngineInspector* getPImpl() noexcept = 0;
494
+ virtual bool setExecutionContext(IExecutionContext const* context) noexcept = 0;
495
+ virtual IExecutionContext const* getExecutionContext() const noexcept = 0;
496
+ virtual char const* getLayerInformation(int32_t layerIndex, LayerInformationFormat format) const noexcept = 0;
497
+ virtual char const* getEngineInformation(LayerInformationFormat format) const noexcept = 0;
498
+ virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
499
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
500
+ };
501
+
502
+ class VTensor : public VRoot
503
+ {
504
+ public:
505
+ virtual void setName(char const* name) noexcept = 0;
506
+ virtual char const* getName() const noexcept = 0;
507
+ virtual void setDimensions(Dims const& dimensions) noexcept = 0;
508
+ virtual Dims getDimensions() const noexcept = 0;
509
+ virtual void setType(DataType type) noexcept = 0;
510
+ virtual DataType getType() const noexcept = 0;
511
+ virtual bool setDynamicRange(float min, float max) noexcept = 0;
512
+ virtual bool isNetworkInput() const noexcept = 0;
513
+ virtual bool isNetworkOutput() const noexcept = 0;
514
+ virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept = 0;
515
+ virtual bool getBroadcastAcrossBatch() const noexcept = 0;
516
+ virtual TensorLocation getLocation() const noexcept = 0;
517
+ virtual void setLocation(TensorLocation location) noexcept = 0;
518
+ virtual bool dynamicRangeIsSet() const noexcept = 0;
519
+ virtual void resetDynamicRange() noexcept = 0;
520
+ virtual float getDynamicRangeMin() const noexcept = 0;
521
+ virtual float getDynamicRangeMax() const noexcept = 0;
522
+ virtual void setAllowedFormats(TensorFormats formats) noexcept = 0;
523
+ virtual TensorFormats getAllowedFormats() const noexcept = 0;
524
+ virtual bool isShapeTensor() const noexcept = 0;
525
+ virtual bool isExecutionTensor() const noexcept = 0;
526
+ virtual void setDimensionName(int32_t index, char const* name) noexcept = 0;
527
+ virtual char const* getDimensionName(int32_t index) const noexcept = 0;
528
+ };
529
+
530
+ class VLayer : public VRoot
531
+ {
532
+ public:
533
+ virtual LayerType getType() const noexcept = 0;
534
+ virtual void setName(char const* name) noexcept = 0;
535
+ virtual char const* getName() const noexcept = 0;
536
+ virtual int32_t getNbInputs() const noexcept = 0;
537
+ virtual ITensor* getInput(int32_t index) const noexcept = 0;
538
+ virtual int32_t getNbOutputs() const noexcept = 0;
539
+ virtual ITensor* getOutput(int32_t index) const noexcept = 0;
540
+ virtual void setInput(int32_t index, ITensor& tensor) noexcept = 0;
541
+ virtual void setPrecision(DataType dataType) noexcept = 0;
542
+ virtual DataType getPrecision() const noexcept = 0;
543
+ virtual bool precisionIsSet() const noexcept = 0;
544
+ virtual void resetPrecision() noexcept = 0;
545
+ virtual void setOutputType(int32_t index, DataType dataType) noexcept = 0;
546
+ virtual DataType getOutputType(int32_t index) const noexcept = 0;
547
+ virtual bool outputTypeIsSet(int32_t index) const noexcept = 0;
548
+ virtual void resetOutputType(int32_t index) noexcept = 0;
549
+ virtual void setMetadata(char const* docString) noexcept = 0;
550
+ virtual char const* getMetadata() const noexcept = 0;
551
+ virtual bool setNbRanks(int32_t nbRanks) noexcept = 0;
552
+ virtual int32_t getNbRanks() const noexcept = 0;
553
+ };
554
+
555
+ class VConvolutionLayer : public VRoot
556
+ {
557
+ public:
558
+ virtual void setNbOutputMaps(int64_t nbOutputMaps) noexcept = 0;
559
+ virtual int64_t getNbOutputMaps() const noexcept = 0;
560
+ virtual void setNbGroups(int64_t nbGroups) noexcept = 0;
561
+ virtual int64_t getNbGroups() const noexcept = 0;
562
+ virtual void setKernelWeights(Weights weights) noexcept = 0;
563
+ virtual Weights getKernelWeights() const noexcept = 0;
564
+ virtual void setBiasWeights(Weights weights) noexcept = 0;
565
+ virtual Weights getBiasWeights() const noexcept = 0;
566
+ virtual void setPrePadding(Dims const& padding) noexcept = 0;
567
+ virtual Dims getPrePadding() const noexcept = 0;
568
+ virtual void setPostPadding(Dims const& padding) noexcept = 0;
569
+ virtual Dims getPostPadding() const noexcept = 0;
570
+ virtual void setPaddingMode(PaddingMode paddingMode) noexcept = 0;
571
+ virtual PaddingMode getPaddingMode() const noexcept = 0;
572
+ virtual void setKernelSizeNd(Dims const& kernelSize) noexcept = 0;
573
+ virtual Dims getKernelSizeNd() const noexcept = 0;
574
+ virtual void setStrideNd(Dims const& stride) noexcept = 0;
575
+ virtual Dims getStrideNd() const noexcept = 0;
576
+ virtual void setPaddingNd(Dims const& padding) noexcept = 0;
577
+ virtual Dims getPaddingNd() const noexcept = 0;
578
+ virtual void setDilationNd(Dims const& dilation) noexcept = 0;
579
+ virtual Dims getDilationNd() const noexcept = 0;
580
+ };
581
+
582
+ class VActivationLayer : public VRoot
583
+ {
584
+ public:
585
+ virtual void setActivationType(ActivationType type) noexcept = 0;
586
+ virtual ActivationType getActivationType() const noexcept = 0;
587
+ virtual void setAlpha(float alpha) noexcept = 0;
588
+ virtual void setBeta(float beta) noexcept = 0;
589
+ virtual float getAlpha() const noexcept = 0;
590
+ virtual float getBeta() const noexcept = 0;
591
+ };
592
+
593
+ class VPoolingLayer : public VRoot
594
+ {
595
+ public:
596
+ virtual void setPoolingType(PoolingType type) noexcept = 0;
597
+ virtual PoolingType getPoolingType() const noexcept = 0;
598
+ virtual void setBlendFactor(float blendFactor) noexcept = 0;
599
+ virtual float getBlendFactor() const noexcept = 0;
600
+ virtual void setAverageCountExcludesPadding(bool exclusive) noexcept = 0;
601
+ virtual bool getAverageCountExcludesPadding() const noexcept = 0;
602
+ virtual void setPrePadding(Dims const& padding) noexcept = 0;
603
+ virtual Dims getPrePadding() const noexcept = 0;
604
+ virtual void setPostPadding(Dims const& padding) noexcept = 0;
605
+ virtual Dims getPostPadding() const noexcept = 0;
606
+ virtual void setPaddingMode(PaddingMode paddingMode) noexcept = 0;
607
+ virtual PaddingMode getPaddingMode() const noexcept = 0;
608
+ virtual void setWindowSizeNd(Dims const& windowSize) noexcept = 0;
609
+ virtual Dims getWindowSizeNd() const noexcept = 0;
610
+ virtual void setStrideNd(Dims const& stride) noexcept = 0;
611
+ virtual Dims getStrideNd() const noexcept = 0;
612
+ virtual void setPaddingNd(Dims const& padding) noexcept = 0;
613
+ virtual Dims getPaddingNd() const noexcept = 0;
614
+ };
615
+
616
+ class VLRNLayer : public VRoot
617
+ {
618
+ public:
619
+ virtual void setWindowSize(int64_t windowSize) noexcept = 0;
620
+ virtual int64_t getWindowSize() const noexcept = 0;
621
+ virtual void setAlpha(float alpha) noexcept = 0;
622
+ virtual float getAlpha() const noexcept = 0;
623
+ virtual void setBeta(float beta) noexcept = 0;
624
+ virtual float getBeta() const noexcept = 0;
625
+ virtual void setK(float k) noexcept = 0;
626
+ virtual float getK() const noexcept = 0;
627
+ };
628
+
629
+ class VScaleLayer : public VRoot
630
+ {
631
+ public:
632
+ virtual void setMode(ScaleMode mode) noexcept = 0;
633
+ virtual ScaleMode getMode() const noexcept = 0;
634
+ virtual void setShift(Weights shift) noexcept = 0;
635
+ virtual Weights getShift() const noexcept = 0;
636
+ virtual void setScale(Weights scale) noexcept = 0;
637
+ virtual Weights getScale() const noexcept = 0;
638
+ virtual void setPower(Weights power) noexcept = 0;
639
+ virtual Weights getPower() const noexcept = 0;
640
+ virtual int32_t getChannelAxis() const noexcept = 0;
641
+ virtual void setChannelAxis(int32_t channelAxis) noexcept = 0;
642
+ };
643
+
644
+ class VSoftMaxLayer : public VRoot
645
+ {
646
+ public:
647
+ virtual void setAxes(uint32_t axes) noexcept = 0;
648
+ virtual uint32_t getAxes() const noexcept = 0;
649
+ };
650
+
651
+ class VConcatenationLayer : public VRoot
652
+ {
653
+ public:
654
+ virtual void setAxis(int32_t axis) noexcept = 0;
655
+ virtual int32_t getAxis() const noexcept = 0;
656
+ };
657
+
658
+ class VDeconvolutionLayer : public VRoot
659
+ {
660
+ public:
661
+ virtual void setNbOutputMaps(int64_t nbOutputMaps) noexcept = 0;
662
+ virtual int64_t getNbOutputMaps() const noexcept = 0;
663
+ virtual void setNbGroups(int64_t nbGroups) noexcept = 0;
664
+ virtual int64_t getNbGroups() const noexcept = 0;
665
+ virtual void setKernelWeights(Weights weights) noexcept = 0;
666
+ virtual Weights getKernelWeights() const noexcept = 0;
667
+ virtual void setBiasWeights(Weights weights) noexcept = 0;
668
+ virtual Weights getBiasWeights() const noexcept = 0;
669
+ virtual void setPrePadding(Dims const& padding) noexcept = 0;
670
+ virtual Dims getPrePadding() const noexcept = 0;
671
+ virtual void setPostPadding(Dims const& padding) noexcept = 0;
672
+ virtual Dims getPostPadding() const noexcept = 0;
673
+ virtual void setPaddingMode(PaddingMode paddingMode) noexcept = 0;
674
+ virtual PaddingMode getPaddingMode() const noexcept = 0;
675
+ virtual void setKernelSizeNd(Dims const& kernelSize) noexcept = 0;
676
+ virtual Dims getKernelSizeNd() const noexcept = 0;
677
+ virtual void setStrideNd(Dims const& stride) noexcept = 0;
678
+ virtual Dims getStrideNd() const noexcept = 0;
679
+ virtual void setPaddingNd(Dims const& padding) noexcept = 0;
680
+ virtual Dims getPaddingNd() const noexcept = 0;
681
+ virtual void setDilationNd(Dims const& dilation) noexcept = 0;
682
+ virtual Dims getDilationNd() const noexcept = 0;
683
+ };
684
+
685
+ class VElementWiseLayer : public VRoot
686
+ {
687
+ public:
688
+ virtual void setOperation(ElementWiseOperation op) noexcept = 0;
689
+ virtual ElementWiseOperation getOperation() const noexcept = 0;
690
+ };
691
+
692
+ class VGatherLayer : public VRoot
693
+ {
694
+ public:
695
+ virtual void setGatherAxis(int32_t axis) noexcept = 0;
696
+ virtual int32_t getGatherAxis() const noexcept = 0;
697
+ virtual void setNbElementWiseDims(int32_t k) noexcept = 0;
698
+ virtual int32_t getNbElementWiseDims() const noexcept = 0;
699
+ virtual void setMode(GatherMode mode) noexcept = 0;
700
+ virtual GatherMode getMode() const noexcept = 0;
701
+ };
702
+
703
+ class VPluginLayer : public VRoot
704
+ {
705
+ public:
706
+ virtual IPlugin& getPlugin() noexcept = 0;
707
+ };
708
+
709
+ class VPluginV2Layer : public VRoot
710
+ {
711
+ public:
712
+ virtual IPluginV2& getPlugin() noexcept = 0;
713
+ };
714
+
715
+ class VPluginV3Layer : public VRoot
716
+ {
717
+ public:
718
+ virtual IPluginV3& getPlugin() noexcept = 0;
719
+ };
720
+
721
+ class VUnaryLayer : public VRoot
722
+ {
723
+ public:
724
+ virtual void setOperation(UnaryOperation op) noexcept = 0;
725
+ virtual UnaryOperation getOperation() const noexcept = 0;
726
+ };
727
+
728
+ class VReduceLayer : public VRoot
729
+ {
730
+ public:
731
+ virtual void setOperation(ReduceOperation op) noexcept = 0;
732
+ virtual ReduceOperation getOperation() const noexcept = 0;
733
+ virtual void setReduceAxes(uint32_t reduceAxes) noexcept = 0;
734
+ virtual uint32_t getReduceAxes() const noexcept = 0;
735
+ virtual void setKeepDimensions(bool keepDimensions) noexcept = 0;
736
+ virtual bool getKeepDimensions() const noexcept = 0;
737
+ };
738
+
739
+ class VPaddingLayer : public VRoot
740
+ {
741
+ public:
742
+ virtual void setPrePaddingNd(Dims const& padding) noexcept = 0;
743
+ virtual Dims getPrePaddingNd() const noexcept = 0;
744
+ virtual void setPostPaddingNd(Dims const& padding) noexcept = 0;
745
+ virtual Dims getPostPaddingNd() const noexcept = 0;
746
+ };
747
+
748
+ class VShuffleLayer : public VRoot
749
+ {
750
+ public:
751
+ virtual void setFirstTranspose(Permutation const& permutation) noexcept = 0;
752
+ virtual Permutation const& getFirstTranspose() const noexcept = 0;
753
+ virtual void setReshapeDimensions(Dims const& dimensions) noexcept = 0;
754
+ virtual Dims getReshapeDimensions() const noexcept = 0;
755
+ virtual void setSecondTranspose(Permutation const& permutation) noexcept = 0;
756
+ virtual Permutation const& getSecondTranspose() const noexcept = 0;
757
+ virtual void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept = 0;
758
+ virtual bool getZeroIsPlaceholder() const noexcept = 0;
759
+ };
760
+
761
+ class VSliceLayer : public VRoot
762
+ {
763
+ public:
764
+ virtual void setStart(Dims const& start) noexcept = 0;
765
+ virtual Dims getStart() const noexcept = 0;
766
+ virtual void setSize(Dims const& size) noexcept = 0;
767
+ virtual Dims getSize() const noexcept = 0;
768
+ virtual void setStride(Dims const& stride) noexcept = 0;
769
+ virtual Dims getStride() const noexcept = 0;
770
+ virtual void setMode(SampleMode mode) noexcept = 0;
771
+ virtual SampleMode getMode() const noexcept = 0;
772
+ virtual void setAxes(Dims const& axes) noexcept = 0;
773
+ virtual Dims getAxes() const noexcept = 0;
774
+ };
775
+
776
+ class VShapeLayer : public VRoot
777
+ {
778
+ public:
779
+ };
780
+
781
+ class VTopKLayer : public VRoot
782
+ {
783
+ public:
784
+ virtual void setOperation(TopKOperation op) noexcept = 0;
785
+ virtual TopKOperation getOperation() const noexcept = 0;
786
+ virtual void setK(int32_t k) noexcept = 0;
787
+ virtual int32_t getK() const noexcept = 0;
788
+ virtual void setReduceAxes(uint32_t reduceAxes) noexcept = 0;
789
+ virtual uint32_t getReduceAxes() const noexcept = 0;
790
+ virtual bool setIndicesType(DataType type) noexcept = 0;
791
+ virtual DataType getIndicesType() const noexcept = 0;
792
+ };
793
+
794
+ class VMatrixMultiplyLayer : public VRoot
795
+ {
796
+ public:
797
+ virtual void setOperation(int32_t index, MatrixOperation op) noexcept = 0;
798
+ virtual MatrixOperation getOperation(int32_t index) const noexcept = 0;
799
+ };
800
+
801
+ class VNonZeroLayer : public VRoot
802
+ {
803
+ public:
804
+ virtual bool setIndicesType(DataType type) noexcept = 0;
805
+ virtual DataType getIndicesType() const noexcept = 0;
806
+ };
807
+
808
+ class VRaggedSoftMaxLayer : public VRoot
809
+ {
810
+ public:
811
+ };
812
+
813
+ class VIdentityLayer : public VRoot
814
+ {
815
+ public:
816
+ };
817
+
818
+ class VCastLayer : public VRoot
819
+ {
820
+ public:
821
+ virtual void setToType(DataType toType) noexcept = 0;
822
+ virtual DataType getToType() const noexcept = 0;
823
+ };
824
+
825
+ class VConstantLayer : public VRoot
826
+ {
827
+ public:
828
+ virtual void setWeights(Weights weights) noexcept = 0;
829
+ virtual Weights getWeights() const noexcept = 0;
830
+ virtual void setDimensions(Dims const& dimensions) noexcept = 0;
831
+ virtual Dims getDimensions() const noexcept = 0;
832
+ };
833
+
834
+ class VParametricReLULayer : public VRoot
835
+ {
836
+ public:
837
+ };
838
+
839
+ class VResizeLayer : public VRoot
840
+ {
841
+ public:
842
+ virtual void setOutputDimensions(Dims const& dimensions) noexcept = 0;
843
+ virtual Dims getOutputDimensions() const noexcept = 0;
844
+ virtual void setScales(float const* scales, int32_t nbScales) noexcept = 0;
845
+ virtual int32_t getScales(int32_t size, float* scales) const noexcept = 0;
846
+ virtual void setResizeMode(InterpolationMode interpolationMode) noexcept = 0;
847
+ virtual InterpolationMode getResizeMode() const noexcept = 0;
848
+ virtual void setCoordinateTransformation(ResizeCoordinateTransformation coordTransform) noexcept = 0;
849
+ virtual ResizeCoordinateTransformation getCoordinateTransformation() const noexcept = 0;
850
+ virtual void setSelectorForSinglePixel(ResizeSelector selector) noexcept = 0;
851
+ virtual ResizeSelector getSelectorForSinglePixel() const noexcept = 0;
852
+ virtual void setNearestRounding(ResizeRoundMode value) noexcept = 0;
853
+ virtual ResizeRoundMode getNearestRounding() const noexcept = 0;
854
+ virtual void setCubicCoeff(float value) noexcept = 0;
855
+ virtual float getCubicCoeff() const noexcept = 0;
856
+ virtual void setExcludeOutside(bool value) noexcept = 0;
857
+ virtual bool getExcludeOutside() const noexcept = 0;
858
+ };
859
+
860
+ class VLoopBoundaryLayer : public VRoot
861
+ {
862
+ public:
863
+ virtual ILoop* getLoop() const noexcept = 0;
864
+ };
865
+
866
+ class VRecurrenceLayer : public VRoot
867
+ {
868
+ public:
869
+ };
870
+
871
+ class VLoopOutputLayer : public VRoot
872
+ {
873
+ public:
874
+ virtual LoopOutput getLoopOutput() const noexcept = 0;
875
+ virtual void setAxis(int32_t axis) noexcept = 0;
876
+ virtual int32_t getAxis() const noexcept = 0;
877
+ };
878
+
879
+ class VTripLimitLayer : public VRoot
880
+ {
881
+ public:
882
+ virtual TripLimit getTripLimit() const noexcept = 0;
883
+ };
884
+
885
+ class VIteratorLayer : public VRoot
886
+ {
887
+ public:
888
+ virtual void setAxis(int32_t axis) noexcept = 0;
889
+ virtual int32_t getAxis() const noexcept = 0;
890
+ virtual void setReverse(bool reverse) noexcept = 0;
891
+ virtual bool getReverse() const noexcept = 0;
892
+ };
893
+ class VLoop : public VRoot
894
+ {
895
+ public:
896
+ virtual IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept = 0;
897
+ virtual ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept = 0;
898
+ virtual IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept = 0;
899
+ virtual ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept = 0;
900
+ virtual void setName(char const* name) noexcept = 0;
901
+ virtual char const* getName() const noexcept = 0;
902
+ };
903
+
904
+ class VConditionalBoundaryLayer : public VRoot
905
+ {
906
+ public:
907
+ virtual IIfConditional* getConditional() const noexcept = 0;
908
+ };
909
+
910
+ class VConditionLayer : public VRoot
911
+ {
912
+ public:
913
+ };
914
+
915
+ class VConditionalInputLayer : public VRoot
916
+ {
917
+ public:
918
+ };
919
+
920
+ class VConditionalOutputLayer : public VRoot
921
+ {
922
+ public:
923
+ };
924
+
925
+ class VIfConditional : public VRoot
926
+ {
927
+ public:
928
+ virtual IConditionLayer* setCondition(ITensor& tensor) noexcept = 0;
929
+ virtual IIfConditionalInputLayer* addInput(ITensor& tensor) noexcept = 0;
930
+ virtual IIfConditionalOutputLayer* addOutput(ITensor& trueTensor, ITensor& falseTensor) noexcept = 0;
931
+ virtual void setName(char const* name) noexcept = 0;
932
+ virtual char const* getName() const noexcept = 0;
933
+ };
934
+
935
+ class VAttentionBoundaryLayer : public VRoot
936
+ {
937
+ public:
938
+ virtual IAttention* getAttention() const noexcept = 0;
939
+ };
940
+
941
+ class VAttentionInputLayer : public VRoot
942
+ {
943
+ public:
944
+ };
945
+
946
+ class VAttentionOutputLayer : public VRoot
947
+ {
948
+ public:
949
+ };
950
+
951
+ class VAttention : public VRoot
952
+ {
953
+ public:
954
+ TRT_NODISCARD virtual bool setInput(int32_t index, ITensor& input) noexcept = 0;
955
+ TRT_NODISCARD virtual int32_t getNbInputs() const noexcept = 0;
956
+ TRT_NODISCARD virtual ITensor* getInput(int32_t index) const noexcept = 0;
957
+ TRT_NODISCARD virtual int32_t getNbOutputs() const noexcept = 0;
958
+ TRT_NODISCARD virtual ITensor* getOutput(int32_t index) const noexcept = 0;
959
+ TRT_NODISCARD virtual bool setName(char const* name) noexcept = 0;
960
+ TRT_NODISCARD virtual char const* getName() const noexcept = 0;
961
+ TRT_NODISCARD virtual bool setNormalizationOperation(AttentionNormalizationOp op) noexcept = 0;
962
+ TRT_NODISCARD virtual AttentionNormalizationOp getNormalizationOperation() const noexcept = 0;
963
+ TRT_NODISCARD virtual bool setCausal(bool isCausal) noexcept = 0;
964
+ TRT_NODISCARD virtual bool getCausal() const noexcept = 0;
965
+ TRT_NODISCARD virtual bool setMask(ITensor& mask) noexcept = 0;
966
+ TRT_NODISCARD virtual ITensor* getMask() const noexcept = 0;
967
+ TRT_NODISCARD virtual bool setDecomposable(bool decomposable) noexcept = 0;
968
+ TRT_NODISCARD virtual bool getDecomposable() const noexcept = 0;
969
+ TRT_NODISCARD virtual bool setNormalizationQuantizeScale(ITensor& tensor) noexcept = 0;
970
+ TRT_NODISCARD virtual ITensor* getNormalizationQuantizeScale() const noexcept = 0;
971
+ TRT_NODISCARD virtual bool setNormalizationQuantizeToType(DataType type) noexcept = 0;
972
+ TRT_NODISCARD virtual DataType getNormalizationQuantizeToType() const noexcept = 0;
973
+ TRT_NODISCARD virtual bool setMetadata(char const* docString) noexcept = 0;
974
+ TRT_NODISCARD virtual char const* getMetadata() const noexcept = 0;
975
+ TRT_NODISCARD virtual bool setNbRanks(int32_t nbRanks) noexcept = 0;
976
+ TRT_NODISCARD virtual int32_t getNbRanks() const noexcept = 0;
977
+ }; // class VAttention
978
+
979
+ class VSelectLayer : public VRoot
980
+ {
981
+ };
982
+
983
+ class VAssertionLayer : public VRoot
984
+ {
985
+ public:
986
+ virtual void setMessage(char const* message) noexcept = 0;
987
+ virtual char const* getMessage() const noexcept = 0;
988
+ };
989
+
990
+ class VFillLayer : public VRoot
991
+ {
992
+ public:
993
+ virtual void setDimensions(Dims const& dimensions) noexcept = 0;
994
+ virtual Dims getDimensions() const noexcept = 0;
995
+ virtual void setOperation(FillOperation op) noexcept = 0;
996
+ virtual FillOperation getOperation() const noexcept = 0;
997
+ virtual void setAlpha(double alpha) noexcept = 0;
998
+ virtual double getAlpha() const noexcept = 0;
999
+ virtual void setBeta(double beta) noexcept = 0;
1000
+ virtual double getBeta() const noexcept = 0;
1001
+ virtual void setAlphaInt64(int64_t alpha) noexcept = 0;
1002
+ virtual int64_t getAlphaInt64() const noexcept = 0;
1003
+ virtual void setBetaInt64(int64_t beta) noexcept = 0;
1004
+ virtual int64_t getBetaInt64() const noexcept = 0;
1005
+ virtual bool isAlphaBetaInt64() const noexcept = 0;
1006
+ virtual DataType getToType() const noexcept = 0;
1007
+ virtual void setToType(DataType toType) noexcept = 0;
1008
+ };
1009
+
1010
+ class VQuantizeLayer : public VRoot
1011
+ {
1012
+ public:
1013
+ virtual int32_t getAxis() const noexcept = 0;
1014
+ virtual void setAxis(int32_t axis) noexcept = 0;
1015
+ virtual DataType getToType() const noexcept = 0;
1016
+ virtual void setToType(DataType toType) noexcept = 0;
1017
+ virtual Dims getBlockShape() const noexcept = 0;
1018
+ virtual bool setBlockShape(Dims const& blockShape) noexcept = 0;
1019
+ };
1020
+
1021
+ class VDequantizeLayer : public VRoot
1022
+ {
1023
+ public:
1024
+ virtual int32_t getAxis() const noexcept = 0;
1025
+ virtual void setAxis(int32_t axis) noexcept = 0;
1026
+ virtual DataType getToType() const noexcept = 0;
1027
+ virtual void setToType(DataType toType) noexcept = 0;
1028
+ virtual Dims getBlockShape() const noexcept = 0;
1029
+ virtual bool setBlockShape(Dims const& blockShape) noexcept = 0;
1030
+ };
1031
+
1032
+ class VDynamicQuantizeLayer : public VRoot
1033
+ {
1034
+ public:
1035
+ TRT_DEPRECATED virtual int32_t getAxis() const noexcept = 0;
1036
+ TRT_DEPRECATED virtual void setAxis(int32_t axis) noexcept = 0;
1037
+ TRT_DEPRECATED virtual int32_t getBlockSize() const noexcept = 0;
1038
+ TRT_DEPRECATED virtual void setBlockSize(int32_t axis) noexcept = 0;
1039
+ virtual DataType getScaleType() const noexcept = 0;
1040
+ virtual void setScaleType(DataType axis) noexcept = 0;
1041
+ virtual DataType getToType() const noexcept = 0;
1042
+ virtual void setToType(DataType toType) noexcept = 0;
1043
+ virtual Dims getBlockShape() const noexcept = 0;
1044
+ virtual void setBlockShape(Dims const& blockShape) noexcept = 0;
1045
+ };
1046
+
1047
+ class VScatterLayer : public VRoot
1048
+ {
1049
+ public:
1050
+ virtual void setMode(ScatterMode mode) noexcept = 0;
1051
+ virtual ScatterMode getMode() const noexcept = 0;
1052
+ virtual void setAxis(int32_t axis) noexcept = 0;
1053
+ virtual int32_t getAxis() const noexcept = 0;
1054
+ }; // class VScatterLayer
1055
+
1056
+ class VEinsumLayer : public VRoot
1057
+ {
1058
+ public:
1059
+ virtual bool setEquation(char const* equation) noexcept = 0;
1060
+ virtual char const* getEquation() const noexcept = 0;
1061
+ };
1062
+
1063
+ class VOneHotLayer : public VRoot
1064
+ {
1065
+ public:
1066
+ virtual int32_t getAxis() const noexcept = 0;
1067
+ virtual void setAxis(int32_t axis) noexcept = 0;
1068
+ }; // class VOneHotLayer
1069
+
1070
+ class VGridSampleLayer : public VRoot
1071
+ {
1072
+ public:
1073
+ virtual void setInterpolationMode(InterpolationMode mode) noexcept = 0;
1074
+ virtual InterpolationMode getInterpolationMode() const noexcept = 0;
1075
+ virtual void setAlignCorners(bool alignCorners) noexcept = 0;
1076
+ virtual bool getAlignCorners() const noexcept = 0;
1077
+ virtual bool setSampleMode(SampleMode mode) noexcept = 0;
1078
+ virtual SampleMode getSampleMode() const noexcept = 0;
1079
+ }; // class VGridSampleLayer
1080
+
1081
+ class VNMSLayer : public VRoot
1082
+ {
1083
+ public:
1084
+ virtual void setBoundingBoxFormat(BoundingBoxFormat fmt) noexcept = 0;
1085
+ virtual BoundingBoxFormat getBoundingBoxFormat() const noexcept = 0;
1086
+ virtual void setTopKBoxLimit(int32_t limit) noexcept = 0;
1087
+ virtual int32_t getTopKBoxLimit() const noexcept = 0;
1088
+ virtual bool setIndicesType(DataType type) noexcept = 0;
1089
+ virtual DataType getIndicesType() const noexcept = 0;
1090
+ }; // class VNMSLayer
1091
+
1092
+ class VReverseSequenceLayer : public VRoot
1093
+ {
1094
+ public:
1095
+ virtual void setBatchAxis(int32_t batchAxis) noexcept = 0;
1096
+ virtual int32_t getBatchAxis() const noexcept = 0;
1097
+
1098
+ virtual void setSequenceAxis(int32_t sequenceAxis) noexcept = 0;
1099
+ virtual int32_t getSequenceAxis() const noexcept = 0;
1100
+ }; // class VReverseSequenceLayer
1101
+
1102
+ class VNormalizationLayer : public VRoot
1103
+ {
1104
+ public:
1105
+ virtual void setEpsilon(float eps) noexcept = 0;
1106
+ virtual float getEpsilon() const noexcept = 0;
1107
+ virtual void setAxes(uint32_t axesMask) noexcept = 0;
1108
+ virtual uint32_t getAxes() const noexcept = 0;
1109
+ virtual void setNbGroups(int64_t nbGroups) noexcept = 0;
1110
+ virtual int64_t getNbGroups() const noexcept = 0;
1111
+ virtual void setComputePrecision(DataType type) noexcept = 0;
1112
+ virtual DataType getComputePrecision() const noexcept = 0;
1113
+ virtual bool isV2() const noexcept = 0;
1114
+ }; // class VNormalizationLayer
1115
+
1116
+ class VSqueezeLayer : public VRoot
1117
+ {
1118
+ };
1119
+
1120
+ class VUnsqueezeLayer : public VRoot
1121
+ {
1122
+ };
1123
+
1124
+ class VCumulativeLayer : public VRoot
1125
+ {
1126
+ public:
1127
+ virtual bool setOperation(CumulativeOperation op) noexcept = 0;
1128
+ virtual CumulativeOperation getOperation() const noexcept = 0;
1129
+ virtual void setExclusive(bool exclusive) noexcept = 0;
1130
+ virtual bool getExclusive() const noexcept = 0;
1131
+ virtual void setReverse(bool reverse) noexcept = 0;
1132
+ virtual bool getReverse() const noexcept = 0;
1133
+ }; // class VCumulativeLayer
1134
+
1135
+ class VRotaryEmbeddingLayer : public VRoot
1136
+ {
1137
+ public:
1138
+ virtual void setInterleaved(bool interleaved) noexcept = 0;
1139
+ virtual bool getInterleaved() const noexcept = 0;
1140
+ virtual bool setRotaryEmbeddingDim(int32_t rotaryEmbeddingDim) noexcept = 0;
1141
+ virtual int32_t getRotaryEmbeddingDim() const noexcept = 0;
1142
+ virtual void setInput(int32_t index, ITensor& input) noexcept = 0;
1143
+ }; // class VRotaryEmbeddingLayer
1144
+
1145
+ class VKVCacheUpdateLayer : public VRoot
1146
+ {
1147
+ public:
1148
+ TRT_NODISCARD virtual bool setCacheMode(KVCacheMode cacheMode) noexcept = 0;
1149
+ TRT_NODISCARD virtual KVCacheMode getCacheMode() const noexcept = 0;
1150
+ }; // class VKVCacheUpdateLayer
1151
+
1152
+ class VMoELayer : public VRoot
1153
+ {
1154
+ public:
1155
+ virtual void setGatedWeights(ITensor& fcGateWeights, ITensor& fcUpWeights, ITensor& fcDownWeights, MoEActType activationType) noexcept = 0;
1156
+ virtual void setGatedBiases(ITensor& fcGateBiases, ITensor& fcUpBiases, ITensor& fcDownBiases) noexcept = 0;
1157
+ virtual void setActivationType(MoEActType activationType) noexcept = 0;
1158
+ virtual MoEActType getActivationType() const noexcept = 0;
1159
+ virtual void setQuantizationStatic(ITensor& fcDownActivationScale, DataType dataType) noexcept = 0;
1160
+ virtual void setQuantizationDynamicDblQ(ITensor& fcDownActivationDblQScale, DataType dataType, Dims const& blockShape, DataType dynQOutputScaleType) noexcept = 0;
1161
+ virtual void setQuantizationToType(DataType type) noexcept = 0;
1162
+ virtual DataType getQuantizationToType() const noexcept = 0;
1163
+ virtual void setQuantizationBlockShape(Dims const& blockShape) noexcept = 0;
1164
+ virtual Dims getQuantizationBlockShape() const noexcept = 0;
1165
+ virtual void setDynQOutputScaleType(DataType type) noexcept = 0;
1166
+ virtual DataType getDynQOutputScaleType() const noexcept = 0;
1167
+ virtual void setSwigluParams(float limit, float alpha, float beta) noexcept = 0;
1168
+ virtual void setSwigluParamLimit(float limit) noexcept = 0;
1169
+ virtual float getSwigluParamLimit() const noexcept = 0;
1170
+ virtual void setSwigluParamAlpha(float alpha) noexcept = 0;
1171
+ virtual float getSwigluParamAlpha() const noexcept = 0;
1172
+ virtual void setSwigluParamBeta(float beta) noexcept = 0;
1173
+ virtual float getSwigluParamBeta() const noexcept = 0;
1174
+ virtual void setInput(int32_t index, ITensor& tensor) noexcept = 0;
1175
+ }; // class VMoELayer
1176
+
1177
+
1178
+ class VNetworkDefinition : public VRoot
1179
+ {
1180
+ public:
1181
+ virtual ITensor* addInput(char const* name, DataType type, Dims const& dimensions) noexcept = 0;
1182
+ virtual void markOutput(ITensor& tensor) noexcept = 0;
1183
+ virtual IActivationLayer* addActivation(ITensor& input, ActivationType type) noexcept = 0;
1184
+ virtual ILRNLayer* addLRN(ITensor& input, int64_t window, float alpha, float beta, float k) noexcept = 0;
1185
+ virtual IScaleLayer* addScale(
1186
+ ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept = 0;
1187
+ virtual ISoftMaxLayer* addSoftMax(ITensor& input) noexcept = 0;
1188
+ virtual IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) noexcept = 0;
1189
+ virtual IElementWiseLayer* addElementWise(ITensor& input1, ITensor& input2, ElementWiseOperation op) noexcept = 0;
1190
+ virtual IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) noexcept = 0;
1191
+ virtual IShuffleLayer* addShuffle(ITensor& input) noexcept = 0;
1192
+ virtual int32_t getNbLayers() const noexcept = 0;
1193
+ virtual ILayer* getLayer(int32_t index) const noexcept = 0;
1194
+ virtual int32_t getNbInputs() const noexcept = 0;
1195
+ virtual ITensor* getInput(int32_t index) const noexcept = 0;
1196
+ virtual int32_t getNbOutputs() const noexcept = 0;
1197
+ virtual ITensor* getOutput(int32_t index) const noexcept = 0;
1198
+ virtual IReduceLayer* addReduce(
1199
+ ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
1200
+ = 0;
1201
+ virtual ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept = 0;
1202
+ virtual IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) noexcept = 0;
1203
+ virtual IRaggedSoftMaxLayer* addRaggedSoftMax(ITensor& input, ITensor& bounds) noexcept = 0;
1204
+ virtual IMatrixMultiplyLayer* addMatrixMultiply(
1205
+ ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) noexcept = 0;
1206
+ virtual IConstantLayer* addConstant(Dims const& dimensions, Weights weights) noexcept = 0;
1207
+ virtual IIdentityLayer* addIdentity(ITensor& input) noexcept = 0;
1208
+ virtual void removeTensor(ITensor& tensor) noexcept = 0;
1209
+ virtual void unmarkOutput(ITensor& tensor) noexcept = 0;
1210
+ virtual IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) noexcept = 0;
1211
+ virtual IPluginV3Layer* addPluginV3(ITensor* const* inputs, int32_t nbInputs, ITensor* const* shapeInputs,
1212
+ int32_t nbShapeInputs, IPluginV3& plugin) noexcept = 0;
1213
+ virtual ISliceLayer* addSlice(ITensor& input, Dims const& start, Dims const& size, Dims const& stride) noexcept = 0;
1214
+ virtual void setName(char const* name) noexcept = 0;
1215
+ virtual char const* getName() const noexcept = 0;
1216
+ virtual IShapeLayer* addShape(ITensor& input) noexcept = 0;
1217
+ virtual bool hasImplicitBatchDimension() const noexcept = 0;
1218
+ virtual bool markOutputForShapes(ITensor& tensor) noexcept = 0;
1219
+ virtual bool unmarkOutputForShapes(ITensor& tensor) noexcept = 0;
1220
+ virtual IParametricReLULayer* addParametricReLU(ITensor& input, ITensor& slope) noexcept = 0;
1221
+ virtual IConvolutionLayer* addConvolutionNd(
1222
+ ITensor& input, int64_t nbOutputMaps, Dims const& kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
1223
+ = 0;
1224
+ virtual IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims const& windowSize) noexcept = 0;
1225
+ virtual IDeconvolutionLayer* addDeconvolutionNd(
1226
+ ITensor& input, int64_t nbOutputMaps, Dims const& kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
1227
+ = 0;
1228
+ virtual IScaleLayer* addScaleNd(
1229
+ ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept = 0;
1230
+ virtual IResizeLayer* addResize(ITensor& input) noexcept = 0;
1231
+ virtual ILoop* addLoop() noexcept = 0;
1232
+ virtual ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) noexcept = 0;
1233
+ virtual IFillLayer* addFill(Dims const& dimensions, FillOperation op) noexcept = 0;
1234
+ virtual IPaddingLayer* addPaddingNd(ITensor& input, Dims const& prePadding, Dims const& postPadding) noexcept = 0;
1235
+ virtual bool setWeightsName(Weights weights, char const* name) noexcept = 0;
1236
+ virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
1237
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
1238
+ virtual IDequantizeLayer* addDequantize(ITensor& input, ITensor& scale) noexcept = 0;
1239
+ virtual IQuantizeLayer* addQuantize(ITensor& input, ITensor& scale) noexcept = 0;
1240
+ virtual IGatherLayer* addGatherV2(ITensor& data, ITensor& indices, GatherMode mode) noexcept = 0;
1241
+ virtual IIfConditional* addIfConditional() noexcept = 0;
1242
+ virtual IScatterLayer* addScatter(ITensor& data, ITensor& indices, ITensor& updates, ScatterMode mode) noexcept = 0;
1243
+ virtual IEinsumLayer* addEinsum(ITensor* const* inputs, int32_t nbInputs, char const* equation) noexcept = 0;
1244
+ virtual IAssertionLayer* addAssertion(ITensor& condition, char const* message) noexcept = 0;
1245
+ virtual IOneHotLayer* addOneHot(ITensor& indices, ITensor& values, ITensor& depth, int32_t axis) noexcept = 0;
1246
+ virtual INonZeroLayer* addNonZero(ITensor& input) noexcept = 0;
1247
+ virtual IGridSampleLayer* addGridSample(ITensor& input, ITensor& grid) noexcept = 0;
1248
+ virtual INMSLayer* addNMS(ITensor& boxes, ITensor& scores, ITensor& maxOutputBoxesPerClass) noexcept = 0;
1249
+ virtual IReverseSequenceLayer* addReverseSequence(ITensor& input, ITensor& sequenceLens) noexcept = 0;
1250
+ virtual INormalizationLayer* addNormalization(
1251
+ ITensor& input, ITensor& scale, ITensor& bias, uint32_t axesMask) noexcept = 0;
1252
+ virtual ICastLayer* addCast(ITensor& input, DataType toType) noexcept = 0;
1253
+ virtual IBuilder& getBuilder() const noexcept = 0;
1254
+ virtual NetworkDefinitionCreationFlags getFlags() const noexcept = 0;
1255
+ virtual bool getFlag(NetworkDefinitionCreationFlag networkDefinitionCreationFlag) const noexcept = 0;
1256
+ virtual IQuantizeLayer* addQuantizeV2(ITensor& input, ITensor& scale, DataType outputType) noexcept = 0;
1257
+ virtual IDequantizeLayer* addDequantizeV2(ITensor& input, ITensor& scale, DataType outputType) noexcept = 0;
1258
+ virtual IFillLayer* addFillV2(Dims const& dimensions, FillOperation op, DataType outputType) noexcept = 0;
1259
+ virtual bool markDebug(ITensor& tensor) noexcept = 0;
1260
+ virtual bool unmarkDebug(ITensor& tensor) noexcept = 0;
1261
+ virtual bool isDebugTensor(ITensor const& tensor) const noexcept = 0;
1262
+ virtual bool markWeightsRefittable(char const* name) noexcept = 0;
1263
+ virtual bool unmarkWeightsRefittable(char const* name) noexcept = 0;
1264
+ virtual bool areWeightsMarkedRefittable(char const* name) const noexcept = 0;
1265
+ virtual ISqueezeLayer* addSqueeze(ITensor& input, ITensor& axes) noexcept = 0;
1266
+ virtual IUnsqueezeLayer* addUnsqueeze(ITensor& input, ITensor& axes) noexcept = 0;
1267
+ virtual IDynamicQuantizeLayer* addDynamicQuantize(
1268
+ ITensor& input, int32_t axis, int32_t blockSize, DataType toType, DataType scaleType) noexcept = 0;
1269
+ virtual ICumulativeLayer* addCumulative(
1270
+ ITensor& input, ITensor& axis, CumulativeOperation operation, bool exclusive, bool reverse) noexcept = 0;
1271
+ virtual bool markUnfusedTensorsAsDebugTensors() noexcept = 0;
1272
+ virtual bool unmarkUnfusedTensorsAsDebugTensors() noexcept = 0;
1273
+ virtual ITopKLayer* addTopKV2(
1274
+ ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes, DataType indicesType) noexcept = 0;
1275
+ virtual INonZeroLayer* addNonZeroV2(ITensor& input, DataType indicesType) noexcept = 0;
1276
+ virtual INMSLayer* addNMSV2(
1277
+ ITensor& boxes, ITensor& scores, ITensor& maxOutputBoxesPerClass, DataType indicesType) noexcept = 0;
1278
+ virtual IAttention* addAttention(
1279
+ ITensor& query, ITensor& key, ITensor& value, AttentionNormalizationOp normOp, bool isCausal) noexcept = 0;
1280
+ virtual IRotaryEmbeddingLayer* addRotaryEmbedding(ITensor& input, ITensor& cosCache, ITensor& sinCache,
1281
+ bool interleaved, int32_t rotaryEmbeddingDim) noexcept = 0;
1282
+ virtual IDynamicQuantizeLayer* addDynamicQuantizeV2(
1283
+ ITensor& input, Dims const& blockShape, DataType toType, DataType scaleType) noexcept = 0;
1284
+ virtual IKVCacheUpdateLayer* addKVCacheUpdate(
1285
+ ITensor& cache, ITensor& update, ITensor& writeIndices, KVCacheMode cacheMode) noexcept = 0;
1286
+ virtual INormalizationLayer* addNormalizationV2(
1287
+ ITensor& input, ITensor& scale, ITensor& bias, uint32_t axesMask) noexcept = 0;
1288
+ virtual IMoELayer* addMoE(
1289
+ ITensor& hiddenStates, ITensor& selectedExpertsForTokens, ITensor& scoresForSelectedExperts) noexcept = 0;
1290
+ virtual IDistCollectiveLayer* addDistCollective(ITensor& input, CollectiveOperation distCollectiveOp,
1291
+ ReduceOperation reduceOp, int64_t root, int64_t* groups, int64_t groupSize) noexcept = 0;
1292
+ };
1293
+
1294
+ class VAlgorithmIOInfo : public VRoot
1295
+ {
1296
+ public:
1297
+ virtual DataType getDataType() const noexcept = 0;
1298
+ virtual Dims getStrides() const noexcept = 0;
1299
+ virtual int64_t getVectorizedDim() const noexcept = 0;
1300
+ virtual int64_t getComponentsPerElement() const noexcept = 0;
1301
+ };
1302
+
1303
+ class VAlgorithmVariant : public VRoot
1304
+ {
1305
+ public:
1306
+ virtual int64_t getImplementation() const noexcept = 0;
1307
+ virtual int64_t getTactic() const noexcept = 0;
1308
+ };
1309
+
1310
+ class VAlgorithmContext : public VRoot
1311
+ {
1312
+ public:
1313
+ virtual char const* getName() const noexcept = 0;
1314
+ virtual Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept = 0;
1315
+ virtual int32_t getNbInputs() const noexcept = 0;
1316
+ virtual int32_t getNbOutputs() const noexcept = 0;
1317
+ };
1318
+
1319
+ class VAlgorithm : public VRoot
1320
+ {
1321
+ public:
1322
+ virtual IAlgorithmVariant const& getAlgorithmVariant() const noexcept = 0;
1323
+ virtual float getTimingMSec() const noexcept = 0;
1324
+ virtual std::size_t getWorkspaceSize() const noexcept = 0;
1325
+ virtual IAlgorithmIOInfo const* getAlgorithmIOInfoByIndex(int32_t index) const noexcept = 0;
1326
+ };
1327
+
1328
+
1329
+ class VTimingCache : public VRoot
1330
+ {
1331
+ public:
1332
+ virtual nvinfer1::IHostMemory* serialize() const noexcept = 0;
1333
+ virtual bool combine(ITimingCache const& inputCache, bool ignoreMismatch) noexcept = 0;
1334
+ virtual bool reset() noexcept = 0;
1335
+ virtual int64_t queryKeys(TimingCacheKey* keyBuffer, int64_t capacity) const noexcept = 0;
1336
+ virtual TimingCacheValue query(TimingCacheKey const& key) const noexcept = 0;
1337
+ virtual bool update(TimingCacheKey const& key, TimingCacheValue const& value) noexcept = 0;
1338
+ };
1339
+
1340
+ class VBuilderConfig : public VRoot
1341
+ {
1342
+ public:
1343
+ virtual void setAvgTimingIterations(int32_t avgTiming) noexcept = 0;
1344
+ virtual int32_t getAvgTimingIterations() const noexcept = 0;
1345
+ virtual void setEngineCapability(EngineCapability capability) noexcept = 0;
1346
+ virtual EngineCapability getEngineCapability() const noexcept = 0;
1347
+ virtual void setInt8Calibrator(IInt8Calibrator* calibrator) noexcept = 0;
1348
+ virtual IInt8Calibrator* getInt8Calibrator() const noexcept = 0;
1349
+ virtual void setFlags(BuilderFlags builderFlags) noexcept = 0;
1350
+ virtual BuilderFlags getFlags() const noexcept = 0;
1351
+ virtual void clearFlag(BuilderFlag builderFlag) noexcept = 0;
1352
+ virtual void setFlag(BuilderFlag builderFlag) noexcept = 0;
1353
+ virtual bool getFlag(BuilderFlag builderFlag) const noexcept = 0;
1354
+ virtual void setDeviceType(ILayer const* layer, DeviceType deviceType) noexcept = 0;
1355
+ virtual DeviceType getDeviceType(ILayer const* layer) const noexcept = 0;
1356
+ virtual bool isDeviceTypeSet(ILayer const* layer) const noexcept = 0;
1357
+ virtual void resetDeviceType(ILayer const* layer) noexcept = 0;
1358
+ virtual bool canRunOnDLA(ILayer const* layer) const noexcept = 0;
1359
+ virtual void setDLACore(int32_t dlaCore) noexcept = 0;
1360
+ virtual int32_t getDLACore() const noexcept = 0;
1361
+ virtual void setDefaultDeviceType(DeviceType deviceType) noexcept = 0;
1362
+ virtual DeviceType getDefaultDeviceType() const noexcept = 0;
1363
+ virtual void reset() noexcept = 0;
1364
+ virtual void setProfileStream(const cudaStream_t stream) noexcept = 0;
1365
+ virtual cudaStream_t getProfileStream() const noexcept = 0;
1366
+ virtual int32_t addOptimizationProfile(IOptimizationProfile const* profile) noexcept = 0;
1367
+ virtual int32_t getNbOptimizationProfiles() const noexcept = 0;
1368
+ virtual void setProfilingVerbosity(ProfilingVerbosity verbosity) noexcept = 0;
1369
+ virtual ProfilingVerbosity getProfilingVerbosity() const noexcept = 0;
1370
+ virtual void setAlgorithmSelector(IAlgorithmSelector* selector) noexcept = 0;
1371
+ virtual IAlgorithmSelector* getAlgorithmSelector() const noexcept = 0;
1372
+ virtual bool setCalibrationProfile(IOptimizationProfile const* profile) noexcept = 0;
1373
+ virtual IOptimizationProfile const* getCalibrationProfile() noexcept = 0;
1374
+ virtual void setQuantizationFlags(QuantizationFlags flags) noexcept = 0;
1375
+ virtual QuantizationFlags getQuantizationFlags() const noexcept = 0;
1376
+ virtual void clearQuantizationFlag(QuantizationFlag flag) noexcept = 0;
1377
+ virtual void setQuantizationFlag(QuantizationFlag flag) noexcept = 0;
1378
+ virtual bool getQuantizationFlag(QuantizationFlag flag) const noexcept = 0;
1379
+ virtual bool setTacticSources(TacticSources tacticSources) noexcept = 0;
1380
+ virtual TacticSources getTacticSources() const noexcept = 0;
1381
+ virtual nvinfer1::ITimingCache* createTimingCache(void const* blob, std::size_t size) const noexcept = 0;
1382
+ virtual bool setTimingCache(ITimingCache const& cache, bool ignoreMismatch) noexcept = 0;
1383
+ virtual nvinfer1::ITimingCache const* getTimingCache() const noexcept = 0;
1384
+ virtual void setMemoryPoolLimit(MemoryPoolType pool, std::size_t poolSize) noexcept = 0;
1385
+ virtual std::size_t getMemoryPoolLimit(MemoryPoolType pool) const noexcept = 0;
1386
+ virtual void setPreviewFeature(PreviewFeature feature, bool enable) noexcept = 0;
1387
+ virtual bool getPreviewFeature(PreviewFeature feature) const noexcept = 0;
1388
+ virtual void setBuilderOptimizationLevel(int32_t level) noexcept = 0;
1389
+ virtual int32_t getBuilderOptimizationLevel() const noexcept = 0;
1390
+ virtual void setHardwareCompatibilityLevel(HardwareCompatibilityLevel hardwareCompatibilityLevel) noexcept = 0;
1391
+ virtual HardwareCompatibilityLevel getHardwareCompatibilityLevel() const noexcept = 0;
1392
+ virtual void setPluginsToSerialize(char const* const* paths, int32_t nbPaths) noexcept = 0;
1393
+ virtual char const* getPluginToSerialize(int32_t index) const noexcept = 0;
1394
+ virtual int32_t getNbPluginsToSerialize() const noexcept = 0;
1395
+ virtual void setMaxAuxStreams(int32_t nbStreams) noexcept = 0;
1396
+ virtual int32_t getMaxAuxStreams() const noexcept = 0;
1397
+ virtual void setProgressMonitor(IProgressMonitor* monitor) noexcept = 0;
1398
+ virtual IProgressMonitor* getProgressMonitor() const noexcept = 0;
1399
+ virtual void setRuntimePlatform(RuntimePlatform runtimePlatform) noexcept = 0;
1400
+ virtual RuntimePlatform getRuntimePlatform() const noexcept = 0;
1401
+ virtual void setMaxNbTactics(int32_t maxTactics) noexcept = 0;
1402
+ virtual int32_t getMaxNbTactics() const noexcept = 0;
1403
+ virtual bool setTilingOptimizationLevel(TilingOptimizationLevel level) noexcept = 0;
1404
+ virtual TilingOptimizationLevel getTilingOptimizationLevel() const noexcept = 0;
1405
+ virtual bool setL2LimitForTiling(int64_t size) noexcept = 0;
1406
+ virtual int64_t getL2LimitForTiling() const noexcept = 0;
1407
+ virtual bool setRemoteAutoTuningConfig(char const* config) noexcept = 0;
1408
+ virtual char const* getRemoteAutoTuningConfig() const noexcept = 0;
1409
+ };
1410
+
1411
+ class VSerializationConfig : public VRoot
1412
+ {
1413
+ public:
1414
+ virtual bool setFlags(SerializationFlags serializationFlags) noexcept = 0;
1415
+ virtual SerializationFlags getFlags() const noexcept = 0;
1416
+ virtual bool clearFlag(SerializationFlag serializationFlag) noexcept = 0;
1417
+ virtual bool setFlag(SerializationFlag serializationFlag) noexcept = 0;
1418
+ virtual bool getFlag(SerializationFlag serializationFlag) const noexcept = 0;
1419
+ };
1420
+
1421
+ class VBuilder : public VRoot
1422
+ {
1423
+ public:
1424
+ virtual bool platformHasFastFp16() const noexcept = 0;
1425
+ virtual bool platformHasFastInt8() const noexcept = 0;
1426
+ virtual int32_t getMaxDLABatchSize() const noexcept = 0;
1427
+ virtual int32_t getNbDLACores() const noexcept = 0;
1428
+ virtual void setGpuAllocator(IGpuAllocator* allocator) noexcept = 0;
1429
+ virtual nvinfer1::IBuilderConfig* createBuilderConfig() noexcept = 0;
1430
+ virtual nvinfer1::INetworkDefinition* createNetworkV2(NetworkDefinitionCreationFlags flags) noexcept = 0;
1431
+ virtual nvinfer1::IOptimizationProfile* createOptimizationProfile() noexcept = 0;
1432
+ virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
1433
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
1434
+ virtual void reset() noexcept = 0;
1435
+ virtual bool platformHasTf32() const noexcept = 0;
1436
+ virtual nvinfer1::IHostMemory* buildSerializedNetwork(
1437
+ INetworkDefinition& network, IBuilderConfig& config) noexcept = 0;
1438
+ virtual bool isNetworkSupported(INetworkDefinition const& network, IBuilderConfig const& config) const noexcept = 0;
1439
+ virtual ILogger* getLogger() const noexcept = 0;
1440
+ virtual bool setMaxThreads(int32_t maxThreads) noexcept = 0;
1441
+ virtual int32_t getMaxThreads() const noexcept = 0;
1442
+ virtual IPluginRegistry& getPluginRegistry() noexcept = 0;
1443
+ virtual ICudaEngine* buildEngineWithConfig(INetworkDefinition& network, IBuilderConfig& config) noexcept = 0;
1444
+ virtual bool buildSerializedNetworkToStream(
1445
+ INetworkDefinition& network, IBuilderConfig& config, IStreamWriter& writer) noexcept = 0;
1446
+ virtual nvinfer1::IHostMemory* buildSerializedNetworkWithKernelText(
1447
+ INetworkDefinition& network, IBuilderConfig& config, IHostMemory*& kernelText) noexcept
1448
+ = 0;
1449
+ };
1450
+
1451
+ class VRuntimeConfig : public VRoot
1452
+ {
1453
+ public:
1454
+ virtual IRuntimeConfig* getPImpl() noexcept = 0;
1455
+ virtual void setExecutionContextAllocationStrategy(ExecutionContextAllocationStrategy strategy) noexcept = 0;
1456
+ virtual ExecutionContextAllocationStrategy getExecutionContextAllocationStrategy() const noexcept = 0;
1457
+ };
1458
+
1459
+
1460
+ class VDistCollectiveLayer : public VRoot
1461
+ {
1462
+ }; // VDistCollectiveLayer
1463
+
1464
+ } // namespace apiv
1465
+ } // namespace nvinfer1
1466
+
1467
+ // @endcond
1468
+
1469
+ #endif // NV_INFER_RUNTIME_IMPL_H
tensorrt/include/NvInferLegacyDims.h ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_LEGACY_DIMS_H
19
+ #define NV_INFER_LEGACY_DIMS_H
20
+
21
+ #define NV_INFER_INTERNAL_INCLUDE 1
22
+ #include "NvInferRuntimeBase.h" // IWYU pragma: exports
23
+ #undef NV_INFER_INTERNAL_INCLUDE
24
+
25
+ //!
26
+ //! \file NvInferLegacyDims.h
27
+ //!
28
+ //! This file contains declarations of legacy dimensions types which use channel
29
+ //! semantics in their names, and declarations on which those types rely.
30
+ //!
31
+
32
+ //!
33
+ //! \namespace nvinfer1
34
+ //!
35
+ //! \brief The TensorRT API version 1 namespace.
36
+ //!
37
+ namespace nvinfer1
38
+ {
39
+ //!
40
+ //! \class Dims2
41
+ //!
42
+ //! \brief Descriptor for two-dimensional data.
43
+ //!
44
+ class Dims2 : public Dims
45
+ {
46
+ public:
47
+ //!
48
+ //! \brief Construct an empty Dims2 object.
49
+ //!
50
+ Dims2()
51
+ : Dims2(0, 0)
52
+ {
53
+ }
54
+
55
+ //!
56
+ //! \brief Construct a Dims2 from 2 elements.
57
+ //!
58
+ //! \param d0 The first element.
59
+ //! \param d1 The second element.
60
+ //!
61
+ Dims2(int64_t d0, int64_t d1)
62
+ {
63
+ nbDims = 2;
64
+ d[0] = d0;
65
+ d[1] = d1;
66
+ for (int64_t i{nbDims}; i < Dims::MAX_DIMS; ++i)
67
+ {
68
+ d[i] = 0;
69
+ }
70
+ }
71
+ };
72
+
73
+ //!
74
+ //! \class DimsHW
75
+ //!
76
+ //! \brief Descriptor for two-dimensional spatial data.
77
+ //!
78
+ class DimsHW : public Dims2
79
+ {
80
+ public:
81
+ //!
82
+ //! \brief Construct an empty DimsHW object.
83
+ //!
84
+ DimsHW()
85
+ : Dims2()
86
+ {
87
+ }
88
+
89
+ //!
90
+ //! \brief Construct a DimsHW given height and width.
91
+ //!
92
+ //! \param height the height of the data
93
+ //! \param width the width of the data
94
+ //!
95
+ DimsHW(int64_t height, int64_t width)
96
+ : Dims2(height, width)
97
+ {
98
+ }
99
+
100
+ //!
101
+ //! \brief Get the height.
102
+ //!
103
+ //! \return The height.
104
+ //!
105
+ int64_t& h()
106
+ {
107
+ return d[0];
108
+ }
109
+
110
+ //!
111
+ //! \brief Get the height.
112
+ //!
113
+ //! \return The height.
114
+ //!
115
+ int64_t h() const
116
+ {
117
+ return d[0];
118
+ }
119
+
120
+ //!
121
+ //! \brief Get the width.
122
+ //!
123
+ //! \return The width.
124
+ //!
125
+ int64_t& w()
126
+ {
127
+ return d[1];
128
+ }
129
+
130
+ //!
131
+ //! \brief Get the width.
132
+ //!
133
+ //! \return The width.
134
+ //!
135
+ int64_t w() const
136
+ {
137
+ return d[1];
138
+ }
139
+ };
140
+
141
+ //!
142
+ //! \class Dims3
143
+ //!
144
+ //! \brief Descriptor for three-dimensional data.
145
+ //!
146
+ class Dims3 : public Dims2
147
+ {
148
+ public:
149
+ //!
150
+ //! \brief Construct an empty Dims3 object.
151
+ //!
152
+ Dims3()
153
+ : Dims3(0, 0, 0)
154
+ {
155
+ }
156
+
157
+ //!
158
+ //! \brief Construct a Dims3 from 3 elements.
159
+ //!
160
+ //! \param d0 The first element.
161
+ //! \param d1 The second element.
162
+ //! \param d2 The third element.
163
+ //!
164
+ Dims3(int64_t d0, int64_t d1, int64_t d2)
165
+ : Dims2(d0, d1)
166
+ {
167
+ nbDims = 3;
168
+ d[2] = d2;
169
+ }
170
+ };
171
+
172
+ //!
173
+ //! \class Dims4
174
+ //!
175
+ //! \brief Descriptor for four-dimensional data.
176
+ //!
177
+ class Dims4 : public Dims3
178
+ {
179
+ public:
180
+ //!
181
+ //! \brief Construct an empty Dims4 object.
182
+ //!
183
+ Dims4()
184
+ : Dims4(0, 0, 0, 0)
185
+ {
186
+ }
187
+
188
+ //!
189
+ //! \brief Construct a Dims4 from 4 elements.
190
+ //!
191
+ //! \param d0 The first element.
192
+ //! \param d1 The second element.
193
+ //! \param d2 The third element.
194
+ //! \param d3 The fourth element.
195
+ //!
196
+ Dims4(int64_t d0, int64_t d1, int64_t d2, int64_t d3)
197
+ : Dims3(d0, d1, d2)
198
+ {
199
+ nbDims = 4;
200
+ d[3] = d3;
201
+ }
202
+ };
203
+
204
+ } // namespace nvinfer1
205
+
206
+ #endif // NV_INFER_LEGCY_DIMS_H
tensorrt/include/NvInferPlugin.h ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_PLUGIN_H
19
+ #define NV_INFER_PLUGIN_H
20
+
21
+ #include "NvInfer.h"
22
+ #include "NvInferPluginUtils.h"
23
+ //!
24
+ //! \file NvInferPlugin.h
25
+ //!
26
+ //! This is the API for the Nvidia provided TensorRT plugins.
27
+ //!
28
+
29
+ extern "C"
30
+ {
31
+ //!
32
+ //! \brief Initialize and register all the existing TensorRT plugins to the Plugin Registry with an optional
33
+ //! namespace. The plugin library author should ensure that this function name is unique to the library. This
34
+ //! function should be called once before accessing the Plugin Registry.
35
+ //! \param logger Logger object to print plugin registration information
36
+ //! \param libNamespace Namespace used to register all the plugins in this library
37
+ //!
38
+ TENSORRTAPI bool initLibNvInferPlugins(void* logger, char const* libNamespace);
39
+
40
+ } // extern "C"
41
+
42
+ #endif // NV_INFER_PLUGIN_H
tensorrt/include/NvInferPluginBase.h ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_PLUGIN_BASE_H
19
+ #define NV_INFER_PLUGIN_BASE_H
20
+
21
+ #if !defined(NV_INFER_INTERNAL_INCLUDE)
22
+ static_assert(false, "Do not directly include this file. Include NvInferRuntime.h or NvInferPluginUtils.h");
23
+ #endif
24
+
25
+ #define NV_INFER_INTERNAL_INCLUDE 1
26
+ #include "NvInferRuntimeBase.h" // IWYU pragma: exports
27
+ #undef NV_INFER_INTERNAL_INCLUDE
28
+ namespace nvinfer1
29
+ {
30
+
31
+ //!
32
+ //! \enum PluginFieldType
33
+ //!
34
+ //! \brief The possible field types for custom layer.
35
+ //!
36
+ enum class PluginFieldType : int32_t
37
+ {
38
+ //! FP16 field type.
39
+ kFLOAT16 = 0,
40
+ //! FP32 field type.
41
+ kFLOAT32 = 1,
42
+ //! FP64 field type.
43
+ kFLOAT64 = 2,
44
+ //! INT8 field type.
45
+ kINT8 = 3,
46
+ //! INT16 field type.
47
+ kINT16 = 4,
48
+ //! INT32 field type.
49
+ kINT32 = 5,
50
+ //! char field type.
51
+ kCHAR = 6,
52
+ //! nvinfer1::Dims field type.
53
+ kDIMS = 7,
54
+ //! Unknown field type.
55
+ kUNKNOWN = 8,
56
+ //! BF16 field type.
57
+ kBF16 = 9,
58
+ //! INT64 field type.
59
+ kINT64 = 10,
60
+ //! FP8 field type.
61
+ kFP8 = 11,
62
+ //! INT4 field type.
63
+ kINT4 = 12,
64
+ //! FP4 field type.
65
+ kFP4 = 13,
66
+ };
67
+
68
+ //!
69
+ //! \class PluginField
70
+ //!
71
+ //! \brief Structure containing plugin attribute field names and associated data
72
+ //! This information can be parsed to decode necessary plugin metadata
73
+ //!
74
+ //!
75
+ class PluginField
76
+ {
77
+ public:
78
+ //! Plugin field attribute name
79
+ AsciiChar const* name;
80
+ //! Plugin field attribute data
81
+ void const* data;
82
+ //! Plugin field attribute type
83
+ PluginFieldType type;
84
+ //! Number of data entries in the Plugin attribute
85
+ int32_t length;
86
+
87
+ PluginField(AsciiChar const* const name_ = nullptr, void const* const data_ = nullptr,
88
+ PluginFieldType const type_ = PluginFieldType::kUNKNOWN, int32_t const length_ = 0) noexcept
89
+ : name(name_)
90
+ , data(data_)
91
+ , type(type_)
92
+ , length(length_)
93
+ {
94
+ }
95
+ };
96
+
97
+ //!
98
+ //! \struct PluginFieldCollection
99
+ //!
100
+ //! \brief Plugin field collection struct.
101
+ //!
102
+ struct PluginFieldCollection
103
+ {
104
+ //! Number of PluginField entries.
105
+ int32_t nbFields{};
106
+ //! Pointer to PluginField entries.
107
+ PluginField const* fields{};
108
+ };
109
+
110
+ //!
111
+ //! \enum TensorRTPhase
112
+ //!
113
+ //! \brief Indicates a phase of operation of TensorRT
114
+ //!
115
+ enum class TensorRTPhase : int32_t
116
+ {
117
+ //! Build phase of TensorRT
118
+ kBUILD = 0,
119
+ //! Execution phase of TensorRT
120
+ kRUNTIME = 1
121
+ };
122
+
123
+ //!
124
+ //! \enum PluginCapabilityType
125
+ //!
126
+ //! \brief Enumerates the different capability types a IPluginV3 object may have
127
+ //!
128
+ enum class PluginCapabilityType : int32_t
129
+ {
130
+ //! Core capability. Every IPluginV3 object must have this.
131
+ kCORE = 0,
132
+ //! Build capability. IPluginV3 objects provided to TensorRT build phase must have this.
133
+ kBUILD = 1,
134
+ //! Runtime capability. IPluginV3 objects provided to TensorRT build and execution phases must have this.
135
+ kRUNTIME = 2
136
+ };
137
+
138
+ namespace v_1_0
139
+ {
140
+ class IPluginCapability : public IVersionedInterface
141
+ {
142
+ };
143
+
144
+ class IPluginResource : public IVersionedInterface
145
+ {
146
+ public:
147
+ //!
148
+ //! \brief Return version information associated with this interface. Applications must not override this method.
149
+ //!
150
+ InterfaceInfo getInterfaceInfo() const noexcept override
151
+ {
152
+ return InterfaceInfo{"IPluginResource", 1, 0};
153
+ }
154
+ //!
155
+ //! \brief Free the underlying resource
156
+ //!
157
+ //! This will only be called for IPluginResource objects that were produced from IPluginResource::clone()
158
+ //!
159
+ //! The IPluginResource object on which release() is called must still be in a clone-able state
160
+ //! after release() returns
161
+ //!
162
+ //! \return 0 for success, else non-zero
163
+ //! \usage
164
+ //! - Allowed context for the API call
165
+ //! - Thread-safe: No; this method is not required to be thread-safe
166
+ //!
167
+ virtual int32_t release() noexcept = 0;
168
+
169
+ //!
170
+ //! \brief Clone the resource object
171
+ //!
172
+ //! \note Resource initialization (if any) may be skipped for non-cloned objects since only clones will be
173
+ //! registered by TensorRT
174
+ //!
175
+ //! \return Pointer to cloned object. nullptr if there was an issue.
176
+ //!
177
+ //! \usage
178
+ //! - Allowed context for the API call
179
+ //! - Thread-safe: Yes; this method is required to be thread-safe and may be called from multiple threads.
180
+ //!
181
+ virtual IPluginResource* clone() noexcept = 0;
182
+
183
+ ~IPluginResource() noexcept override = default;
184
+
185
+ IPluginResource() = default;
186
+ IPluginResource(IPluginResource const&) = default;
187
+ IPluginResource(IPluginResource&&) = default;
188
+ IPluginResource& operator=(IPluginResource const&) & = default;
189
+ IPluginResource& operator=(IPluginResource&&) & = default;
190
+ }; // class IPluginResource
191
+
192
+ class IPluginCreatorInterface : public IVersionedInterface
193
+ {
194
+ public:
195
+ ~IPluginCreatorInterface() noexcept override = default;
196
+
197
+ protected:
198
+ IPluginCreatorInterface() = default;
199
+ IPluginCreatorInterface(IPluginCreatorInterface const&) = default;
200
+ IPluginCreatorInterface(IPluginCreatorInterface&&) = default;
201
+ IPluginCreatorInterface& operator=(IPluginCreatorInterface const&) & = default;
202
+ IPluginCreatorInterface& operator=(IPluginCreatorInterface&&) & = default;
203
+ };
204
+
205
+ class IPluginV3 : public IVersionedInterface
206
+ {
207
+ public:
208
+ //!
209
+ //! \brief Return version information associated with this interface. Applications must not override this method.
210
+ //!
211
+ InterfaceInfo getInterfaceInfo() const noexcept override
212
+ {
213
+ return InterfaceInfo{"PLUGIN", 1, 0};
214
+ }
215
+
216
+ //! \brief Return a pointer to plugin object implementing the specified PluginCapabilityType.
217
+ //!
218
+ //! \note IPluginV3 objects added for the build phase (through addPluginV3()) must return valid objects for
219
+ //! PluginCapabilityType::kCORE, PluginCapabilityType::kBUILD and PluginCapabilityType::kRUNTIME.
220
+ //!
221
+ //! \note IPluginV3 objects added for the runtime phase must return valid objects for
222
+ //! PluginCapabilityType::kCORE and PluginCapabilityType::kRUNTIME.
223
+ //!
224
+ //! \see TensorRTPhase
225
+ //! \see IPluginCreatorV3One::createPlugin()
226
+ //!
227
+ virtual IPluginCapability* getCapabilityInterface(PluginCapabilityType type) noexcept = 0;
228
+
229
+ //!
230
+ //! \brief Clone the plugin object. This copies over internal plugin parameters and returns a new plugin object with
231
+ //! these parameters. The cloned object must be in a fully initialized state.
232
+ //!
233
+ //! \note The cloned object must return valid objects through getCapabilityInterface() for at least the same
234
+ //! PluginCapabilityTypes as the original object.
235
+ //!
236
+ //! \return A cloned plugin object in an initialized state with the same parameters as the current object.
237
+ //! nullptr must be returned if the cloning fails.
238
+ //!
239
+ virtual IPluginV3* clone() noexcept = 0;
240
+ };
241
+ } // namespace v_1_0
242
+
243
+ //!
244
+ //! \class IPluginResource
245
+ //!
246
+ //! \brief Interface for plugins to define custom resources that could be shared through the plugin registry
247
+ //!
248
+ //! \see IPluginRegistry::acquirePluginResource
249
+ //! \see IPluginRegistry::releasePluginResource
250
+ //!
251
+ using IPluginResource = v_1_0::IPluginResource;
252
+
253
+ //!
254
+ //! \class IPluginCreatorInterface
255
+ //!
256
+ //! \brief Base class for all plugin creator versions.
257
+ //!
258
+ //! \see IPluginCreator and IPluginRegistry
259
+ //!
260
+ using IPluginCreatorInterface = v_1_0::IPluginCreatorInterface;
261
+
262
+ //!
263
+ //! \class IPluginV3
264
+ //!
265
+ //! \brief Plugin class for the V3 generation of user-implemented layers.
266
+ //!
267
+ //! IPluginV3 acts as a wrapper around the plugin capability interfaces that define the actual behavior of the plugin.
268
+ //!
269
+ //! \see IPluginCapability
270
+ //! \see IPluginCreatorV3One
271
+ //! \see IPluginRegistry
272
+ //!
273
+ using IPluginV3 = v_1_0::IPluginV3;
274
+
275
+ //!
276
+ //! \class IPluginCapability
277
+ //!
278
+ //! \brief Base class for plugin capability interfaces
279
+ //!
280
+ //! IPluginCapability represents a split in TensorRT V3 plugins to sub-objects that expose different types of
281
+ //! capabilites a plugin may have, as opposed to a single interface which defines all capabilities and behaviors of a
282
+ //! plugin.
283
+ //!
284
+ //! \warning Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
285
+ //!
286
+ //! \see PluginCapabilityType
287
+ //!
288
+ using IPluginCapability = v_1_0::IPluginCapability;
289
+ } // namespace nvinfer1
290
+
291
+ #endif /* NV_INFER_PLUGIN_BASE_H */
tensorrt/include/NvInferPluginUtils.h ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_PLUGIN_UTILS_H
19
+ #define NV_INFER_PLUGIN_UTILS_H
20
+
21
+ #include "NvInferRuntimeCommon.h"
22
+
23
+ //!
24
+ //! \file NvInferPluginUtils.h
25
+ //!
26
+ //! This is the API for the Nvidia provided TensorRT plugin utilities.
27
+ //! It lists all the parameters utilized by the TensorRT plugins.
28
+ //!
29
+
30
+ namespace nvinfer1
31
+ {
32
+ namespace plugin
33
+ {
34
+
35
+ //!
36
+ //! \struct PriorBoxParameters
37
+ //!
38
+ //! \brief The PriorBox plugin layer generates the prior boxes of designated sizes and aspect ratios across all
39
+ //! dimensions (H x W).
40
+ //!
41
+ //! PriorBoxParameters defines a set of parameters for creating the PriorBox plugin layer.
42
+ //!
43
+ struct PriorBoxParameters
44
+ {
45
+ float *minSize; //!< Minimum box size in pixels. Can not be nullptr.
46
+ float *maxSize; //!< Maximum box size in pixels. Can be nullptr.
47
+ float *aspectRatios; //!< Aspect ratios of the boxes. Can be nullptr.
48
+ int32_t numMinSize; //!< Number of elements in minSize. Must be larger than 0.
49
+ int32_t numMaxSize; //!< Number of elements in maxSize. Can be 0 or same as numMinSize.
50
+ int32_t numAspectRatios; //!< Number of elements in aspectRatios. Can be 0.
51
+ bool flip; //!< If true, will flip each aspect ratio. For example,
52
+ //!< if there is an aspect ratio "r", the aspect ratio "1.0/r" will be generated as well.
53
+ bool clip; //!< If true, will clip the prior so that it is within [0,1].
54
+ float variance[4]; //!< Variance for adjusting the prior boxes.
55
+ int32_t imgH; //!< Image height. If 0, then the H dimension of the data tensor will be used.
56
+ int32_t imgW; //!< Image width. If 0, then the W dimension of the data tensor will be used.
57
+ float stepH; //!< Step in H. If 0, then (float)imgH/h will be used where h is the H dimension of the 1st input tensor.
58
+ float stepW; //!< Step in W. If 0, then (float)imgW/w will be used where w is the W dimension of the 1st input tensor.
59
+ float offset; //!< Offset to the top left corner of each cell.
60
+ };
61
+
62
+ //!
63
+ //! \struct RPROIParams
64
+ //!
65
+ //! \brief RPROIParams is used to create the RPROIPlugin instance.
66
+ //!
67
+ struct RPROIParams
68
+ {
69
+ int32_t poolingH; //!< Height of the output in pixels after ROI pooling on feature map.
70
+ int32_t poolingW; //!< Width of the output in pixels after ROI pooling on feature map.
71
+ int32_t featureStride; //!< Feature stride; ratio of input image size to feature map size.
72
+ //!< Assuming that max pooling layers in the neural network use square filters.
73
+ int32_t preNmsTop; //!< Number of proposals to keep before applying NMS.
74
+ int32_t nmsMaxOut; //!< Number of remaining proposals after applying NMS.
75
+ int32_t anchorsRatioCount; //!< Number of anchor box ratios.
76
+ int32_t anchorsScaleCount; //!< Number of anchor box scales.
77
+ float iouThreshold; //!< IoU (Intersection over Union) threshold used for the NMS step.
78
+ float minBoxSize; //!< Minimum allowed bounding box size before scaling, used for anchor box calculation.
79
+ float spatialScale; //!< Spatial scale between the input image and the last feature map.
80
+ };
81
+
82
+ //!
83
+ //! \struct GridAnchorParameters
84
+ //!
85
+ //! \brief The Anchor Generator plugin layer generates the prior boxes of designated sizes and aspect ratios across all dimensions (H x W).
86
+ //! GridAnchorParameters defines a set of parameters for creating the plugin layer for all feature maps.
87
+ //!
88
+ struct GridAnchorParameters
89
+ {
90
+ float minSize; //!< Scale of anchors corresponding to finest resolution.
91
+ float maxSize; //!< Scale of anchors corresponding to coarsest resolution.
92
+ float* aspectRatios; //!< List of aspect ratios to place on each grid point.
93
+ int32_t numAspectRatios; //!< Number of elements in aspectRatios.
94
+ int32_t H; //!< Height of feature map to generate anchors for.
95
+ int32_t W; //!< Width of feature map to generate anchors for.
96
+ float variance[4]; //!< Variance for adjusting the prior boxes.
97
+ };
98
+
99
+ //!
100
+ //! \enum CodeTypeSSD
101
+ //!
102
+ //! \brief The type of encoding used for decoding the bounding boxes and loc_data.
103
+ //!
104
+ //! \deprecated Deprecated in TensorRT 10.0. DetectionOutput plugin is deprecated.
105
+ //!
106
+ enum class CodeTypeSSD : int32_t
107
+ {
108
+ CORNER TRT_DEPRECATED_ENUM = 0, //!< Use box corners.
109
+ CENTER_SIZE TRT_DEPRECATED_ENUM = 1, //!< Use box centers and size.
110
+ CORNER_SIZE TRT_DEPRECATED_ENUM = 2, //!< Use box centers and size.
111
+ TF_CENTER TRT_DEPRECATED_ENUM = 3 //!< Use box centers and size but flip x and y coordinates.
112
+ };
113
+
114
+ //!
115
+ //! \struct DetectionOutputParameters
116
+ //!
117
+ //! \brief The DetectionOutput plugin layer generates the detection output
118
+ //! based on location and confidence predictions by doing non maximum suppression.
119
+ //!
120
+ //! This plugin first decodes the bounding boxes based on the anchors generated.
121
+ //! It then performs non_max_suppression on the decoded bounding boxes.
122
+ //! DetectionOutputParameters defines a set of parameters for creating the DetectionOutput plugin layer.
123
+ //!
124
+ //! \deprecated Deprecated in TensorRT 10.0. DetectionOutput plugin is deprecated.
125
+ //!
126
+ struct TRT_DEPRECATED DetectionOutputParameters
127
+ {
128
+ bool shareLocation; //!< If true, bounding box are shared among different classes.
129
+ bool varianceEncodedInTarget; //!< If true, variance is encoded in target.
130
+ //!< Otherwise we need to adjust the predicted offset accordingly.
131
+ int32_t backgroundLabelId; //!< Background label ID. If there is no background class, set it as -1.
132
+ int32_t numClasses; //!< Number of classes to be predicted.
133
+ int32_t topK; //!< Number of boxes per image with top confidence scores that are fed
134
+ //!< into the NMS algorithm.
135
+ int32_t keepTopK; //!< Number of total bounding boxes to be kept per image after NMS step.
136
+ float confidenceThreshold; //!< Only consider detections whose confidences are larger than a threshold.
137
+ float nmsThreshold; //!< Threshold to be used in NMS.
138
+ CodeTypeSSD codeType; //!< Type of coding method for bbox.
139
+ int32_t inputOrder[3]; //!< Specifies the order of inputs {loc_data, conf_data, priorbox_data}.
140
+ bool confSigmoid; //!< Set to true to calculate sigmoid of confidence scores.
141
+ bool isNormalized; //!< Set to true if bounding box data is normalized by the network.
142
+ bool isBatchAgnostic{true}; //!< Defaults to true. Set to false if prior boxes are unique per batch.
143
+ };
144
+
145
+ //!
146
+ //! \brief When performing yolo9000, softmaxTree is helping to do softmax on confidence scores,
147
+ //! for element to get the precise classification through word-tree structured classification definition.
148
+ //!
149
+ struct softmaxTree
150
+ {
151
+ int32_t* leaf;
152
+ int32_t n;
153
+ int32_t* parent;
154
+ int32_t* child;
155
+ int32_t* group;
156
+ char** name;
157
+ int32_t groups;
158
+ int32_t* groupSize;
159
+ int32_t* groupOffset;
160
+ };
161
+
162
+ //!
163
+ //! \brief The Region plugin layer performs region proposal calculation.
164
+ //!
165
+ //! Generate 5 bounding boxes per cell (for yolo9000, generate 3 bounding boxes per cell).
166
+ //! For each box, calculating its probabilities of objects detections from 80 pre-defined classifications
167
+ //! (yolo9000 has 9418 pre-defined classifications, and these 9418 items are organized as work-tree structure).
168
+ //! RegionParameters defines a set of parameters for creating the Region plugin layer.
169
+ //!
170
+ struct RegionParameters
171
+ {
172
+ int32_t num; //!< Number of predicted bounding box for each grid cell.
173
+ int32_t coords; //!< Number of coordinates for a bounding box.
174
+ int32_t classes; //!< Number of classifications to be predicted.
175
+ softmaxTree* smTree; //!< Helping structure to do softmax on confidence scores.
176
+ };
177
+
178
+ //!
179
+ //! \brief The NMSParameters are used by the BatchedNMSPlugin for performing
180
+ //! the non_max_suppression operation over boxes for object detection networks.
181
+ //!
182
+ //! \deprecated Deprecated in TensorRT 10.0. BatchedNMSPlugin plugin is deprecated.
183
+ //!
184
+ struct TRT_DEPRECATED NMSParameters
185
+ {
186
+ bool shareLocation; //!< If set to true, the boxes inputs are shared across all classes.
187
+ //!< If set to false, the boxes input should account for per class box data.
188
+ int32_t backgroundLabelId; //!< Label ID for the background class.
189
+ //!< If there is no background class, set it as -1
190
+ int32_t numClasses; //!< Number of classes in the network.
191
+ int32_t topK; //!< Number of bounding boxes to be fed into the NMS step.
192
+ int32_t keepTopK; //!< Number of total bounding boxes to be kept per image after NMS step.
193
+ //!< Should be less than or equal to the topK value.
194
+ float scoreThreshold; //!< Scalar threshold for score (low scoring boxes are removed).
195
+ float iouThreshold; //!< A scalar threshold for IOU (new boxes that have high IOU overlap
196
+ //!< with previously selected boxes are removed).
197
+ bool isNormalized; //!< Set to false, if the box coordinates are not normalized,
198
+ //!< i.e. not in the range [0,1]. Defaults to false.
199
+ };
200
+
201
+ } // namespace plugin
202
+ } // namespace nvinfer1
203
+
204
+ #endif // NV_INFER_PLUGIN_UTILS_H
tensorrt/include/NvInferRuntime.h ADDED
The diff for this file is too large to render. See raw diff
 
tensorrt/include/NvInferRuntimeBase.h ADDED
@@ -0,0 +1,689 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_RUNTIME_BASE_H
19
+ #define NV_INFER_RUNTIME_BASE_H
20
+
21
+ #include "NvInferVersion.h"
22
+ #include <cstddef>
23
+ #include <cstdint>
24
+ #include <cuda_runtime_api.h>
25
+
26
+ // Items that are marked as deprecated will be removed in a future release.
27
+ #if __cplusplus >= 201402L
28
+ #define TRT_DEPRECATED [[deprecated]]
29
+ #define TRT_DEPRECATED_BECAUSE(REASON) [[deprecated(REASON)]]
30
+ #define TRT_DEPRECATED_ENUM TRT_DEPRECATED
31
+ #ifdef _MSC_VER
32
+ #define TRT_DEPRECATED_API __declspec(dllexport)
33
+ #else
34
+ #define TRT_DEPRECATED_API [[deprecated]] __attribute__((visibility("default")))
35
+ #endif
36
+ #else
37
+ #ifdef _MSC_VER
38
+ #define TRT_DEPRECATED
39
+ #define TRT_DEPRECATED_ENUM
40
+ #define TRT_DEPRECATED_API __declspec(dllexport)
41
+ #else
42
+ #define TRT_DEPRECATED __attribute__((deprecated))
43
+ #define TRT_DEPRECATED_ENUM
44
+ #define TRT_DEPRECATED_API __attribute__((deprecated, visibility("default")))
45
+ #endif
46
+ #define TRT_DEPRECATED_BECAUSE(REASON) TRT_DEPRECATED
47
+ #endif
48
+
49
+ //! A stand-in for `[[nodiscard]]` and `[[nodiscard(REASON)]]` that works with older compilers.
50
+ #if __cplusplus >= 201907L
51
+ #define TRT_NODISCARD [[nodiscard]]
52
+ #define TRT_NODISCARD_BECAUSE(REASON) [[nodiscard(REASON)]]
53
+ #elif __cplusplus >= 201603L
54
+ #define TRT_NODISCARD [[nodiscard]]
55
+ #define TRT_NODISCARD_BECAUSE(REASON) [[nodiscard]]
56
+ #else
57
+ #define TRT_NODISCARD
58
+ #define TRT_NODISCARD_BECAUSE(REASON)
59
+ #endif
60
+
61
+ // Defines which symbols are exported.
62
+ #ifdef TENSORRT_BUILD_LIB
63
+ #ifdef _MSC_VER
64
+ //On Windows, exports are controlled by .def files; not by dllexport.
65
+ #define TENSORRTAPI
66
+ #else
67
+ #define TENSORRTAPI __attribute__((visibility("default")))
68
+ #endif
69
+ #else
70
+ #define TENSORRTAPI
71
+ #endif
72
+ #define TRTNOEXCEPT
73
+ //!
74
+ //! \file NvInferRuntimeBase.h
75
+ //!
76
+ //! This file contains common definitions, data structures and interfaces shared between the standard and safe runtime.
77
+ //!
78
+ //! \warning Do not directly include this file. Instead include one of:
79
+ //! * NvInferRuntime.h (for the standard runtime)
80
+ //! * NvInferPluginUtils.h (for plugin utilities)
81
+ //!
82
+ #if !defined(NV_INFER_INTERNAL_INCLUDE)
83
+ static_assert(false, "Do not directly include this file. Include NvInferRuntime.h or NvInferPluginUtils.h");
84
+ #endif
85
+
86
+ //! Forward declare some CUDA types to avoid an include dependency.
87
+
88
+ extern "C"
89
+ {
90
+ //! Forward declaration of cublasContext to use in other interfaces.
91
+ struct cublasContext;
92
+ //! Forward declaration of cudnnContext to use in other interfaces.
93
+ struct cudnnContext;
94
+ }
95
+
96
+ //! Construct a single integer denoting TensorRT version.
97
+ //! Usable in preprocessor expressions.
98
+ #define NV_TENSORRT_VERSION_INT(major, minor, patch) ((major) *10000L + (minor) *100L + (patch) *1L)
99
+
100
+ //! TensorRT version as a single integer.
101
+ //! Usable in preprocessor expressions.
102
+ #define NV_TENSORRT_VERSION NV_TENSORRT_VERSION_INT(NV_TENSORRT_MAJOR, NV_TENSORRT_MINOR, NV_TENSORRT_PATCH)
103
+
104
+ //!
105
+ //! \namespace nvinfer1
106
+ //!
107
+ //! \brief The TensorRT API version 1 namespace.
108
+ //!
109
+ namespace nvinfer1
110
+ {
111
+ //! char_t is the type used by TensorRT to represent all valid characters.
112
+ using char_t = char;
113
+
114
+ //! AsciiChar is the type used by TensorRT to represent valid ASCII characters.
115
+ //! This type is widely used in automotive safety context.
116
+ using AsciiChar = char_t;
117
+
118
+ //! Forward declare IErrorRecorder for use in other interfaces.
119
+ namespace v_1_0
120
+ {
121
+ class IErrorRecorder;
122
+ } // namespace v_1_0
123
+ using IErrorRecorder = v_1_0::IErrorRecorder;
124
+
125
+ namespace impl
126
+ {
127
+ //! Declaration of EnumMaxImpl struct to store maximum number of elements in an enumeration type.
128
+ template <typename T>
129
+ struct EnumMaxImpl;
130
+ } // namespace impl
131
+
132
+ //! Maximum number of elements in an enumeration type.
133
+ template <typename T>
134
+ constexpr int32_t EnumMax() noexcept
135
+ {
136
+ return impl::EnumMaxImpl<T>::kVALUE;
137
+ }
138
+
139
+ //!
140
+ //! \enum DataType
141
+ //! \brief The type of weights and tensors.
142
+ //! The datatypes other than kBOOL, kINT32, and kINT64 are "activation datatypes,"
143
+ //! as they often represent values corresponding to inference results.
144
+ //!
145
+ enum class DataType : int32_t
146
+ {
147
+ //! 32-bit floating point format.
148
+ kFLOAT = 0,
149
+
150
+ //! IEEE 16-bit floating-point format -- has a 5 bit exponent and 11 bit significand.
151
+ kHALF = 1,
152
+
153
+ //! Signed 8-bit integer representing a quantized floating-point value.
154
+ kINT8 = 2,
155
+
156
+ //! Signed 32-bit integer format.
157
+ kINT32 = 3,
158
+
159
+ //! 8-bit boolean. 0 = false, 1 = true, other values undefined.
160
+ kBOOL = 4,
161
+
162
+ //! Unsigned 8-bit integer format.
163
+ //! Cannot be used to represent quantized floating-point values.
164
+ //! Use the IdentityLayer to convert kUINT8 network-level inputs to {kFLOAT, kHALF} prior
165
+ //! to use with other TensorRT layers, or to convert intermediate output
166
+ //! before kUINT8 network-level outputs from {kFLOAT, kHALF} to kUINT8.
167
+ //! kUINT8 conversions are only supported for {kFLOAT, kHALF}.
168
+ //! kUINT8 to {kFLOAT, kHALF} conversion will convert the integer values
169
+ //! to equivalent floating point values.
170
+ //! {kFLOAT, kHALF} to kUINT8 conversion will convert the floating point values
171
+ //! to integer values by truncating towards zero. This conversion has undefined behavior for
172
+ //! floating point values outside the range [0.0F, 256.0F) after truncation.
173
+ //! kUINT8 conversions are not supported for {kINT8, kINT32, kBOOL}.
174
+ kUINT8 = 5,
175
+
176
+ //! Signed 8-bit floating point with
177
+ //! 1 sign bit, 4 exponent bits, 3 mantissa bits, and exponent-bias 7.
178
+ kFP8 = 6,
179
+
180
+ //! Brain float -- has an 8 bit exponent and 8 bit significand.
181
+ kBF16 = 7,
182
+
183
+ //! Signed 64-bit integer type.
184
+ kINT64 = 8,
185
+
186
+ //! Signed 4-bit integer type.
187
+ kINT4 = 9,
188
+
189
+ //! 4-bit floating point type
190
+ //! 1 bit sign, 2 bit exponent, 1 bit mantissa
191
+ kFP4 = 10,
192
+
193
+ //! Unsigned representation of exponent-only 8-bit floating point type for quantization scales
194
+ kE8M0 = 11,
195
+ };
196
+
197
+ namespace impl
198
+ {
199
+ //! Maximum number of elements in DataType enum. \see DataType
200
+ template <>
201
+ struct EnumMaxImpl<DataType>
202
+ {
203
+ //! Declaration of kVALUE that represents the maximum number of elements in the DataType enum.
204
+ static constexpr int32_t kVALUE = 12;
205
+ };
206
+ } // namespace impl
207
+
208
+ //!
209
+ //! \class Dims
210
+ //! \brief Structure to define the dimensions of a tensor.
211
+ //!
212
+ //! TensorRT can also return an "invalid dims" structure. This structure is
213
+ //! represented by nbDims == -1 and d[i] == 0 for all i.
214
+ //!
215
+ //! TensorRT can also return an "unknown rank" dims structure. This structure is
216
+ //! represented by nbDims == -1 and d[i] == -1 for all i.
217
+ //!
218
+ class Dims64
219
+ {
220
+ public:
221
+ //! The maximum rank (number of dimensions) supported for a tensor.
222
+ static constexpr int32_t MAX_DIMS{8};
223
+
224
+ //! The rank (number of dimensions).
225
+ int32_t nbDims;
226
+
227
+ //! The extent of each dimension.
228
+ int64_t d[MAX_DIMS];
229
+ };
230
+
231
+ //!
232
+ //! Alias for Dims64.
233
+ //!
234
+ using Dims = Dims64;
235
+
236
+ using InterfaceKind = char const*;
237
+
238
+ //!
239
+ //! \class InterfaceInfo
240
+ //!
241
+ //! \brief Version information associated with a TRT interface
242
+ //!
243
+ class InterfaceInfo
244
+ {
245
+ public:
246
+ InterfaceKind kind;
247
+ int32_t major;
248
+ int32_t minor;
249
+ };
250
+
251
+ //!
252
+ //! \enum APILanguage
253
+ //!
254
+ //! \brief Programming language used in the implementation of a TRT interface
255
+ //!
256
+ enum class APILanguage : int32_t
257
+ {
258
+ kCPP = 0,
259
+ kPYTHON = 1
260
+ };
261
+
262
+ namespace impl
263
+ {
264
+ //! Maximum number of elements in APILanguage enum. \see APILanguage
265
+ template <>
266
+ struct EnumMaxImpl<APILanguage>
267
+ {
268
+ //! Declaration of kVALUE that represents the maximum number of elements in the APILanguage enum.
269
+ static constexpr int32_t kVALUE = 2;
270
+ };
271
+ } // namespace impl
272
+
273
+ //!
274
+ //! \class IVersionedInterface
275
+ //!
276
+ //! \brief An Interface class for version control.
277
+ //!
278
+ class IVersionedInterface
279
+ {
280
+ public:
281
+ //!
282
+ //! \brief The language used to build the implementation of this Interface.
283
+ //!
284
+ //! Applications must not override this method.
285
+ //!
286
+ virtual APILanguage getAPILanguage() const noexcept
287
+ {
288
+ return APILanguage::kCPP;
289
+ }
290
+
291
+ //!
292
+ //! \brief Return version information associated with this interface. Applications must not override this method.
293
+ //!
294
+ virtual InterfaceInfo getInterfaceInfo() const noexcept = 0;
295
+
296
+ virtual ~IVersionedInterface() noexcept = default;
297
+
298
+ protected:
299
+ IVersionedInterface() = default;
300
+ IVersionedInterface(IVersionedInterface const&) = default;
301
+ IVersionedInterface(IVersionedInterface&&) = default;
302
+ IVersionedInterface& operator=(IVersionedInterface const&) & = default;
303
+ IVersionedInterface& operator=(IVersionedInterface&&) & = default;
304
+ };
305
+
306
+ //!
307
+ //! \enum ErrorCode
308
+ //!
309
+ //! \brief Error codes that can be returned by TensorRT during execution.
310
+ //!
311
+ enum class ErrorCode : int32_t
312
+ {
313
+ //!
314
+ //! Execution completed successfully.
315
+ //!
316
+ kSUCCESS = 0,
317
+
318
+ //!
319
+ //! An error that does not fall into any other category. This error is included for forward compatibility.
320
+ //!
321
+ kUNSPECIFIED_ERROR = 1,
322
+
323
+ //!
324
+ //! A non-recoverable TensorRT error occurred. TensorRT is in an invalid internal state when this error is
325
+ //! emitted and any further calls to TensorRT will result in undefined behavior.
326
+ //!
327
+ kINTERNAL_ERROR = 2,
328
+
329
+ //!
330
+ //! An argument passed to the function is invalid in isolation.
331
+ //! This is a violation of the API contract.
332
+ //!
333
+ kINVALID_ARGUMENT = 3,
334
+
335
+ //!
336
+ //! An error occurred when comparing the state of an argument relative to other arguments. For example, the
337
+ //! dimensions for concat differ between two tensors outside of the channel dimension. This error is triggered
338
+ //! when an argument is correct in isolation, but not relative to other arguments. This is to help to distinguish
339
+ //! from the simple errors from the more complex errors.
340
+ //! This is a violation of the API contract.
341
+ //!
342
+ kINVALID_CONFIG = 4,
343
+
344
+ //!
345
+ //! An error occurred when performing an allocation of memory on the host or the device.
346
+ //! A memory allocation error is normally fatal, but in the case where the application provided its own memory
347
+ //! allocation routine, it is possible to increase the pool of available memory and resume execution.
348
+ //!
349
+ kFAILED_ALLOCATION = 5,
350
+
351
+ //!
352
+ //! One, or more, of the components that TensorRT relies on did not initialize correctly.
353
+ //! This is a system setup issue.
354
+ //!
355
+ kFAILED_INITIALIZATION = 6,
356
+
357
+ //!
358
+ //! An error occurred during execution that caused TensorRT to end prematurely, either an asynchronous error,
359
+ //! user cancellation, or other execution errors reported by CUDA/DLA. In a dynamic system, the
360
+ //! data can be thrown away and the next frame can be processed or execution can be retried.
361
+ //! This is either an execution error or a memory error.
362
+ //!
363
+ kFAILED_EXECUTION = 7,
364
+
365
+ //!
366
+ //! An error occurred during execution that caused the data to become corrupted, but execution finished. Examples
367
+ //! of this error are NaN squashing or integer overflow. In a dynamic system, the data can be thrown away and the
368
+ //! next frame can be processed or execution can be retried.
369
+ //! This is either a data corruption error, an input error, or a range error.
370
+ //! This is not used in safety but may be used in standard.
371
+ //!
372
+ kFAILED_COMPUTATION = 8,
373
+
374
+ //!
375
+ //! TensorRT was put into a bad state by incorrect sequence of function calls. An example of an invalid state is
376
+ //! specifying a layer to be DLA only without GPU fallback, and that layer is not supported by DLA. This can occur
377
+ //! in situations where a service is optimistically executing networks for multiple different configurations
378
+ //! without checking proper error configurations, and instead throwing away bad configurations caught by TensorRT.
379
+ //! This is a violation of the API contract, but can be recoverable.
380
+ //!
381
+ //! Example of a recovery:
382
+ //! GPU fallback is disabled and conv layer with large filter(63x63) is specified to run on DLA. This will fail due
383
+ //! to DLA not supporting the large kernel size. This can be recovered by either turning on GPU fallback
384
+ //! or setting the layer to run on the GPU.
385
+ //!
386
+ kINVALID_STATE = 9,
387
+
388
+ //!
389
+ //! An error occurred due to the network not being supported on the device due to constraints of the hardware or
390
+ //! system. An example is running an unsafe layer in a safety certified context, or a resource requirement for the
391
+ //! current network is greater than the capabilities of the target device. The network is otherwise correct, but
392
+ //! the network and hardware combination is problematic. This can be recoverable.
393
+ //! Examples:
394
+ //! * Scratch space requests larger than available device memory and can be recovered by increasing allowed
395
+ //! workspace size.
396
+ //! * Tensor size exceeds the maximum element count and can be recovered by reducing the maximum batch size.
397
+ //!
398
+ kUNSUPPORTED_STATE = 10,
399
+
400
+ };
401
+
402
+ namespace impl
403
+ {
404
+ //! Maximum number of elements in ErrorCode enum. \see ErrorCode
405
+ template <>
406
+ struct EnumMaxImpl<ErrorCode>
407
+ {
408
+ //! Declaration of kVALUE
409
+ static constexpr int32_t kVALUE = 11;
410
+ };
411
+ } // namespace impl
412
+
413
+ namespace v_1_0
414
+ {
415
+ class IErrorRecorder : public IVersionedInterface
416
+ {
417
+ public:
418
+ //!
419
+ //! \brief Return version information associated with this interface. Applications must not override this method.
420
+ //!
421
+ InterfaceInfo getInterfaceInfo() const noexcept override
422
+ {
423
+ return InterfaceInfo{"IErrorRecorder", 1, 0};
424
+ }
425
+
426
+ //!
427
+ //! \brief A typedef of a C-style string for reporting error descriptions.
428
+ //!
429
+ using ErrorDesc = char const*;
430
+
431
+ //!
432
+ //! \brief The length limit for an error description in bytes, excluding the '\0' string terminator.
433
+ //! Only applicable to safe runtime.
434
+ //! General error recorder implementation can use any size appropriate for the use case.
435
+ //!
436
+ static constexpr size_t kMAX_DESC_LENGTH{127U};
437
+
438
+ //!
439
+ //! \brief A typedef of a 32-bit integer for reference counting.
440
+ //!
441
+ using RefCount = int32_t;
442
+
443
+ IErrorRecorder() = default;
444
+ ~IErrorRecorder() noexcept override = default;
445
+
446
+ // Public API used to retrieve information from the error recorder.
447
+
448
+ //!
449
+ //! \brief Return the number of errors
450
+ //!
451
+ //! Determines the number of errors that occurred between the current point in execution
452
+ //! and the last time that the clear() was executed. Due to the possibility of asynchronous
453
+ //! errors occurring, a TensorRT API can return correct results, but still register errors
454
+ //! with the Error Recorder. The value of getNbErrors() must increment by 1 after each reportError()
455
+ //! call until clear() is called, or the maximum number of errors that can be stored is exceeded.
456
+ //!
457
+ //! \return Returns the number of errors detected, or 0 if there are no errors.
458
+ //! If the upper bound of errors that can be stored is exceeded, the upper bound value must
459
+ //! be returned.
460
+ //!
461
+ //! For example, if the error recorder can store up to 16 error descriptions but reportError() has
462
+ //! been called 20 times, getNbErrors() must return 16.
463
+ //!
464
+ //! \see clear(), hasOverflowed()
465
+ //!
466
+ //! \usage
467
+ //! - Allowed context for the API call
468
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
469
+ //! when multiple execution contexts are used during runtime.
470
+ //!
471
+ virtual int32_t getNbErrors() const noexcept = 0;
472
+
473
+ //!
474
+ //! \brief Returns the ErrorCode enumeration.
475
+ //!
476
+ //! \param errorIdx A 32-bit integer that indexes into the error array.
477
+ //!
478
+ //! The errorIdx specifies what error code from 0 to getNbErrors()-1 that the application
479
+ //! wants to analyze and return the error code enum.
480
+ //!
481
+ //! \return Returns the enum corresponding to errorIdx if errorIdx is in range (between 0 and getNbErrors()-1).
482
+ //! ErrorCode::kUNSPECIFIED_ERROR must be returned if errorIdx is not in range.
483
+ //!
484
+ //! \see getErrorDesc(), ErrorCode
485
+ //!
486
+ //! \usage
487
+ //! - Allowed context for the API call
488
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
489
+ //! when multiple execution contexts are used during runtime.
490
+ //!
491
+ virtual ErrorCode getErrorCode(int32_t errorIdx) const noexcept = 0;
492
+
493
+ //!
494
+ //! \brief Returns a null-terminated C-style string description of the error.
495
+ //!
496
+ //! \param errorIdx A 32-bit integer that indexes into the error array.
497
+ //!
498
+ //! For the error specified by the idx value, return the string description of the error. The
499
+ //! error string is a null-terminated C-style string. In the safety context there is a
500
+ //! constant length requirement to remove any dynamic memory allocations and the error message
501
+ //! will be truncated if it exceeds kMAX_DESC_LENGTH bytes.
502
+ //! The format of the string is "<EnumAsStr> - <Description>".
503
+ //!
504
+ //! \return Returns a string representation of the error along with a description of the error if errorIdx is in
505
+ //! range (between 0 and getNbErrors()-1). An empty string will be returned if errorIdx is not in range.
506
+ //!
507
+ //! \see getErrorCode()
508
+ //!
509
+ //! \usage
510
+ //! - Allowed context for the API call
511
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
512
+ //! when multiple execution contexts are used during runtime.
513
+ //!
514
+ virtual ErrorDesc getErrorDesc(int32_t errorIdx) const noexcept = 0;
515
+
516
+ //!
517
+ //! \brief Determine if the error stack has overflowed.
518
+ //!
519
+ //! In the case when the number of errors is large, this function is used to query if one or more
520
+ //! errors have been dropped due to lack of storage capacity. This is especially important in the
521
+ //! automotive safety case where the internal error handling mechanisms cannot allocate memory.
522
+ //!
523
+ //! \return true if errors have been dropped due to overflowing the error stack.
524
+ //!
525
+ //! \usage
526
+ //! - Allowed context for the API call
527
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
528
+ //! when multiple execution contexts are used during runtime.
529
+ //!
530
+ virtual bool hasOverflowed() const noexcept = 0;
531
+
532
+ //!
533
+ //! \brief Clear the error stack on the error recorder.
534
+ //!
535
+ //! Removes all the tracked errors by the error recorder. The implementation must guarantee that after
536
+ //! this function is called, and as long as no error occurs, the next call to getNbErrors will return
537
+ //! zero and hasOverflowed will return false.
538
+ //!
539
+ //! \see getNbErrors(), hasOverflowed()
540
+ //!
541
+ //! \usage
542
+ //! - Allowed context for the API call
543
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
544
+ //! when multiple execution contexts are used during runtime.
545
+ //!
546
+ virtual void clear() noexcept = 0;
547
+
548
+ // API used by TensorRT to report Error information to the application.
549
+
550
+ //!
551
+ //! \brief Report an error to the error recorder with the corresponding enum and description.
552
+ //!
553
+ //! \param val The error code enum that is being reported.
554
+ //! \param desc The string description of the error, which will be a NULL-terminated string.
555
+ //! For safety use cases its length is limited to kMAX_DESC_LENGTH bytes
556
+ //! (excluding the NULL terminator) and descriptions that exceed this limit will be silently truncated.
557
+ //!
558
+ //! Report an error to the user that has a given value and human readable description. The function returns false
559
+ //! if processing can continue, which implies that the reported error is not fatal. This does not guarantee that
560
+ //! processing continues, but provides a hint to TensorRT.
561
+ //! The desc C-string data is only valid during the call to reportError and may be immediately deallocated by the
562
+ //! caller when reportError returns. The implementation must not store the desc pointer in the ErrorRecorder object
563
+ //! or otherwise access the data from desc after reportError returns.
564
+ //!
565
+ //! \return True if the error is determined to be fatal and processing of the current function must end.
566
+ //!
567
+ //! \warning If the error recorder's maximum number of storable errors is exceeded, the error description will be
568
+ //! silently dropped and the value returned by getNbErrors() will not be incremented. However, the return
569
+ //! value will still signal whether the error must be considered fatal.
570
+ //!
571
+ //! \usage
572
+ //! - Allowed context for the API call
573
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
574
+ //! when multiple execution contexts are used during runtime.
575
+ //!
576
+ virtual bool reportError(ErrorCode val, ErrorDesc desc) noexcept = 0;
577
+
578
+ //!
579
+ //! \brief Increments the refcount for the current ErrorRecorder.
580
+ //!
581
+ //! Increments the reference count for the object by one and returns the current value. This reference count allows
582
+ //! the application to know that an object inside of TensorRT has taken a reference to the ErrorRecorder. TensorRT
583
+ //! guarantees that every call to IErrorRecorder::incRefCount() will be paired with a call to
584
+ //! IErrorRecorder::decRefCount() when the reference is released. It is undefined behavior to destruct the
585
+ //! ErrorRecorder when incRefCount() has been called without a corresponding decRefCount().
586
+ //!
587
+ //! \return The reference counted value after the increment completes.
588
+ //!
589
+ //! \usage
590
+ //! - Allowed context for the API call
591
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
592
+ //! when multiple execution contexts are used during runtime.
593
+ //!
594
+ virtual RefCount incRefCount() noexcept = 0;
595
+
596
+ //!
597
+ //! \brief Decrements the refcount for the current ErrorRecorder.
598
+ //!
599
+ //! Decrements the reference count for the object by one and returns the current value. This reference count allows
600
+ //! the application to know that an object inside of TensorRT has taken a reference to the ErrorRecorder. TensorRT
601
+ //! guarantees that every call to IErrorRecorder::decRefCount() will be preceded by a call to
602
+ //! IErrorRecorder::incRefCount(). It is undefined behavior to destruct the ErrorRecorder when incRefCount() has been
603
+ //! called without a corresponding decRefCount().
604
+ //!
605
+ //! \return The reference counted value after the decrement completes.
606
+ //!
607
+ //! \usage
608
+ //! - Allowed context for the API call
609
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
610
+ //! when multiple execution contexts are used during runtime.
611
+ //!
612
+ virtual RefCount decRefCount() noexcept = 0;
613
+
614
+ protected:
615
+ // @cond SuppressDoxyWarnings
616
+ IErrorRecorder(IErrorRecorder const&) = default;
617
+ IErrorRecorder(IErrorRecorder&&) = default;
618
+ IErrorRecorder& operator=(IErrorRecorder const&) & = default;
619
+ IErrorRecorder& operator=(IErrorRecorder&&) & = default;
620
+ // @endcond
621
+ }; // class IErrorRecorder
622
+ } // namespace v_1_0
623
+
624
+ //!
625
+ //! \class IErrorRecorder
626
+ //!
627
+ //! \brief Reference counted application-implemented error reporting interface for TensorRT objects.
628
+ //!
629
+ //! The error reporting mechanism is a user-defined object that interacts with the internal state of the object
630
+ //! that it is assigned to in order to determine information about abnormalities in execution. The error recorder
631
+ //! gets both an error enum that is more descriptive than pass/fail and also a string description that gives more
632
+ //! detail on the exact failure modes. In the safety context, the error strings are all limited to 128 bytes
633
+ //! or less in length, including the NULL terminator.
634
+ //!
635
+ //! The ErrorRecorder gets passed along to any class that is created from another class that has an ErrorRecorder
636
+ //! assigned to it. For example, assigning an ErrorRecorder to an IBuilder allows all INetwork's, ILayer's, and
637
+ //! ITensor's to use the same error recorder. For functions that have their own ErrorRecorder accessor functions.
638
+ //! This allows registering a different error recorder or de-registering of the error recorder for that specific
639
+ //! object.
640
+ //!
641
+ //! ErrorRecorder objects that are used in the safety runtime must define an implementation-dependent upper limit
642
+ //! of errors whose information can be stored, and drop errors above this upper limit. The limit must fit in int32_t.
643
+ //! The IErrorRecorder::hasOverflowed() method is used to signal that one or more errors have been dropped.
644
+ //!
645
+ //! The ErrorRecorder object implementation must be thread safe. All locking and synchronization is pushed to the
646
+ //! interface implementation and TensorRT does not hold any synchronization primitives when calling the interface
647
+ //! functions.
648
+ //!
649
+ //! The lifetime of the ErrorRecorder object must exceed the lifetime of all TensorRT objects that use it.
650
+ //!
651
+ using IErrorRecorder = v_1_0::IErrorRecorder;
652
+
653
+ //!
654
+ //! \enum TensorIOMode
655
+ //!
656
+ //! \brief Definition of tensor IO Mode.
657
+ //!
658
+ enum class TensorIOMode : int32_t
659
+ {
660
+ //! Tensor is not an input or output.
661
+ kNONE = 0,
662
+
663
+ //! Tensor is input to the engine.
664
+ kINPUT = 1,
665
+
666
+ //! Tensor is output by the engine.
667
+ kOUTPUT = 2
668
+ };
669
+
670
+ namespace impl
671
+ {
672
+ //! Maximum number of elements in TensorIOMode enum. \see TensorIOMode
673
+ template <>
674
+ struct EnumMaxImpl<TensorIOMode>
675
+ {
676
+ // Declaration of kVALUE that represents maximum number of elements in TensorIOMode enum
677
+ static constexpr int32_t kVALUE = 3;
678
+ };
679
+ } // namespace impl
680
+ } // namespace nvinfer1
681
+
682
+ //!
683
+ //! \brief Return the library version number.
684
+ //!
685
+ //! The format is as for TENSORRT_VERSION: (MAJOR * 100 + MINOR) * 100 + PATCH
686
+ //!
687
+ extern "C" TENSORRTAPI int32_t getInferLibVersion() noexcept;
688
+
689
+ #endif // NV_INFER_RUNTIME_BASE_H
tensorrt/include/NvInferRuntimeCommon.h ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_RUNTIME_COMMON_H
19
+ #define NV_INFER_RUNTIME_COMMON_H
20
+
21
+ //!
22
+ //! \file NvInferRuntimeCommon.h
23
+ //!
24
+ //! This file provides the nvinfer1::IPluginRegistry interface, which will be moved to the NvInferRuntime.h header
25
+ //! in a future release.
26
+ //!
27
+ //! \warning This file will be removed in a future release.
28
+ //!
29
+ //! \warning Do not directly include this file. Instead include NvInferRuntime.h
30
+ //!
31
+ #define NV_INFER_INTERNAL_INCLUDE 1
32
+ #include "NvInferPluginBase.h"
33
+ #undef NV_INFER_INTERNAL_INCLUDE
34
+ #include "NvInferRuntimePlugin.h"
35
+
36
+ namespace nvinfer1
37
+ {
38
+ //!
39
+ //! \class IPluginRegistry
40
+ //!
41
+ //! \brief Single registration point for all plugins in an application. It is
42
+ //! used to find plugin implementations during engine deserialization.
43
+ //! Internally, the plugin registry is considered to be a singleton so all
44
+ //! plugins in an application are part of the same global registry.
45
+ //! Note that the plugin registry is only supported for plugins of type
46
+ //! IPluginV2 and should also have a corresponding IPluginCreator implementation.
47
+ //!
48
+ //! \see IPluginV2 and IPluginCreator
49
+ //!
50
+ //! \warning Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
51
+ //!
52
+ //! \warning In the automotive safety context, be sure to call IPluginRegistry::setErrorRecorder() to register
53
+ //! an error recorder with the registry before using other methods in the registry.
54
+ //!
55
+ class IPluginRegistry
56
+ {
57
+ public:
58
+ //!
59
+ //! \brief Pointer for plugin library handle.
60
+ //!
61
+ using PluginLibraryHandle = void*;
62
+
63
+ //!
64
+ //! \brief Register a plugin creator implementing IPluginCreator. Returns false if any plugin creator with the same
65
+ //! name, version or namespace is already registered.
66
+ //!
67
+ //! \warning The string pluginNamespace must be 1024 bytes or less including the NULL terminator and must be NULL
68
+ //! terminated.
69
+ //!
70
+ //! \usage
71
+ //! - Allowed context for the API call
72
+ //! - Thread-safe: Yes; calls to this method will be synchronized by a mutex.
73
+ //!
74
+ //! \deprecated Deprecated in TensorRT 10.0. Superseded by
75
+ //! IPluginRegistry::registerCreator(IPluginCreatorInterface&, AsciiChar const* const).
76
+ //!
77
+ TRT_DEPRECATED virtual bool registerCreator(
78
+ IPluginCreator& creator, AsciiChar const* const pluginNamespace) noexcept = 0;
79
+
80
+ //!
81
+ //! \brief Return all the registered plugin creators and the number of
82
+ //! registered plugin creators. Returns nullptr if none found.
83
+ //!
84
+ //! \warning If any plugin creators are registered or deregistered after calling this function, the returned pointer
85
+ //! is not guaranteed to be valid thereafter.
86
+ //!
87
+ //! \usage
88
+ //! - Allowed context for the API call
89
+ //! - Thread-safe: No
90
+ //!
91
+ //! \deprecated Deprecated in TensorRT 10.0. Superseded by IPluginRegistry::getAllCreators(int32_t* const).
92
+ //!
93
+ TRT_DEPRECATED virtual IPluginCreator* const* getPluginCreatorList(int32_t* const numCreators) const noexcept = 0;
94
+
95
+ //!
96
+ //! \brief Return plugin creator based on plugin name, version, and
97
+ //! namespace associated with plugin during network creation.
98
+ //!
99
+ //! \warning The strings pluginName, pluginVersion, and pluginNamespace must be 1024 bytes or less including the
100
+ //! NULL terminator and must be NULL terminated.
101
+ //!
102
+ //! \warning Returns nullptr if a plugin creator with matching name, version, and namespace is found, but is not a
103
+ //! descendent of IPluginCreator
104
+ //!
105
+ //! \usage
106
+ //! - Allowed context for the API call
107
+ //! - Thread-safe: Yes
108
+ //!
109
+ //! \deprecated Deprecated in TensorRT 10.0. Superseded by IPluginRegistry::getCreator(AsciiChar const* const,
110
+ //! AsciiChar const* const, AsciiChar const* const).
111
+ //!
112
+ TRT_DEPRECATED virtual IPluginCreator* getPluginCreator(AsciiChar const* const pluginName,
113
+ AsciiChar const* const pluginVersion, AsciiChar const* const pluginNamespace = "") noexcept = 0;
114
+
115
+ // @cond SuppressDoxyWarnings
116
+ IPluginRegistry() = default;
117
+ IPluginRegistry(IPluginRegistry const&) = delete;
118
+ IPluginRegistry(IPluginRegistry&&) = delete;
119
+ IPluginRegistry& operator=(IPluginRegistry const&) & = delete;
120
+ IPluginRegistry& operator=(IPluginRegistry&&) & = delete;
121
+ // @endcond
122
+
123
+ protected:
124
+ virtual ~IPluginRegistry() noexcept = default;
125
+
126
+ public:
127
+ //!
128
+ //! \brief Set the ErrorRecorder for this interface
129
+ //!
130
+ //! Assigns the ErrorRecorder to this interface. The ErrorRecorder will track all errors during execution.
131
+ //! This function will call incRefCount of the registered ErrorRecorder at least once. Setting
132
+ //! recorder to nullptr unregisters the recorder with the interface, resulting in a call to decRefCount if
133
+ //! a recorder has been registered.
134
+ //!
135
+ //! \param recorder The error recorder to register with this interface.
136
+ //!
137
+ //! \see getErrorRecorder()
138
+ //!
139
+ //! \usage
140
+ //! - Allowed context for the API call
141
+ //! - Thread-safe: No
142
+ //!
143
+ virtual void setErrorRecorder(IErrorRecorder* const recorder) noexcept = 0;
144
+
145
+ //!
146
+ //! \brief Get the ErrorRecorder assigned to this interface.
147
+ //!
148
+ //! Retrieves the assigned error recorder object for the given class. A default error recorder does not exist,
149
+ //! so a nullptr will be returned if setErrorRecorder has not been called, or an ErrorRecorder has not been
150
+ //! inherited.
151
+ //!
152
+ //! \return A pointer to the IErrorRecorder object that has been registered.
153
+ //!
154
+ //! \see setErrorRecorder()
155
+ //!
156
+ //! \usage
157
+ //! - Allowed context for the API call
158
+ //! - Thread-safe: Yes
159
+ //!
160
+ virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
161
+
162
+ //!
163
+ //! \brief Deregister a previously registered plugin creator implementing IPluginCreator.
164
+ //!
165
+ //! Since there may be a desire to limit the number of plugins,
166
+ //! this function provides a mechanism for removing plugin creators registered in TensorRT.
167
+ //! The plugin creator that is specified by \p creator is removed from TensorRT and no longer tracked.
168
+ //!
169
+ //! \return True if the plugin creator was deregistered, false if it was not found in the registry or otherwise
170
+ //! could not be deregistered.
171
+ //!
172
+ //! \usage
173
+ //! - Allowed context for the API call
174
+ //! - Thread-safe: Yes
175
+ //!
176
+ //! \deprecated Deprecated in TensorRT 10.0. Superseded by
177
+ //! IPluginRegistry::deregisterCreator(IPluginCreatorInterface const&).
178
+ //!
179
+ TRT_DEPRECATED virtual bool deregisterCreator(IPluginCreator const& creator) noexcept = 0;
180
+
181
+ //!
182
+ //! \brief Return whether the parent registry will be searched if a plugin is not found in this registry
183
+ //! default: true
184
+ //!
185
+ //! \return bool variable indicating whether parent search is enabled.
186
+ //!
187
+ //! \see setParentSearchEnabled
188
+ //!
189
+ virtual bool isParentSearchEnabled() const = 0;
190
+
191
+ //!
192
+ //! \brief Set whether the parent registry will be searched if a plugin is not found in this registry.
193
+ //!
194
+ //! \param enabled The bool variable indicating whether parent search is enabled.
195
+ //!
196
+ //! \see isParentSearchEnabled
197
+ //!
198
+ virtual void setParentSearchEnabled(bool const enabled) = 0;
199
+
200
+ //!
201
+ //! \brief Load and register a shared library of plugins.
202
+ //!
203
+ //! \param pluginPath the plugin library path.
204
+ //!
205
+ //! \return The loaded plugin library handle. The call will fail and return
206
+ //! nullptr if any of the plugins are already registered.
207
+ //!
208
+ virtual PluginLibraryHandle loadLibrary(AsciiChar const* pluginPath) noexcept = 0;
209
+
210
+ //!
211
+ //! \brief Deregister plugins associated with a library. Any resources acquired when the library
212
+ //! was loaded will be released.
213
+ //!
214
+ //! \param handle the plugin library handle to deregister.
215
+ //!
216
+ virtual void deregisterLibrary(PluginLibraryHandle handle) noexcept = 0;
217
+
218
+ //!
219
+ //! \brief Register a plugin creator. Returns false if a plugin creator with the same type
220
+ //! is already registered.
221
+ //!
222
+ //! \warning The string pluginNamespace must be 1024 bytes or less including the NULL terminator and must be NULL
223
+ //! terminated.
224
+ //!
225
+ //! \usage
226
+ //! - Allowed context for the API call
227
+ //! - Thread-safe: Yes; calls to this method will be synchronized by a mutex.
228
+ //!
229
+ virtual bool registerCreator(IPluginCreatorInterface& creator, AsciiChar const* const pluginNamespace) noexcept = 0;
230
+
231
+ //!
232
+ //! \brief Return all registered plugin creators. Returns nullptr if none found.
233
+ //!
234
+ //! \warning If any plugin creators are registered or deregistered after calling this function, the returned pointer
235
+ //! is not guaranteed to be valid thereafter.
236
+ //!
237
+ //! \usage
238
+ //! - Allowed context for the API call
239
+ //! - Thread-safe: No
240
+ //!
241
+ virtual IPluginCreatorInterface* const* getAllCreators(int32_t* const numCreators) const noexcept = 0;
242
+
243
+ //!
244
+ //! \brief Return a registered plugin creator based on plugin name, version, and namespace associated with the
245
+ //! plugin during network creation.
246
+ //!
247
+ //! \warning The strings pluginName, pluginVersion, and pluginNamespace must be 1024 bytes or less including the
248
+ //! NULL terminator and must be NULL terminated.
249
+ //!
250
+ //! \usage
251
+ //! - Allowed context for the API call
252
+ //! - Thread-safe: Yes
253
+ //!
254
+ virtual IPluginCreatorInterface* getCreator(AsciiChar const* const pluginName, AsciiChar const* const pluginVersion,
255
+ AsciiChar const* const pluginNamespace = "") noexcept = 0;
256
+
257
+ //!
258
+ //! \brief Deregister a previously registered plugin creator.
259
+ //!
260
+ //! Since there may be a desire to limit the number of plugins,
261
+ //! this function provides a mechanism for removing plugin creators registered in TensorRT.
262
+ //! The plugin creator that is specified by \p creator is removed from TensorRT and no longer tracked.
263
+ //!
264
+ //! \return True if the plugin creator was deregistered, false if it was not found in the registry or otherwise
265
+ //! could not be deregistered.
266
+ //!
267
+ //! \usage
268
+ //! - Allowed context for the API call
269
+ //! - Thread-safe: Yes
270
+ //!
271
+ virtual bool deregisterCreator(IPluginCreatorInterface const& creator) noexcept = 0;
272
+
273
+ //!
274
+ //! \brief Get a plugin resource
275
+ //! \param key Key for identifying the resource. Cannot be null.
276
+ //! \param resource A plugin resource object. The object will only need to be valid until this method returns, as
277
+ //! only a clone of this object will be registered by TRT. Cannot be null.
278
+ //!
279
+ //! \return Registered plugin resource object
280
+ //!
281
+ //! \usage
282
+ //! - Allowed context for the API call
283
+ //! - Thread-safe: Yes; calls to this method will be synchronized by a mutex.
284
+ //!
285
+ virtual IPluginResource* acquirePluginResource(AsciiChar const* key, IPluginResource* resource) noexcept = 0;
286
+
287
+ //!
288
+ //! \brief Decrement reference count for the resource with this key
289
+ //! If reference count goes to zero after decrement, release() will be invoked on the resource, the key will
290
+ //! be deregistered and the resource object will be deleted
291
+ //!
292
+ //! \param key Key that was used to register the resource. Cannot be null.
293
+ //!
294
+ //! \return 0 for success, else non-zero
295
+ //!
296
+ //! \usage
297
+ //! - Allowed context for the API call
298
+ //! - Thread-safe: Yes; calls to this method will be synchronized by a mutex.
299
+ //!
300
+ virtual int32_t releasePluginResource(AsciiChar const* key) noexcept = 0;
301
+
302
+ //!
303
+ //! \brief Return all registered plugin creators by searching starting from the current registry and following
304
+ //! parent registries recursively as long as isParentSearchEnabled() returns true.
305
+ //!
306
+ //! \param[out] numCreators Pointer to an integer where the number of registered plugin creators will be stored.
307
+ //!
308
+ //! \return A pointer to an array of IPluginCreatorInterface pointers. Returns nullptr if no creators are found.
309
+ //!
310
+ //! \warning If any plugin creators are registered or deregistered after calling this function, the returned pointer
311
+ //! is not guaranteed to remain valid.
312
+ //!
313
+ //! \usage
314
+ //! - Allowed context for the API call
315
+ //! - Thread-safe: No
316
+ //!
317
+ virtual IPluginCreatorInterface* const* getAllCreatorsRecursive(int32_t* const numCreators) noexcept = 0;
318
+ };
319
+
320
+ } // namespace nvinfer1
321
+
322
+ #endif /* NV_INFER_RUNTIME_COMMON_H */
tensorrt/include/NvInferRuntimePlugin.h ADDED
@@ -0,0 +1,980 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_INFER_RUNTIME_PLUGIN_H
19
+ #define NV_INFER_RUNTIME_PLUGIN_H
20
+
21
+ #define NV_INFER_INTERNAL_INCLUDE 1
22
+ #include "NvInferPluginBase.h"
23
+ #undef NV_INFER_INTERNAL_INCLUDE
24
+
25
+ //!
26
+ //! \file NvInferRuntimePlugin.h
27
+ //!
28
+ //! This file contains common definitions, data structures and interfaces that relate to plugins and are shared
29
+ //! between the standard and safe runtime.
30
+ //!
31
+ //! \warning Do not directly include this file. Instead include NvInferRuntime.h
32
+ //!
33
+
34
+ //!
35
+ //! \namespace nvinfer1
36
+ //!
37
+ //! \brief The TensorRT API version 1 namespace.
38
+ //!
39
+ namespace nvinfer1
40
+ {
41
+
42
+ enum class TensorFormat : int32_t;
43
+ namespace v_1_0
44
+ {
45
+ class IGpuAllocator;
46
+ } // namespace v_1_0
47
+ using IGpuAllocator = v_1_0::IGpuAllocator;
48
+
49
+ //!
50
+ //! \brief PluginFormat is reserved for backward compatibility.
51
+ //!
52
+ //! \see IPluginV2::supportsFormat()
53
+ //!
54
+ using PluginFormat = TensorFormat;
55
+
56
+ //!
57
+ //! \brief Bit at the plugin version to identify that it is a plugin.
58
+ //!
59
+ static constexpr int32_t kPLUGIN_VERSION_PYTHON_BIT = 0x40;
60
+
61
+ //!
62
+ //! \struct PluginTensorDesc
63
+ //!
64
+ //! \brief Fields that a plugin might see for an input or output.
65
+ //!
66
+ //! Scale is only valid when data type is DataType::kINT8. TensorRT will set
67
+ //! the value to -1.0F if it is invalid.
68
+ //!
69
+ //! \see IPluginV2IOExt::supportsFormatCombination
70
+ //! \see IPluginV2IOExt::configurePlugin
71
+ //!
72
+ struct PluginTensorDesc
73
+ {
74
+ //! Dimensions.
75
+ Dims dims;
76
+ //! \warning DataType:kBOOL and DataType::kUINT8 are not supported.
77
+ DataType type;
78
+ //! Tensor format.
79
+ TensorFormat format;
80
+ //! Scale for INT8 data type.
81
+ float scale;
82
+ };
83
+
84
+ //!
85
+ //! \struct PluginVersion
86
+ //!
87
+ //! \brief Definition of plugin versions.
88
+ //!
89
+ //! Tag for plug-in versions. Used in upper byte of getTensorRTVersion().
90
+ //!
91
+ //! \deprecated Deprecated in TensorRT 10.10. PluginVersion is used only in relation to IPluginV2-descendent plugin
92
+ //! interfaces, which are all deprecated.
93
+ //!
94
+ enum class PluginVersion : uint8_t
95
+ {
96
+ //! IPluginV2
97
+ kV2 TRT_DEPRECATED_ENUM = 0,
98
+ //! IPluginV2Ext
99
+ kV2_EXT TRT_DEPRECATED_ENUM = 1,
100
+ //! IPluginV2IOExt
101
+ kV2_IOEXT TRT_DEPRECATED_ENUM = 2,
102
+ //! IPluginV2DynamicExt
103
+ kV2_DYNAMICEXT TRT_DEPRECATED_ENUM = 3,
104
+ //! IPluginV2DynamicExt-based Python plugins
105
+ kV2_DYNAMICEXT_PYTHON TRT_DEPRECATED_ENUM = kPLUGIN_VERSION_PYTHON_BIT | 3
106
+ };
107
+
108
+ //!
109
+ //! \enum PluginCreatorVersion
110
+ //!
111
+ //! \brief Enum to identify version of the plugin creator.
112
+ //!
113
+ //! \deprecated Deprecated in TensorRT 10.10. PluginCreatorVersion is used only in relation to plugin creators based
114
+ //! off IPluginCreator, which is deprecated.
115
+ //!
116
+ enum class PluginCreatorVersion : int32_t
117
+ {
118
+ //! IPluginCreator
119
+ kV1 TRT_DEPRECATED_ENUM = 0,
120
+ //! IPluginCreator-based Python plugin creators
121
+ kV1_PYTHON TRT_DEPRECATED_ENUM = kPLUGIN_VERSION_PYTHON_BIT
122
+ };
123
+
124
+ //!
125
+ //! \class IPluginV2
126
+ //!
127
+ //! \brief Plugin class for user-implemented layers.
128
+ //!
129
+ //! Plugins are a mechanism for applications to implement custom layers. When
130
+ //! combined with IPluginCreator it provides a mechanism to register plugins and
131
+ //! look up the Plugin Registry during de-serialization.
132
+ //!
133
+ //! \see IPluginCreator
134
+ //! \see IPluginRegistry
135
+ //!
136
+ //! \deprecated Deprecated in TensorRT 8.5. Implement IPluginV3 instead.
137
+ //!
138
+ class TRT_DEPRECATED IPluginV2
139
+ {
140
+ public:
141
+ //!
142
+ //! \brief Return the API version with which this plugin was built.
143
+ //!
144
+ //! Do not override this method as it is used by the TensorRT library to maintain backwards-compatibility with
145
+ //! plugins.
146
+ //!
147
+ //! \return The TensorRT version in the format (major * 100 + minor) * 100 + patch.
148
+ //!
149
+ //! \usage
150
+ //! - Allowed context for the API call
151
+ //! - Thread-safe: Yes, the implementation provided here is safe to call from any thread.
152
+ //!
153
+ virtual int32_t getTensorRTVersion() const noexcept
154
+ {
155
+ return NV_TENSORRT_VERSION;
156
+ }
157
+
158
+ //!
159
+ //! \brief Return the plugin type. Should match the plugin name returned by the corresponding plugin creator
160
+ //!
161
+ //! \see IPluginCreator::getPluginName()
162
+ //!
163
+ //! \warning The string returned must be NULL-terminated and have a length of 1024 bytes or less including the
164
+ //! NULL terminator.
165
+ //!
166
+ //! \usage
167
+ //! - Allowed context for the API call
168
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
169
+ //! when building networks on multiple devices sharing the same plugin.
170
+ //!
171
+ virtual AsciiChar const* getPluginType() const noexcept = 0;
172
+
173
+ //!
174
+ //! \brief Return the plugin version. Should match the plugin version returned by the corresponding plugin creator
175
+ //!
176
+ //! \see IPluginCreator::getPluginVersion()
177
+ //!
178
+ //! \warning The string returned must be NULL-terminated and have a length of 1024 bytes or less including the
179
+ //! NULL terminator.
180
+ //!
181
+ //! \usage
182
+ //! - Allowed context for the API call
183
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
184
+ //! when building networks on multiple devices sharing the same plugin.
185
+ //!
186
+ virtual AsciiChar const* getPluginVersion() const noexcept = 0;
187
+
188
+ //!
189
+ //! \brief Get the number of outputs from the layer.
190
+ //!
191
+ //! \return The number of outputs, which is a positive integer.
192
+ //!
193
+ //! This function is called by the implementations of INetworkDefinition and IBuilder. In particular, it is called
194
+ //! prior to any call to initialize().
195
+ //!
196
+ //! \usage
197
+ //! - Allowed context for the API call
198
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
199
+ //! when building networks on multiple devices sharing the same plugin.
200
+ //!
201
+ virtual int32_t getNbOutputs() const noexcept = 0;
202
+
203
+ //!
204
+ //! \brief Get the dimension of an output tensor.
205
+ //!
206
+ //! \param index The index of the output tensor. Will lie in the valid range (between 0 and getNbOutputs()-1
207
+ //! inclusive).
208
+ //! \param inputs The input tensor dimensions. Will be the start address of a Dims array of length nbInputDims.
209
+ //! \param nbInputDims The number of input tensors. Will be a non-negative integer.
210
+ //!
211
+ //! \return The output tensor dimensions if the index is in the valid range.
212
+ //! An invalid value of Dims{-1, {}} must be returned if the index is not in the valid range.
213
+ //!
214
+ //! This function is called by the implementations of INetworkDefinition and IBuilder. In particular, it is called
215
+ //! prior to any call to initialize().
216
+ //!
217
+ //! \usage
218
+ //! - Allowed context for the API call
219
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
220
+ //! when building networks on multiple devices sharing the same plugin.
221
+ //!
222
+ //! \note In any non-IPluginV2DynamicExt plugin, batch size must not be included in the returned dimensions,
223
+ //! even if the plugin is expected to be run in a network with explicit batch mode enabled.
224
+ //! Please see the TensorRT Developer Guide for more details on how plugin inputs and outputs behave.
225
+ //!
226
+ virtual Dims getOutputDimensions(int32_t index, Dims const* inputs, int32_t nbInputDims) noexcept = 0;
227
+
228
+ //!
229
+ //! \brief Check format support.
230
+ //!
231
+ //! \param type DataType requested.
232
+ //! \param format PluginFormat requested.
233
+ //!
234
+ //! \return true if the plugin supports the type-format combination.
235
+ //!
236
+ //! This function is called by the implementations of INetworkDefinition, IBuilder, and
237
+ //! safe::ICudaEngine/ICudaEngine. In particular, it is called when creating an engine and when deserializing an
238
+ //! engine.
239
+ //!
240
+ //! \warning for the format field, the values PluginFormat::kCHW4, PluginFormat::kCHW16, and PluginFormat::kCHW32
241
+ //! will not be passed in, this is to keep backward compatibility with TensorRT 5.x series. Use PluginV2IOExt
242
+ //! or PluginV2DynamicExt for other PluginFormats.
243
+ //!
244
+ //! \warning DataType:kBOOL and DataType::kUINT8 are not supported.
245
+ //!
246
+ //! \usage
247
+ //! - Allowed context for the API call
248
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
249
+ //! when building networks on multiple devices sharing the same plugin.
250
+ //!
251
+ virtual bool supportsFormat(DataType type, PluginFormat format) const noexcept = 0;
252
+
253
+ //!
254
+ //! \brief Configure the layer.
255
+ //!
256
+ //! This function is called by the builder prior to initialize(). It provides an opportunity for the layer to make
257
+ //! algorithm choices on the basis of its weights, dimensions, and maximum batch size.
258
+ //!
259
+ //! \param inputDims The input tensor dimensions. Will be the start address of a Dims array of length nbInputs.
260
+ //! \param nbInputs The number of inputs. Will be a non-negative integer.
261
+ //! \param outputDims The output tensor dimensions. Will be the start address of a Dims array of length nbOutputs.
262
+ //! \param nbOutputs The number of outputs. Will be a positive integer identical to the return value of
263
+ //! getNbOutputs().
264
+ //! \param type The data type selected for the engine.
265
+ //! \param format The format selected for the engine.
266
+ //! \param maxBatchSize The maximum batch size. Will be a positive integer.
267
+ //!
268
+ //! The dimensions passed here do not include the outermost batch size (i.e. for 2D image networks, they will be
269
+ //! 3-dimensional CHW dimensions).
270
+ //!
271
+ //! \warning for the format field, the values PluginFormat::kCHW4, PluginFormat::kCHW16, and PluginFormat::kCHW32
272
+ //! will not be passed in, this is to keep backward compatibility with TensorRT 5.x series. Use PluginV2IOExt
273
+ //! or PluginV2DynamicExt for other PluginFormats.
274
+ //!
275
+ //! \warning DataType:kBOOL and DataType::kUINT8 are not supported.
276
+ //!
277
+ //! \see clone()
278
+ //!
279
+ //! \usage
280
+ //! - Allowed context for the API call
281
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
282
+ //! when building networks on multiple devices sharing the same plugin. However, TensorRT
283
+ //! will not call this method from two threads simultaneously on a given clone of a plugin.
284
+ //!
285
+ virtual void configureWithFormat(Dims const* inputDims, int32_t nbInputs, Dims const* outputDims, int32_t nbOutputs,
286
+ DataType type, PluginFormat format, int32_t maxBatchSize) noexcept
287
+ = 0;
288
+
289
+ //!
290
+ //! \brief Initialize the layer for execution. This is called when the engine is created.
291
+ //!
292
+ //! \return 0 for success, else non-zero (which will cause engine termination).
293
+ //!
294
+ //! \usage
295
+ //! - Allowed context for the API call
296
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
297
+ //! when building networks on multiple devices sharing the same plugin or when using multiple
298
+ //! execution contexts using this plugin.
299
+ //!
300
+ virtual int32_t initialize() noexcept = 0;
301
+
302
+ //!
303
+ //! \brief Release resources acquired during plugin layer initialization. This is called when the engine is
304
+ //! destroyed.
305
+ //!
306
+ //! \see initialize()
307
+ //!
308
+ //! \usage
309
+ //! - Allowed context for the API call
310
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
311
+ //! when building networks on multiple devices sharing the same plugin or when using multiple
312
+ //! execution contexts using this plugin. However, TensorRT will not call this method from
313
+ //! two threads simultaneously on a given clone of a plugin.
314
+ //!
315
+ virtual void terminate() noexcept = 0;
316
+
317
+ //!
318
+ //! \brief Find the workspace size required by the layer.
319
+ //!
320
+ //! This function is called during engine startup, after initialize(). The workspace size returned must be
321
+ //! sufficient for any batch size up to the maximum.
322
+ //!
323
+ //! \param maxBatchSize The maximum batch size, which will be a positive integer.
324
+ //!
325
+ //! \return The workspace size in bytes, i.e. the device memory size that the plugin requires for its internal
326
+ //! computations.
327
+ //!
328
+ //! \usage
329
+ //! - Allowed context for the API call
330
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
331
+ //! when building networks on multiple devices sharing the same plugin. However, TensorRT
332
+ //! will not call this method from two threads simultaneously on a given clone of a plugin.
333
+ //!
334
+ virtual size_t getWorkspaceSize(int32_t maxBatchSize) const noexcept = 0;
335
+
336
+ //!
337
+ //! \brief Execute the layer.
338
+ //!
339
+ //! \param batchSize The number of inputs in the batch.
340
+ //! \param inputs The memory for the input tensors. Will be an array of device addresses corresponding to input
341
+ //! tensors of length nbInputs, where nbInputs is the second parameter passed to configureWithFormat().
342
+ //! The i-th input tensor will have the dimensions inputDims[i], where inputDims is the first parameter
343
+ //! that was passed to configureWithFormat().
344
+ //! \param outputs The memory for the output tensors. Will be an array of device addresses corresponding to output
345
+ //! tensors of length getNbOutputs().
346
+ //! \param workspace Workspace for execution. Will be the start address of a device buffer whose length will be at
347
+ //! least getWorkspaceSize(batchSize).
348
+ //! \param stream The stream in which to execute the kernels. This will be a valid CUDA stream.
349
+ //!
350
+ //! \return 0 for success, else non-zero (which will cause engine termination).
351
+ //!
352
+ //! \usage
353
+ //! - Allowed context for the API call
354
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
355
+ //! when multiple execution contexts are used during runtime.
356
+ //!
357
+ virtual int32_t enqueue(int32_t batchSize, void const* const* inputs, void* const* outputs, void* workspace,
358
+ cudaStream_t stream) noexcept
359
+ = 0;
360
+
361
+ //!
362
+ //! \brief Find the size of the serialization buffer required to store the plugin configuration in a binary file.
363
+ //!
364
+ //! \return The size of the serialization buffer in bytes.
365
+ //!
366
+ //! \usage
367
+ //! - Allowed context for the API call
368
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
369
+ //! when building networks on multiple devices sharing the same plugin.
370
+ //!
371
+ virtual size_t getSerializationSize() const noexcept = 0;
372
+
373
+ //!
374
+ //! \brief Serialize the layer.
375
+ //!
376
+ //! \param buffer A pointer to a host buffer to serialize data. Size of buffer will be at least as large as the
377
+ //! value returned by getSerializationSize.
378
+ //!
379
+ //! \see getSerializationSize()
380
+ //!
381
+ //! \usage
382
+ //! - Allowed context for the API call
383
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
384
+ //! when building networks on multiple devices sharing the same plugin.
385
+ //!
386
+ virtual void serialize(void* buffer) const noexcept = 0;
387
+
388
+ //!
389
+ //! \brief Destroy the plugin object. This will be called when the network, builder or engine is destroyed.
390
+ //!
391
+ //! \usage
392
+ //! - Allowed context for the API call
393
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
394
+ //! when building networks on multiple devices sharing the same plugin.
395
+ //!
396
+ virtual void destroy() noexcept = 0;
397
+
398
+ //!
399
+ //! \brief Clone the plugin object. This copies over internal plugin parameters and returns a new plugin object with
400
+ //! these parameters.
401
+ //!
402
+ //! The TensorRT runtime calls clone() to clone the plugin when an execution context is created for an engine,
403
+ //! after the engine has been created. The runtime does not call initialize() on the cloned plugin,
404
+ //! so the cloned plugin must be created in an initialized state.
405
+ //!
406
+ //! \return A cloned plugin object in an initialized state with the same parameters as the current object.
407
+ //! nullptr must be returned if the cloning fails, e.g. because of resource exhaustion.
408
+ //!
409
+ //! \usage
410
+ //! - Allowed context for the API call
411
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
412
+ //! when building networks on multiple devices sharing the same plugin or when creating multiple
413
+ //! execution contexts.
414
+ //!
415
+ virtual IPluginV2* clone() const noexcept = 0;
416
+
417
+ //!
418
+ //! \brief Set the namespace that this plugin object belongs to. Ideally, all plugin
419
+ //! objects from the same plugin library must have the same namespace.
420
+ //!
421
+ //! \param pluginNamespace The namespace for the plugin object.
422
+ //!
423
+ //! \warning The string pluginNamespace will be NULL-terminated and have a length of 1024 bytes or less including the
424
+ //! NULL terminator.
425
+ //!
426
+ //! \usage
427
+ //! - Allowed context for the API call
428
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
429
+ //! when building networks on multiple devices sharing the same plugin.
430
+ //!
431
+ virtual void setPluginNamespace(AsciiChar const* pluginNamespace) noexcept = 0;
432
+
433
+ //!
434
+ //! \brief Return the namespace of the plugin object.
435
+ //!
436
+ //! \return The namespace string that was passed to setPluginNamespace(), possibly after truncation to 1024 bytes
437
+ //! if a longer string was passed. An empty string must be returned as default value.
438
+ //!
439
+ //! \usage
440
+ //! - Allowed context for the API call
441
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
442
+ //! when building networks on multiple devices sharing the same plugin.
443
+ //!
444
+ virtual AsciiChar const* getPluginNamespace() const noexcept = 0;
445
+
446
+ // @cond SuppressDoxyWarnings
447
+ IPluginV2() = default;
448
+ virtual ~IPluginV2() noexcept = default;
449
+ // @endcond
450
+
451
+ protected:
452
+ // @cond SuppressDoxyWarnings
453
+ IPluginV2(IPluginV2 const&) = default;
454
+ IPluginV2(IPluginV2&&) = default;
455
+ IPluginV2& operator=(IPluginV2 const&) & = default;
456
+ IPluginV2& operator=(IPluginV2&&) & = default;
457
+ // @endcond
458
+ };
459
+
460
+ //!
461
+ //! \class IPluginV2Ext
462
+ //!
463
+ //! \brief Plugin class for user-implemented layers.
464
+ //!
465
+ //! Plugins are a mechanism for applications to implement custom layers. This
466
+ //! interface provides additional capabilities to the IPluginV2 interface by
467
+ //! supporting different output data types and broadcast across batches.
468
+ //!
469
+ //! \see IPluginV2
470
+ //!
471
+ //! \deprecated Deprecated in TensorRT 8.5. Implement IPluginV3 instead.
472
+ //!
473
+ class TRT_DEPRECATED IPluginV2Ext : public IPluginV2
474
+ {
475
+ public:
476
+ //!
477
+ //! \brief Return the DataType of the plugin output at the requested index.
478
+ //!
479
+ //! \param index The output tensor index in the valid range between 0 and getNbOutputs()-1.
480
+ //! \param inputTypes The data types of the input tensors, stored in an array of length nbInputs.
481
+ //! \param nbInputs The number of input tensors. Will be a non-negative integer.
482
+ //!
483
+ //! \return The data type of the output tensor with the provided index if the input tensors have the data types
484
+ //! provided in inputTypes, provided the output tensor index is in the valid range. DataType::kFLOAT must be
485
+ //! returned if the index is not in the valid range.
486
+ //!
487
+ //! The default behavior must be to return the type of the first input, or DataType::kFLOAT if the layer has no
488
+ //! inputs. The returned data type must have a format that is supported by the plugin.
489
+ //!
490
+ //! \see supportsFormat()
491
+ //!
492
+ //! \warning DataType:kBOOL and DataType::kUINT8 are not supported.
493
+ //!
494
+ //! \usage
495
+ //! - Allowed context for the API call
496
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
497
+ //! when building networks on multiple devices sharing the same plugin.
498
+ //!
499
+ virtual nvinfer1::DataType getOutputDataType(
500
+ int32_t index, nvinfer1::DataType const* inputTypes, int32_t nbInputs) const noexcept
501
+ = 0;
502
+
503
+ //!
504
+ //! \brief Return true if the output tensor is broadcast across a batch.
505
+ //!
506
+ //! \param outputIndex The index of the output tensor, which will be in the valid range between 0 and
507
+ //! nbOutputs()-1.
508
+ //! \param inputIsBroadcasted A boolean array of length nbInputs. The i-th element will be true if and only if
509
+ //! the tensor for the ith input is broadcast across a batch.
510
+ //! \param nbInputs The number of inputs. Will be a non-negative integer.
511
+ //!
512
+ //! The values in inputIsBroadcasted refer to broadcasting at the semantic level,
513
+ //! i.e. are unaffected by whether method canBroadcastInputAcrossBatch requests
514
+ //! physical replication of the values.
515
+ //!
516
+ //! \usage
517
+ //! - Allowed context for the API call
518
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
519
+ //! when building networks on multiple devices sharing the same plugin.
520
+ //!
521
+ //! \deprecated Deprecated in TensorRT 10.0. Implicit batch support is removed in TensorRT 10.0.
522
+ //!
523
+ TRT_DEPRECATED virtual bool isOutputBroadcastAcrossBatch(
524
+ int32_t outputIndex, bool const* inputIsBroadcasted, int32_t nbInputs) const noexcept
525
+ = 0;
526
+
527
+ //!
528
+ //! \brief Return true if the plugin can use an input tensor that is broadcast across batch without replication.
529
+ //!
530
+ //! \param inputIndex Index of input that could be broadcast. Will be in the valid range between 0 and
531
+ //! nbInputs - 1 where nbInputs is the maximum number of input tensors supported by this plugin.
532
+ //!
533
+ //! \return true if the index is in the valid range and the plugin is able to broadcast a single copy of this
534
+ //! input tensor across the batch. False otherwise.
535
+ //!
536
+ //! For each input whose tensor is semantically broadcast across a batch,
537
+ //! TensorRT calls this method before calling configurePlugin.
538
+ //! If canBroadcastInputAcrossBatch returns true, TensorRT will not replicate the input tensor;
539
+ //! i.e., there will be a single copy that the plugin must share across the batch.
540
+ //! If it returns false, TensorRT will replicate the input tensor
541
+ //! so that it appears like a non-broadcasted tensor.
542
+ //!
543
+ //! This method is called only for inputs that can be broadcast.
544
+ //!
545
+ //! \usage
546
+ //! - Allowed context for the API call
547
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
548
+ //! when building networks on multiple devices sharing the same plugin.
549
+ //!
550
+ //! \deprecated Deprecated in TensorRT 10.0. Implicit batch support is removed in TensorRT 10.0.
551
+ //!
552
+ TRT_DEPRECATED virtual bool canBroadcastInputAcrossBatch(int32_t inputIndex) const noexcept = 0;
553
+
554
+ //!
555
+ //! \brief Configure the layer with input and output data types.
556
+ //!
557
+ //! This function is called by the builder prior to initialize(). It provides an opportunity for the layer to make
558
+ //! algorithm choices on the basis of its weights, dimensions, data types and maximum batch size.
559
+ //!
560
+ //! \param inputDims The input tensor dimensions. Will be an array of length nbInputs.
561
+ //! \param nbInputs The number of inputs. Will be a non-negative integer.
562
+ //! \param outputDims The output tensor dimensions. Will be an array of length nbOutputs.
563
+ //! \param nbOutputs The number of outputs. Will be a positive integer.
564
+ //! \param inputTypes The data types selected for the plugin inputs. Will be an array of length nbInputs.
565
+ //! \param outputTypes The data types selected for the plugin outputs. Will be an array of length nbOutputs.
566
+ //! \param inputIsBroadcast True for each input that the plugin must broadcast across the batch.
567
+ //! Will be an array of length nbInputs.
568
+ //! \param outputIsBroadcast True for each output that TensorRT will broadcast across the batch.
569
+ //! Will be an array of length nbOutputs.
570
+ //! \param floatFormat The format selected for the engine for the floating point inputs/outputs.
571
+ //! \param maxBatchSize The maximum batch size. Will be a positive integer.
572
+ //!
573
+ //! The dimensions passed here do not include the outermost batch size (i.e. for 2D image networks, they will be
574
+ //! 3-dimensional CHW dimensions). When inputIsBroadcast or outputIsBroadcast is true, the outermost batch size for
575
+ //! that input or output must be treated as if it is one.
576
+ //! Index 'i' of inputIsBroadcast is true only if the input is semantically broadcast across the batch and
577
+ //! calling canBroadcastInputAcrossBatch with argument 'i' returns true.
578
+ //! Index 'i' of outputIsBroadcast is true only if calling isOutputBroadcastAcrossBatch with argument 'i'
579
+ //! returns true.
580
+ //!
581
+ //! \warning for the floatFormat field, the values PluginFormat::kCHW4, PluginFormat::kCHW16, and
582
+ //! PluginFormat::kCHW32 will not be passed in, this is to keep backward compatibility with TensorRT 5.x series. Use
583
+ //! PluginV2IOExt or PluginV2DynamicExt for other PluginFormats.
584
+ //!
585
+ //! \usage
586
+ //! - Allowed context for the API call
587
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
588
+ //! when building networks on multiple devices sharing the same plugin. However, TensorRT
589
+ //! will not call this method from two threads simultaneously on a given clone of a plugin.
590
+ //!
591
+ virtual void configurePlugin(Dims const* inputDims, int32_t nbInputs, Dims const* outputDims, int32_t nbOutputs,
592
+ DataType const* inputTypes, DataType const* outputTypes, bool const* inputIsBroadcast,
593
+ bool const* outputIsBroadcast, PluginFormat floatFormat, int32_t maxBatchSize) noexcept
594
+ = 0;
595
+
596
+ IPluginV2Ext() = default;
597
+ ~IPluginV2Ext() override = default;
598
+
599
+ //!
600
+ //! \brief Attach the plugin object to an execution context and grant the plugin the access to some context
601
+ //! resources.
602
+ //!
603
+ //! \param cudnn The cuDNN context handle of the execution context. Will be a valid cuDNN context handle, or
604
+ //! nullptr if TacticSource::kCUDNN is disabled.
605
+ //! \param cublas The cuBLAS context handle of the execution context. Will be a valid cuBLAS context handle, or
606
+ //! nullptr if TacticSource::kCUBLAS is disabled.
607
+ //! \param allocator The allocator used by the execution context
608
+ //!
609
+ //! This function is called automatically for each plugin when a new execution context is created. If the context
610
+ //! was created without resources, this method is not called until the resources are assigned. It is also called if
611
+ //! new resources are assigned to the context.
612
+ //!
613
+ //! If the plugin needs per-context resource, it can be allocated here.
614
+ //! The plugin can also get context-owned cuDNN and cuBLAS context here.
615
+ //!
616
+ //! \note The TacticSource::kCUDNN and TacticSource::kCUBLAS flag is disabled by default.
617
+ //! The allocator pointer is unique to each building or execution context instance having overlapping lifetimes.
618
+ //! It can be used as a key to manage resources across plugin instances sharing the same context.
619
+ //! Plugins attached to different contexts will have different handles as their execution will not overlap.
620
+ //!
621
+ //! \see TacticSources
622
+ //! \see getPluginCudnnHandle(void* executionContextIdentifier)
623
+ //! \see getPluginCublasHandle(void* excecutionContextIdentifier)
624
+ //!
625
+ //! \note In the automotive safety context, the cuDNN and cuBLAS parameters will be nullptr because cuDNN and cuBLAS
626
+ //! are not used by the safe runtime.
627
+ //!
628
+ //! \usage
629
+ //! - Allowed context for the API call
630
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
631
+ //! when building networks on multiple devices sharing the same plugin.
632
+ //!
633
+ virtual void attachToContext(
634
+ cudnnContext* /*cudnn*/, cublasContext* /*cublas*/, IGpuAllocator* /*allocator*/) noexcept
635
+ {
636
+ }
637
+
638
+ //!
639
+ //! \brief Detach the plugin object from its execution context.
640
+ //!
641
+ //! This function is called automatically for each plugin when an execution context is destroyed or the context
642
+ //! resources are unassigned from the context.
643
+ //!
644
+ //! If the plugin owns per-context resource, it can be released here.
645
+ //!
646
+ //! \usage
647
+ //! - Allowed context for the API call
648
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
649
+ //! when building networks on multiple devices sharing the same plugin.
650
+ //!
651
+ virtual void detachFromContext() noexcept {}
652
+
653
+ //!
654
+ //! \brief Clone the plugin object. This copies over internal plugin parameters as well and returns a new plugin
655
+ //! object with these parameters. If the source plugin is pre-configured with configurePlugin(), the returned object
656
+ //! must also be pre-configured. The returned object must allow attachToContext() with a new execution context.
657
+ //! Cloned plugin objects can share the same per-engine immutable resource (e.g. weights) with the source object
658
+ //! (e.g. via ref-counting) to avoid duplication.
659
+ //!
660
+ //! \return A pointer to a cloned plugin object if cloning was successful, otherwise nullptr.
661
+ //!
662
+ //! \usage
663
+ //! - Allowed context for the API call
664
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
665
+ //! when building networks on multiple devices sharing the same plugin.
666
+ //!
667
+ IPluginV2Ext* clone() const noexcept override = 0;
668
+
669
+ protected:
670
+ // @cond SuppressDoxyWarnings
671
+ IPluginV2Ext(IPluginV2Ext const&) = default;
672
+ IPluginV2Ext(IPluginV2Ext&&) = default;
673
+ IPluginV2Ext& operator=(IPluginV2Ext const&) & = default;
674
+ IPluginV2Ext& operator=(IPluginV2Ext&&) & = default;
675
+ // @endcond
676
+
677
+ //!
678
+ //! \brief Return the API version with which this plugin was built. The
679
+ //! upper byte reserved by TensorRT and is used to differentiate this from IPluginV2.
680
+ //!
681
+ //! \return In the lower three bytes, the TensorRT version in the format
682
+ //! (major * 100 + minor) * 100 + patch.
683
+ //! In the upper byte, the value 1.
684
+ //!
685
+ //! Do not override this method as it is used by the TensorRT library to maintain backwards-compatibility with
686
+ //! plugins.
687
+ //!
688
+ //! \usage
689
+ //! - Allowed context for the API call
690
+ //! - Thread-safe: Yes, the implementation provided here is safe to call from any thread.
691
+ //!
692
+ int32_t getTensorRTVersion() const noexcept override
693
+ {
694
+ return static_cast<int32_t>((static_cast<uint32_t>(PluginVersion::kV2_EXT) << 24U)
695
+ | (static_cast<uint32_t>(NV_TENSORRT_VERSION) & 0xFFFFFFU));
696
+ }
697
+
698
+ //!
699
+ //! \brief Derived classes must not implement this. In a C++11 API it would be final.
700
+ //!
701
+ //! IPluginV2Ext::configureWithFormat() is a NOP operation for all classes derived from IPluginV2Ext.
702
+ //! These classes call configurePlugin() instead.
703
+ //!
704
+ void configureWithFormat(Dims const* /*inputDims*/, int32_t /*nbInputs*/, Dims const* /*outputDims*/,
705
+ int32_t /*nbOutputs*/, DataType /*type*/, PluginFormat /*format*/, int32_t /*maxBatchSize*/) noexcept override
706
+ {
707
+ }
708
+ };
709
+
710
+ //!
711
+ //! \class IPluginV2IOExt
712
+ //!
713
+ //! \brief Plugin class for user-implemented layers.
714
+ //!
715
+ //! Plugins are a mechanism for applications to implement custom layers. This interface provides additional
716
+ //! capabilities to the IPluginV2Ext interface by extending different I/O data types and tensor formats.
717
+ //!
718
+ //! \see IPluginV2Ext
719
+ //!
720
+ //! \deprecated Deprecated in TensorRT 10.0. Implement IPluginV3 instead.
721
+ //!
722
+ class TRT_DEPRECATED IPluginV2IOExt : public IPluginV2Ext
723
+ {
724
+ public:
725
+ //!
726
+ //! \brief Configure the layer.
727
+ //!
728
+ //! This function is called by the builder prior to initialize(). It provides an opportunity for the layer to make
729
+ //! algorithm choices on the basis of the provided I/O PluginTensorDesc.
730
+ //!
731
+ //! \param in The input tensors attributes that are used for configuration.
732
+ //! \param nbInput Number of input tensors.
733
+ //! \param out The output tensors attributes that are used for configuration.
734
+ //! \param nbOutput Number of output tensors.
735
+ //!
736
+ //! \usage
737
+ //! - Allowed context for the API call
738
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
739
+ //! when building networks on multiple devices sharing the same plugin. However, TensorRT
740
+ //! will not call this method from two threads simultaneously on a given clone of a plugin.
741
+ //!
742
+ virtual void configurePlugin(
743
+ PluginTensorDesc const* in, int32_t nbInput, PluginTensorDesc const* out, int32_t nbOutput) noexcept
744
+ = 0;
745
+
746
+ //!
747
+ //! \brief Return true if plugin supports the format and datatype for the input/output indexed by pos.
748
+ //!
749
+ //! For this method inputs are numbered 0..(nbInputs-1) and outputs are numbered nbInputs..(nbInputs+nbOutputs-1).
750
+ //! Using this numbering, pos is an index into InOut, where 0 <= pos < nbInputs+nbOutputs.
751
+ //!
752
+ //! TensorRT invokes this method to ask if the input/output indexed by pos supports the format/datatype specified
753
+ //! by inOut[pos].format and inOut[pos].type. The override must return true if that format/datatype at inOut[pos]
754
+ //! are supported by the plugin. If support is conditional on other input/output formats/datatypes, the plugin can
755
+ //! make its result conditional on the formats/datatypes in inOut[0..pos-1], which will be set to values
756
+ //! that the plugin supports. The override must not inspect inOut[pos+1..nbInputs+nbOutputs-1],
757
+ //! which will have invalid values. In other words, the decision for pos must be based on inOut[0..pos] only.
758
+ //!
759
+ //! Some examples:
760
+ //!
761
+ //! * A definition for a plugin that supports only FP16 NCHW:
762
+ //!
763
+ //! return inOut.format[pos] == TensorFormat::kLINEAR && inOut.type[pos] == DataType::kHALF;
764
+ //!
765
+ //! * A definition for a plugin that supports only FP16 NCHW for its two inputs,
766
+ //! and FP32 NCHW for its single output:
767
+ //!
768
+ //! return inOut.format[pos] == TensorFormat::kLINEAR &&
769
+ //! (inOut.type[pos] == (pos < 2 ? DataType::kHALF : DataType::kFLOAT));
770
+ //!
771
+ //! * A definition for a "polymorphic" plugin with two inputs and one output that supports
772
+ //! any format or type, but the inputs and output must have the same format and type:
773
+ //!
774
+ //! return pos == 0 || (inOut.format[pos] == inOut.format[0] && inOut.type[pos] == inOut.type[0]);
775
+ //!
776
+ //! Warning: TensorRT will stop asking for formats once it finds kFORMAT_COMBINATION_LIMIT on combinations.
777
+ //!
778
+ //! \usage
779
+ //! - Allowed context for the API call
780
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
781
+ //! when building networks on multiple devices sharing the same plugin.
782
+ //!
783
+ virtual bool supportsFormatCombination(
784
+ int32_t pos, PluginTensorDesc const* inOut, int32_t nbInputs, int32_t nbOutputs) const noexcept
785
+ = 0;
786
+
787
+ // @cond SuppressDoxyWarnings
788
+ IPluginV2IOExt() = default;
789
+ ~IPluginV2IOExt() override = default;
790
+ // @endcond
791
+
792
+ protected:
793
+ // @cond SuppressDoxyWarnings
794
+ IPluginV2IOExt(IPluginV2IOExt const&) = default;
795
+ IPluginV2IOExt(IPluginV2IOExt&&) = default;
796
+ IPluginV2IOExt& operator=(IPluginV2IOExt const&) & = default;
797
+ IPluginV2IOExt& operator=(IPluginV2IOExt&&) & = default;
798
+ // @endcond
799
+
800
+ //!
801
+ //! \brief Return the API version with which this plugin was built. The upper byte is reserved by TensorRT and is
802
+ //! used to differentiate this from IPluginV2 and IPluginV2Ext.
803
+ //!
804
+ //! Do not override this method as it is used by the TensorRT library to maintain backwards-compatibility with
805
+ //! plugins.
806
+ //!
807
+ //! \usage
808
+ //! - Allowed context for the API call
809
+ //! - Thread-safe: Yes, the implementation provided here is safe to call from any thread.
810
+ //!
811
+ int32_t getTensorRTVersion() const noexcept override
812
+ {
813
+ return static_cast<int32_t>((static_cast<uint32_t>(PluginVersion::kV2_IOEXT) << 24U)
814
+ | (static_cast<uint32_t>(NV_TENSORRT_VERSION) & 0xFFFFFFU));
815
+ }
816
+
817
+ private:
818
+ // Following are obsolete base class methods, and must not be implemented or used.
819
+
820
+ //!
821
+ //! \brief Set plugin configuration.
822
+ //!
823
+ void configurePlugin(Dims const*, int32_t, Dims const*, int32_t, DataType const*, DataType const*, bool const*,
824
+ bool const*, PluginFormat, int32_t) noexcept final
825
+ {
826
+ }
827
+
828
+ //!
829
+ //! \brief Check if provided data type is supported.
830
+ //!
831
+ bool supportsFormat(DataType, PluginFormat) const noexcept final
832
+ {
833
+ return false;
834
+ }
835
+ };
836
+
837
+ namespace v_1_0
838
+ {
839
+ class TRT_DEPRECATED IPluginCreator : public IPluginCreatorInterface
840
+ {
841
+ public:
842
+ //!
843
+ //! \brief Return the plugin name.
844
+ //!
845
+ //! \warning The string returned must be NULL-terminated and have a length of 1024 bytes or less including
846
+ //! the NULL terminator.
847
+ //!
848
+ //! \usage
849
+ //! - Allowed context for the API call
850
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
851
+ //! when building networks on multiple devices sharing the same plugin or when deserializing
852
+ //! multiple engines concurrently sharing plugins.
853
+ //!
854
+ virtual AsciiChar const* getPluginName() const noexcept = 0;
855
+
856
+ //!
857
+ //! \brief Return the plugin version.
858
+ //!
859
+ //! \warning The string returned must be NULL-terminated and have a length of 1024 bytes or less including
860
+ //! the NULL terminator.
861
+ //!
862
+ //! \usage
863
+ //! - Allowed context for the API call
864
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
865
+ //! when building networks on multiple devices sharing the same plugin or when deserializing
866
+ //! multiple engines concurrently sharing plugins.
867
+ //!
868
+ virtual AsciiChar const* getPluginVersion() const noexcept = 0;
869
+
870
+ //!
871
+ //! \brief Return a list of fields that need to be passed to createPlugin.
872
+ //!
873
+ //! \see PluginFieldCollection
874
+ //!
875
+ //! \usage
876
+ //! - Allowed context for the API call
877
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
878
+ //! when building networks on multiple devices sharing the same plugin or when deserializing
879
+ //! multiple engines concurrently sharing plugins.
880
+ //!
881
+ virtual PluginFieldCollection const* getFieldNames() noexcept = 0;
882
+
883
+ //!
884
+ //! \brief Return a plugin object. Return nullptr in case of error.
885
+ //!
886
+ //! \param name A NULL-terminated name string of length 1024 or less, including the NULL terminator.
887
+ //! \param fc A pointer to a collection of fields needed for constructing the plugin.
888
+ //!
889
+ //! \usage
890
+ //! - Allowed context for the API call
891
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
892
+ //! when building networks on multiple devices sharing the same plugin or when deserializing
893
+ //! multiple engines concurrently sharing plugins.
894
+ //!
895
+ virtual IPluginV2* createPlugin(AsciiChar const* name, PluginFieldCollection const* fc) noexcept = 0;
896
+
897
+ //!
898
+ //! \brief Called during deserialization of plugin layer. Return a plugin object.
899
+ //!
900
+ //! \param name A NULL-terminated name string of length 1024 or less, including the NULL terminator.
901
+ //! \param serialData The start address of a byte array with the serialized plugin representation.
902
+ //! \param serialLength The length in bytes of the byte array with the serialized plugin representation.
903
+ //!
904
+ //! \return A deserialized plugin object
905
+ //!
906
+ //! \usage
907
+ //! - Allowed context for the API call
908
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
909
+ //! when building networks on multiple devices sharing the same plugin or when deserializing
910
+ //! multiple engines concurrently sharing plugins.
911
+ //!
912
+ virtual IPluginV2* deserializePlugin(AsciiChar const* name, void const* serialData, size_t serialLength) noexcept
913
+ = 0;
914
+
915
+ //!
916
+ //! \brief Set the namespace of the plugin creator based on the plugin
917
+ //! library it belongs to. This can be set while registering the plugin creator.
918
+ //!
919
+ //! \param pluginNamespace A NULL-terminated namespace string of length 1024 or less, including the NULL terminator
920
+ //!
921
+ //! \see IPluginRegistry::registerCreator()
922
+ //!
923
+ //! \usage
924
+ //! - Allowed context for the API call
925
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
926
+ //! when building networks on multiple devices sharing the same plugin or when deserializing
927
+ //! multiple engines concurrently sharing plugins.
928
+ //!
929
+ virtual void setPluginNamespace(AsciiChar const* pluginNamespace) noexcept = 0;
930
+
931
+ //!
932
+ //! \brief Return the namespace of the plugin creator object.
933
+ //!
934
+ //! \warning The string returned must be NULL-terminated and have a length of 1024 bytes or less including the
935
+ //! NULL terminator.
936
+ //!
937
+ //! \usage
938
+ //! - Allowed context for the API call
939
+ //! - Thread-safe: Yes, this method is required to be thread-safe and may be called from multiple threads
940
+ //! when building networks on multiple devices sharing the same plugin or when deserializing
941
+ //! multiple engines concurrently sharing plugins.
942
+ //!
943
+ virtual AsciiChar const* getPluginNamespace() const noexcept = 0;
944
+
945
+ IPluginCreator() = default;
946
+ ~IPluginCreator() override = default;
947
+
948
+ protected:
949
+ // @cond SuppressDoxyWarnings
950
+ IPluginCreator(IPluginCreator const&) = default;
951
+ IPluginCreator(IPluginCreator&&) = default;
952
+ IPluginCreator& operator=(IPluginCreator const&) & = default;
953
+ IPluginCreator& operator=(IPluginCreator&&) & = default;
954
+ // @endcond
955
+ public:
956
+ //!
957
+ //! \brief Return version information associated with this interface. Applications must not override this method.
958
+ //!
959
+ InterfaceInfo getInterfaceInfo() const noexcept override
960
+ {
961
+ return InterfaceInfo{"PLUGIN CREATOR_V1", 1, 0};
962
+ }
963
+ };
964
+ } // namespace v_1_0
965
+
966
+ //!
967
+ //! \class IPluginCreator
968
+ //!
969
+ //! \brief Plugin creator class for user implemented layers.
970
+ //!
971
+ //! \see IPlugin and IPluginFactory
972
+ //!
973
+ //! \deprecated Deprecated in TensorRT 10.0. Please implement IPluginCreatorV3One
974
+ //! along with IPluginV3 plugins instead.
975
+ //!
976
+ using IPluginCreator = v_1_0::IPluginCreator;
977
+
978
+ } // namespace nvinfer1
979
+
980
+ #endif // NV_INFER_RUNTIME_PLUGIN_H
tensorrt/include/NvInferVersion.h ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ //!
19
+ //! \file NvInferVersion.h
20
+ //!
21
+ //! Defines the TensorRT version
22
+ //!
23
+ #ifndef NV_INFER_VERSION_H
24
+ #define NV_INFER_VERSION_H
25
+
26
+ #define TRT_MAJOR_ENTERPRISE 10
27
+ #define TRT_MINOR_ENTERPRISE 16
28
+ #define TRT_PATCH_ENTERPRISE 1
29
+ #define TRT_BUILD_ENTERPRISE 11
30
+ #define NV_TENSORRT_MAJOR TRT_MAJOR_ENTERPRISE //!< TensorRT major version.
31
+ #define NV_TENSORRT_MINOR TRT_MINOR_ENTERPRISE //!< TensorRT minor version.
32
+ #define NV_TENSORRT_PATCH TRT_PATCH_ENTERPRISE //!< TensorRT patch version.
33
+ #define NV_TENSORRT_BUILD TRT_BUILD_ENTERPRISE //!< TensorRT build number.
34
+
35
+ #define NV_TENSORRT_LWS_MAJOR 0 //!< TensorRT LWS major version.
36
+ #define NV_TENSORRT_LWS_MINOR 0 //!< TensorRT LWS minor version.
37
+ #define NV_TENSORRT_LWS_PATCH 0 //!< TensorRT LWS patch version.
38
+
39
+ #define NV_TENSORRT_RELEASE_TYPE_EARLY_ACCESS 0 //!< An early access release
40
+ #define NV_TENSORRT_RELEASE_TYPE_RELEASE_CANDIDATE 1 //!< A release candidate
41
+ #define NV_TENSORRT_RELEASE_TYPE_GENERAL_AVAILABILITY 2 //!< A final release
42
+
43
+ #define NV_TENSORRT_RELEASE_TYPE NV_TENSORRT_RELEASE_TYPE_GENERAL_AVAILABILITY //!< TensorRT release type
44
+
45
+ #endif // NV_INFER_VERSION_H
tensorrt/include/NvOnnxConfig.h ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_OnnxConfig_H
19
+ #define NV_OnnxConfig_H
20
+
21
+ #include "NvInfer.h"
22
+
23
+ namespace nvonnxparser
24
+ {
25
+
26
+ //!
27
+ //! \mainpage
28
+ //!
29
+ //! This is the API documentation for the Configuration Manager for Open Neural Network Exchange (ONNX) Parser for Nvidia TensorRT Inference Engine.
30
+ //! It provides information on individual functions, classes
31
+ //! and methods. Use the index on the left to navigate the documentation.
32
+ //!
33
+ //! Please see the accompanying user guide and samples for higher-level information and general advice on using ONNX Parser and TensorRT.
34
+ //!
35
+
36
+ //!
37
+ //! \file NvOnnxConfig.h
38
+ //!
39
+ //! This is the API file for the Configuration Manager for ONNX Parser for Nvidia TensorRT.
40
+ //!
41
+
42
+ //!
43
+ //! \class IOnnxConfig
44
+ //! \brief Configuration Manager Class.
45
+ //!
46
+ class IOnnxConfig
47
+ {
48
+ public:
49
+ virtual ~IOnnxConfig() noexcept = default;
50
+ //!
51
+ //! \typedef Verbosity
52
+ //!
53
+ //! \brief Defines Verbosity level.
54
+ //!
55
+ typedef int32_t Verbosity;
56
+
57
+ //!
58
+ //! \brief Set the Model Data Type.
59
+ //!
60
+ //! Sets the Model DataType, one of the following: float -d 32 (default), half precision -d 16, and int8 -d 8 data
61
+ //! types.
62
+ //!
63
+ //! \see getModelDtype()
64
+ //!
65
+ virtual void setModelDtype(const nvinfer1::DataType) noexcept = 0;
66
+
67
+ //!
68
+ //! \brief Get the Model Data Type.
69
+ //!
70
+ //! \return the data type of the model.
71
+ //!
72
+ //! \see setModelDtype() and DataType
73
+ //!
74
+ virtual nvinfer1::DataType getModelDtype() const noexcept = 0;
75
+
76
+ //!
77
+ //! \brief Get the Model FileName.
78
+ //!
79
+ //! \return Return the Model Filename, as a null-terminated C-style string.
80
+ //!
81
+ //! \see setModelFileName()
82
+ //!
83
+ virtual char const* getModelFileName() const noexcept = 0;
84
+
85
+ //!
86
+ //! \brief Set the Model File Name.
87
+ //!
88
+ //! The Model File name contains the Network Description in ONNX pb format.
89
+ //!
90
+ //! This method copies the name string.
91
+ //!
92
+ //! \param onnxFilename The name.
93
+ //!
94
+ //! \see getModelFileName()
95
+ //!
96
+ virtual void setModelFileName(char const* onnxFilename) noexcept = 0;
97
+
98
+ //!
99
+ //! \brief Get the Verbosity Level.
100
+ //!
101
+ //! \return The Verbosity Level.
102
+ //!
103
+ //! \see addVerbosity(), reduceVerbosity()
104
+ //!
105
+ virtual Verbosity getVerbosityLevel() const noexcept = 0;
106
+
107
+ //!
108
+ //! \brief Increase the Verbosity Level.
109
+ //!
110
+ //! \return The Verbosity Level.
111
+ //!
112
+ //! \see reduceVerbosity(), setVerbosity(Verbosity)
113
+ //!
114
+ virtual void addVerbosity() noexcept = 0;
115
+
116
+ //!
117
+ //! \brief Reduce the Verbosity Level.
118
+ //!
119
+ //! \see addVerbosity(), setVerbosity(Verbosity)
120
+ //!
121
+ virtual void reduceVerbosity() noexcept = 0;
122
+
123
+ //!
124
+ //! \brief Set to specific verbosity Level.
125
+ //!
126
+ //! \see addVerbosity(), reduceVerbosity()
127
+ //!
128
+ virtual void setVerbosityLevel(Verbosity) noexcept = 0;
129
+
130
+ //!
131
+ //! \brief Returns the File Name of the Network Description as a Text File.
132
+ //!
133
+ //! \return Return the name of the file containing the network description converted to a plain text, used for
134
+ //! debugging purposes.
135
+ //!
136
+ //! \see setTextFilename()
137
+ //!
138
+ virtual char const* getTextFileName() const noexcept = 0;
139
+
140
+ //!
141
+ //! \brief Set the File Name of the Network Description as a Text File.
142
+ //!
143
+ //! This API allows setting a file name for the network description in plain text, equivalent of the ONNX protobuf.
144
+ //!
145
+ //! This method copies the name string.
146
+ //!
147
+ //! \param textFileName Name of the file.
148
+ //!
149
+ //! \see getTextFilename()
150
+ //!
151
+ virtual void setTextFileName(char const* textFileName) noexcept = 0;
152
+
153
+ //!
154
+ //! \brief Get the File Name of the Network Description as a Text File, including the weights.
155
+ //!
156
+ //! \return Return the name of the file containing the network description converted to a plain text, used for
157
+ //! debugging purposes.
158
+ //!
159
+ //! \see setFullTextFilename()
160
+ //!
161
+ virtual char const* getFullTextFileName() const noexcept = 0;
162
+
163
+ //!
164
+ //! \brief Set the File Name of the Network Description as a Text File, including the weights.
165
+ //!
166
+ //! This API allows setting a file name for the network description in plain text, equivalent of the ONNX protobuf.
167
+ //!
168
+ //! This method copies the name string.
169
+ //!
170
+ //! \param fullTextFileName Name of the file.
171
+ //!
172
+ //! \see getFullTextFilename()
173
+ //!
174
+ virtual void setFullTextFileName(char const* fullTextFileName) noexcept = 0;
175
+
176
+ //!
177
+ //! \brief Get whether the layer information will be printed.
178
+ //!
179
+ //! \return Returns whether the layer information will be printed.
180
+ //!
181
+ //! \see setPrintLayerInfo()
182
+ //!
183
+ virtual bool getPrintLayerInfo() const noexcept = 0;
184
+
185
+ //!
186
+ //! \brief Set whether the layer information will be printed.
187
+ //!
188
+ //! \see getPrintLayerInfo()
189
+ //!
190
+ virtual void setPrintLayerInfo(bool) noexcept = 0;
191
+
192
+ }; // class IOnnxConfig
193
+
194
+ TENSORRTAPI IOnnxConfig* createONNXConfig();
195
+
196
+ } // namespace nvonnxparser
197
+
198
+ #endif
tensorrt/include/NvOnnxParser.h ADDED
@@ -0,0 +1,657 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef NV_ONNX_PARSER_H
19
+ #define NV_ONNX_PARSER_H
20
+
21
+ #include "NvInfer.h"
22
+ #include <stddef.h>
23
+ #include <string>
24
+ #include <vector>
25
+
26
+ //!
27
+ //! \file NvOnnxParser.h
28
+ //!
29
+ //! This is the API for the ONNX Parser
30
+ //!
31
+
32
+ #define NV_ONNX_PARSER_MAJOR 0
33
+ #define NV_ONNX_PARSER_MINOR 1
34
+ #define NV_ONNX_PARSER_PATCH 0
35
+
36
+ static constexpr int32_t NV_ONNX_PARSER_VERSION
37
+ = ((NV_ONNX_PARSER_MAJOR * 10000) + (NV_ONNX_PARSER_MINOR * 100) + NV_ONNX_PARSER_PATCH);
38
+
39
+ //!
40
+ //! \typedef SubGraph_t
41
+ //!
42
+ //! \brief The data structure containing the parsing capability of
43
+ //! a set of nodes in an ONNX graph.
44
+ //!
45
+ typedef std::pair<std::vector<size_t>, bool> SubGraph_t;
46
+
47
+ //!
48
+ //! \typedef SubGraphCollection_t
49
+ //!
50
+ //! \brief The data structure containing all SubGraph_t partitioned
51
+ //! out of an ONNX graph.
52
+ //!
53
+ typedef std::vector<SubGraph_t> SubGraphCollection_t;
54
+
55
+ //!
56
+ //! \namespace nvonnxparser
57
+ //!
58
+ //! \brief The TensorRT ONNX parser API namespace
59
+ //!
60
+ namespace nvonnxparser
61
+ {
62
+
63
+ //! \return the numerical value of the highest-valued enumerator for type T.
64
+ //! It must be specialized for each enum type that uses it.
65
+ //! {$nv-internal-release begin}
66
+ //! \note This is different from nvinfer1::EnumMax<T>(), which is one more than that.
67
+ //! {$nv-internal-release end}
68
+ template <typename T>
69
+ constexpr int32_t EnumMax() noexcept = delete;
70
+
71
+ //!
72
+ //! \enum ErrorCode
73
+ //!
74
+ //! \brief The type of error that the parser or refitter may return
75
+ //!
76
+ enum class ErrorCode : int
77
+ {
78
+ kSUCCESS = 0,
79
+ kINTERNAL_ERROR = 1,
80
+ kMEM_ALLOC_FAILED = 2,
81
+ kMODEL_DESERIALIZE_FAILED = 3,
82
+ kINVALID_VALUE = 4,
83
+ kINVALID_GRAPH = 5,
84
+ kINVALID_NODE = 6,
85
+ kUNSUPPORTED_GRAPH = 7,
86
+ kUNSUPPORTED_NODE = 8,
87
+ kUNSUPPORTED_NODE_ATTR = 9,
88
+ kUNSUPPORTED_NODE_INPUT = 10,
89
+ kUNSUPPORTED_NODE_DATATYPE = 11,
90
+ kUNSUPPORTED_NODE_DYNAMIC = 12,
91
+ kUNSUPPORTED_NODE_SHAPE = 13,
92
+ kREFIT_FAILED = 14
93
+ };
94
+
95
+ //! Specialization. See `nvonnxparser::EnumMax()` for details.
96
+ template <>
97
+ constexpr int32_t EnumMax<ErrorCode>() noexcept
98
+ {
99
+ return 14;
100
+ }
101
+
102
+ //!
103
+ //! \brief Represents one or more OnnxParserFlag values using binary OR
104
+ //! operations, e.g., 1U << OnnxParserFlag::kNATIVE_INSTANCENORM
105
+ //!
106
+ //! \see IParser::setFlags() and IParser::getFlags()
107
+ //!
108
+ using OnnxParserFlags
109
+ = uint32_t;
110
+
111
+ enum class OnnxParserFlag : int32_t
112
+ {
113
+ //! Parse the ONNX model into the INetworkDefinition with the intention of using TensorRT's native layer
114
+ //! implementation over the plugin implementation for InstanceNormalization nodes.
115
+ //! This flag is required when building version-compatible or hardware-compatible engines.
116
+ //! This flag is set to be ON by default.
117
+ kNATIVE_INSTANCENORM = 0,
118
+ //! Enable UINT8 as a quantization data type and asymmetric quantization with non-zero zero-point values
119
+ //! in Quantize and Dequantize nodes. This flag is set to be OFF by default.
120
+ //! The resulting engine must be built targeting DLA version >= 3.16.
121
+ kENABLE_UINT8_AND_ASYMMETRIC_QUANTIZATION_DLA = 1,
122
+ //! Parse the ONNX model with per-node validation for DLA. If the model is not fully supported by DLA, then
123
+ //! parsing will fail. If this flag is set, isSubGraphSupported() will also return capability in the context of DLA
124
+ //! support. When this flag is set, a valid IBuilderConfig must be provided to the parser via setBuilderConfig().
125
+ // This flag is set to be OFF by default.
126
+ kREPORT_CAPABILITY_DLA = 2,
127
+ //! Allow a loaded plugin with the same name as an ONNX operator type to override the default ONNX implementation,
128
+ //! even if the plugin namespace attribute is not set.
129
+ //! Useful for custom plugins that replace standard ONNX operators, such as alternative implementations for better
130
+ //! performance. This flag is set to be OFF by default.
131
+ kENABLE_PLUGIN_OVERRIDE = 3,
132
+ //! Opportunistically rewrite or modify layers to make them more amenable to running on DLA.
133
+ kADJUST_FOR_DLA = 4
134
+ };
135
+
136
+ //! Specialization. See `nvonnxparser::EnumMax()` for details.
137
+ template <>
138
+ constexpr int32_t EnumMax<OnnxParserFlag>() noexcept
139
+ {
140
+ return 3;
141
+ }
142
+
143
+ //!
144
+ //! \class IParserError
145
+ //!
146
+ //! \brief an object containing information about an error
147
+ //!
148
+ class IParserError
149
+ {
150
+ public:
151
+ //!
152
+ //!\brief the error code.
153
+ //!
154
+ virtual ErrorCode code() const = 0;
155
+ //!
156
+ //!\brief description of the error.
157
+ //!
158
+ virtual char const* desc() const = 0;
159
+ //!
160
+ //!\brief source file in which the error occurred.
161
+ //!
162
+ virtual char const* file() const = 0;
163
+ //!
164
+ //!\brief source line at which the error occurred.
165
+ //!
166
+ virtual int line() const = 0;
167
+ //!
168
+ //!\brief source function in which the error occurred.
169
+ //!
170
+ virtual char const* func() const = 0;
171
+ //!
172
+ //!\brief index of the ONNX model node in which the error occurred.
173
+ //!
174
+ virtual int node() const = 0;
175
+ //!
176
+ //!\brief name of the node in which the error occurred.
177
+ //!
178
+ virtual char const* nodeName() const = 0;
179
+ //!
180
+ //!\brief name of the node operation in which the error occurred.
181
+ //!
182
+ virtual char const* nodeOperator() const = 0;
183
+ //!
184
+ //!\brief A list of the local function names, from the top level down, constituting the current
185
+ //! stack trace in which the error occurred. A top-level node that is not inside any
186
+ //! local function would return a nullptr.
187
+ //!
188
+ virtual char const* const* localFunctionStack() const = 0;
189
+ //!
190
+ //!\brief The size of the stack of local functions at the point where the error occurred.
191
+ //! A top-level node that is not inside any local function would correspond to
192
+ // a stack size of 0.
193
+ //!
194
+ virtual int32_t localFunctionStackSize() const = 0;
195
+
196
+ protected:
197
+ virtual ~IParserError() {}
198
+ };
199
+
200
+ //!
201
+ //! \class IParser
202
+ //!
203
+ //! \brief an object for parsing ONNX models into a TensorRT network definition
204
+ //!
205
+ //! \warning If the ONNX model has a graph output with the same name as a graph input,
206
+ //! the output will be renamed by prepending "__".
207
+ //!
208
+ //! \warning Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
209
+ //!
210
+ class IParser
211
+ {
212
+ public:
213
+ //!
214
+ //! \brief Parse a serialized ONNX model into the TensorRT network.
215
+ //! This method has very limited diagnostics. If parsing the serialized model
216
+ //! fails for any reason (e.g. unsupported IR version, unsupported opset, etc.)
217
+ //! it the user responsibility to intercept and report the error.
218
+ //! To obtain a better diagnostic, use the parseFromFile method below.
219
+ //!
220
+ //! \param serialized_onnx_model Pointer to the serialized ONNX model. Can be freed after this function returns.
221
+ //! \param serialized_onnx_model_size Size of the serialized ONNX model
222
+ //! in bytes
223
+ //! \param model_path Absolute path to the model file for loading external weights if required
224
+ //! \return true if the model was parsed successfully
225
+ //! \see getNbErrors() getError()
226
+ //!
227
+ virtual bool parse(
228
+ void const* serialized_onnx_model, size_t serialized_onnx_model_size, const char* model_path = nullptr) noexcept
229
+ = 0;
230
+
231
+ //!
232
+ //! \brief Parse an onnx model file, which can be a binary protobuf or a text onnx model
233
+ //! calls parse method inside.
234
+ //!
235
+ //! \param onnxModelFile name
236
+ //! \param verbosity Level
237
+ //!
238
+ //! \return true if the model was parsed successfully
239
+ //!
240
+ //!
241
+ virtual bool parseFromFile(const char* onnxModelFile, int verbosity) noexcept = 0;
242
+
243
+ //!
244
+ //! [DEPRECATED] Deprecated in TensorRT 10.1. See supportsModelV2.
245
+ //!
246
+ //! \brief Check whether TensorRT supports a particular ONNX model.
247
+ //! If the function returns True, one can proceed to engine building
248
+ //! without having to call \p parse or \p parseFromFile.
249
+ //!
250
+ //! \param serialized_onnx_model Pointer to the serialized ONNX model. Can be freed after this function returns.
251
+ //! \param serialized_onnx_model_size Size of the serialized ONNX model
252
+ //! in bytes
253
+ //! \param sub_graph_collection Container to hold supported subgraphs
254
+ //! \param model_path Absolute path to the model file for loading external weights if required
255
+ //! \return true if the model is supported
256
+ //!
257
+ TRT_DEPRECATED virtual bool supportsModel(void const* serialized_onnx_model, size_t serialized_onnx_model_size,
258
+ SubGraphCollection_t& sub_graph_collection, const char* model_path = nullptr) noexcept = 0;
259
+
260
+ //!
261
+ //! [DEPRECATED] Deprecated in TensorRT 10.13. See loadInitializer().
262
+ //!
263
+ //!\brief Parse a serialized ONNX model into the TensorRT network
264
+ //! with consideration of user provided weights
265
+ //!
266
+ //! \param serialized_onnx_model Pointer to the serialized ONNX model. Can be freed after this function returns.
267
+ //! \param serialized_onnx_model_size Size of the serialized ONNX model
268
+ //! in bytes
269
+ //! \return true if the model was parsed successfully
270
+ //! \see getNbErrors() getError()
271
+ //!
272
+ TRT_DEPRECATED virtual bool parseWithWeightDescriptors(
273
+ void const* serialized_onnx_model, size_t serialized_onnx_model_size) noexcept = 0;
274
+
275
+ //!
276
+ //!\brief Returns whether the specified operator may be supported by the
277
+ //! parser.
278
+ //!
279
+ //! Note that a result of true does not guarantee that the operator will be
280
+ //! supported in all cases (i.e., this function may return false-positives).
281
+ //!
282
+ //! \param op_name The name of the ONNX operator to check for support
283
+ //!
284
+ virtual bool supportsOperator(const char* op_name) const noexcept = 0;
285
+
286
+ //!
287
+ //!\brief Get the number of errors that occurred during prior calls to
288
+ //! \p parse
289
+ //!
290
+ //! \see getError() clearErrors() IParserError
291
+ //!
292
+ virtual int getNbErrors() const noexcept = 0;
293
+
294
+ //!
295
+ //!\brief Get an error that occurred during prior calls to \p parse
296
+ //!
297
+ //! \see getNbErrors() clearErrors() IParserError
298
+ //!
299
+ virtual IParserError const* getError(int index) const noexcept = 0;
300
+
301
+ //!
302
+ //!\brief Clear errors from prior calls to \p parse
303
+ //!
304
+ //! \see getNbErrors() getError() IParserError
305
+ //!
306
+ virtual void clearErrors() noexcept = 0;
307
+
308
+ virtual ~IParser() noexcept = default;
309
+
310
+ //!
311
+ //! \brief Query the plugin libraries needed to implement operations used by the parser in a version-compatible
312
+ //! engine.
313
+ //!
314
+ //! This provides a list of plugin libraries on the filesystem needed to implement operations
315
+ //! in the parsed network. If you are building a version-compatible engine using this network,
316
+ //! provide this list to IBuilderConfig::setPluginsToSerialize to serialize these plugins along
317
+ //! with the version-compatible engine, or, if you want to ship these plugin libraries externally
318
+ //! to the engine, ensure that IPluginRegistry::loadLibrary is used to load these libraries in the
319
+ //! appropriate runtime before deserializing the corresponding engine.
320
+ //!
321
+ //! \param[out] nbPluginLibs Returns the number of plugin libraries in the array, or -1 if there was an error.
322
+ //! \return Array of `nbPluginLibs` C-strings describing plugin library paths on the filesystem if nbPluginLibs > 0,
323
+ //! or nullptr otherwise. This array is owned by the IParser, and the pointers in the array are only valid until
324
+ //! the next call to parse(), supportsModel(), parseFromFile(), or parseWithWeightDescriptors().
325
+ //!
326
+ virtual char const* const* getUsedVCPluginLibraries(int64_t& nbPluginLibs) const noexcept = 0;
327
+
328
+ //!
329
+ //! \brief Set the parser flags.
330
+ //!
331
+ //! The flags are listed in the OnnxParserFlag enum.
332
+ //!
333
+ //! \param OnnxParserFlags The flags used when parsing an ONNX model.
334
+ //!
335
+ //! \note This function will override the previous set flags, rather than bitwise ORing the new flag.
336
+ //!
337
+ //! \see getFlags()
338
+ //!
339
+ virtual void setFlags(OnnxParserFlags onnxParserFlags) noexcept = 0;
340
+
341
+ //!
342
+ //! \brief Get the parser flags. Defaults to 0.
343
+ //!
344
+ //! \return The parser flags as a bitmask.
345
+ //!
346
+ //! \see setFlags()
347
+ //!
348
+ virtual OnnxParserFlags getFlags() const noexcept = 0;
349
+
350
+ //!
351
+ //! \brief clear a parser flag.
352
+ //!
353
+ //! clears the parser flag from the enabled flags.
354
+ //!
355
+ //! \see setFlags()
356
+ //!
357
+ virtual void clearFlag(OnnxParserFlag onnxParserFlag) noexcept = 0;
358
+
359
+ //!
360
+ //! \brief Set a single parser flag.
361
+ //!
362
+ //! Add the input parser flag to the already enabled flags.
363
+ //!
364
+ //! \see setFlags()
365
+ //!
366
+ virtual void setFlag(OnnxParserFlag onnxParserFlag) noexcept = 0;
367
+
368
+ //!
369
+ //! \brief Returns true if the parser flag is set
370
+ //!
371
+ //! \see getFlags()
372
+ //!
373
+ //! \return True if flag is set, false if unset.
374
+ //!
375
+ virtual bool getFlag(OnnxParserFlag onnxParserFlag) const noexcept = 0;
376
+
377
+ //!
378
+ //!\brief Return the i-th output ITensor object for the ONNX layer "name".
379
+ //!
380
+ //! Return the i-th output ITensor object for the ONNX layer "name".
381
+ //! If "name" is not found or i is out of range, return nullptr.
382
+ //! In the case of multiple nodes sharing the same name this function will return
383
+ //! the output tensors of the first instance of the node in the ONNX graph.
384
+ //!
385
+ //! \param name The name of the ONNX layer.
386
+ //!
387
+ //! \param i The index of the output. i must be in range [0, layer.num_outputs).
388
+ //!
389
+ virtual nvinfer1::ITensor const* getLayerOutputTensor(char const* name, int64_t i) noexcept = 0;
390
+
391
+ //!
392
+ //! \brief Check whether TensorRT supports a particular ONNX model.
393
+ //! If the function returns True, one can proceed to engine building
394
+ //! without having to call \p parse or \p parseFromFile.
395
+ //! Results can be queried through \p getNbSubgraphs, \p isSubgraphSupported,
396
+ //! \p getSubgraphNodes.
397
+ //!
398
+ //! \param serializedOnnxModel Pointer to the serialized ONNX model. Can be freed after this function returns.
399
+ //! \param serializedOnnxModelSize Size of the serialized ONNX model in bytes
400
+ //! \param modelPath Absolute path to the model file for loading external weights if required
401
+ //! \return true if the model is supported
402
+ //!
403
+ virtual bool supportsModelV2(
404
+ void const* serializedOnnxModel, size_t serializedOnnxModelSize, char const* modelPath = nullptr) noexcept = 0;
405
+
406
+ //!
407
+ //! \brief Get the number of subgraphs. Calling this function before calling \p supportsModelV2 results in undefined
408
+ //! behavior.
409
+ //!
410
+ //!
411
+ //! \return Number of subgraphs.
412
+ //!
413
+ virtual int64_t getNbSubgraphs() noexcept = 0;
414
+
415
+ //!
416
+ //! \brief Returns whether the subgraph is supported. Calling this function before calling \p supportsModelV2
417
+ //! results in undefined behavior.
418
+ //!
419
+ //!
420
+ //! \param index Index of the subgraph.
421
+ //! \return Whether the subgraph is supported.
422
+ //!
423
+ virtual bool isSubgraphSupported(int64_t const index) noexcept = 0;
424
+
425
+ //!
426
+ //! \brief Get the nodes of the specified subgraph. Calling this function before calling \p supportsModelV2 results
427
+ //! in undefined behavior.
428
+ //!
429
+ //!
430
+ //! \param index Index of the subgraph.
431
+ //! \param subgraphLength Returns the length of the subgraph as reference.
432
+ //!
433
+ //! \return Pointer to the subgraph nodes array. This pointer is owned by the Parser.
434
+ //!
435
+ virtual int64_t* getSubgraphNodes(int64_t const index, int64_t& subgraphLength) noexcept = 0;
436
+
437
+ //!
438
+ //! \brief Load a serialized ONNX model into the parser. Unlike the parse(), parseFromFile(), or
439
+ //! parseWithWeightDescriptors() functions, this function does not immediately convert the model into a TensorRT
440
+ //! INetworkDefinition. Using this function allows users to provide their own initializers for the ONNX model
441
+ //! through the loadInitializer() function.
442
+ //!
443
+ //! Only one model can be loaded at a time. Subsequent calls to loadModelProto() will result in an error.
444
+ //!
445
+ //! To begin the conversion of the model into a TensorRT INetworkDefinition, use parseModelProto().
446
+ //!
447
+ //! \param serializedOnnxModel Pointer to the serialized ONNX model. Can be freed after this function returns.
448
+ //! \param serializedOnnxModelSize Size of the serialized ONNX model in bytes.
449
+ //! \param modelPath Absolute path to the model file for loading external weights if required.
450
+ //! \return true if the model was loaded successfully
451
+ //! \see getNbErrors() getError()
452
+ //!
453
+ virtual bool loadModelProto(
454
+ void const* serializedOnnxModel, size_t serializedOnnxModelSize, char const* modelPath = nullptr) noexcept = 0;
455
+
456
+ //!
457
+ //! \brief Prompt the ONNX parser to load an initializer with user-provided binary data.
458
+ //! The lifetime of the data must exceed the lifetime of the parser.
459
+ //!
460
+ //! All user-provided initializers must be provided prior to calling refitModelProto().
461
+ //!
462
+ //! This function can be called multiple times to specify the names of multiple initializers.
463
+ //!
464
+ //! Calling this function with an initializer previously specified will overwrite the previous instance.
465
+ //!
466
+ //!
467
+ //! This function will return false if initializer validation fails. Possible validation errors are:
468
+ //! * This function was called prior to loadModelProto().
469
+ //! * The requested initializer was not found in the model.
470
+ //! * The size of the data provided is different from the corresponding initializer in the model.
471
+ //!
472
+ //! \param name Name of the initializer.
473
+ //! \param data Binary data containing the values of the initializer.
474
+ //! \param size Size of the initializer in bytes.
475
+ //! \return true if the initializer was loaded successfully
476
+ //! \see loadModelProto()
477
+ //!
478
+ virtual bool loadInitializer(char const* name, void const* data, size_t size) noexcept = 0;
479
+
480
+ //! \brief Begin the parsing and conversion process of the loaded ONNX model into a TensorRT INetworkDefinition.
481
+ //!
482
+ //! \return true if conversion was successful
483
+ //! \see getNbErrors() getError() loadModelProto() loadModelProtoFromFile()
484
+ //!
485
+ virtual bool parseModelProto() noexcept = 0;
486
+
487
+ //!
488
+ //! \brief Set the BuilderConfig for the parser.
489
+ //!
490
+ //! \return true if the IBuilderConfig was set successfully, false otherwise.
491
+ //!
492
+ virtual bool setBuilderConfig(const nvinfer1::IBuilderConfig* const builderConfig) noexcept = 0;
493
+ };
494
+
495
+ //!
496
+ //! \class IParserRefitter
497
+ //!
498
+ //! \brief An interface designed to refit weights from an ONNX model.
499
+ //!
500
+ //! \warning Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
501
+ //!
502
+ class IParserRefitter
503
+ {
504
+ public:
505
+ //!
506
+ //! \brief Load a serialized ONNX model from memory and perform weight refit.
507
+ //!
508
+ //! \param serializedOnnxModel Pointer to the serialized ONNX model
509
+ //! \param serializedOnnxModelSize Size of the serialized ONNX model
510
+ //! in bytes
511
+ //! \param modelPath Absolute path to the model file for loading external weights if required
512
+ //! \return true if all the weights in the engine were refit successfully.
513
+ //!
514
+ //! The serialized ONNX model must be identical to the one used to generate the engine
515
+ //! that will be refit.
516
+ //!
517
+ virtual bool refitFromBytes(
518
+ void const* serializedOnnxModel, size_t serializedOnnxModelSize, char const* modelPath = nullptr) noexcept
519
+ = 0;
520
+
521
+ //!
522
+ //! \brief Load and parse a ONNX model from disk and perform weight refit.
523
+ //!
524
+ //! \param onnxModelFile Path to the ONNX model to load from disk.
525
+ //!
526
+ //! \return true if the model was loaded successfully, and if all the weights in the engine were refit successfully.
527
+ //!
528
+ //! The provided ONNX model must be identical to the one used to generate the engine
529
+ //! that will be refit.
530
+ //!
531
+ virtual bool refitFromFile(char const* onnxModelFile) noexcept = 0;
532
+
533
+ //!
534
+ //!\brief Get the number of errors that occurred during prior calls to \p refitFromBytes or \p refitFromFile
535
+ //!
536
+ //! \see getError() IParserError
537
+ //!
538
+ virtual int32_t getNbErrors() const noexcept = 0;
539
+
540
+ //!
541
+ //!\brief Get an error that occurred during prior calls to \p refitFromBytes or \p refitFromFile
542
+ //!
543
+ //! \see getNbErrors() IParserError
544
+ //!
545
+ virtual IParserError const* getError(int32_t index) const noexcept = 0;
546
+
547
+ //!
548
+ //!\brief Clear errors from prior calls to \p refitFromBytes or \p refitFromFile
549
+ //!
550
+ //! \see getNbErrors() getError() IParserError
551
+ //!
552
+ virtual void clearErrors() = 0;
553
+
554
+ virtual ~IParserRefitter() noexcept = default;
555
+
556
+ //!
557
+ //! \brief Load a serialized ONNX model into the parser. Unlike the refit(), or refitFromFile()
558
+ //! functions, this function does not immediately begin the refit process. Using this function
559
+ //! allows users to provide their own initializers for the ONNX model through the loadInitializer() function.
560
+ //!
561
+ //! Only one model can be loaded at a time. Subsequent calls to loadModelProto() will result in an error.
562
+ //!
563
+ //! To begin the refit process, use refitModelProto().
564
+ //!
565
+ //! \param serializedOnnxModel Pointer to the serialized ONNX model. Can be freed after this function returns.
566
+ //! \param serializedOnnxModelSize Size of the serialized ONNX model in bytes.
567
+ //! \param modelPath Absolute path to the model file for loading external weights if required.
568
+ //! \return true if the model was loaded successfully
569
+ //! \see getNbErrors() getError()
570
+ //!
571
+ virtual bool loadModelProto(
572
+ void const* serializedOnnxModel, size_t serializedOnnxModelSize, char const* modelPath = nullptr) noexcept = 0;
573
+
574
+ //!
575
+ //! \brief Prompt the ONNX refitter to load an initializer with user-provided binary data.
576
+ //! The lifetime of the data must exceed the lifetime of the refitter.
577
+ //!
578
+ //! All user-provided initializers must be provided prior to calling refitModelProto().
579
+ //!
580
+ //! This function can be called multiple times to specify the names of multiple initializers.
581
+ //!
582
+ //! Calling this function with an initializer previously specified will overwrite the previous instance.
583
+ //!
584
+ //! This function will return false if initializer validation fails. Possible validation errors are:
585
+ //! * This function was called prior to loadModelProto()
586
+ //! * The requested initializer was not found in the model.
587
+ //! * The size of the data provided is different from the corresponding initializer in the model.
588
+ //!
589
+ //! \param name Name of the initializer.
590
+ //! \param data Binary data containing the values of the initializer.
591
+ //! \param size Size of the initializer in bytes.
592
+ //! \return true if the initializer was loaded successfully
593
+ //! \see loadModelProto()
594
+ //!
595
+ virtual bool loadInitializer(char const* name, void const* data, size_t size) noexcept = 0;
596
+
597
+ //! \brief Begin the refit process from the loaded ONNX model.
598
+ //!
599
+ //! \return true if refit was successful
600
+ //! \see getNbErrors() getError() loadModelProto()
601
+ //!
602
+ virtual bool refitModelProto() noexcept = 0;
603
+ };
604
+
605
+ } // namespace nvonnxparser
606
+
607
+ extern "C" TENSORRTAPI void* createNvOnnxParser_INTERNAL(void* network, void* logger, int version) noexcept;
608
+ extern "C" TENSORRTAPI void* createNvOnnxParserRefitter_INTERNAL(
609
+ void* refitter, void* logger, int32_t version) noexcept;
610
+ extern "C" TENSORRTAPI int getNvOnnxParserVersion() noexcept;
611
+
612
+ namespace nvonnxparser
613
+ {
614
+
615
+ namespace
616
+ {
617
+
618
+ //!
619
+ //! \brief Create a new parser object
620
+ //!
621
+ //! \param network The network definition that the parser will write to
622
+ //! \param logger The logger to use
623
+ //! \return a new parser object or NULL if an error occurred
624
+ //!
625
+ //! Any input dimensions that are constant should not be changed after parsing,
626
+ //! because correctness of the translation may rely on those constants.
627
+ //! Changing a dynamic input dimension, i.e. one that translates to -1 in
628
+ //! TensorRT, to a constant is okay if the constant is consistent with the model.
629
+ //! Each instance of the parser is designed to only parse one ONNX model once.
630
+ //!
631
+ //! \see IParser
632
+ //!
633
+ inline IParser* createParser(nvinfer1::INetworkDefinition& network, nvinfer1::ILogger& logger) noexcept
634
+ {
635
+ return static_cast<IParser*>(createNvOnnxParser_INTERNAL(&network, &logger, NV_ONNX_PARSER_VERSION));
636
+ }
637
+
638
+ //!
639
+ //! \brief Create a new ONNX refitter object
640
+ //!
641
+ //! \param refitter The Refitter object used to refit the model
642
+ //! \param logger The logger to use
643
+ //! \return a new ParserRefitter object or NULL if an error occurred
644
+ //!
645
+ //! \see IParserRefitter
646
+ //!
647
+ inline IParserRefitter* createParserRefitter(nvinfer1::IRefitter& refitter, nvinfer1::ILogger& logger) noexcept
648
+ {
649
+ return static_cast<IParserRefitter*>(
650
+ createNvOnnxParserRefitter_INTERNAL(&refitter, &logger, NV_ONNX_PARSER_VERSION));
651
+ }
652
+
653
+ } // namespace
654
+
655
+ } // namespace nvonnxparser
656
+
657
+ #endif // NV_ONNX_PARSER_H
tensorrt/include/impl/NvInferPythonPlugin.h ADDED
@@ -0,0 +1,594 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #ifndef TRT_PYTHON_IMPL_PLUGIN_H
19
+ #define TRT_PYTHON_IMPL_PLUGIN_H
20
+
21
+ #include "NvInfer.h"
22
+
23
+ //!
24
+ //! \file NvInferPythonPlugin.h
25
+ //!
26
+ //! This file contains definitions for supporting the `tensorrt.plugin` Python module
27
+ //!
28
+ //! \warning None of the defintions here are part of the TensorRT C++ API and may not follow semantic versioning rules.
29
+ //! TensorRT clients must not utilize them directly.
30
+ //!
31
+
32
+ namespace nvinfer1
33
+ {
34
+
35
+ //! \enum PluginArgType
36
+ //! \brief Numeric type of an extra kernel input argument in an AOT Python plugin
37
+ enum class PluginArgType : int32_t
38
+ {
39
+ //! Integer argument
40
+ kINT = 0,
41
+ };
42
+
43
+ //! \enum PluginArgDataType
44
+ //! \brief Data type of an extra kernel input argument in an AOT Python plugin
45
+ enum class PluginArgDataType : int32_t
46
+ {
47
+ //! 8-bit signed integer
48
+ kINT8 = 0,
49
+ //! 16-bit signed integer
50
+ kINT16 = 1,
51
+ //! 32-bit signed integer
52
+ kINT32 = 2,
53
+ };
54
+ //! \class ISymExpr
55
+ //! \brief Generic interface for a scalar symbolic expression implementable by a Python plugin / TensorRT Python backend
56
+ class ISymExpr
57
+ {
58
+ public:
59
+ //! \brief Get the type of the symbolic expression
60
+ virtual PluginArgType getType() const noexcept = 0;
61
+ //! \brief Get the data type of the symbolic expression
62
+ virtual PluginArgDataType getDataType() const noexcept = 0;
63
+ //! \brief Underlying symbolic expression
64
+ virtual void* getExpr() noexcept = 0;
65
+ };
66
+
67
+ //! Impl class for ISymExprs
68
+ class ISymExprsImpl
69
+ {
70
+ public:
71
+ virtual ISymExpr* getSymExpr(int32_t index) const noexcept = 0;
72
+ virtual bool setSymExpr(int32_t index, ISymExpr* symExpr) noexcept = 0;
73
+ virtual int32_t getNbSymExprs() const noexcept = 0;
74
+ virtual bool setNbSymExprs(int32_t count) noexcept = 0;
75
+
76
+ virtual ~ISymExprsImpl() noexcept = default;
77
+ };
78
+
79
+ //! \class ISymExprs
80
+ //! \brief Allows for a sequence of symbolic expressions to be communicated to the TensorRT backend
81
+ //! \note Clients must not implement this class.
82
+ //! \see ISymExpr
83
+ class ISymExprs
84
+ {
85
+ public:
86
+ //! \brief Get the symbolic expression at the given index
87
+ //! \return A pointer to the symbolic expression or nullptr if the index is out of range
88
+ ISymExpr* getSymExpr(int32_t index) const noexcept
89
+ {
90
+ return mImpl->getSymExpr(index);
91
+ }
92
+
93
+ //! \brief Set the symbolic expression at the given index
94
+ //! \return true if the index is in range and the symbolic expression was set successfully, false otherwise
95
+ bool setSymExpr(int32_t index, ISymExpr* symExpr) noexcept
96
+ {
97
+ return mImpl->setSymExpr(index, symExpr);
98
+ }
99
+
100
+ //! \brief Get the number of symbolic expressions
101
+ int32_t getNbSymExprs() const noexcept
102
+ {
103
+ return mImpl->getNbSymExprs();
104
+ }
105
+
106
+ //! \brief Set the number of symbolic expressions
107
+ //! \return true if the number of symbolic expressions was set successfully, false otherwise
108
+ bool setNbSymExprs(int32_t count) noexcept
109
+ {
110
+ return mImpl->setNbSymExprs(count);
111
+ }
112
+
113
+ protected:
114
+ ISymExprsImpl* mImpl{nullptr};
115
+ virtual ~ISymExprs() noexcept = default;
116
+ };
117
+
118
+ //! \enum QuickPluginCreationRequest
119
+ //! \brief Communicates preference when a quickly deployable plugin is to be added to the network
120
+ enum class QuickPluginCreationRequest : int32_t
121
+ {
122
+ //! No preference specified
123
+ kUNKNOWN = 0,
124
+ //! JIT plugin is preferred
125
+ kPREFER_JIT = 1,
126
+ //! AOT plugin is preferred
127
+ kPREFER_AOT = 2,
128
+ //! JIT plugin must be used. TensorRT should fail if a JIT implementation cannot be found.
129
+ kSTRICT_JIT = 3,
130
+ //! AOT plugin must be used. TensorRT should fail if an AOT implementation cannot be found.
131
+ kSTRICT_AOT = 4,
132
+ };
133
+
134
+ //! Impl class for IKernelLaunchParams
135
+ class IKernelLaunchParamsImpl
136
+ {
137
+ public:
138
+ virtual ISymExpr* getGridX() noexcept = 0;
139
+ virtual bool setGridX(ISymExpr* gridX) noexcept = 0;
140
+
141
+ virtual ISymExpr* getGridY() noexcept = 0;
142
+ virtual bool setGridY(ISymExpr* gridY) noexcept = 0;
143
+
144
+ virtual ISymExpr* getGridZ() noexcept = 0;
145
+ virtual bool setGridZ(ISymExpr* gridZ) noexcept = 0;
146
+
147
+ virtual ISymExpr* getBlockX() noexcept = 0;
148
+ virtual bool setBlockX(ISymExpr* blockX) noexcept = 0;
149
+
150
+ virtual ISymExpr* getBlockY() noexcept = 0;
151
+ virtual bool setBlockY(ISymExpr* blockY) noexcept = 0;
152
+
153
+ virtual ISymExpr* getBlockZ() noexcept = 0;
154
+ virtual bool setBlockZ(ISymExpr* blockZ) noexcept = 0;
155
+
156
+ virtual ISymExpr* getSharedMem() noexcept = 0;
157
+ virtual bool setSharedMem(ISymExpr* sharedMem) noexcept = 0;
158
+
159
+ virtual ~IKernelLaunchParamsImpl() noexcept = default;
160
+ };
161
+
162
+ //! \class IKernelLaunchParams
163
+ //! \brief Allows for kernel launch parameters to be communicated to the TensorRT backend
164
+ //! \note Clients must not implement this class.
165
+ class IKernelLaunchParams
166
+ {
167
+ public:
168
+ //! Get the X dimension of the grid
169
+ ISymExpr* getGridX() noexcept
170
+ {
171
+ return mImpl->getGridX();
172
+ }
173
+
174
+ //! \brief Set the X dimension of the grid
175
+ //! \return true if the grid's X dimension was set successfully, false otherwise
176
+ bool setGridX(ISymExpr* gridX) noexcept
177
+ {
178
+ return mImpl->setGridX(gridX);
179
+ }
180
+
181
+ //! Get the Y dimension of the grid
182
+ ISymExpr* getGridY() noexcept
183
+ {
184
+ return mImpl->getGridY();
185
+ }
186
+
187
+ //! \brief Set the Y dimension of the grid
188
+ //! \return true if the grid's Y dimension was set successfully, false otherwise
189
+ bool setGridY(ISymExpr* gridY) noexcept
190
+ {
191
+ return mImpl->setGridY(gridY);
192
+ }
193
+
194
+ //! Get the Z dimension of the grid
195
+ ISymExpr* getGridZ() noexcept
196
+ {
197
+ return mImpl->getGridZ();
198
+ }
199
+
200
+ //! \brief Set the Z dimension of the grid
201
+ //! \return true if the grid's Z dimension was set successfully, false otherwise
202
+ bool setGridZ(ISymExpr* gridZ) noexcept
203
+ {
204
+ return mImpl->setGridZ(gridZ);
205
+ }
206
+
207
+ //! \brief Get the X dimension of each thread block
208
+ ISymExpr* getBlockX() noexcept
209
+ {
210
+ return mImpl->getBlockX();
211
+ }
212
+
213
+ //! \brief Set the X dimension of each thread block
214
+ //! \return true if each thread block's X dimension was set successfully, false otherwise
215
+ bool setBlockX(ISymExpr* blockX) noexcept
216
+ {
217
+ return mImpl->setBlockX(blockX);
218
+ }
219
+
220
+ //! \brief Get the Y dimension of each thread block
221
+ ISymExpr* getBlockY() noexcept
222
+ {
223
+ return mImpl->getBlockY();
224
+ }
225
+
226
+ //! \brief Set the Y dimension of each thread block
227
+ //! \return true if each thread block's Y dimension was set successfully, false otherwise
228
+ bool setBlockY(ISymExpr* blockY) noexcept
229
+ {
230
+ return mImpl->setBlockY(blockY);
231
+ }
232
+
233
+ //! \brief Get the Z dimension of each thread block
234
+ ISymExpr* getBlockZ() noexcept
235
+ {
236
+ return mImpl->getBlockZ();
237
+ }
238
+
239
+ //! \brief Set the Z dimension of each thread block
240
+ //! \return true if each thread block's Z dimension was set successfully, false otherwise
241
+ bool setBlockZ(ISymExpr* blockZ) noexcept
242
+ {
243
+ return mImpl->setBlockZ(blockZ);
244
+ }
245
+
246
+ //! \brief Get the dynamic shared-memory per thread block in bytes
247
+ ISymExpr* getSharedMem() noexcept
248
+ {
249
+ return mImpl->getSharedMem();
250
+ }
251
+
252
+ //! \brief Set the dynamic shared-memory per thread block in bytes
253
+ //! \return true if the dynamic shared-memory per thread block was set successfully, false otherwise
254
+ bool setSharedMem(ISymExpr* sharedMem) noexcept
255
+ {
256
+ return mImpl->setSharedMem(sharedMem);
257
+ }
258
+
259
+ protected:
260
+ IKernelLaunchParamsImpl* mImpl{nullptr};
261
+ virtual ~IKernelLaunchParams() noexcept = default;
262
+ };
263
+
264
+ namespace v_1_0
265
+ {
266
+
267
+ class IPluginV3QuickCore : public IPluginCapability
268
+ {
269
+ public:
270
+ InterfaceInfo getInterfaceInfo() const noexcept override
271
+ {
272
+ return InterfaceInfo{"PLUGIN_V3QUICK_CORE", 1, 0};
273
+ }
274
+
275
+ virtual AsciiChar const* getPluginName() const noexcept = 0;
276
+
277
+ virtual AsciiChar const* getPluginVersion() const noexcept = 0;
278
+
279
+ virtual AsciiChar const* getPluginNamespace() const noexcept = 0;
280
+ };
281
+
282
+ class IPluginV3QuickBuild : public IPluginCapability
283
+ {
284
+ public:
285
+ InterfaceInfo getInterfaceInfo() const noexcept override
286
+ {
287
+ return InterfaceInfo{"PLUGIN_V3QUICK_BUILD", 1, 0};
288
+ }
289
+
290
+ //!
291
+ //! \brief Provide the data types of the plugin outputs if the input tensors have the data types provided.
292
+ //!
293
+ //! \param outputTypes Pre-allocated array to which the output data types should be written.
294
+ //! \param nbOutputs The number of output tensors. This matches the value returned from getNbOutputs().
295
+ //! \param inputTypes The input data types.
296
+ //! \param inputRanks Ranks of the input tensors
297
+ //! \param nbInputs The number of input tensors.
298
+ //!
299
+ //! \return 0 for success, else non-zero
300
+ //!
301
+ virtual int32_t getOutputDataTypes(DataType* outputTypes, int32_t nbOutputs, DataType const* inputTypes,
302
+ int32_t const* inputRanks, int32_t nbInputs) const noexcept = 0;
303
+
304
+ //!
305
+ //! \brief Provide expressions for computing dimensions of the output tensors from dimensions of the input tensors.
306
+ //!
307
+ //! \param inputs Expressions for dimensions of the input tensors
308
+ //! \param nbInputs The number of input tensors
309
+ //! \param shapeInputs Expressions for values of the shape tensor inputs
310
+ //! \param nbShapeInputs The number of shape tensor inputs
311
+ //! \param outputs Pre-allocated array to which the output dimensions must be written
312
+ //! \param exprBuilder Object for generating new dimension expressions
313
+ //!
314
+ //! \return 0 for success, else non-zero
315
+ //!
316
+ virtual int32_t getOutputShapes(DimsExprs const* inputs, int32_t nbInputs, DimsExprs const* shapeInputs,
317
+ int32_t nbShapeInputs, DimsExprs* outputs, int32_t nbOutputs, IExprBuilder& exprBuilder) noexcept = 0;
318
+
319
+ //!
320
+ //! \brief Configure the plugin. Behaves similarly to `IPluginV3OneBuild::configurePlugin()`
321
+ //!
322
+ //! \return 0 for success, else non-zero
323
+ //!
324
+ virtual int32_t configurePlugin(DynamicPluginTensorDesc const* in, int32_t nbInputs,
325
+ DynamicPluginTensorDesc const* out, int32_t nbOutputs) noexcept = 0;
326
+
327
+ //!
328
+ //! \brief Get number of format combinations supported by the plugin for the I/O characteristics indicated by
329
+ //! `inOut`.
330
+ //!
331
+ virtual int32_t getNbSupportedFormatCombinations(
332
+ DynamicPluginTensorDesc const* inOut, int32_t nbInputs, int32_t nbOutputs) noexcept = 0;
333
+
334
+ //!
335
+ //! \brief Write all format combinations supported by the plugin for the I/O characteristics indicated by `inOut` to
336
+ //! `supportedCombinations`. It is guaranteed to have sufficient memory allocated for (nbInputs + nbOutputs) *
337
+ //! getNbSupportedFormatCombinations() `PluginTensorDesc`s.
338
+ //!
339
+ //! \return 0 for success, else non-zero
340
+ //!
341
+ virtual int32_t getSupportedFormatCombinations(DynamicPluginTensorDesc const* inOut, int32_t nbInputs,
342
+ int32_t nbOutputs, PluginTensorDesc* supportedCombinations, int32_t nbFormatCombinations) noexcept = 0;
343
+
344
+ //!
345
+ //! \brief Get the number of outputs from the plugin.
346
+ //!
347
+ virtual int32_t getNbOutputs() const noexcept = 0;
348
+
349
+ //!
350
+ //! \brief Communicates to TensorRT that the output at the specified output index is aliased to the input at the
351
+ //! returned index. Behaves similary to `v_2_0::IPluginV3OneBuild.getAliasedInput()`.
352
+ //!
353
+ virtual int32_t getAliasedInput(int32_t outputIndex) noexcept
354
+ {
355
+ return -1;
356
+ }
357
+
358
+ //!
359
+ //! \brief Query for any custom tactics that the plugin intends to use specific to the I/O characteristics indicated
360
+ //! by the immediately preceding call to `configurePlugin()`.
361
+ //!
362
+ //! \return 0 for success, else non-zero
363
+ //!
364
+ virtual int32_t getValidTactics(int32_t* tactics, int32_t nbTactics) noexcept
365
+ {
366
+ return 0;
367
+ }
368
+
369
+ //!
370
+ //! \brief Query for number of custom tactics related to the `getValidTactics()` call.
371
+ //!
372
+ virtual int32_t getNbTactics() noexcept
373
+ {
374
+ return 0;
375
+ }
376
+
377
+ //!
378
+ //! \brief Called to query the suffix to use for the timing cache ID. May be called anytime after plugin creation.
379
+ //!
380
+ virtual char const* getTimingCacheID() noexcept
381
+ {
382
+ return nullptr;
383
+ }
384
+
385
+ //!
386
+ //! \brief Query for a string representing the configuration of the plugin. May be called anytime after
387
+ //! plugin creation.
388
+ //!
389
+ virtual char const* getMetadataString() noexcept
390
+ {
391
+ return nullptr;
392
+ }
393
+ };
394
+
395
+ class IPluginV3QuickAOTBuild : public IPluginV3QuickBuild
396
+ {
397
+ public:
398
+ InterfaceInfo getInterfaceInfo() const noexcept override
399
+ {
400
+ return InterfaceInfo{"PLUGIN_V3QUICKAOT_BUILD", 1, 0};
401
+ }
402
+
403
+ //! \brief Get the launch parameters for the kernel to be used for the specified input and output types/formats and
404
+ //! any corresponding custom tactics.
405
+ //! If custom tactics are being advertised by the plugin, the corresponding tactic is the one specified by
406
+ //! the immediately preceding call to setTactic().
407
+ //!
408
+ //! \param inputs Expressions for dimensions of the input tensors
409
+ //! \param inOut The input and output tensors' attributes
410
+ //! \param nbInputs The number of input tensors
411
+ //! \param nbOutputs The number of output tensors
412
+ //! \param launchParams Interface which allows the specification of kernel launch parameters as symbolic expressions
413
+ //! of the input dimensions
414
+ //! \param extraArgs Interface which allows the specification of any scalar arguments to be
415
+ //! passed to the kernel, as symbolic expressions of the input dimensions
416
+ //! \param exprBuilder Object for generating new symbolic expressions
417
+ //!
418
+ //! \return 0 for success, else non-zero
419
+ //!
420
+ virtual int32_t getLaunchParams(DimsExprs const* inputs, DynamicPluginTensorDesc const* inOut, int32_t nbInputs,
421
+ int32_t nbOutputs, IKernelLaunchParams* launchParams, ISymExprs* extraArgs,
422
+ IExprBuilder& exprBuilder) noexcept = 0;
423
+
424
+ //!
425
+ //! \brief Get the compiled form for the kernel to be used for the specified input and output types/formats and any
426
+ //! corresponding custom tactics.
427
+ //! If custom tactics are being advertised by the plugin, the corresponding tactic is the one specified by
428
+ //! the immediately preceding call to setTactic().
429
+ //!
430
+ //! \param in The input tensors' attributes that are used for configuration.
431
+ //! \param nbInputs Number of input tensors.
432
+ //! \param out The output tensors' attributes that are used for configuration.
433
+ //! \param nbOutputs Number of output tensors.
434
+ //! \param kernelName The name for the kernel.
435
+ //! \param compiledKernel Compiled form of the kernel.
436
+ //! \param compiledKernelSize The size of the compiled kernel.
437
+ //!
438
+ //! \return 0 for success, else non-zero
439
+ //!
440
+ virtual int32_t getKernel(PluginTensorDesc const* in, int32_t nbInputs, PluginTensorDesc const* out,
441
+ int32_t nbOutputs, const char** kernelName, char** compiledKernel, int32_t* compiledKernelSize) noexcept = 0;
442
+
443
+ //!
444
+ //! \brief Set the tactic to be used in the subsequent call to enqueue(). Behaves similar to
445
+ //! IPluginV3OneRuntime::setTactic()
446
+ //!
447
+ //! \return 0 for success, else non-zero
448
+ //!
449
+ virtual int32_t setTactic(int32_t tactic) noexcept
450
+ {
451
+ return 0;
452
+ }
453
+ };
454
+
455
+ class IPluginV3QuickRuntime : public IPluginCapability
456
+ {
457
+ public:
458
+ InterfaceInfo getInterfaceInfo() const noexcept override
459
+ {
460
+ return InterfaceInfo{"PLUGIN_V3QUICK_RUNTIME", 1, 0};
461
+ }
462
+
463
+ //!
464
+ //! \brief Set the tactic to be used in the subsequent call to enqueue(). Behaves similar to
465
+ //! `IPluginV3OneRuntime::setTactic()`.
466
+ //!
467
+ //! \return 0 for success, else non-zero
468
+ //!
469
+ virtual int32_t setTactic(int32_t tactic) noexcept
470
+ {
471
+ return 0;
472
+ }
473
+
474
+ //!
475
+ //! \brief Execute the plugin.
476
+ //!
477
+ //! \param inputDesc how to interpret the memory for the input tensors.
478
+ //! \param outputDesc how to interpret the memory for the output tensors.
479
+ //! \param inputs The memory for the input tensors.
480
+ //! \param inputStrides Strides for input tensors.
481
+ //! \param outputStrides Strides for output tensors.
482
+ //! \param outputs The memory for the output tensors.
483
+ //! \param nbInputs Number of input tensors.
484
+ //! \param nbOutputs Number of output tensors.
485
+ //! \param stream The stream in which to execute the kernels.
486
+ //!
487
+ //! \return 0 for success, else non-zero
488
+ //!
489
+ virtual int32_t enqueue(PluginTensorDesc const* inputDesc, PluginTensorDesc const* outputDesc,
490
+ void const* const* inputs, void* const* outputs, Dims const* inputStrides, Dims const* outputStrides,
491
+ int32_t nbInputs, int32_t nbOutputs, cudaStream_t stream) noexcept = 0;
492
+
493
+ //!
494
+ //! \brief Get the plugin fields which should be serialized.
495
+ //!
496
+ virtual PluginFieldCollection const* getFieldsToSerialize() noexcept = 0;
497
+ };
498
+
499
+ class IPluginCreatorV3Quick : public IPluginCreatorInterface
500
+ {
501
+ public:
502
+ InterfaceInfo getInterfaceInfo() const noexcept override
503
+ {
504
+ return InterfaceInfo{"PLUGIN CREATOR_V3QUICK", 1, 0};
505
+ }
506
+
507
+ //!
508
+ //! \brief Return a plugin object. Return nullptr in case of error.
509
+ //!
510
+ //! \param name A NULL-terminated name string of length 1024 or less, including the NULL terminator.
511
+ //! \param namespace A NULL-terminated name string of length 1024 or less, including the NULL terminator.
512
+ //! \param fc A pointer to a collection of fields needed for constructing the plugin.
513
+ //! \param phase The TensorRT phase in which the plugin is being created
514
+ //! \param quickPluginCreationRequest Whether a JIT or AOT plugin should be created
515
+ //!
516
+ virtual IPluginV3* createPlugin(AsciiChar const* name, AsciiChar const* nspace, PluginFieldCollection const* fc,
517
+ TensorRTPhase phase, QuickPluginCreationRequest quickPluginCreationRequest) noexcept = 0;
518
+
519
+ //!
520
+ //! \brief Return a list of fields that need to be passed to createPlugin() when creating a plugin for use in the
521
+ //! TensorRT build phase.
522
+ //!
523
+ virtual PluginFieldCollection const* getFieldNames() noexcept = 0;
524
+
525
+ virtual AsciiChar const* getPluginName() const noexcept = 0;
526
+
527
+ virtual AsciiChar const* getPluginVersion() const noexcept = 0;
528
+
529
+ virtual AsciiChar const* getPluginNamespace() const noexcept = 0;
530
+
531
+ IPluginCreatorV3Quick() = default;
532
+ virtual ~IPluginCreatorV3Quick() = default;
533
+
534
+ protected:
535
+ IPluginCreatorV3Quick(IPluginCreatorV3Quick const&) = default;
536
+ IPluginCreatorV3Quick(IPluginCreatorV3Quick&&) = default;
537
+ IPluginCreatorV3Quick& operator=(IPluginCreatorV3Quick const&) & = default;
538
+ IPluginCreatorV3Quick& operator=(IPluginCreatorV3Quick&&) & = default;
539
+ };
540
+
541
+ } // namespace v_1_0
542
+
543
+ //!
544
+ //! \class IPluginV3QuickCore
545
+ //!
546
+ //! \brief Provides core capability (`IPluginCapability::kCORE`) for quickly-deployable TRT plugins
547
+ //!
548
+ //! \warning This class is strictly for the purpose of supporting quickly-deployable TRT Python plugins and is not part
549
+ //! of the public TensorRT C++ API. Users must not inherit from this class.
550
+ //!
551
+ using IPluginV3QuickCore = v_1_0::IPluginV3QuickCore;
552
+
553
+ //!
554
+ //! \class IPluginV3QuickBuild
555
+ //!
556
+ //! \brief Provides build capability (`IPluginCapability::kBUILD`) for quickly-deployable TRT plugins
557
+ //!
558
+ //! \warning This class is strictly for the purpose of supporting quickly-deployable TRT Python plugins and is not part
559
+ //! of the public TensorRT C++ API. Users must not inherit from this class.
560
+ //!
561
+ using IPluginV3QuickBuild = v_1_0::IPluginV3QuickBuild;
562
+
563
+ //!
564
+ //! \class IPluginV3QuickAOTBuild
565
+ //!
566
+ //! \brief Provides additional build capabilities for AOT quickly-deployable TRT plugins. Descends from
567
+ //! IPluginV3QuickBuild.
568
+ //!
569
+ //! \warning This class is strictly for the purpose of supporting quickly-deployable TRT Python plugins and is not part
570
+ //! of the public TensorRT C++ API. Users must not inherit from this class.
571
+ //!
572
+ using IPluginV3QuickAOTBuild = v_1_0::IPluginV3QuickAOTBuild;
573
+
574
+ //!
575
+ //! \class IPluginV3QuickRuntime
576
+ //!
577
+ //! \brief Provides runtime capability (`IPluginCapability::kRUNTIME`) for JIT quickly-deployable TRT plugins
578
+ //!
579
+ //! \warning This class is strictly for the purpose of supporting quickly-deployable TRT Python plugins and is not part
580
+ //! of the public TensorRT C++ API. Users must not inherit from this class.
581
+ //!
582
+ using IPluginV3QuickRuntime = v_1_0::IPluginV3QuickRuntime;
583
+
584
+ //!
585
+ //! \class IPluginCreatorV3Quick
586
+ //!
587
+ //! \warning This class is strictly for the purpose of supporting quickly-deployable TRT Python plugins and is not part
588
+ //! of the public TensorRT C++ API. Users must not inherit from this class.
589
+ //!
590
+ using IPluginCreatorV3Quick = v_1_0::IPluginCreatorV3Quick;
591
+
592
+ } // namespace nvinfer1
593
+
594
+ #endif // TRT_PYTHON_IMPL_PLUGIN_H
tensorrt/lib/nvinfer_dispatch_10.lib ADDED
Binary file (4.36 kB). View file