Skip to content

Commit c144acc

Browse files
authored
Replace 'master' branch ref to 'main' in the code (microsoft#12547)
1 parent d93e653 commit c144acc

Some content is hidden

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

44 files changed

+131
-132
lines changed

csharp/src/Microsoft.ML.OnnxRuntime/ProviderOptions.shared.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public static void StringToDict(string s, Dictionary<string, string> dict)
247247
/// <summary>
248248
/// CoreML flags for use with SessionOptions
249249
/// </summary>
250-
/// <see cref="https://github.com/microsoft/onnxruntime/blob/master/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h"/>
250+
/// <see cref="https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h"/>
251251
[Flags]
252252
public enum CoreMLFlags : uint
253253
{
@@ -261,7 +261,7 @@ public enum CoreMLFlags : uint
261261
/// <summary>
262262
/// NNAPI flags for use with SessionOptions
263263
/// </summary>
264-
/// <see cref="https://github.com/microsoft/onnxruntime/blob/master/include/onnxruntime/core/providers/nnapi/nnapi_provider_factory.h"/>
264+
/// <see cref="https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/providers/nnapi/nnapi_provider_factory.h"/>
265265
[Flags]
266266
public enum NnapiFlags
267267
{

csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.shared.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Microsoft.ML.OnnxRuntime
1111
{
1212
/// <summary>
1313
/// Graph optimization level to use with SessionOptions
14-
/// [https://github.com/microsoft/onnxruntime/blob/master/docs/ONNX_Runtime_Graph_Optimizations.md]
14+
/// [https://github.com/microsoft/onnxruntime/blob/main/docs/ONNX_Runtime_Graph_Optimizations.md]
1515
/// </summary>
1616
public enum GraphOptimizationLevel
1717
{
@@ -408,13 +408,13 @@ public void AppendExecutionProvider(string providerName, Dictionary<string, stri
408408
{
409409
providerOptions = new Dictionary<string, string>();
410410
}
411-
411+
412412
var keysArray = NativeOnnxValueHelper.ConvertNamesToUtf8(
413413
providerOptions.Keys.ToArray(), n => n, cleanupList);
414414

415415
var valuesArray = NativeOnnxValueHelper.ConvertNamesToUtf8(
416416
providerOptions.Values.ToArray(), n => n, cleanupList);
417-
417+
418418
NativeApiStatus.VerifySuccess(NativeMethods.SessionOptionsAppendExecutionProvider(
419419
handle, epArray[0], keysArray, valuesArray, (UIntPtr)providerOptions.Count));
420420
}
@@ -426,7 +426,7 @@ public void AppendExecutionProvider(string providerName, Dictionary<string, stri
426426
/// (Deprecated) Loads a DLL named 'libraryPath' and looks for this entry point:
427427
/// OrtStatus* RegisterCustomOps(OrtSessionOptions* options, const OrtApiBase* api);
428428
/// It then passes in the provided session options to this function along with the api base.
429-
/// Deprecated in favor of RegisterCustomOpLibraryV2() because it provides users with the library handle
429+
/// Deprecated in favor of RegisterCustomOpLibraryV2() because it provides users with the library handle
430430
/// to release when all sessions relying on it are destroyed
431431
/// </summary>
432432
/// <param name="libraryPath">path to the custom op library</param>

dockerfiles/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ If the `device_type` runtime config option is not explicitly specified, CPU will
127127
Example:
128128
HETERO:MYRIAD,CPU HETERO:HDDL,GPU,CPU MULTI:MYRIAD,GPU,CPU AUTO:GPU,CPU
129129
130-
*This is the hardware accelerator target that is enabled by **default** in the container image. After building the container image for one default target, the application may explicitly choose a different target at run time with the same container by using the [Dynamic device selction API](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/OpenVINO-ExecutionProvider.md#dynamic-device-selection).*
130+
*This is the hardware accelerator target that is enabled by **default** in the container image. After building the container image for one default target, the application may explicitly choose a different target at run time with the same container by using the [Dynamic device selction API](https://github.com/microsoft/onnxruntime/blob/main/docs/execution_providers/OpenVINO-ExecutionProvider.md#dynamic-device-selection).*
131131
132132
133133
### OpenVINO on CPU

docs/C_API_Guidelines.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ If an API such as CreateSession creates an Ort object such as Session, Session c
3636

3737
No C++ exceptions must propagate through the C++/C boundaries. All C++ exceptions must be converted to OrtStatus instances at API boundaries. Such functions should return nullptr on success.
3838

39-
Macros API_IMPL_BEGIN and API_IMPL_END are helpful in this regard.
39+
Macros API_IMPL_BEGIN and API_IMPL_END are helpful in this regard.
4040

4141
Cleanup API that destroys objects or simply deallocates memory must return void. Most of the time such API can never error out. Adding return status creates more uncertainty for the client and does not help in exception scenarios such as try/finally in C#. Returning void helps clients to write cleaner code and preserve original exception if any with its meaningful error message rather than memory deallocation failure.
4242

4343
This requirement will also help us to create C++ API wrappers that are exception safe.
4444

45-
Consider logging errors if you must rather than return them to the client.
45+
Consider logging errors if you must rather than return them to the client.
4646

4747
Example: on Windows delete operator is implemented on top of HeapFree() which may return an error. However, delete never returns anything and can be relied upon as a no throw primitive for cleanup purposes.
4848

@@ -52,7 +52,7 @@ When API errors out it must leave all its out parameters and buffers untouched,
5252

5353
The obvious exception in this rule is the actual OrtStatus that is dynamically allocated and must be released by the client using the corresponding API.
5454

55-
Some of the client code, notably in C#, attempts to detect which out arguments need a cleanup when an API errors out. The way it is done, out arguments are pre-set to a specific value, such as zero. If the API errors out, the client code attempts to cleanup if the out argument has changed.
55+
Some of the client code, notably in C#, attempts to detect which out arguments need a cleanup when an API errors out. The way it is done, out arguments are pre-set to a specific value, such as zero. If the API errors out, the client code attempts to cleanup if the out argument has changed.
5656

5757
Such a technique is error prone and dangerous, as the client has no way of finding out if the out argument has already been cleaned up by the API as should be the case. It may result in double free. One reason for this is our insufficient documentation. This also results in a convoluted hard to read code with nested try/finally/catch clauses.
5858

@@ -80,4 +80,4 @@ Use types that fall into established patterns. For example, we use int64_t for d
8080

8181
### 9. Adding a new API
8282

83-
Follow these guidelines and instructions in the source code. "Rules on how to add a new Ort API version" in [onnxruntime_c_api.cc](https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/core/session/onnxruntime_c_api.cc).
83+
Follow these guidelines and instructions in the source code. "Rules on how to add a new Ort API version" in [onnxruntime_c_api.cc](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/session/onnxruntime_c_api.cc).

docs/Coding_Conventions_and_Standards.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void foo(gsl::span<const std::string> names) {
9797
* Qualify usages of `auto` with `const`, `*`, `&` and `&&` where applicable to more clearly express the intent
9898
* When adding a new class, disable copy/assignment/move until you have a proven need for these capabilities. If a need arises, enable copy/assignment/move selectively, and when doing so validate that the implementation of the class supports what is being enabled.
9999
* Use `ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE` initially
100-
* See the other `ORT_DISALLOW_*` macros in <https://github.com/microsoft/onnxruntime/blob/master/include/onnxruntime/core/common/common.h>
100+
* See the other `ORT_DISALLOW_*` macros in <https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/common/common.h>
101101
* Sometimes, `std::unique_ptr` might be considered for delayed or optional construction of objects or members of classes. Instead, use `std::optional` as appropriate to reduce the number of allocations.
102102
* Don't use `else` after `return`. see: [https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return](https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return)
103103
* Don't overuse `std::shared_ptr`. Use `std::shared_ptr` only if it's not clear when and where the object will be de-allocated. See also: [https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-shared_ptr](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-shared_ptr)
@@ -141,7 +141,7 @@ Follow the [Black formatter](https://black.readthedocs.io)'s coding style when p
141141

142142
Please adhere to the [PEP8 Style Guide](https://www.python.org/dev/peps/pep-0008/). We use [Google's python style guide](https://google.github.io/styleguide/pyguide.html) as the style guide which is an extension to PEP8.
143143

144-
Code can be validated with [flake8](https://pypi.org/project/flake8/) using the configuration file in the root directory called [.flake8](https://github.com/microsoft/onnxruntime/tree/master/.flake8).
144+
Code can be validated with [flake8](https://pypi.org/project/flake8/) using the configuration file in the root directory called [.flake8](https://github.com/microsoft/onnxruntime/blob/main/.flake8).
145145

146146
Use `pyright`, which is provided as a component of the `pylance` extension in VS Code for static type checking.
147147

docs/ContribOperators.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Contrib Operator Schemas
2-
*This file is automatically generated from the registered contrib operator schemas by [this script](https://github.com/microsoft/onnxruntime/blob/master/tools/python/gen_contrib_doc.py).
2+
*This file is automatically generated from the registered contrib operator schemas by [this script](https://github.com/microsoft/onnxruntime/blob/main/tools/python/gen_contrib_doc.py).
33
Do not modify directly.*
44

55
* com.microsoft

docs/NotesOnThreading.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
This document is intended for ORT developers.
44

55
ORT allows the usage of either OpenMP or non-OpenMP (ORT) threads for execution. Threadpool management
6-
is abstracted behind: (1) ThreadPool class in [threadpool.h](https://github.com/microsoft/onnxruntime/blob/master/include/onnxruntime/core/platform/threadpool.h) and (2) functions in [thread_utils.h](https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/core/util/thread_utils.h).
6+
is abstracted behind: (1) ThreadPool class in [threadpool.h](https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/platform/threadpool.h) and (2) functions in [thread_utils.h](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/util/thread_utils.h).
77

88
When developing an op, please use these abstractions to parallelize your code. These abstractions centralize 2 things.
99
When OpenMP is enabled, they resort to using OpenMP. When OpenMP is disabled they resort to sequential execution if the threadpool ptr is NULL or schedule the tasks on the threadpool otherwise.
1010

11-
Examples of these abstractions are: ([threadpool.h](https://github.com/microsoft/onnxruntime/blob/master/include/onnxruntime/core/platform/threadpool.h) has more documentation for these)
11+
Examples of these abstractions are: ([threadpool.h](https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/platform/threadpool.h) has more documentation for these)
1212
* TryParallelFor
1313
* TrySimpleParallelFor
1414
* TryBatchParallelFor

docs/ORTMobilePackageOperatorTypeSupport.md

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

33
## Supported operators and types
44

5-
The supported operators and types are based on what is required to support float32 and quantized versions of popular models. The full list of input models used to determine this list is available [here](https://github.com/microsoft/onnxruntime/blob/master/tools/ci_build/github/android/mobile_package.required_operators.readme.txt)
5+
The supported operators and types are based on what is required to support float32 and quantized versions of popular models. The full list of input models used to determine this list is available [here](https://github.com/microsoft/onnxruntime/blob/main/tools/ci_build/github/android/mobile_package.required_operators.readme.txt)
66

77
## Supported data input types
88

docs/OperatorKernels.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Supported Operators and Data Types
2-
*This file is automatically generated from the registered kernels by [this script](https://github.com/microsoft/onnxruntime/blob/master/tools/python/gen_opkernel_doc.py).
2+
*This file is automatically generated from the registered kernels by [this script](https://github.com/microsoft/onnxruntime/blob/main/tools/python/gen_opkernel_doc.py).
33
Do not modify directly.*
44

55
## Execution Providers

0 commit comments

Comments
 (0)