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
f0224f2a
Commit
f0224f2a
authored
Nov 29, 2022
by
letaoqin
Browse files
Merge branch 'develop' into dl_conv_multiple_d
parents
befc2638
0e9c88ce
Changes
271
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1075 additions
and
418 deletions
+1075
-418
library/include/ck/library/utility/iterator.hpp
library/include/ck/library/utility/iterator.hpp
+22
-0
library/include/ck/library/utility/numeric.hpp
library/include/ck/library/utility/numeric.hpp
+16
-0
library/include/ck/library/utility/ranges.hpp
library/include/ck/library/utility/ranges.hpp
+60
-0
library/src/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/CMakeLists.txt
...ance/gpu/batched_gemm_softmax_gemm_permute/CMakeLists.txt
+1
-0
library/src/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instance.cpp
...cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instance.cpp
+133
-0
library/src/tensor_operation_instance/gpu/batchnorm/CMakeLists.txt
...rc/tensor_operation_instance/gpu/batchnorm/CMakeLists.txt
+6
-0
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_bf16_instance.cpp
.../gpu/batchnorm/device_batchnorm_forward_bf16_instance.cpp
+147
-0
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_f16_instance.cpp
...e/gpu/batchnorm/device_batchnorm_forward_f16_instance.cpp
+147
-0
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_f32_instance.cpp
...e/gpu/batchnorm/device_batchnorm_forward_f32_instance.cpp
+145
-0
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_f64_instance.cpp
...e/gpu/batchnorm/device_batchnorm_forward_f64_instance.cpp
+145
-0
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/CMakeLists.txt
...r_operation_instance/gpu/conv1d_bwd_weight/CMakeLists.txt
+0
-5
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_bf16_instance.cpp
...evice_conv1d_bwd_weight_xdl_nwc_kxc_nwk_bf16_instance.cpp
+0
-102
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f16_instance.cpp
...device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f16_instance.cpp
+0
-102
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f32_instance.cpp
...device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f32_instance.cpp
+0
-101
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/CMakeLists.txt
...sor_operation_instance/gpu/conv2d_bwd_data/CMakeLists.txt
+4
-0
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f16_instance.cpp
...device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f16_instance.cpp
+83
-0
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f32_instance.cpp
...device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f32_instance.cpp
+83
-0
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_int8_instance.cpp
...evice_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_int8_instance.cpp
+83
-0
library/src/tensor_operation_instance/gpu/conv2d_bwd_weight/CMakeLists.txt
...r_operation_instance/gpu/conv2d_bwd_weight/CMakeLists.txt
+0
-6
library/src/tensor_operation_instance/gpu/conv2d_bwd_weight/device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_bf16_instance.cpp
...ce_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_bf16_instance.cpp
+0
-102
No files found.
library/include/ck/library/utility/iterator.hpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include <iterator>
#include <utility>
#include "ck/utility/type.hpp"
namespace
ck
{
template
<
typename
T
>
using
iter_value_t
=
typename
std
::
iterator_traits
<
remove_cvref_t
<
T
>>::
value_type
;
template
<
typename
T
>
using
iter_reference_t
=
decltype
(
*
std
::
declval
<
T
&>
());
template
<
typename
T
>
using
iter_difference_t
=
typename
std
::
iterator_traits
<
remove_cvref_t
<
T
>>::
difference_type
;
}
// namespace ck
library/include/ck/library/utility/numeric.hpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include <iterator>
#include <numeric>
namespace
ck
{
template
<
typename
T
,
typename
ForwardIterator
,
typename
Size
,
typename
BinaryOperation
>
auto
accumulate_n
(
ForwardIterator
first
,
Size
count
,
T
init
,
BinaryOperation
op
)
->
decltype
(
std
::
accumulate
(
first
,
std
::
next
(
first
,
count
),
init
,
op
))
{
return
std
::
accumulate
(
first
,
std
::
next
(
first
,
count
),
init
,
op
);
}
}
// namespace ck
library/include/ck/library/utility/ranges.hpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include <iterator>
#include <type_traits>
#include <utility>
#include "ck/library/utility/iterator.hpp"
namespace
ck
{
namespace
ranges
{
template
<
typename
R
>
using
iterator_t
=
decltype
(
std
::
begin
(
std
::
declval
<
R
&>
()));
template
<
typename
R
>
using
sentinel_t
=
decltype
(
std
::
end
(
std
::
declval
<
R
&>
()));
template
<
typename
R
>
using
range_size_t
=
decltype
(
std
::
size
(
std
::
declval
<
R
&>
()));
template
<
typename
R
>
using
range_difference_t
=
ck
::
iter_difference_t
<
ranges
::
iterator_t
<
R
>>
;
template
<
typename
R
>
using
range_value_t
=
iter_value_t
<
ranges
::
iterator_t
<
R
>>
;
template
<
typename
R
>
using
range_reference_t
=
iter_reference_t
<
ranges
::
iterator_t
<
R
>>
;
template
<
typename
T
,
typename
=
void
>
struct
is_range
:
std
::
false_type
{
};
template
<
typename
T
>
struct
is_range
<
T
,
std
::
void_t
<
decltype
(
std
::
begin
(
std
::
declval
<
T
&>
())),
decltype
(
std
::
end
(
std
::
declval
<
T
&>
()))
>>
:
std
::
true_type
{
};
template
<
typename
T
>
inline
constexpr
bool
is_range_v
=
is_range
<
T
>::
value
;
template
<
typename
T
,
typename
=
void
>
struct
is_sized_range
:
std
::
false_type
{
};
template
<
typename
T
>
struct
is_sized_range
<
T
,
std
::
void_t
<
decltype
(
std
::
size
(
std
::
declval
<
T
&>
()))
>>
:
std
::
bool_constant
<
is_range_v
<
T
>>
{
};
}
// namespace ranges
}
// namespace ck
library/src/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/CMakeLists.txt
View file @
f0224f2a
add_instance_library
(
device_batched_gemm_softmax_gemm_permute_instance
add_instance_library
(
device_batched_gemm_softmax_gemm_permute_instance
device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_f16_f16_f16_f16_gmk_gnk_gno_gmo_instance.cpp
device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_f16_f16_f16_f16_gmk_gnk_gno_gmo_instance.cpp
device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instance.cpp
)
)
library/src/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/gemm_specialization.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_batched_gemm_softmax_gemm_permute_xdl_cshuffle.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
BF16
=
ck
::
bhalf_t
;
using
F32
=
float
;
using
Row
=
ck
::
tensor_layout
::
gemm
::
RowMajor
;
using
Col
=
ck
::
tensor_layout
::
gemm
::
ColumnMajor
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
Scale
=
ck
::
tensor_operation
::
element_wise
::
Scale
;
static
constexpr
auto
GemmDefault
=
ck
::
tensor_operation
::
device
::
GemmSpecialization
::
Default
;
static
constexpr
auto
GemmPadded
=
ck
::
tensor_operation
::
device
::
GemmSpecialization
::
MNKOPadding
;
static
constexpr
auto
TensorDefault
=
ck
::
tensor_operation
::
device
::
TensorSpecialization
::
Default
;
// c[g, m, n] = a[g, m, k] * b[g, n, k]
template
<
index_t
NumDimG
,
index_t
NumDimM
,
index_t
NumDimN
,
index_t
NumDimK
,
index_t
NumDimO
,
MaskingSpecialization
MaskingSpec
>
using
device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instances
=
std
::
tuple
<
// clang-format off
// #############################################| NumDimG| NumDimM| NumDimN| NumDimK| NumDimO| AData| B0Data| B1Data| CData| Acc0BiasData| Acc1BiasData| AccData| CShuffle| A| B0| Acc0| B1| C| GEMM| ATensorSpec| B0TensorSpec| B1TensorSpec| CTensorSpec| NumGemmK| Block| Gemm01| Gemm0| Gemm0| Gemm1| Gemm1| AK1| BK1| B1K1| MPer| NPer| Gemm0| Gemm0| Gemm1| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| B0BlockTransfer| B0BlockTransfer| B0BlockTransfer| B0BlockTransfer| B0BlockTransfer| B0BlockTransfer| B0BlockLds| B1BlockTransfer| B1BlockTransfer| B1BlockTransfer| B1BlockTransfer| B1BlockTransfer| B1BlockTransfer| B1BlockLds| CShuffle| CShuffle| CBlockTransferClusterLengths| CBlockTransfer| MaskingSpec|
// #############################################| | | | | | Type| Type| Type| Type| Type| Type| Type| DataType| Elementwise| Elementwise| Elementwise| Elementwise| Elementwise| Specialization| | | | | Prefetch| Size| MPer| NPer| KPer| NPer| KPer| | | | XDL| XDL| MXdl| NXdl| NXdl| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| _MBlock_MWaveMPerXdl| ScalarPerVector| |
// #############################################| | | | | | | | | | | | | | Operation| Operation| Operation| Operation| Operation| | | | | | Stage| | Block| Block| Block| Block| Block| | | | | | Per| Per| Per| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| _NBlock_NWaveNPerXdl| _NWaveNPerXdl| |
// #############################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wave| Wave| Wave| | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
256
,
128
,
32
,
64
,
32
,
8
,
8
,
2
,
32
,
32
,
2
,
4
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
16
,
16
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
256
,
128
,
32
,
128
,
32
,
8
,
8
,
2
,
32
,
32
,
2
,
4
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
256
,
32
,
64
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
8
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
16
,
16
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
256
,
32
,
128
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
8
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
128
,
64
,
64
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
4
,
2
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
false
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
false
,
S
<
16
,
16
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
128
,
32
,
64
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
4
,
2
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
16
,
16
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
128
,
64
,
128
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
4
,
4
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
false
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
false
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
128
,
32
,
128
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
4
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
64
,
256
,
32
,
128
,
32
,
8
,
8
,
2
,
16
,
16
,
1
,
16
,
8
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
8
,
S
<
1
,
16
,
1
,
16
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
64
,
256
,
32
,
64
,
32
,
8
,
8
,
2
,
16
,
16
,
1
,
16
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
16
,
16
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
4
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
64
,
256
,
64
,
128
,
32
,
8
,
8
,
2
,
16
,
16
,
1
,
16
,
8
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
8
,
S
<
1
,
16
,
1
,
16
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
64
,
256
,
64
,
64
,
32
,
8
,
8
,
2
,
16
,
16
,
1
,
16
,
4
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
16
,
16
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
4
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
// Padded fallback kernel
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmPadded
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
128
,
64
,
128
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
4
,
4
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
false
,
S
<
8
,
32
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
false
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
,
DeviceBatchedGemmSoftmaxGemmPermute_Xdl_CShuffle
<
NumDimG
,
NumDimM
,
NumDimN
,
NumDimK
,
NumDimO
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
GemmPadded
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
TensorDefault
,
1
,
256
,
128
,
64
,
32
,
128
,
32
,
8
,
8
,
2
,
32
,
32
,
1
,
2
,
4
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
4
,
64
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
true
,
S
<
8
,
32
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
4
,
2
,
false
,
1
,
2
,
S
<
1
,
32
,
1
,
8
>
,
8
,
MaskingSpec
>
// clang-format on
>
;
void
add_device_batched_gemm_masking_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceBatchedGemmSoftmaxGemmPermute
<
2
,
1
,
1
,
1
,
1
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
MaskingSpecialization
::
MaskOutUpperTriangle
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instances
<
2
,
1
,
1
,
1
,
1
,
MaskingSpecialization
::
MaskOutUpperTriangle
>
{});
}
void
add_device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceBatchedGemmSoftmaxGemmPermute
<
2
,
1
,
1
,
1
,
1
,
BF16
,
BF16
,
BF16
,
BF16
,
ck
::
Tuple
<>
,
ck
::
Tuple
<>
,
PassThrough
,
PassThrough
,
Scale
,
PassThrough
,
PassThrough
,
MaskingSpecialization
::
MaskDisabled
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_batched_gemm_softmax_gemm_permute_xdl_cshuffle_bf16_bf16_bf16_bf16_gmk_gnk_gno_gmo_instances
<
2
,
1
,
1
,
1
,
1
,
MaskingSpecialization
::
MaskDisabled
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/batchnorm/CMakeLists.txt
0 → 100644
View file @
f0224f2a
add_instance_library
(
device_batchnorm_instance
device_batchnorm_forward_f16_instance.cpp
device_batchnorm_forward_f32_instance.cpp
device_batchnorm_forward_bf16_instance.cpp
device_batchnorm_forward_f64_instance.cpp
)
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_bf16_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_batchnorm_forward_impl.hpp"
#include "ck/utility/data_type.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
BF16
=
ck
::
bhalf_t
;
using
F32
=
float
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_bf16_blockwise_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_bf16_multiblock_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
void
add_device_batchnorm_forward_rank_4_3_bf16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceBatchNormFwd
<
BF16
,
BF16
,
F32
,
BF16
,
BF16
,
F32
,
PassThrough
,
4
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_batchnorm_forward_bf16_blockwise_instances
<
4
,
3
,
PassThrough
>
{});
add_device_operation_instances
(
instances
,
device_batchnorm_forward_bf16_multiblock_instances
<
4
,
3
,
PassThrough
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_f16_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_batchnorm_forward_impl.hpp"
#include "ck/utility/data_type.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
F16
=
ck
::
half_t
;
using
F32
=
float
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_f16_blockwise_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_f16_multiblock_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
void
add_device_batchnorm_forward_rank_4_3_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceBatchNormFwd
<
F16
,
F16
,
F32
,
F16
,
F16
,
F32
,
PassThrough
,
4
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_batchnorm_forward_f16_blockwise_instances
<
4
,
3
,
PassThrough
>
{});
add_device_operation_instances
(
instances
,
device_batchnorm_forward_f16_multiblock_instances
<
4
,
3
,
PassThrough
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_f32_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_batchnorm_forward_impl.hpp"
#include "ck/utility/data_type.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
F32
=
float
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_f32_blockwise_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_f32_multiblock_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
void
add_device_batchnorm_forward_rank_4_3_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceBatchNormFwd
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
4
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_batchnorm_forward_f32_blockwise_instances
<
4
,
3
,
PassThrough
>
{});
add_device_operation_instances
(
instances
,
device_batchnorm_forward_f32_multiblock_instances
<
4
,
3
,
PassThrough
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/batchnorm/device_batchnorm_forward_f64_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_batchnorm_forward_impl.hpp"
#include "ck/utility/data_type.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
F64
=
double
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_f64_blockwise_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
false
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
// clang-format off
template
<
index_t
Rank
,
index_t
NumReduceDim
,
typename
YElementwiseOp
>
using
device_batchnorm_forward_f64_multiblock_instances
=
std
::
tuple
<
// XDataType, YDataType, AccDataType, ScaleDataType, BiasDataType, MeanVarDataType, YElementwiseOp, Rank, NumReduceDim, UseMultiBlockInK, BLockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XSrcYDstVectorDim, XSrcVectorSize, YDstVectorSize, ScaleSrcVectorSize, BiasSrcVectorSize, MeanVarSrcDstVectorSize
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
128
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
64
,
4
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
32
,
8
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
16
,
16
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
8
,
32
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
4
,
64
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
2
,
128
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
0
,
2
,
2
,
1
,
1
,
1
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
>
,
DeviceBatchNormFwdImpl
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
YElementwiseOp
,
Rank
,
NumReduceDim
,
true
,
256
,
1
,
256
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
>
>
;
// clang-format on
void
add_device_batchnorm_forward_rank_4_3_f64_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceBatchNormFwd
<
F64
,
F64
,
F64
,
F64
,
F64
,
F64
,
PassThrough
,
4
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_batchnorm_forward_f64_blockwise_instances
<
4
,
3
,
PassThrough
>
{});
add_device_operation_instances
(
instances
,
device_batchnorm_forward_f64_multiblock_instances
<
4
,
3
,
PassThrough
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/CMakeLists.txt
deleted
100644 → 0
View file @
befc2638
add_instance_library
(
device_conv1d_bwd_weight_instance
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f16_instance.cpp
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f32_instance.cpp
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_bf16_instance.cpp
)
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_bf16_instance.cpp
deleted
100644 → 0
View file @
befc2638
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_convnd_bwd_weight_nwc_kxc_nwk_xdl_cshuffle.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
BF16
=
bhalf_t
;
using
F32
=
float
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
NWC
=
ck
::
tensor_layout
::
convolution
::
NWC
;
using
KXC
=
ck
::
tensor_layout
::
convolution
::
KXC
;
using
NWK
=
ck
::
tensor_layout
::
convolution
::
NWK
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
static
constexpr
auto
ConvBwdWeightDefault
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Default
;
static
constexpr
auto
ConvBwdWeightFilter1x1Stride1Pad0
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Filter1x1Stride1Pad0
;
// Compilation parameters for in[n, wi, c] * wei[k, x, c] = out[n, wo, k]
using
device_conv1d_bwd_weight_xdl_c_shuffle_nwc_kxc_nwk_bf16_f32_bf16_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
256
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
256
,
4
,
8
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
64
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
64
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
32
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
32
,
64
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
// clang-format on
>
;
using
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_1x1_s1_p0_bf16_f32_bf16_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
256
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
256
,
4
,
8
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
64
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
64
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
32
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
32
,
64
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
// clang-format on
>
;
void
add_device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_bf16_f32_bf16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceConvBwdWeight
<
1
,
NWC
,
KXC
,
NWK
,
BF16
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
PassThrough
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_conv1d_bwd_weight_xdl_c_shuffle_nwc_kxc_nwk_bf16_f32_bf16_instances
{});
add_device_operation_instances
(
instances
,
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_1x1_s1_p0_bf16_f32_bf16_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f16_instance.cpp
deleted
100644 → 0
View file @
befc2638
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_convnd_bwd_weight_nwc_kxc_nwk_xdl_cshuffle.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
F16
=
ck
::
half_t
;
using
F32
=
float
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
NWC
=
ck
::
tensor_layout
::
convolution
::
NWC
;
using
KXC
=
ck
::
tensor_layout
::
convolution
::
KXC
;
using
NWK
=
ck
::
tensor_layout
::
convolution
::
NWK
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
static
constexpr
auto
ConvBwdWeightDefault
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Default
;
static
constexpr
auto
ConvBwdWeightFilter1x1Stride1Pad0
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Filter1x1Stride1Pad0
;
// Compilation parameters for in[n, wi, c] * wei[k, x, c] = out[n, wo, k]
using
device_conv1d_bwd_weight_xdl_c_shuffle_nwc_kxc_nwk_f16_default_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
256
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
256
,
4
,
8
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
64
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
64
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
32
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
32
,
64
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
8
>
// clang-format on
>
;
using
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_1x1_s1_p0_f16_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
256
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
256
,
4
,
8
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
64
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
64
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
32
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
8
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F16
,
F16
,
F16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
32
,
64
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
8
>
// clang-format on
>
;
void
add_device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceConvBwdWeight
<
1
,
NWC
,
KXC
,
NWK
,
F16
,
F16
,
F16
,
PassThrough
,
PassThrough
,
PassThrough
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_conv1d_bwd_weight_xdl_c_shuffle_nwc_kxc_nwk_f16_default_instances
{});
add_device_operation_instances
(
instances
,
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_1x1_s1_p0_f16_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/conv1d_bwd_weight/device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f32_instance.cpp
deleted
100644 → 0
View file @
befc2638
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_convnd_bwd_weight_nwc_kxc_nwk_xdl_cshuffle.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
F32
=
float
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
NWC
=
ck
::
tensor_layout
::
convolution
::
NWC
;
using
KXC
=
ck
::
tensor_layout
::
convolution
::
KXC
;
using
NWK
=
ck
::
tensor_layout
::
convolution
::
NWK
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
static
constexpr
auto
ConvBwdWeightDefault
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Default
;
static
constexpr
auto
ConvBwdWeightFilter1x1Stride1Pad0
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Filter1x1Stride1Pad0
;
// Compilation parameters for in[n, wi, c] * wei[k, x, c] = out[n, wo, k]
using
device_conv1d_bwd_weight_xdl_c_shuffle_nwc_kxc_nwk_f32_default_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
256
,
128
,
4
,
4
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
64
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
256
,
4
,
4
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
64
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
128
,
4
,
4
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
128
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
64
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
64
,
128
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
64
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
64
,
4
,
4
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
64
,
128
,
4
,
4
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
32
,
4
,
4
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
32
,
128
,
4
,
4
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
32
,
4
,
4
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
32
,
64
,
4
,
4
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
// clang-format on
>
;
using
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_1x1_s1_p0_f32_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
256
,
128
,
4
,
4
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
64
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
256
,
4
,
4
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
64
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
128
,
4
,
4
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
128
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
64
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
64
,
128
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
64
,
4
,
4
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
64
,
4
,
4
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
64
,
128
,
4
,
4
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
32
,
4
,
4
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
32
,
128
,
4
,
4
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
1
,
true
,
S
<
1
,
4
,
32
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
32
,
4
,
4
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
1
,
F32
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
32
,
64
,
4
,
4
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
2
,
true
,
S
<
1
,
4
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
4
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
// clang-format on
>
;
void
add_device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceConvBwdWeight
<
1
,
NWC
,
KXC
,
NWK
,
F32
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_conv1d_bwd_weight_xdl_c_shuffle_nwc_kxc_nwk_f32_default_instances
{});
add_device_operation_instances
(
instances
,
device_conv1d_bwd_weight_xdl_nwc_kxc_nwk_1x1_s1_p0_f32_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/CMakeLists.txt
View file @
f0224f2a
...
@@ -3,4 +3,8 @@ add_instance_library(device_conv2d_bwd_data_instance
...
@@ -3,4 +3,8 @@ add_instance_library(device_conv2d_bwd_data_instance
device_conv2d_bwd_data_xdl_nhwc_kyxc_nhwk_f16_instance.cpp
device_conv2d_bwd_data_xdl_nhwc_kyxc_nhwk_f16_instance.cpp
device_conv2d_bwd_data_xdl_nhwc_kyxc_nhwk_bf16_instance.cpp
device_conv2d_bwd_data_xdl_nhwc_kyxc_nhwk_bf16_instance.cpp
device_conv2d_bwd_data_xdl_nhwc_kyxc_nhwk_int8_instance.cpp
device_conv2d_bwd_data_xdl_nhwc_kyxc_nhwk_int8_instance.cpp
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f16_instance.cpp
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f32_instance.cpp
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_int8_instance.cpp
)
)
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f16_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_convnd_bwd_data_nwc_kxc_nwk_dl.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
InDataType
=
ck
::
half_t
;
using
WeiDataType
=
ck
::
half_t
;
using
OutDataType
=
ck
::
half_t
;
using
AccDataType
=
float
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
NHWC
=
ck
::
tensor_layout
::
convolution
::
NHWC
;
using
KYXC
=
ck
::
tensor_layout
::
convolution
::
KYXC
;
using
NHWK
=
ck
::
tensor_layout
::
convolution
::
NHWK
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
InElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
WeiElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
OutElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
static
constexpr
auto
ConvBwdDataDefault
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardDataSpecialization
::
Default
;
static
constexpr
auto
ConvBwdDataFilter1x1Stride1Pad0
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardDataSpecialization
::
Filter1x1Stride1Pad0
;
// Compilation parameters for in[n, hi, wi, c] * wei[k, y, x, c] = out[n, ho, wo, k]
using
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f16_instances
=
std
::
tuple
<
// clang-format off
//#########################| NDim| InData| WeiData| OutData| AccData| In| Wei| Out| Convolution| Block| MPer| NPer| K0Per| K1| M1Per| N1Per| KPer| M11N11Thread| M11N11Thread| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| CThreadTransfer| CThreadTransfer| CThreadTransfer|
//#########################| Spatial| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Forward| Size| Block| Block| Block| | ThreadM111| ThreadN111| Thread| ClusterM110Xs| ClusterN110Xs| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| SrcDstAccess| SrcDstVectorDim| DstScalarPerVector|
//#########################| | | | | | Operation| Operation| Operation| Specialization| | | | | | | | | | | K0_M0_M1_K1| K0_M0_M1_K1| ArrangeOrder| Order| Lengths_K0_M0_M1_K1| ContiguousDimOrder| Lengths_K0_M0_M1_K1| K0_N0_N1_K1| K0_N0_N1_K1| ArrangeOrder| Order| Lengths_K0_N0_N1_K1| ContiguousDimOrder| Lengths_K0_N0_N1_K1| Order| | |
//#########################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceConvNdBwdDataNwcKxcNwk_Dl
<
2
,
InDataType
,
WeiDataType
,
OutDataType
,
AccDataType
,
InElementOp
,
WeiElementOp
,
OutElementOp
,
ConvBwdDataDefault
,
256
,
128
,
128
,
16
,
2
,
4
,
4
,
1
,
S
<
8
,
2
>
,
S
<
8
,
2
>
,
S
<
8
,
1
,
1
,
2
>
,
S
<
2
,
1
,
128
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
4
,
1
,
1
,
2
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
1
,
1
,
2
>
,
S
<
1
,
1
,
8
,
2
>
,
S
<
16
,
1
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
8
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
1
,
2
>
,
S
<
0
,
1
,
2
,
3
,
4
,
5
>
,
5
,
4
>
// clang-format on
>
;
using
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_1x1_s1_p0_f16_instances
=
std
::
tuple
<
// clang-format off
//#########################| NDim| InData| WeiData| OutData| AccData| In| Wei| Out| Convolution| Block| MPer| NPer| K0Per| K1| M1Per| N1Per| KPer| M11N11Thread| M11N11Thread| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| CThreadTransfer| CThreadTransfer| CThreadTransfer|
//#########################| Spatial| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Forward| Size| Block| Block| Block| | ThreadM111| ThreadN111| Thread| ClusterM110Xs| ClusterN110Xs| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| SrcDstAccess| SrcDstVectorDim| DstScalarPerVector|
//#########################| | | | | | Operation| Operation| Operation| Specialization| | | | | | | | | | | K0_M0_M1_K1| K0_M0_M1_K1| ArrangeOrder| Order| Lengths_K0_M0_M1_K1| ContiguousDimOrder| Lengths_K0_M0_M1_K1| K0_N0_N1_K1| K0_N0_N1_K1| ArrangeOrder| Order| Lengths_K0_N0_N1_K1| ContiguousDimOrder| Lengths_K0_N0_N1_K1| Order| | |
//#########################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceConvNdBwdDataNwcKxcNwk_Dl
<
2
,
InDataType
,
WeiDataType
,
OutDataType
,
AccDataType
,
InElementOp
,
WeiElementOp
,
OutElementOp
,
ConvBwdDataFilter1x1Stride1Pad0
,
256
,
128
,
128
,
16
,
2
,
4
,
4
,
1
,
S
<
8
,
2
>
,
S
<
8
,
2
>
,
S
<
8
,
1
,
1
,
2
>
,
S
<
2
,
1
,
128
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
4
,
1
,
1
,
2
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
1
,
1
,
2
>
,
S
<
1
,
1
,
8
,
2
>
,
S
<
16
,
1
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
8
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
1
,
2
>
,
S
<
0
,
1
,
2
,
3
,
4
,
5
>
,
5
,
4
>
// clang-format on
>
;
void
add_device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceConvBwdData
<
2
,
NHWC
,
KYXC
,
NHWK
,
InDataType
,
WeiDataType
,
OutDataType
,
PassThrough
,
PassThrough
,
PassThrough
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f16_instances
{});
add_device_operation_instances
(
instances
,
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_1x1_s1_p0_f16_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f32_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_convnd_bwd_data_nwc_kxc_nwk_dl.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
InDataType
=
float
;
using
WeiDataType
=
float
;
using
OutDataType
=
float
;
using
AccDataType
=
float
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
NHWC
=
ck
::
tensor_layout
::
convolution
::
NHWC
;
using
KYXC
=
ck
::
tensor_layout
::
convolution
::
KYXC
;
using
NHWK
=
ck
::
tensor_layout
::
convolution
::
NHWK
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
InElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
WeiElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
OutElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
static
constexpr
auto
ConvBwdDataDefault
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardDataSpecialization
::
Default
;
static
constexpr
auto
ConvBwdDataFilter1x1Stride1Pad0
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardDataSpecialization
::
Filter1x1Stride1Pad0
;
// Compilation parameters for in[n, hi, wi, c] * wei[k, y, x, c] = out[n, ho, wo, k]
using
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f32_instances
=
std
::
tuple
<
// clang-format off
//#########################| NDim| InData| WeiData| OutData| AccData| In| Wei| Out| Convolution| Block| MPer| NPer| K0Per| K1| M1Per| N1Per| KPer| M11N11Thread| M11N11Thread| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| CThreadTransfer| CThreadTransfer| CThreadTransfer|
//#########################| Spatial| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Forward| Size| Block| Block| Block| | ThreadM111| ThreadN111| Thread| ClusterM110Xs| ClusterN110Xs| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| SrcDstAccess| SrcDstVectorDim| DstScalarPerVector|
//#########################| | | | | | Operation| Operation| Operation| Specialization| | | | | | | | | | | K0_M0_M1_K1| K0_M0_M1_K1| ArrangeOrder| Order| Lengths_K0_M0_M1_K1| ContiguousDimOrder| Lengths_K0_M0_M1_K1| K0_N0_N1_K1| K0_N0_N1_K1| ArrangeOrder| Order| Lengths_K0_N0_N1_K1| ContiguousDimOrder| Lengths_K0_N0_N1_K1| Order| | |
//#########################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceConvNdBwdDataNwcKxcNwk_Dl
<
2
,
InDataType
,
WeiDataType
,
OutDataType
,
AccDataType
,
InElementOp
,
WeiElementOp
,
OutElementOp
,
ConvBwdDataDefault
,
256
,
128
,
128
,
16
,
1
,
4
,
4
,
1
,
S
<
8
,
2
>
,
S
<
8
,
2
>
,
S
<
8
,
1
,
1
,
1
>
,
S
<
2
,
1
,
128
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
4
,
1
,
1
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
1
,
1
,
1
>
,
S
<
1
,
1
,
8
,
1
>
,
S
<
16
,
1
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
4
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
1
,
1
>
,
S
<
0
,
1
,
2
,
3
,
4
,
5
>
,
5
,
4
>
// clang-format on
>
;
using
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_1x1_s1_p0_f32_instances
=
std
::
tuple
<
// clang-format off
//#########################| NDim| InData| WeiData| OutData| AccData| In| Wei| Out| Convolution| Block| MPer| NPer| K0Per| K1| M1Per| N1Per| KPer| M11N11Thread| M11N11Thread| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| CThreadTransfer| CThreadTransfer| CThreadTransfer|
//#########################| Spatial| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Forward| Size| Block| Block| Block| | ThreadM111| ThreadN111| Thread| ClusterM110Xs| ClusterN110Xs| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| SrcDstAccess| SrcDstVectorDim| DstScalarPerVector|
//#########################| | | | | | Operation| Operation| Operation| Specialization| | | | | | | | | | | K0_M0_M1_K1| K0_M0_M1_K1| ArrangeOrder| Order| Lengths_K0_M0_M1_K1| ContiguousDimOrder| Lengths_K0_M0_M1_K1| K0_N0_N1_K1| K0_N0_N1_K1| ArrangeOrder| Order| Lengths_K0_N0_N1_K1| ContiguousDimOrder| Lengths_K0_N0_N1_K1| Order| | |
//#########################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceConvNdBwdDataNwcKxcNwk_Dl
<
2
,
InDataType
,
WeiDataType
,
OutDataType
,
AccDataType
,
InElementOp
,
WeiElementOp
,
OutElementOp
,
ConvBwdDataFilter1x1Stride1Pad0
,
256
,
128
,
128
,
16
,
1
,
4
,
4
,
1
,
S
<
8
,
2
>
,
S
<
8
,
2
>
,
S
<
8
,
1
,
1
,
1
>
,
S
<
2
,
1
,
128
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
4
,
1
,
1
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
1
,
1
,
1
>
,
S
<
1
,
1
,
8
,
1
>
,
S
<
16
,
1
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
4
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
1
,
1
>
,
S
<
0
,
1
,
2
,
3
,
4
,
5
>
,
5
,
4
>
// clang-format on
>
;
void
add_device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceConvBwdData
<
2
,
NHWC
,
KYXC
,
NHWK
,
InDataType
,
WeiDataType
,
OutDataType
,
PassThrough
,
PassThrough
,
PassThrough
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_f32_instances
{});
add_device_operation_instances
(
instances
,
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_1x1_s1_p0_f32_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/conv2d_bwd_data/device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_int8_instance.cpp
0 → 100644
View file @
f0224f2a
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_convnd_bwd_data_nwc_kxc_nwk_dl.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
InDataType
=
int8_t
;
using
WeiDataType
=
int8_t
;
using
OutDataType
=
int8_t
;
using
AccDataType
=
int32_t
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
NHWC
=
ck
::
tensor_layout
::
convolution
::
NHWC
;
using
KYXC
=
ck
::
tensor_layout
::
convolution
::
KYXC
;
using
NHWK
=
ck
::
tensor_layout
::
convolution
::
NHWK
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
InElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
WeiElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
OutElementOp
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
static
constexpr
auto
ConvBwdDataDefault
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardDataSpecialization
::
Default
;
static
constexpr
auto
ConvBwdDataFilter1x1Stride1Pad0
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardDataSpecialization
::
Filter1x1Stride1Pad0
;
// Compilation parameters for in[n, hi, wi, c] * wei[k, y, x, c] = out[n, ho, wo, k]
using
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_int8_instances
=
std
::
tuple
<
// clang-format off
//#########################| NDim| InData| WeiData| OutData| AccData| In| Wei| Out| Convolution| Block| MPer| NPer| K0Per| K1| M1Per| N1Per| KPer| M11N11Thread| M11N11Thread| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| CThreadTransfer| CThreadTransfer| CThreadTransfer|
//#########################| Spatial| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Forward| Size| Block| Block| Block| | ThreadM111| ThreadN111| Thread| ClusterM110Xs| ClusterN110Xs| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| SrcDstAccess| SrcDstVectorDim| DstScalarPerVector|
//#########################| | | | | | Operation| Operation| Operation| Specialization| | | | | | | | | | | K0_M0_M1_K1| K0_M0_M1_K1| ArrangeOrder| Order| Lengths_K0_M0_M1_K1| ContiguousDimOrder| Lengths_K0_M0_M1_K1| K0_N0_N1_K1| K0_N0_N1_K1| ArrangeOrder| Order| Lengths_K0_N0_N1_K1| ContiguousDimOrder| Lengths_K0_N0_N1_K1| Order| | |
//#########################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceConvNdBwdDataNwcKxcNwk_Dl
<
2
,
InDataType
,
WeiDataType
,
OutDataType
,
AccDataType
,
InElementOp
,
WeiElementOp
,
OutElementOp
,
ConvBwdDataDefault
,
256
,
128
,
128
,
16
,
4
,
4
,
4
,
1
,
S
<
8
,
2
>
,
S
<
8
,
2
>
,
S
<
8
,
1
,
1
,
4
>
,
S
<
2
,
1
,
128
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
4
,
1
,
1
,
4
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
1
,
1
,
4
>
,
S
<
1
,
1
,
8
,
4
>
,
S
<
16
,
1
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
8
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
1
,
4
>
,
S
<
0
,
1
,
2
,
3
,
4
,
5
>
,
5
,
4
>
// clang-format on
>
;
using
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_1x1_s1_p0_int8_instances
=
std
::
tuple
<
// clang-format off
//#########################| NDim| InData| WeiData| OutData| AccData| In| Wei| Out| Convolution| Block| MPer| NPer| K0Per| K1| M1Per| N1Per| KPer| M11N11Thread| M11N11Thread| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| BBlockTransfer| CThreadTransfer| CThreadTransfer| CThreadTransfer|
//#########################| Spatial| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Forward| Size| Block| Block| Block| | ThreadM111| ThreadN111| Thread| ClusterM110Xs| ClusterN110Xs| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| ThreadSliceLengths| ThreadClusterLengths| ThreadCluster| SrcAccess| SrcVectorTensor| SrcVectorTensor| DstVectorTensor| SrcDstAccess| SrcDstVectorDim| DstScalarPerVector|
//#########################| | | | | | Operation| Operation| Operation| Specialization| | | | | | | | | | | K0_M0_M1_K1| K0_M0_M1_K1| ArrangeOrder| Order| Lengths_K0_M0_M1_K1| ContiguousDimOrder| Lengths_K0_M0_M1_K1| K0_N0_N1_K1| K0_N0_N1_K1| ArrangeOrder| Order| Lengths_K0_N0_N1_K1| ContiguousDimOrder| Lengths_K0_N0_N1_K1| Order| | |
//#########################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceConvNdBwdDataNwcKxcNwk_Dl
<
2
,
InDataType
,
WeiDataType
,
OutDataType
,
AccDataType
,
InElementOp
,
WeiElementOp
,
OutElementOp
,
ConvBwdDataFilter1x1Stride1Pad0
,
256
,
128
,
128
,
16
,
4
,
4
,
4
,
1
,
S
<
8
,
2
>
,
S
<
8
,
2
>
,
S
<
8
,
1
,
1
,
4
>
,
S
<
2
,
1
,
128
,
1
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
4
,
1
,
1
,
4
>
,
S
<
1
,
2
,
0
,
3
>
,
S
<
1
,
1
,
1
,
4
>
,
S
<
1
,
1
,
8
,
4
>
,
S
<
16
,
1
,
16
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
8
,
1
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
1
,
1
,
1
,
4
>
,
S
<
0
,
1
,
2
,
3
,
4
,
5
>
,
5
,
4
>
// clang-format on
>
;
void
add_device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_int8_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceConvBwdData
<
2
,
NHWC
,
KYXC
,
NHWK
,
InDataType
,
WeiDataType
,
OutDataType
,
PassThrough
,
PassThrough
,
PassThrough
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_int8_instances
{});
add_device_operation_instances
(
instances
,
device_conv2d_bwd_data_dl_nhwc_kyxc_nhwk_1x1_s1_p0_int8_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/conv2d_bwd_weight/CMakeLists.txt
deleted
100644 → 0
View file @
befc2638
add_instance_library
(
device_conv2d_bwd_weight_instance
device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_f16_instance.cpp
device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_f32_instance.cpp
device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_bf16_instance.cpp
)
library/src/tensor_operation_instance/gpu/conv2d_bwd_weight/device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_bf16_instance.cpp
deleted
100644 → 0
View file @
befc2638
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_convnd_bwd_weight_nwc_kxc_nwk_xdl_cshuffle.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/add_device_operation_instance.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
using
BF16
=
bhalf_t
;
using
F32
=
float
;
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
NHWC
=
ck
::
tensor_layout
::
convolution
::
NHWC
;
using
KYXC
=
ck
::
tensor_layout
::
convolution
::
KYXC
;
using
NHWK
=
ck
::
tensor_layout
::
convolution
::
NHWK
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
static
constexpr
auto
ConvBwdWeightDefault
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Default
;
static
constexpr
auto
ConvBwdWeightFilter1x1Stride1Pad0
=
ck
::
tensor_operation
::
device
::
ConvolutionBackwardWeightSpecialization
::
Filter1x1Stride1Pad0
;
// Compilation parameters for in[n, hi, wi, c] * wei[k, y, x, c] = out[n, ho, wo, k]
using
device_conv2d_bwd_weight_xdl_c_shuffle_nhwc_kyxc_nhwk_bf16_f32_bf16_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
256
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
256
,
4
,
8
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
64
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
256
,
64
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
128
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
128
,
32
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
64
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightDefault
,
64
,
32
,
64
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
// clang-format on
>
;
using
device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_1x1_s1_p0_bf16_f32_bf16_instances
=
std
::
tuple
<
// clang-format off
//#########################################| Num| InData| WeiData| OutData| AccData| In| Wei| Out| ConvBackward| Block| MPer| NPer| K0Per| K1| MPer| NPer| MXdl| NXdl| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockTransfer| ABlockLds| BBlockTransfer| BBlockTransfer| BBlockTransfer| BlockTransfer| BBlockTransfer| BBlockTransfer| BBlockLds| CShuffle| CShuffle| CBlockTransfer| CBlockTransfer|
//#########################################| Dim| Type| Type| Type| Type| Elementwise| Elementwise| Elementwise| Weight| Size| Block| Block| Block| | XDL| XDL| Per| Per| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraM| ThreadCluster| ThreadCluster| SrcAccessOrder| SrcVectorDim| SrcScalar| DstScalar| AddExtraN| MXdlPerWave| NXdlPerWave| ClusterLengths| ScalarPerVector|
//#########################################| Spatial| | | | | Operation| Operation| Operation| Specialization| | | | | | | | Wave| Wave| Lengths_K0_M_K1| ArrangeOrder| | | PerVector| PerVector_K1| | Lengths_K0_N_K1| ArrangeOrder| | | PerVector| PerVector_K1| | PerShuffle| PerShuffle| MBlock_MPerBlock| NWaveNPerXdl|
//#########################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NBlock_NPerBlock| |
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
256
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
256
,
4
,
8
,
32
,
32
,
2
,
4
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
32
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
8
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
128
,
4
,
8
,
32
,
32
,
4
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
64
,
128
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
64
,
4
,
8
,
32
,
32
,
2
,
2
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
128
,
64
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
256
,
64
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
8
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
128
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
128
,
32
,
128
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
8
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
1
,
true
,
S
<
1
,
4
,
16
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
32
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
64
,
32
,
4
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceConvNdBwdWeightNwcKxcNwk_Xdl_CShuffle
<
2
,
BF16
,
F32
,
BF16
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
ConvBwdWeightFilter1x1Stride1Pad0
,
64
,
32
,
64
,
4
,
8
,
32
,
32
,
1
,
2
,
S
<
1
,
4
,
4
,
4
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
2
,
true
,
S
<
1
,
4
,
8
,
2
>
,
S
<
0
,
3
,
1
,
2
>
,
S
<
0
,
2
,
1
,
3
>
,
2
,
8
,
4
,
true
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
// clang-format on
>
;
void
add_device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_bf16_f32_bf16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceConvBwdWeight
<
2
,
NHWC
,
KYXC
,
NHWK
,
BF16
,
F32
,
BF16
,
PassThrough
,
PassThrough
,
PassThrough
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_conv2d_bwd_weight_xdl_c_shuffle_nhwc_kyxc_nhwk_bf16_f32_bf16_instances
{});
add_device_operation_instances
(
instances
,
device_conv2d_bwd_weight_xdl_nhwc_kyxc_nhwk_1x1_s1_p0_bf16_f32_bf16_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
Prev
1
…
6
7
8
9
10
11
12
13
14
Next
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