From c3a94c6c5fb4cf2b4ccab88e03ef53e5fe1df00e Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Wed, 16 Oct 2024 13:38:22 -0700 Subject: [PATCH] Fix Memcpy transformer when dealing multiple EPs (#22413) ### Description Fix Memcpy transformer when dealing multiple EPs. --------- Co-authored-by: Scott McKay Co-authored-by: Scott McKay --- onnxruntime/core/optimizer/transformer_memcpy.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/onnxruntime/core/optimizer/transformer_memcpy.cc b/onnxruntime/core/optimizer/transformer_memcpy.cc index f1e94dd4fe9e4..6a5a85ce0ff31 100644 --- a/onnxruntime/core/optimizer/transformer_memcpy.cc +++ b/onnxruntime/core/optimizer/transformer_memcpy.cc @@ -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);