Skip to content

Conversation

smk2007
Copy link
Member

@smk2007 smk2007 commented Aug 11, 2022

DirectML GEMM broken in opset 11 and 13 when optional tensor C not provided

In opset 11, GEMM's input C became optional. This was not accounted for in DML.

ML_CHECK_VALID_ARGUMENT(kernelInfo.GetInputCount() >= 2);
ML_CHECK_VALID_ARGUMENT(kernelInfo.GetOutputCount() == 1);
DmlOperator::Initialize(kernelInfo);
auto kernelInputIndices = std::vector<std::optional<uint32_t>> { 0, 1, 2 };
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for pointing this out. I think we need to enhance our ONNXConformance Test to test each operator with/without the graph. Right now OnnxConformance test, executes the GEMM as a graph node. And the Compute method is different for an individual operator and a DML Graph. I will discuss this with the team in more detail.

@smk2007 smk2007 merged commit 67f6b7c into main Aug 11, 2022
@smk2007 smk2007 deleted the user/sheilk/fix-gemm-optional-tensor branch August 11, 2022 23:01
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.

2 participants