Skip to content

Conversation

chilo-ms
Copy link
Contributor

@chilo-ms chilo-ms commented Jul 28, 2025

Description

Add a new Node_GetTensorAttributeAsOrtValue API to support attribute that is a TENSOR type.
This API returns a newly created OrtValue that represents the TensorProto in the TENSOR attribute, caller now owns it and needs to be cleaned up by ValueRelease or use Ort::Value.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

@chilo-ms chilo-ms marked this pull request as ready for review July 29, 2025 07:15
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

@chilo-ms
Copy link
Contributor Author

do we need to cache them at all? there's the issue of caching on demand requiring a non-const OrtNode*. could we just return a newly created OrtValue?

Made the API return a newly create OrtValue, and caller now owns it and have to manually clean up by ReleaseValue or use Ort::Value.

@chilo-ms chilo-ms merged commit 4a8a289 into main Jul 30, 2025
92 of 95 checks passed
@chilo-ms chilo-ms deleted the chi/add_ort_node_tensor_attribute branch July 30, 2025 21:34
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