Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support register custom OpSchema by python #5906

Merged
merged 41 commits into from
Feb 23, 2024

Merge branch 'main' into dev-register-schema

ce63fbc
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Support register custom OpSchema by python #5906

Merge branch 'main' into dev-register-schema
ce63fbc
Select commit
Loading
Failed to load commit list.
GitHub Actions / clang-tidy-review completed Feb 23, 2024 in 0s

clang-tidy-review

There were 6 warnings

Details

onnx/defs/schema.h:1213: warning: method 'UpdateDomainToVersion' can be made static [readability-convert-member-functions-to-static]
onnx/defs/schema.h:1213: warning: 2 adjacent parameters of 'UpdateDomainToVersion' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
onnx/defs/schema.h:1253: warning: the parameter 'op_schema' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
onnx/defs/schema.h:1268: warning: variable name 'm' is too short, expected at least 3 characters [readability-identifier-length]
onnx/defs/schema.h:1269: warning: 'auto &op_name' can be declared as 'const auto &op_name' [readability-qualified-auto]
onnx/defs/schema.h:1270: warning: 'auto &op_domain' can be declared as 'const auto &op_domain' [readability-qualified-auto]

Annotations

Check warning on line 1213 in onnx/defs/schema.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: method 'UpdateDomainToVersion' can be made static [readability-convert-member-functions-to-static]

onnx/defs/schema.h:1211:
```diff
-     void
+     static void
```

Check warning on line 1213 in onnx/defs/schema.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: 2 adjacent parameters of 'UpdateDomainToVersion' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
```cpp
    UpdateDomainToVersion(const std::string& domain, int min_version, int max_version, int last_release_version = -1) {
                                                     ^
```
<details>
<summary>Additional context</summary>

**onnx/defs/schema.h:1212:** the first parameter in the range is 'min_version'
```cpp
    UpdateDomainToVersion(const std::string& domain, int min_version, int max_version, int last_release_version = -1) {
                                                         ^
```
**onnx/defs/schema.h:1212:** the last parameter in the range is 'max_version'
```cpp
    UpdateDomainToVersion(const std::string& domain, int min_version, int max_version, int last_release_version = -1) {
                                                                          ^
```

</details>

Check warning on line 1253 in onnx/defs/schema.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: the parameter 'op_schema' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]

```suggestion
    OpSchemaRegisterOnce(const OpSchema& op_schema, int opset_version_to_load = 0, bool fail_duplicate_schema = true) {
```

Check warning on line 1268 in onnx/defs/schema.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: variable name 'm' is too short, expected at least 3 characters [readability-identifier-length]
```cpp
      auto& m = GetMapWithoutEnsuringRegistration();
            ^
```

Check warning on line 1269 in onnx/defs/schema.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: 'auto &op_name' can be declared as 'const auto &op_name' [readability-qualified-auto]

```suggestion
      const auto& op_name = op_schema.Name();
```

Check warning on line 1270 in onnx/defs/schema.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: 'auto &op_domain' can be declared as 'const auto &op_domain' [readability-qualified-auto]

```suggestion
      const auto& op_domain = op_schema.domain();
```