Commit 39f966e
authored
Fix Doxygen documentation build error in onnxruntime_c_api.h (#27083)
# Fix Doxygen documentation build errors from recent PRs
Fixes multiple Doxygen errors introduced by recent API additions that
cause the nightly documentation build to fail (`WARN_AS_ERROR=YES`).
## Root Cause Analysis
| Error | File | Line | Introduced By | Commit | Fix |
|-------|------|------|---------------|--------|-----|
| Duplicate `\addtogroup Global` | onnxruntime_c_api.h | 973 | PR #26828
- OrtExternalResourceImporter API | c54be3c | Remove redundant group
markers |
| Unresolved `::SetSessionLogSeverityLevel()` | onnxruntime_c_api.h |
1065 | PR #26971 - CreateEnvWithOptions API | 3874516 | Use
`OrtApi::SetSessionLogSeverityLevel` |
| Unresolved `::RunOptionsSetRunLogSeverityLevel()` |
onnxruntime_c_api.h | 1066 | PR #26971 - CreateEnvWithOptions API |
3874516 | Use `OrtApi::RunOptionsSetRunLogSeverityLevel` |
| `<ep_name>` interpreted as HTML | onnxruntime_c_api.h | 1119 | PR
#26971 - CreateEnvWithOptions API | 3874516 | Escape as `\<ep_name\>` |
| `\param[in] importer` not found | onnxruntime_c_api.h | 7982 | PR
#26828 - OrtExternalResourceImporter API | c54be3c | Use `\param[in]
input` (macro expands to `input`) |
| `\param[in] handle` not found | onnxruntime_c_api.h | 8025 | PR #26828
- OrtExternalResourceImporter API | c54be3c | Use `\param[in] input` |
| `\param[in] handle` not found | onnxruntime_c_api.h | 8091 | PR #26828
- OrtExternalResourceImporter API | c54be3c | Use `\param[in] input` |
| Unresolved `::CreateLoopKernel()` | onnxruntime_ep_c_api.h | 667 | PR
#26927 - Control flow kernels API | 1ed8fd9 | Use
`OrtEpApi::CreateLoopKernel` |
| Unresolved `::CreateScanKernel()` | onnxruntime_ep_c_api.h | 710 | PR
#26927 - Control flow kernels API | 1ed8fd9 | Use
`OrtEpApi::CreateScanKernel` |
| `<ep_name>` interpreted as HTML | onnxruntime_ep_c_api.h | 1434 | PR
#26971 - CreateEnvWithOptions API | 3874516 | Escape as `\<ep_name\>` |
| `\param[out] out` not found | onnxruntime_ep_c_api.h | 1440 | PR
#26971 - CreateEnvWithOptions API | 3874516 | Use `\param[out]
config_entries` |
## Summary by PR
| PR | Issues |
|----|--------|
| **#26828** (c54be3c) - OrtExternalResourceImporter API for D3D12 |
Duplicate Doxygen group, incorrect `\param` names for
`ORT_CLASS_RELEASE` macros |
| **#26927** (1ed8fd9) - Control flow kernels API | `::Method()` syntax
unresolvable by Doxygen |
| **#26971** (3874516) - CreateEnvWithOptions API | `::Method()`
syntax, `<ep_name>` HTML interpretation, incorrect param name |
## Technical Details
### `ORT_CLASS_RELEASE` Macro Issue
The `ORT_CLASS_RELEASE(X)` macro at line 164 expands to:
```cpp
void(ORT_API_CALL * Release##X)(_Frees_ptr_opt_ Ort##X * input)
```
The parameter is always named `input`, but the documentation in PR
#26828 used semantic names like `importer` and `handle`. Doxygen
validates `\param` names against actual parameter names in the expanded
code.
### Doxygen Link Resolution
Doxygen 1.9.8 cannot resolve `::MethodName()` as a link to a method. The
correct syntax is to qualify with the struct name: `OrtApi::MethodName`.
## Testing
Verified locally with Doxygen 1.9.8 (matches CI configuration).1 parent 5e7e7a3 commit 39f966e
File tree
2 files changed
+10
-16
lines changed- include/onnxruntime/core/session
2 files changed
+10
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | 973 | | |
978 | 974 | | |
979 | 975 | | |
| |||
1041 | 1037 | | |
1042 | 1038 | | |
1043 | 1039 | | |
1044 | | - | |
1045 | | - | |
1046 | 1040 | | |
1047 | 1041 | | |
1048 | 1042 | | |
| |||
1068 | 1062 | | |
1069 | 1063 | | |
1070 | 1064 | | |
1071 | | - | |
1072 | | - | |
| 1065 | + | |
| 1066 | + | |
1073 | 1067 | | |
1074 | 1068 | | |
1075 | 1069 | | |
| |||
1122 | 1116 | | |
1123 | 1117 | | |
1124 | 1118 | | |
1125 | | - | |
| 1119 | + | |
1126 | 1120 | | |
1127 | 1121 | | |
1128 | 1122 | | |
| |||
7985 | 7979 | | |
7986 | 7980 | | |
7987 | 7981 | | |
7988 | | - | |
| 7982 | + | |
7989 | 7983 | | |
7990 | 7984 | | |
7991 | 7985 | | |
| |||
8028 | 8022 | | |
8029 | 8023 | | |
8030 | 8024 | | |
8031 | | - | |
| 8025 | + | |
8032 | 8026 | | |
8033 | 8027 | | |
8034 | 8028 | | |
| |||
8094 | 8088 | | |
8095 | 8089 | | |
8096 | 8090 | | |
8097 | | - | |
| 8091 | + | |
8098 | 8092 | | |
8099 | 8093 | | |
8100 | 8094 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
| 667 | + | |
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
| 710 | + | |
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| |||
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
1434 | | - | |
| 1434 | + | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | 1437 | | |
1438 | 1438 | | |
1439 | 1439 | | |
1440 | | - | |
| 1440 | + | |
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
| |||
0 commit comments