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

De-duplicate 1D scale and zero point tensors to scalars in DML kernels #18629

Closed
wants to merge 4 commits into from

Conversation

raoanag
Copy link
Contributor

@raoanag raoanag commented Nov 29, 2023

chrilaMSFT and others added 4 commits November 29, 2023 13:25
#18495)

Update TryConvertTensorToBroadcastScalar to fail gracefully if not CPU
tensor

### Description
Added early exit for in TryConvertTensorToBroadcastScalar if there is no
CpuData to prevent failure caused by constExpTensor->GetByteData()
throwing.

### Motivation and Context
DmlPrototype branch was failing in QLinearConv when there was no CpuData

---------

Co-authored-by: Christian Larson <[email protected]>
### Description
Fix TryConvertTensorToBroadcastScalar build break, caused by incorrect
method call.

-        else if (!IsCpuData())
+        else if (!constExpTensor->IsCpuData())

### Motivation and Context
Previous build causing build break.

Co-authored-by: Christian Larson <[email protected]>
@@ -111,6 +111,8 @@ class DmlOperatorBatchNormalization15 : public DmlOperator, BatchNormalizationHe
std::vector<DML_TENSOR_DESC> inputDescs = GetDmlInputDescs();
std::vector<DML_TENSOR_DESC> outputDescs = GetDmlOutputDescs();

// TODO: Port this to a graph description to enable DML graph optimization
Copy link
Contributor

Choose a reason for hiding this comment

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

// TODO: Port this to a graph description to enable DML graph optimization

Should there be an issue tracking the todo?

@@ -85,7 +85,10 @@ namespace Windows::AI::MachineLearning::Adapter
{
uint32_t nodeCount = 0;
std::vector<std::unique_ptr<AbstractOperatorDesc>> nodesAsOperatorDesc;

// TODO: Remove this
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be removed?

jeffbloo added a commit that referenced this pull request Jan 2, 2024
#18862)

### Description
Cleanup and rebase from [this
PR](#18629)



### Motivation and Context

---------

Co-authored-by: Christian Larson <[email protected]>
Co-authored-by: Christian Larson <[email protected]>
Co-authored-by: Jeff Bloomfield <[email protected]>
Co-authored-by: Anagha Rao <[email protected]>
@jeffbloo
Copy link
Contributor

jeffbloo commented Jan 3, 2024

This is merged in this PR instead:
#18862

@jeffbloo jeffbloo closed this Jan 3, 2024
jeffbloo added a commit that referenced this pull request Jan 4, 2024
#18862)

### Description
Cleanup and rebase from [this
PR](#18629)



### Motivation and Context

---------

Co-authored-by: Christian Larson <[email protected]>
Co-authored-by: Christian Larson <[email protected]>
Co-authored-by: Jeff Bloomfield <[email protected]>
Co-authored-by: Anagha Rao <[email protected]>
jslap-ubi pushed a commit to jslap-ubi/onnxruntime that referenced this pull request Apr 5, 2024
microsoft#18862)

### Description
Cleanup and rebase from [this
PR](microsoft#18629)



### Motivation and Context

---------

Co-authored-by: Christian Larson <[email protected]>
Co-authored-by: Christian Larson <[email protected]>
Co-authored-by: Jeff Bloomfield <[email protected]>
Co-authored-by: Anagha Rao <[email protected]>
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