Skip to content

Conversation

@yifei410
Copy link
Contributor

@yifei410 yifei410 commented Aug 8, 2025

Description

It is related to #25629

Motivation and Context

With #25320 #23979, all initialized tensor protos are associated with OrtValue, VitisiAI EP need to adapt to this change.

@HectorSVC
Copy link
Contributor

/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows x64 QNN CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

*p->mutable_value() = std::string("<") + graph_ptr;
} else {
// Under threshold: get the data from ORT_MEM_ADDR and add it to cloned graph
std::unique_ptr<ONNX_NAMESPACE::TensorProto> tensor_proto;
Copy link
Member

Choose a reason for hiding this comment

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

tensor_proto;

If it is not in memory, then this is going to be nullptr

}
} else {
*cloned_tensor = *original_tensor;
// ORT 1.22 or ealier intializer handling
Copy link
Member

@yuslepukhin yuslepukhin Aug 11, 2025

Choose a reason for hiding this comment

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

// ORT 1.22 or ealier intializer handling

What is the perceived difference? It is inline or not.

*p->mutable_key() = "location";
*p->mutable_value() = std::string("<") + graph_ptr;
// ORT 1.23 intializer handling
if (size >= external_data_threshold) {
Copy link
Member

Choose a reason for hiding this comment

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

if (size >= external_data_threshold) {

Use utils::HasExternalDataInMemory() to see if data is in OrtValue.

*p->mutable_key() = "location";
*p->mutable_value() = std::string("<") + graph_ptr;
} else {
// Under threshold: get the data from ORT_MEM_ADDR and add it to cloned graph
Copy link
Member

@yuslepukhin yuslepukhin Aug 11, 2025

Choose a reason for hiding this comment

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

// Under threshold: get the data from ORT_MEM_AD

Do not rely on threshold. Some big initializers may not be converted. Use utils to test if the data is external.

We generally do not want YOU to make the decision of what is expected to be an external data in memory.

Use utilities to test and convert.

You can also get a corresponding OrtValue from the graph.

Copy link
Member

@yuslepukhin yuslepukhin left a comment

Choose a reason for hiding this comment

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

🕐

@HectorSVC HectorSVC added the ep:VitisAI issues related to Vitis AI execution provider label Aug 11, 2025
@HectorSVC HectorSVC closed this Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:VitisAI issues related to Vitis AI execution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants