[DML EP] Revert DML's cpu fallback logic - #13605
Merged
Patrice Vignola (PatriceVignola) merged 1 commit intoNov 10, 2022
Merged
Conversation
Patrice Vignola (PatriceVignola)
requested a review
from Dwayne Robinson (fdwr)
November 9, 2022 20:37
Patrice Vignola (PatriceVignola)
deleted the
user/pavignol/fix-dml-cpu-fallback-logic
branch
November 10, 2022 08:56
Contributor
|
I found that the implementation of GetCapability for DML EP is different from other EPs such as CUDA. So a possible fix for your case is to follow the way CUDA EP does, instead of put all nodes as candidates passed to GetCpuPreferredNodes, just pass those nodes supported by target EP (DML here) to GetCpuPreferredNodes. Then inside GetCpuPreferredNodes, you will not hit the assertion of "ORT_ENFORCE(kernel_info != nullptr);". |
MS (simon-moo)
pushed a commit
to simon-moo/onnxruntime
that referenced
this pull request
Dec 21, 2022
### Description Revert DML's CPU fallback logic from microsoft#13442. ### Motivation and Context Although the logic works great in many models that have good DML coverage, it makes perf worse in some models where many operators are missing DML coverage (e.g. int64). Overall, the right fix seems to instead implement the operator on DML even though it almost always falls back to the CPU, just for the sake of having a registration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Revert DML's CPU fallback logic from #13442.
Motivation and Context
Although the logic works great in many models that have good DML coverage, it makes perf worse in some models where many operators are missing DML coverage (e.g. int64). Overall, the right fix seems to instead implement the operator on DML even though it almost always falls back to the CPU, just for the sake of having a registration.