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] Add int4 QDQ #21592

Merged
merged 9 commits into from
Aug 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add registration for supporting ops
  • Loading branch information
PatriceVignola committed Aug 9, 2024
commit 6f2677fd03cf2c80b6e989b9dee10df45d9f8992
Original file line number Diff line number Diff line change
@@ -856,13 +856,16 @@ constexpr static OperatorRegistrationInformation operatorRegistrationInformation
{REG_INFO_COPY( 7, Squeeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported)},
{REG_INFO_COPY(11, Squeeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported)},
{REG_INFO_COPY(13, Squeeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY(21, Squeeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY( 7, Unsqueeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported)},
{REG_INFO_COPY(11, Unsqueeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported)},
{REG_INFO_COPY(13, Unsqueeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY(21, Unsqueeze, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY( 7, Reshape, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY(13, Reshape, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY(14, Reshape, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY(19, Reshape, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},
{REG_INFO_COPY(21, Reshape, typeNameListDefault, supportedTypeListAllScalars, DmlGraphSupport::Supported, requiredConstantCpuInputs(1))},

// Elementwise
{REG_INFO( 7, Sqrt, typeNameListDefault, supportedTypeListFloat16to32, DmlGraphSupport::Supported)},
@@ -1081,6 +1084,7 @@ constexpr static OperatorRegistrationInformation operatorRegistrationInformation
{REG_INFO( 9, Cast, typeNameListTwo, supportedTypeListCast, DmlGraphSupport::Supported)},
{REG_INFO( 13, Cast, typeNameListTwo, supportedTypeListCast, DmlGraphSupport::Supported)},
{REG_INFO( 19, Cast, typeNameListTwo, supportedTypeListCast, DmlGraphSupport::Supported)},
{REG_INFO( 21, Cast, typeNameListTwo, supportedTypeListCast, DmlGraphSupport::Supported)},
{REG_INFO_VER( 15, CastLike, typeNameListTwo, supportedTypeListCast, DmlGraphSupport::Supported)},
{REG_INFO_VER( 19, CastLike, typeNameListTwo, supportedTypeListCast, DmlGraphSupport::Supported)},
{REG_INFO( 7, MemcpyFromHost, typeNameListDefault, supportedTypeListAll)},
@@ -1094,6 +1098,7 @@ constexpr static OperatorRegistrationInformation operatorRegistrationInformation
{REG_INFO( 13, Shape, typeNameShape, supportedTypeListShape, DmlGraphSupport::NotSupported)},
{REG_INFO( 15, Shape, typeNameShape, supportedTypeListShape, DmlGraphSupport::NotSupported)},
{REG_INFO( 19, Shape, typeNameShape, supportedTypeListShape, DmlGraphSupport::NotSupported)},
{REG_INFO( 21, Shape, typeNameShape, supportedTypeListShape, DmlGraphSupport::NotSupported)},
{REG_INFO( 7, Size, typeNameSize, supportedTypeListSize, DmlGraphSupport::NotSupported)},
{REG_INFO( 13, Size, typeNameSize, supportedTypeListSize, DmlGraphSupport::NotSupported)},
{REG_INFO( 19, Size, typeNameSize, supportedTypeListSize, DmlGraphSupport::NotSupported)},
Original file line number Diff line number Diff line change
@@ -1696,9 +1696,11 @@ using ShapeInferenceHelper_DepthToSpace = DepthToSpaceHelper;
using ShapeInferenceHelper_Squeeze7 = VersionedOpsetHelper<SqueezeHelper, 7>;
using ShapeInferenceHelper_Squeeze11 = VersionedOpsetHelper<SqueezeHelper, 11>;
using ShapeInferenceHelper_Squeeze13 = VersionedOpsetHelper<SqueezeHelper, 13>;
using ShapeInferenceHelper_Squeeze21 = VersionedOpsetHelper<SqueezeHelper, 21>;
using ShapeInferenceHelper_Unsqueeze7 = VersionedOpsetHelper<UnsqueezeHelper, 7>;
using ShapeInferenceHelper_Unsqueeze11 = VersionedOpsetHelper<UnsqueezeHelper, 11>;
using ShapeInferenceHelper_Unsqueeze13 = VersionedOpsetHelper<UnsqueezeHelper, 13>;
using ShapeInferenceHelper_Unsqueeze21 = VersionedOpsetHelper<UnsqueezeHelper, 21>;
using ShapeInferenceHelper_EyeLike = GetOutputShapeAsInputShapeHelper;
using ShapeInferenceHelper_Trilu = GetOutputShapeAsInputShapeHelper;
using ShapeInferenceHelper_Col2Im = Col2ImHelper;
@@ -1708,6 +1710,7 @@ using ShapeInferenceHelper_Reshape7 = ReshapeHelper;
using ShapeInferenceHelper_Reshape13 = ReshapeHelper;
using ShapeInferenceHelper_Reshape14 = ReshapeHelper;
using ShapeInferenceHelper_Reshape19 = ReshapeHelper;
using ShapeInferenceHelper_Reshape21 = ReshapeHelper;
using ShapeInferenceHelper_ConstantOfShape = ConstantOfShapeHelper;
using ShapeInferenceHelper_Tile = TileHelper;
using ShapeInferenceHelper_Resize10 = VersionedOpsetHelper<ResizeHelper, 10>;
Original file line number Diff line number Diff line change
@@ -441,6 +441,11 @@ namespace OperatorHelper
{
static const int sc_sinceVer_QuantizeLinear = 21;

Check warning

Code scanning / PREfast

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_QuantizeLinear' can be computed at compile-time. Consider using constexpr (con.5). Warning

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_QuantizeLinear' can be computed at compile-time. Consider using constexpr (con.5).
static const int sc_sinceVer_DequantizeLinear = 21;

Check warning

Code scanning / PREfast

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_DequantizeLinear' can be computed at compile-time. Consider using constexpr (con.5). Warning

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_DequantizeLinear' can be computed at compile-time. Consider using constexpr (con.5).
static const int sc_sinceVer_Squeeze = 21;

Check warning

Code scanning / PREfast

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Squeeze' can be computed at compile-time. Consider using constexpr (con.5). Warning

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Squeeze' can be computed at compile-time. Consider using constexpr (con.5).
static const int sc_sinceVer_Unsqueeze = 21;

Check warning

Code scanning / PREfast

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Unsqueeze' can be computed at compile-time. Consider using constexpr (con.5). Warning

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Unsqueeze' can be computed at compile-time. Consider using constexpr (con.5).
static const int sc_sinceVer_Reshape = 21;

Check warning

Code scanning / PREfast

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Reshape' can be computed at compile-time. Consider using constexpr (con.5). Warning

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Reshape' can be computed at compile-time. Consider using constexpr (con.5).
static const int sc_sinceVer_Cast = 21;

Check warning

Code scanning / PREfast

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Cast' can be computed at compile-time. Consider using constexpr (con.5). Warning

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Cast' can be computed at compile-time. Consider using constexpr (con.5).
static const int sc_sinceVer_Shape = 21;

Check warning

Code scanning / PREfast

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Shape' can be computed at compile-time. Consider using constexpr (con.5). Warning

The const variable 'OperatorHelper::OnnxOperatorSet21::sc_sinceVer_Shape' can be computed at compile-time. Consider using constexpr (con.5).
}

namespace MsftOperatorSet1