Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel
Commits
dc7b6568
Commit
dc7b6568
authored
Mar 09, 2023
by
rocking
Browse files
Refine the quantization instance library
parent
c0be8480
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
244 additions
and
97 deletions
+244
-97
library/src/tensor_operation_instance/gpu/quantization/CMakeLists.txt
...tensor_operation_instance/gpu/quantization/CMakeLists.txt
+4
-4
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_bias_perchannel_quantization_int8_instance.cpp
...ice_conv2d_bias_perchannel_quantization_int8_instance.cpp
+31
-25
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_bias_perlayer_quantization_int8_instance.cpp
...evice_conv2d_bias_perlayer_quantization_int8_instance.cpp
+35
-21
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_int8_instance.hpp
...u/quantization/conv2d_fwd/device_conv2d_int8_instance.hpp
+20
-47
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_perchannel_quantization_int8_instance.cpp
...d/device_conv2d_perchannel_quantization_int8_instance.cpp
+80
-0
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_perlayer_quantization_int8_instance.cpp
...fwd/device_conv2d_perlayer_quantization_int8_instance.cpp
+74
-0
No files found.
library/src/tensor_operation_instance/gpu/quantization/CMakeLists.txt
View file @
dc7b6568
add_instance_library
(
device_quantization_instance
add_instance_library
(
device_quantization_instance
conv2d_fwd/device_conv2d_
xdl_
bias_perchannel_quantization_int8_instance.cpp
conv2d_fwd/device_conv2d_bias_perchannel_quantization_int8_instance.cpp
conv2d_fwd/device_conv2d_
xdl_
bias_perlayer_quantization_int8_instance.cpp
conv2d_fwd/device_conv2d_bias_perlayer_quantization_int8_instance.cpp
conv2d_fwd/device_conv2d_
xdl_
perchannel_quantization_int8_instance.cpp
conv2d_fwd/device_conv2d_perchannel_quantization_int8_instance.cpp
conv2d_fwd/device_conv2d_
xdl_
perlayer_quantization_int8_instance.cpp
conv2d_fwd/device_conv2d_perlayer_quantization_int8_instance.cpp
)
)
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_
xdl_
bias_perchannel_quantization_int8_instance.cpp
→
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_bias_perchannel_quantization_int8_instance.cpp
View file @
dc7b6568
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "device_conv2d_
xdl_
int8_instance.hpp"
#include "device_conv2d_int8_instance.hpp"
namespace
ck
{
namespace
ck
{
namespace
tensor_operation
{
namespace
tensor_operation
{
...
@@ -22,20 +22,23 @@ void add_device_conv2d_bias_perchannel_quantization_int8_instances(
...
@@ -22,20 +22,23 @@ void add_device_conv2d_bias_perchannel_quantization_int8_instances(
Add_Mul2_Clamp
>>>&
instances
)
Add_Mul2_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_GK_Tuple
,
I32_F32_Tuple
,
I32_F32_Tuple
,
Add_Mul2_Clamp
,
Add_Mul2_Clamp
,
ConvFwdDefault
>
{});
ConvFwdDefault
,
8
>
{});
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_GK_Tuple
,
I32_F32_Tuple
,
I32_F32_Tuple
,
Add_Mul2_Clamp
,
Add_Mul2_Clamp
,
ConvFwd1x1P0
>
{});
ConvFwd1x1P0
,
8
>
{});
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_GK_Tuple
,
I32_F32_Tuple
,
I32_F32_Tuple
,
Add_Mul2_Clamp
,
Add_Mul2_Clamp
,
ConvFwd1x1S1P0
>
{});
ConvFwd1x1S1P0
,
8
>
{});
}
}
void
add_device_conv2d_bias_relu_perchannel_quantization_int8_instances
(
void
add_device_conv2d_bias_relu_perchannel_quantization_int8_instances
(
...
@@ -53,20 +56,23 @@ void add_device_conv2d_bias_relu_perchannel_quantization_int8_instances(
...
@@ -53,20 +56,23 @@ void add_device_conv2d_bias_relu_perchannel_quantization_int8_instances(
Add_Relu_Mul2_Clamp
>>>&
instances
)
Add_Relu_Mul2_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_GK_Tuple
,
I32_F32_Tuple
,
I32_F32_Tuple
,
Add_Relu_Mul2_Clamp
,
Add_Relu_Mul2_Clamp
,
ConvFwdDefault
>
{});
ConvFwdDefault
,
8
>
{});
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_GK_Tuple
,
I32_F32_Tuple
,
I32_F32_Tuple
,
Add_Relu_Mul2_Clamp
,
Add_Relu_Mul2_Clamp
,
ConvFwd1x1P0
>
{});
ConvFwd1x1P0
,
8
>
{});
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_GK_Tuple
,
I32_F32_Tuple
,
I32_F32_Tuple
,
Add_Relu_Mul2_Clamp
,
Add_Relu_Mul2_Clamp
,
ConvFwd1x1S1P0
>
{});
ConvFwd1x1S1P0
,
8
>
{});
}
}
}
// namespace instance
}
// namespace instance
}
// namespace device
}
// namespace device
...
...
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_
xdl_
bias_perlayer_quantization_int8_instance.cpp
→
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_bias_perlayer_quantization_int8_instance.cpp
View file @
dc7b6568
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "device_conv2d_
xdl_
int8_instance.hpp"
#include "device_conv2d_int8_instance.hpp"
namespace
ck
{
namespace
ck
{
namespace
tensor_operation
{
namespace
tensor_operation
{
...
@@ -21,15 +21,24 @@ void add_device_conv2d_bias_perlayer_quantization_int8_instances(
...
@@ -21,15 +21,24 @@ void add_device_conv2d_bias_perlayer_quantization_int8_instances(
PassThrough
,
PassThrough
,
Add_Mul_Clamp
>>>&
instances
)
Add_Mul_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
I32_Tuple
,
Add_Mul_Clamp
,
ConvFwdDefault
>
{});
I32_Tuple
,
add_device_operation_instances
(
Add_Mul_Clamp
,
instances
,
ConvFwdDefault
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
I32_Tuple
,
Add_Mul_Clamp
,
ConvFwd1x1P0
>
{});
8
>
{});
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
I32_Tuple
,
Add_Mul_Clamp
,
ConvFwd1x1S1P0
>
{});
I32_Tuple
,
Add_Mul_Clamp
,
ConvFwd1x1P0
,
8
>
{});
add_device_operation_instances
(
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
I32_Tuple
,
Add_Mul_Clamp
,
ConvFwd1x1S1P0
,
8
>
{});
}
}
void
add_device_conv2d_bias_relu_perlayer_quantization_int8_instances
(
void
add_device_conv2d_bias_relu_perlayer_quantization_int8_instances
(
...
@@ -47,20 +56,25 @@ void add_device_conv2d_bias_relu_perlayer_quantization_int8_instances(
...
@@ -47,20 +56,25 @@ void add_device_conv2d_bias_relu_perlayer_quantization_int8_instances(
Add_Relu_Mul_Clamp
>>>&
instances
)
Add_Relu_Mul_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_Tuple
,
I32_Tuple
,
I32_Tuple
,
Add_Relu_Mul_Clamp
,
Add_Relu_Mul_Clamp
,
ConvFwdDefault
>
{});
ConvFwdDefault
,
8
>
{});
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
I32_Tuple
,
Add_Relu_Mul_Clamp
,
ConvFwd1x1P0
>
{});
I32_Tuple
,
Add_Relu_Mul_Clamp
,
ConvFwd1x1P0
,
8
>
{});
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
instances
,
device_
conv2d_int8_32Ds
_instances
<
GK_Tuple
,
device_
grouped_conv2d_xdl_int8
_instances
<
GK_Tuple
,
I32_Tuple
,
I32_Tuple
,
Add_Relu_Mul_Clamp
,
Add_Relu_Mul_Clamp
,
ConvFwd1x1S1P0
>
{});
ConvFwd1x1S1P0
,
8
>
{});
}
}
}
// namespace instance
}
// namespace instance
}
// namespace device
}
// namespace device
...
...
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_
xdl_
int8_instance.hpp
→
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_int8_instance.hpp
View file @
dc7b6568
...
@@ -53,55 +53,28 @@ static constexpr auto ConvFwd1x1S1P0 =
...
@@ -53,55 +53,28 @@ static constexpr auto ConvFwd1x1S1P0 =
template
<
typename
DsLayout
,
template
<
typename
DsLayout
,
typename
DsDatatype
,
typename
DsDatatype
,
typename
OutElementOp
,
typename
OutElementOp
,
ConvolutionForwardSpecialization
ConvSpec
>
ConvolutionForwardSpecialization
ConvSpec
,
index_t
DstScalarPerVector
=
16
>
// clang-format off
// clang-format off
using
device_conv2d_int8_instances
=
using
device_
grouped_
conv2d_
xdl_
int8_instances
=
std
::
tuple
<
std
::
tuple
<
//########################################| NumDim| A| B| Ds| E| AData| BData| AccData| CShuffle| Ds| EData| A| B| CDE| ConvForward| GEMM| NumGemmK| Block| MPer| NPer| KPer| AK1| BK1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransferClusterLengths| CBlockTransfer|
//########################################| NumDim| A| B| Ds| E| AData| BData| AccData| CShuffle| Ds| EData| A| B| CDE| ConvForward| GEMM| NumGemmK| Block| MPer| NPer| KPer| AK1| BK1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransferClusterLengths| CBlockTransfer|
//########################################| Spatial| Layout| Layout| Layout| Layout| Type| Type| Type| DataType| DataType| Type| Elementwise| Elementwise| Elementwise| Specialization| Specialization| Prefetch| Size| Block| Block| Block| | | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| _MBlock_MWaveMPerXdl| ScalarPerVector|
//########################################| Spatial| Layout| Layout| Layout| Layout| Type| Type| Type| DataType| DataType| Type| Elementwise| Elementwise| Elementwise| Specialization| Specialization| Prefetch| Size| Block| Block| Block| | | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| _MBlock_MWaveMPerXdl| ScalarPerVector|
//########################################| | | | | | | | | | | | Operation| Operation| Operation| | | Stage| | | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| _NBlock_NWaveNPerXdl| _NWaveNPerXdl|
//########################################| | | | | | | | | | | | Operation| Operation| Operation| | | Stage| | | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| _NBlock_NWaveNPerXdl| _NWaveNPerXdl|
//########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
//########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
256
,
128
,
64
,
16
,
16
,
32
,
32
,
4
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
256
,
128
,
64
,
16
,
16
,
32
,
32
,
4
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
256
,
64
,
16
,
16
,
32
,
32
,
2
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
256
,
64
,
16
,
16
,
32
,
32
,
2
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
128
,
64
,
16
,
16
,
32
,
32
,
4
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
128
,
64
,
16
,
16
,
32
,
32
,
4
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
128
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
128
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
2
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
2
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
64
,
128
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
64
,
128
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
64
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
64
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
64
,
128
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
64
,
128
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
32
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
2
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
32
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
2
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
32
,
128
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
32
,
128
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
64
,
32
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
16
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
64
,
32
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
DstScalarPerVector
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
32
,
64
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
16
>
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
32
,
64
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
DstScalarPerVector
>
>
;
// clang-format on
// for conv + multiple of 32 bit Ds. bit of Ds will affect the ScalarPerVector of C
template
<
typename
DsLayout
,
typename
DsDatatype
,
typename
OutElementOp
,
ConvolutionForwardSpecialization
ConvSpec
>
// clang-format off
using
device_conv2d_int8_32Ds_instances
=
std
::
tuple
<
//########################################| NumDim| A| B| Ds| E| AData| BData| AccData| CShuffle| Ds| EData| A| B| CDE| ConvForward| GEMM| NumGemmK| Block| MPer| NPer| KPer| AK1| BK1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransferClusterLengths| CBlockTransfer|
//########################################| Spatial| Layout| Layout| Layout| Layout| Type| Type| Type| DataType| DataType| Type| Elementwise| Elementwise| Elementwise| Specialization| Specialization| Prefetch| Size| Block| Block| Block| | | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| _MBlock_MWaveMPerXdl| ScalarPerVector|
//########################################| | | | | | | | | | | | Operation| Operation| Operation| | | Stage| | | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| _NBlock_NWaveNPerXdl| _NWaveNPerXdl|
//########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
256
,
128
,
64
,
16
,
16
,
32
,
32
,
4
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
256
,
64
,
16
,
16
,
32
,
32
,
2
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
128
,
64
,
16
,
16
,
32
,
32
,
4
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
128
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
2
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
64
,
128
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
64
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
2
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
128
,
64
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
256
,
64
,
128
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
128
,
32
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
64
,
1
,
2
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
128
,
32
,
128
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
64
,
32
,
64
,
16
,
16
,
32
,
32
,
2
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
8
>
,
DeviceGroupedConvFwdMultipleD_Xdl_CShuffle
<
2
,
GNHWC
,
GKYXC
,
DsLayout
,
GNHWK
,
int8_t
,
int8_t
,
int32_t
,
int32_t
,
DsDatatype
,
int8_t
,
PassThrough
,
PassThrough
,
OutElementOp
,
ConvSpec
,
GemmSpec
,
1
,
64
,
32
,
64
,
64
,
16
,
16
,
32
,
32
,
1
,
2
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
16
,
16
,
1
,
1
,
1
,
S
<
1
,
32
,
1
,
2
>
,
8
>
>
;
>
;
// clang-format on
// clang-format on
...
...
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_
xdl_
perchannel_quantization_int8_instance.cpp
→
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_perchannel_quantization_int8_instance.cpp
View file @
dc7b6568
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "device_conv2d_
xdl_
int8_instance.hpp"
#include "device_conv2d_int8_instance.hpp"
namespace
ck
{
namespace
ck
{
namespace
tensor_operation
{
namespace
tensor_operation
{
...
@@ -21,15 +21,24 @@ void add_device_conv2d_perchannel_quantization_int8_instances(
...
@@ -21,15 +21,24 @@ void add_device_conv2d_perchannel_quantization_int8_instances(
PassThrough
,
PassThrough
,
Mul2_Clamp
>>>&
instances
)
Mul2_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
F32_Tuple
,
Mul2_Clamp
,
ConvFwdDefault
>
{});
F32_Tuple
,
add_device_operation_instances
(
Mul2_Clamp
,
instances
,
ConvFwdDefault
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
F32_Tuple
,
Mul2_Clamp
,
ConvFwd1x1P0
>
{});
8
>
{});
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
F32_Tuple
,
Mul2_Clamp
,
ConvFwd1x1S1P0
>
{});
F32_Tuple
,
Mul2_Clamp
,
ConvFwd1x1P0
,
8
>
{});
add_device_operation_instances
(
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
F32_Tuple
,
Mul2_Clamp
,
ConvFwd1x1S1P0
,
8
>
{});
}
}
void
add_device_conv2d_relu_perchannel_quantization_int8_instances
(
void
add_device_conv2d_relu_perchannel_quantization_int8_instances
(
...
@@ -46,15 +55,24 @@ void add_device_conv2d_relu_perchannel_quantization_int8_instances(
...
@@ -46,15 +55,24 @@ void add_device_conv2d_relu_perchannel_quantization_int8_instances(
PassThrough
,
PassThrough
,
Relu_Mul2_Clamp
>>>&
instances
)
Relu_Mul2_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
F32_Tuple
,
Relu_Mul2_Clamp
,
ConvFwdDefault
>
{});
F32_Tuple
,
add_device_operation_instances
(
Relu_Mul2_Clamp
,
instances
,
ConvFwdDefault
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
F32_Tuple
,
Relu_Mul2_Clamp
,
ConvFwd1x1P0
>
{});
8
>
{});
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
device_conv2d_int8_32Ds_instances
<
GK_Tuple
,
F32_Tuple
,
Relu_Mul2_Clamp
,
ConvFwd1x1S1P0
>
{});
F32_Tuple
,
Relu_Mul2_Clamp
,
ConvFwd1x1P0
,
8
>
{});
add_device_operation_instances
(
instances
,
device_grouped_conv2d_xdl_int8_instances
<
GK_Tuple
,
F32_Tuple
,
Relu_Mul2_Clamp
,
ConvFwd1x1S1P0
,
8
>
{});
}
}
}
// namespace instance
}
// namespace instance
}
// namespace device
}
// namespace device
...
...
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_
xdl_
perlayer_quantization_int8_instance.cpp
→
library/src/tensor_operation_instance/gpu/quantization/conv2d_fwd/device_conv2d_perlayer_quantization_int8_instance.cpp
View file @
dc7b6568
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "device_conv2d_
xdl_
int8_instance.hpp"
#include "device_conv2d_int8_instance.hpp"
namespace
ck
{
namespace
ck
{
namespace
tensor_operation
{
namespace
tensor_operation
{
...
@@ -21,15 +21,21 @@ void add_device_conv2d_perlayer_quantization_int8_instances(
...
@@ -21,15 +21,21 @@ void add_device_conv2d_perlayer_quantization_int8_instances(
PassThrough
,
PassThrough
,
Mul_Clamp
>>>&
instances
)
Mul_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
Empty_Tuple
,
device_conv2d_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Mul_Clamp
,
ConvFwdDefault
>
{});
Empty_Tuple
,
add_device_operation_instances
(
Mul_Clamp
,
instances
,
ConvFwdDefault
>
{});
device_conv2d_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Mul_Clamp
,
ConvFwd1x1P0
>
{});
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
device_grouped_conv2d_xdl_int8_instances
<
Empty_Tuple
,
instances
,
Empty_Tuple
,
device_conv2d_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Mul_Clamp
,
ConvFwd1x1S1P0
>
{});
Mul_Clamp
,
ConvFwd1x1P0
>
{});
add_device_operation_instances
(
instances
,
device_grouped_conv2d_xdl_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Mul_Clamp
,
ConvFwd1x1S1P0
>
{});
}
}
void
add_device_conv2d_relu_perlayer_quantization_int8_instances
(
void
add_device_conv2d_relu_perlayer_quantization_int8_instances
(
...
@@ -46,15 +52,21 @@ void add_device_conv2d_relu_perlayer_quantization_int8_instances(
...
@@ -46,15 +52,21 @@ void add_device_conv2d_relu_perlayer_quantization_int8_instances(
PassThrough
,
PassThrough
,
Relu_Mul_Clamp
>>>&
instances
)
Relu_Mul_Clamp
>>>&
instances
)
{
{
add_device_operation_instances
(
add_device_operation_instances
(
instances
,
instances
,
device_grouped_conv2d_xdl_int8_instances
<
Empty_Tuple
,
device_conv2d_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Relu_Mul_Clamp
,
ConvFwdDefault
>
{});
Empty_Tuple
,
add_device_operation_instances
(
Relu_Mul_Clamp
,
instances
,
ConvFwdDefault
>
{});
device_conv2d_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Relu_Mul_Clamp
,
ConvFwd1x1P0
>
{});
add_device_operation_instances
(
instances
,
add_device_operation_instances
(
device_grouped_conv2d_xdl_int8_instances
<
Empty_Tuple
,
instances
,
Empty_Tuple
,
device_conv2d_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Relu_Mul_Clamp
,
ConvFwd1x1S1P0
>
{});
Relu_Mul_Clamp
,
ConvFwd1x1P0
>
{});
add_device_operation_instances
(
instances
,
device_grouped_conv2d_xdl_int8_instances
<
Empty_Tuple
,
Empty_Tuple
,
Relu_Mul_Clamp
,
ConvFwd1x1S1P0
>
{});
}
}
}
// namespace instance
}
// namespace instance
}
// namespace device
}
// namespace device
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment