You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Trim trailing space
* Use relative links. Absolute links were needed because of
<dhimmel/obonet#12>, which is fixed now.
* Fix typos.
* master -> main.
Signed-off-by: Gary Miguel <garymiguel@microsoft.com>
*[Opset Version Conversion](docs/VersionConverter.md)
31
31
32
32
# NOTICE: ONNX now uses main branch as default branch
33
33
Here are the [steps](https://github.com/onnx/onnx/wiki/How-to-migrate-to-main-branch-in-local-repo) from ONNX wiki for migrating to main branch in local repo.
34
34
35
35
# Contribute
36
-
ONNX is a [community project][community]. We encourage you to join the effort and contribute feedback, ideas, and code. You can participate in the [SIGs][sigs] and [Working Groups][wgs] to shape the future of ONNX.
36
+
ONNX is a [community project](community/readme.md). We encourage you to join the effort and contribute feedback, ideas, and code. You can participate in the [Special Interest Groups](community/sigs.md) and [Working Groups](community/working-groups.md) to shape the future of ONNX.
37
37
38
-
Check out our [contribution guide][contributing] to get started.
38
+
Check out our [contribution guide](docs/CONTRIBUTING.md) to get started.
39
39
40
40
If you think some operator should be added to ONNX specification, please read
41
-
[this document][new_op].
41
+
[this document](docs/AddNewOp.md).
42
42
43
43
# Discuss
44
44
We encourage you to open [Issues](https://github.com/onnx/onnx/issues), or use [Slack](https://slack.lfai.foundation/) for more real-time discussion
@@ -82,9 +82,9 @@ You can also use the [onnx-dev docker image](https://hub.docker.com/r/onnx/onnx-
82
82
83
83
84
84
## Build ONNX from Source
85
-
Before building from source uninstall any existing versions of onnx `pip uninstall onnx`.
85
+
Before building from source uninstall any existing versions of onnx `pip uninstall onnx`.
86
86
87
-
Generally spreaking, you need to install [protobuf C/C++ libraires and tools](https://github.com/protocolbuffers/protobuf) before proceeding forward. Then depending on how you installed protobuf, you need to set environment variable CMAKE_ARGS to "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON" or "-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF". For example, you may need to run the following command:
87
+
Generally speaking, you need to install [protobuf C/C++ libraries and tools](https://github.com/protocolbuffers/protobuf) before proceeding forward. Then depending on how you installed protobuf, you need to set environment variable CMAKE_ARGS to "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON" or "-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF". For example, you may need to run the following command:
88
88
89
89
Linux:
90
90
```bash
@@ -99,7 +99,7 @@ The ON/OFF depends on what kind of protobuf library you have. Shared libraries a
99
99
100
100
101
101
### Windows
102
-
If you are building ONNX from source, it is recommended that you also build Protobuf locally as a static library. The version distributed with conda-forge is a DLL, but ONNX expects it to be a static library. Building protobuf locally also lets you control the verison of protobuf. The tested and recommended version is 3.16.0.
102
+
If you are building ONNX from source, it is recommended that you also build Protobuf locally as a static library. The version distributed with conda-forge is a DLL, but ONNX expects it to be a static library. Building protobuf locally also lets you control the version of protobuf. The tested and recommended version is 3.16.0.
103
103
104
104
The instructions in this README assume you are using Visual Studio. It is recommended that you run all the commands from a shell started from "x64 Native Tools Command Prompt for VS 2019" and keep the build system generator for cmake (e.g., cmake -G "Visual Studio 16 2019") consistent while building protobuf as well as ONNX.
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX=<protobug_install_dir> -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF .
112
+
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX=<protobuf_install_dir> -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF .
113
113
msbuild protobuf.sln /m /p:Configuration=Release
114
114
msbuild INSTALL.vcxproj /p:Configuration=Release
115
115
```
116
-
Then it will be built as a static library and installed to <protobug_install_dir>. Please add the bin directory(which contains protoc.exe) to your PATH.
116
+
Then it will be built as a static library and installed to <protobuf_install_dir>. Please add the bin directory(which contains protoc.exe) to your PATH.
117
117
118
118
```bat
119
-
set PATH=<protobug_install_dir>/bin;%PATH%
119
+
set PATH=<protobuf_install_dir>/bin;%PATH%
120
120
```
121
121
122
-
Please note: if your protobug_install_dir contains spaces, **do not** add quotation marks around it.
122
+
Please note: if your protobuf_install_dir contains spaces, **do not** add quotation marks around it.
123
123
124
-
Alternative: if you don't want to change your PATH, you can set ONNX_PROTOC_EXECUTABLE instead.
124
+
Alternative: if you don't want to change your PATH, you can set ONNX_PROTOC_EXECUTABLE instead.
125
125
```bat
126
126
set CMAKE_ARGS=-DONNX_PROTOC_EXECUTABLE=<full_path_to_protoc.exe>
127
127
```
@@ -137,7 +137,7 @@ pip install -e .
137
137
```
138
138
### Linux
139
139
140
-
First, you need to install protobuf.
140
+
First, you need to install protobuf.
141
141
142
142
Ubuntu users: the quickest way to install protobuf is to run
143
143
@@ -232,25 +232,25 @@ to verify it works.
232
232
233
233
234
234
## Common Build Options
235
-
For full list refer to CMakeLists.txt
236
-
**Environment variables**
237
-
*`USE_MSVC_STATIC_RUNTIME` should be 1 or 0, not ON or OFF. When set to 1 onnx links statically to runtime library.
235
+
For full list refer to CMakeLists.txt
236
+
**Environment variables**
237
+
*`USE_MSVC_STATIC_RUNTIME` should be 1 or 0, not ON or OFF. When set to 1 onnx links statically to runtime library.
238
238
**Default**: USE_MSVC_STATIC_RUNTIME=0
239
239
240
-
*`DEBUG` should be 0 or 1. When set to 1 onnx is built in debug mode. or debug versions of the dependencies, you need to open the [CMakeLists file][CMakeLists] and append a letter `d` at the end of the package name lines. For example, `NAMES protobuf-lite` would become `NAMES protobuf-lited`.
240
+
*`DEBUG` should be 0 or 1. When set to 1 onnx is built in debug mode. or debug versions of the dependencies, you need to open the [CMakeLists file](CMakeLists.txt) and append a letter `d` at the end of the package name lines. For example, `NAMES protobuf-lite` would become `NAMES protobuf-lited`.
241
241
**Default**: Debug=0
242
242
243
243
**CMake variables**
244
-
*`ONNX_USE_PROTOBUF_SHARED_LIBS` should be ON or OFF.
244
+
*`ONNX_USE_PROTOBUF_SHARED_LIBS` should be ON or OFF.
`ONNX_USE_PROTOBUF_SHARED_LIBS` determines how onnx links to protobuf libraries.
247
-
- When set to ON - onnx will dynamically link to protobuf shared libs, PROTOBUF_USE_DLLS will be defined as described [here](https://github.com/protocolbuffers/protobuf/blob/master/cmake/README.md#dlls-vs-static-linking), Protobuf_USE_STATIC_LIBS will be set to OFF and `USE_MSVC_STATIC_RUNTIME` must be 0.
248
-
- When set to OFF - onnx will link statically to protobuf, and Protobuf_USE_STATIC_LIBS will be set to ON (to force the use of the static libraries) and `USE_MSVC_STATIC_RUNTIME` can be 0 or 1.
246
+
`ONNX_USE_PROTOBUF_SHARED_LIBS` determines how onnx links to protobuf libraries.
247
+
- When set to ON - onnx will dynamically link to protobuf shared libs, PROTOBUF_USE_DLLS will be defined as described [here](https://github.com/protocolbuffers/protobuf/blob/master/cmake/README.md#dlls-vs-static-linking), Protobuf_USE_STATIC_LIBS will be set to OFF and `USE_MSVC_STATIC_RUNTIME` must be 0.
248
+
- When set to OFF - onnx will link statically to protobuf, and Protobuf_USE_STATIC_LIBS will be set to ON (to force the use of the static libraries) and `USE_MSVC_STATIC_RUNTIME` can be 0 or 1.
249
249
250
-
*`ONNX_USE_LITE_PROTO` should be ON or OFF. When set to ON onnx uses lite protobuf instead of full protobuf.
250
+
*`ONNX_USE_LITE_PROTO` should be ON or OFF. When set to ON onnx uses lite protobuf instead of full protobuf.
251
251
**Default**: ONNX_USE_LITE_PROTO=OFF
252
252
253
-
*`ONNX_WERROR` should be ON or OFF. When set to ON warnings are treated as errors.
253
+
*`ONNX_WERROR` should be ON or OFF. When set to ON warnings are treated as errors.
254
254
**Default**: ONNX_WERROR=OFF in local builds, ON in CI and release pipelines.
255
255
256
256
@@ -275,33 +275,12 @@ pytest
275
275
276
276
# Development
277
277
278
-
Check out the [contributor guide](https://github.com/onnx/onnx/blob/main/docs/CONTRIBUTING.md) for instructions.
278
+
Check out the [contributor guide](docs/CONTRIBUTING.md) for instructions.
279
279
280
280
# License
281
281
282
-
[Apache License v2.0][license]
282
+
[Apache License v2.0](LICENSE)
283
283
284
284
# Code of Conduct
285
285
286
286
[ONNX Open Source Code of Conduct](https://onnx.ai/codeofconduct.html)
287
-
288
-
289
-
<!-- links
290
-
NOTE: these are absolute rather than repo-relative because we
291
-
this document is rendered by PyPI which doesn't seem to handle
292
-
relative links properly. See https://github.com/dhimmel/obonet/issues/12.
0 commit comments