Fix Memcpy transformer when dealing multiple EPs (#22413)

### Description

Fix Memcpy transformer when dealing multiple EPs.

---------

Co-authored-by: Scott McKay <Scott.McKay@microsoft.com>
Co-authored-by: Scott McKay <skottmckay@gmail.com>
This commit is contained in:
Yulong Wang 2024-10-16 13:38:22 -07:00 committed by GitHub
parent f610605a48
commit c3a94c6c5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -256,13 +256,6 @@ void TransformerMemcpyImpl::ProcessDefs(onnxruntime::Node& node, const KernelReg
}
} else if (node_provider_type != kCudaExecutionProvider && node_provider_type != kTensorrtExecutionProvider &&
node_provider_type != kRocmExecutionProvider && node_provider_type != kMIGraphXExecutionProvider) {
// TODO: copy between devices? i.e. multiple GPUs
if (node_provider_type != onnxruntime::kCpuExecutionProvider &&
node_provider_type != onnxruntime::kVitisAIExecutionProvider &&
!node_provider_type.empty()) {
ORT_THROW("Execution type '", node_provider_type, "' doesn't support memcpy ");
}
for (const auto* arg : node.InputDefs()) {
if (arg->Exists())
non_provider_input_defs_.insert(arg);