diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlCommon.h b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlCommon.h index e1fd0695cd..536fa9beeb 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlCommon.h +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlCommon.h @@ -10,7 +10,7 @@ namespace Dml { using namespace OperatorHelper; - static const int MaximumDimensionCount = DML_TENSOR_DIMENSION_COUNT_MAX; + static const int MaximumDimensionCount = DML_TENSOR_DIMENSION_COUNT_MAX1; DML_TENSOR_DATA_TYPE GetDmlDataTypeFromMlDataType(MLOperatorTensorDataType tensorDataType); DML_TENSOR_DATA_TYPE GetDmlDataTypeFromMlDataTypeNoThrow(MLOperatorTensorDataType tensorDataType) noexcept; diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/DmlOperatorOneHot.cpp b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/DmlOperatorOneHot.cpp index ec01a54acc..f1ba681d99 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/DmlOperatorOneHot.cpp +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/DmlOperatorOneHot.cpp @@ -37,7 +37,7 @@ public: TensorAxis::DoNotCoerce, TensorAxis::W, TensorAxis::RightAligned, - NchwDimensionCount, // minDimensionCount + 1, // minDimensionCount 0 ); @@ -49,10 +49,12 @@ public: TensorAxis::DoNotCoerce, TensorAxis::W, TensorAxis::RightAligned, - NchwDimensionCount, // minDimensionCount + 1, // minDimensionCount 0 ); + DmlOperator::Remap64bitDmlDataTypesTo32bitIfNeeded(); + // Adjust the axis so it's in DML's terms rather than the original ONNX indexing. uint32_t dmlAxis = GetDmlAdjustedAxis( m_absoluteAxis, diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/TensorDesc.h b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/TensorDesc.h index ea1af04ad6..39f4b0e56c 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/TensorDesc.h +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/TensorDesc.h @@ -59,8 +59,6 @@ namespace Dml DML_BUFFER_TENSOR_DESC m_bufferTensorDesc = {}; }; - - class TensorDescBuilder { public: