Skip to content

Conversation

@adrianlizarraga
Copy link
Contributor

@adrianlizarraga adrianlizarraga commented Jul 28, 2025

Description

Updates Node_GetAttributeByName to return an error status with code ORT_NOT_FOUND and set the attribute output parameter to NULL when called with a non-existing attribute name.

Why? Currently, a caller has to do string comparison of the OrtStatus error message to determine if the attribute does not exist or if another error occurred. This can be somewhat cumbersome. With this change, the caller can just check the error code.

Motivation and Context

Make it easier to use Node_GetAttributeByName.

@adrianlizarraga adrianlizarraga changed the title [EP ABI] Allow calling Node_GetAttrByName with non-existing attr name [EP ABI] Node_GetAttrByName returns ORT_NOT_FOUND with non-existing attr name Jul 28, 2025
@adrianlizarraga adrianlizarraga requested review from chilo-ms and yuslepukhin and removed request for yuslepukhin July 29, 2025 17:36
@adrianlizarraga adrianlizarraga merged commit 8f20e30 into main Jul 29, 2025
92 of 93 checks passed
@adrianlizarraga adrianlizarraga deleted the adrianl/EpABI_GetAttrByName_NotFoundOk branch July 29, 2025 22:03
snnn pushed a commit that referenced this pull request Jul 30, 2025
…ttr name (#25565)

### Description
Updates `Node_GetAttributeByName` to return an error status with code
`ORT_NOT_FOUND` and set the `attribute` output parameter to `NULL` when
called with a non-existing attribute name.

Why? Currently, a caller has to do string comparison of the `OrtStatus`
error message to determine if the attribute does not exist or if another
error occurred. This can be somewhat cumbersome. With this change, the
caller can just check the error code.

### Motivation and Context
Make it easier to use `Node_GetAttributeByName`.
snnn pushed a commit that referenced this pull request Jul 30, 2025
- DynamicQuantizeMatMul - handle case where B zero point input is
provided but not constant. (#25544)
- Refactor plugin EP support (#25541)
- Remove the python installation steps from
win-qnn-arm64-ci-pipeline.yml (#25552)
- [EP ABI] Node_GetAttrByName returns ORT_NOT_FOUND with non-existing
attr name (#25565)
- Fix C/C++ documentation generation (#25569)
- [build] fix multi-config for VCPKG (#25585)
sanketkaleoss pushed a commit to sanketkaleoss/onnxruntime that referenced this pull request Aug 11, 2025
…ttr name (microsoft#25565)

### Description
Updates `Node_GetAttributeByName` to return an error status with code
`ORT_NOT_FOUND` and set the `attribute` output parameter to `NULL` when
called with a non-existing attribute name.

Why? Currently, a caller has to do string comparison of the `OrtStatus`
error message to determine if the attribute does not exist or if another
error occurred. This can be somewhat cumbersome. With this change, the
caller can just check the error code.

### Motivation and Context
Make it easier to use `Node_GetAttributeByName`.
qti-yuduo pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Sep 24, 2025
- Fix OrtNodeAttrHelper::Get after the change - microsoft#25565
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants