Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DML EP] Add int16 QDQ remover #22459

Closed
wants to merge 3 commits into from

Conversation

PatriceVignola
Copy link
Contributor

Description

Motivation and Context


if (session_options.config_options.GetConfigOrDefault(kOrtSessionOptionsDisableDoubleQDQRemover, "0") == "0") {
// DML doesn't support int16 QDQ, so we remove all pairs that cancel eachother to avoid falling back to the CPU
transformers.emplace_back(std::make_unique<Int16QDQPairsRemover>(dml_ep));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think L1 optimizations should be EP agnostic given partitioning hasn't occurred yet so we don't know which EP will be assigned the nodes.

Instead of using an L1 optimizer, can the DML EP create a ComputeCapability for a fused node that drops the DQ/Q? Should be relatively simple to do that.

@@ -317,6 +318,12 @@ InlinedVector<std::unique_ptr<GraphTransformer>> GenerateTransformers(
#else
const bool avx2_precision_mode = false;
#endif

if (session_options.config_options.GetConfigOrDefault(kOrtSessionOptionsDisableDoubleQDQRemover, "0") == "0") {
// DML doesn't support int16 QDQ, so we remove all pairs that cancel eachother to avoid falling back to the CPU
Copy link
Contributor

@fdwr fdwr Nov 13, 2024

Choose a reason for hiding this comment

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

Suggested change
// DML doesn't support int16 QDQ, so we remove all pairs that cancel eachother to avoid falling back to the CPU
// DML doesn't support int16 QDQ, so we remove all pairs that cancel each other to avoid falling back to the CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants