mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-10 17:37:14 +00:00
The transformer of memcpy is needed for ROCm EP and MIGraphX EP when fallbacking CPU happens (#10522)
Co-authored-by: Weixing Zhang <wezhan@microsoft.com>
This commit is contained in:
parent
f92e47e95b
commit
2002a96594
1 changed files with 5 additions and 2 deletions
|
|
@ -189,7 +189,8 @@ void TransformerMemcpyImpl::ProcessDefs(onnxruntime::Node& node, const KernelReg
|
|||
InitializedTensorSet& initializers_consumed) {
|
||||
auto node_provider_type = node.GetExecutionProviderType();
|
||||
if ((node_provider_type == provider_) ||
|
||||
(node_provider_type == kCudaExecutionProvider && kTensorrtExecutionProvider == provider_)) {
|
||||
(node_provider_type == kCudaExecutionProvider && kTensorrtExecutionProvider == provider_) ||
|
||||
(node_provider_type == kRocmExecutionProvider && kMIGraphXExecutionProvider == provider_)) {
|
||||
provider_nodes_.insert(&node);
|
||||
// note KernelCreateInfo might be nullptr for custom kernel
|
||||
const KernelCreateInfo* kci = nullptr;
|
||||
|
|
@ -281,7 +282,9 @@ void TransformerMemcpyImpl::BuildDefsMapping(const onnxruntime::NodeArg* arg, co
|
|||
if (arg_input_index == -1 && arg_output_index == -1)
|
||||
continue;
|
||||
auto node_provider_type = it.GetExecutionProviderType();
|
||||
if ((node_provider_type == provider_) || (node_provider_type == kCudaExecutionProvider && kTensorrtExecutionProvider == provider_)) {
|
||||
if ((node_provider_type == provider_) ||
|
||||
(node_provider_type == kCudaExecutionProvider && kTensorrtExecutionProvider == provider_) ||
|
||||
(node_provider_type == kRocmExecutionProvider && kMIGraphXExecutionProvider == provider_)) {
|
||||
const KernelCreateInfo* kci = nullptr;
|
||||
ORT_IGNORE_RETURN_VALUE(kernel_registries.SearchKernelRegistry(it, &kci));
|
||||
if (arg_input_index != -1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue