Skip to content

Commit

Permalink
[DML EP] Attention Kernel bug fix (#13879)
Browse files Browse the repository at this point in the history
### Description
- Use same data type as input for mask_index tensor which is used as DML
GEMM API's C parameter.
- Remove gsl header include as it is already gets included transitively.



### Motivation and Context
- Why is this change required? What problem does it solve?
Bug found in internal conformance testing.
- If it fixes an open issue, please link to the issue here.
N/A
  • Loading branch information
sumitsays authored Dec 7, 2022
1 parent 4c79977 commit 5b16593
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class DmlOperatorAttention : public DmlOperator
valueSlicedOperatorDesc.InputWindowStrides = strides.data();
const DML_OPERATOR_DESC valueSlicedDesc = { DML_OPERATOR_SLICE1, &valueSlicedOperatorDesc};

TensorDesc castedMaskIndexTensorDesc = TensorDesc::ConstructDefaultTensorDesc(MLOperatorTensorDataType::Float, desiredMaskIndexShape);
TensorDesc castedMaskIndexTensorDesc = TensorDesc::ConstructDefaultTensorDesc(dataType, desiredMaskIndexShape);
DML_TENSOR_DESC namedCastedMaskIndexTensorDesc = castedMaskIndexTensorDesc.GetDmlDesc();

DML_CAST_OPERATOR_DESC castMaskIndexOperatorDesc = {};
Expand Down
1 change: 0 additions & 1 deletion winml/test/scenario/cppwinrt/CustomOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "filehelpers.h"
#include <fstream>
#include <MemoryBuffer.h>
#include <gsl/gsl>
#include "CustomOperatorProvider.h"
#include "CustomOps.h"

Expand Down

0 comments on commit 5b16593

Please sign in to comment.