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_ROCM
Commits
d0f355a3
"images/vscode:/vscode.git/clone" did not exist on "880ae2db26460ee4e1c31ff44d096e4e0812213b"
Commit
d0f355a3
authored
Dec 19, 2023
by
Jun Liu
Browse files
Merge branch 'develop' into amd-develop
parents
55a89c74
b305a29e
Changes
81
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
522 additions
and
63 deletions
+522
-63
library/include/ck/library/tensor_operation_instance/gpu/layernorm_bwd_data.hpp
...rary/tensor_operation_instance/gpu/layernorm_bwd_data.hpp
+84
-0
library/include/ck/library/tensor_operation_instance/gpu/normalization_fwd.hpp
...brary/tensor_operation_instance/gpu/normalization_fwd.hpp
+4
-4
library/include/ck/library/tensor_operation_instance/gpu/normalization_fwd_swish.hpp
...tensor_operation_instance/gpu/normalization_fwd_swish.hpp
+2
-2
library/include/ck/library/tensor_operation_instance/gpu/permute_scale.hpp
...k/library/tensor_operation_instance/gpu/permute_scale.hpp
+77
-0
library/src/tensor_operation_instance/gpu/gemm/device_gemm_xdl_c_shuffle_lds_direct_load_f16_f16_f16_mk_nk_mn_instance.cpp
...shuffle_lds_direct_load_f16_f16_f16_mk_nk_mn_instance.cpp
+13
-16
library/src/tensor_operation_instance/gpu/normalization_bwd_data/CMakeLists.txt
...ration_instance/gpu/normalization_bwd_data/CMakeLists.txt
+8
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_data/device_groupnorm_bwd_data_f32_instance.cpp
...ation_bwd_data/device_groupnorm_bwd_data_f32_instance.cpp
+22
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_data/device_layernorm2d_bwd_data_f16_instance.cpp
...ion_bwd_data/device_layernorm2d_bwd_data_f16_instance.cpp
+23
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_data/device_layernorm2d_bwd_data_f32_instance.cpp
...ion_bwd_data/device_layernorm2d_bwd_data_f32_instance.cpp
+23
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_data/normalization_bwd_data_instance_common.hpp
...ation_bwd_data/normalization_bwd_data_instance_common.hpp
+73
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/CMakeLists.txt
..._instance/gpu/normalization_bwd_gamma_beta/CMakeLists.txt
+8
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/device_groupnorm_bwd_gamma_beta_f32_instance.cpp
...mma_beta/device_groupnorm_bwd_gamma_beta_f32_instance.cpp
+23
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/device_layernorm2d_bwd_gamma_beta_f16_instance.cpp
...a_beta/device_layernorm2d_bwd_gamma_beta_f16_instance.cpp
+24
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/device_layernorm2d_bwd_gamma_beta_f32_instance.cpp
...a_beta/device_layernorm2d_bwd_gamma_beta_f32_instance.cpp
+24
-0
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/normalization_bwd_gamma_beta_instance_common.hpp
...mma_beta/normalization_bwd_gamma_beta_instance_common.hpp
+73
-0
library/src/tensor_operation_instance/gpu/normalization_fwd/device_groupnorm_fwd_f16_instance.cpp
...u/normalization_fwd/device_groupnorm_fwd_f16_instance.cpp
+1
-1
library/src/tensor_operation_instance/gpu/normalization_fwd/device_groupnorm_fwd_swish_f16_instance.cpp
...alization_fwd/device_groupnorm_fwd_swish_f16_instance.cpp
+1
-1
library/src/tensor_operation_instance/gpu/normalization_fwd/device_layernorm2d_fwd_f16_instance.cpp
...normalization_fwd/device_layernorm2d_fwd_f16_instance.cpp
+1
-1
library/src/tensor_operation_instance/gpu/normalization_fwd/device_layernorm4d_fwd_f16_instance.cpp
...normalization_fwd/device_layernorm4d_fwd_f16_instance.cpp
+1
-1
library/src/tensor_operation_instance/gpu/normalization_fwd/normalization_fwd_instance_common.hpp
...u/normalization_fwd/normalization_fwd_instance_common.hpp
+37
-37
No files found.
library/include/ck/library/tensor_operation_instance/gpu/layernorm_bwd_data.hpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include <vector>
#include <memory>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/device_normalization_bwd_data.hpp"
#include "ck/library/tensor_operation_instance/device_operation_instance_factory.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
#ifdef CK_ENABLE_FP16
// FP16
void
add_device_layernorm2d_bwd_data_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdData
<
F16
,
F16
,
F16
,
F16
,
F16
,
2
,
1
>>>&
);
#endif
#ifdef CK_ENABLE_FP32
// FP32
void
add_device_layernorm2d_bwd_data_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdData
<
F32
,
F32
,
F32
,
F32
,
F32
,
2
,
1
>>>&
);
#endif
template
<
typename
DYDataType
,
typename
XDataType
,
typename
GammaDataType
,
typename
MeanInvStdDataType
,
typename
DXDataType
,
index_t
Rank
,
index_t
NumReduceDim
>
struct
DeviceOperationInstanceFactory
<
ck
::
tensor_operation
::
device
::
DeviceNormalizationBwdData
<
DYDataType
,
XDataType
,
GammaDataType
,
MeanInvStdDataType
,
DXDataType
,
Rank
,
NumReduceDim
>>
{
using
DeviceOp
=
DeviceNormalizationBwdData
<
DYDataType
,
XDataType
,
GammaDataType
,
MeanInvStdDataType
,
DXDataType
,
Rank
,
NumReduceDim
>
;
static
auto
GetInstances
()
{
std
::
vector
<
std
::
unique_ptr
<
DeviceOp
>>
op_ptrs
;
#ifdef CK_ENABLE_FP16
if
constexpr
(
is_same_v
<
DYDataType
,
F16
>
&&
is_same_v
<
XDataType
,
F16
>
&&
is_same_v
<
GammaDataType
,
F16
>
&&
is_same_v
<
MeanInvStdDataType
,
F16
>
&&
is_same_v
<
DXDataType
,
F16
>
)
{
if
constexpr
(
Rank
==
2
&&
NumReduceDim
==
1
)
{
add_device_layernorm2d_bwd_data_f16_instances
(
op_ptrs
);
}
}
#endif
#ifdef CK_ENABLE_FP32
if
constexpr
(
is_same_v
<
DYDataType
,
F32
>
&&
is_same_v
<
XDataType
,
F32
>
&&
is_same_v
<
GammaDataType
,
F32
>
&&
is_same_v
<
MeanInvStdDataType
,
F32
>
&&
is_same_v
<
DXDataType
,
F32
>
)
{
if
constexpr
(
Rank
==
2
&&
NumReduceDim
==
1
)
{
add_device_layernorm2d_bwd_data_f32_instances
(
op_ptrs
);
}
}
#endif
return
op_ptrs
;
}
};
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/include/ck/library/tensor_operation_instance/gpu/normalization_fwd.hpp
View file @
d0f355a3
...
...
@@ -20,15 +20,15 @@ namespace instance {
// FP16
void
add_device_normalization_fwd_rank_2_1_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
PassThrough
,
2
,
1
>>>&
);
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
PassThrough
,
2
,
1
>>>&
);
void
add_device_normalization_fwd_rank_4_3_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
PassThrough
,
4
,
3
>>>&
);
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
PassThrough
,
4
,
3
>>>&
);
void
add_device_normalization_fwd_rank_5_3_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
PassThrough
,
5
,
3
>>>&
);
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
PassThrough
,
5
,
3
>>>&
);
#endif
#ifdef CK_ENABLE_FP32
// FP32
...
...
@@ -76,7 +76,7 @@ struct DeviceOperationInstanceFactory<ck::tensor_operation::device::DeviceNormal
#ifdef CK_ENABLE_FP16
if
constexpr
(
is_same_v
<
XDataType
,
F16
>
&&
is_same_v
<
GammaDataType
,
F16
>
&&
is_same_v
<
BetaDataType
,
F16
>
&&
is_same_v
<
YDataType
,
F16
>
&&
is_same_v
<
SaveMeanInvStdDataType
,
F
32
>
)
is_same_v
<
SaveMeanInvStdDataType
,
F
16
>
)
{
if
constexpr
(
Rank
==
2
&&
NumReduceDim
==
1
)
{
...
...
library/include/ck/library/tensor_operation_instance/gpu/normalization_fwd_swish.hpp
View file @
d0f355a3
...
...
@@ -19,7 +19,7 @@ namespace instance {
// FP16
void
add_device_normalization_fwd_rank_5_3_swish_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
Swish
,
5
,
3
>>>&
);
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
Swish
,
5
,
3
>>>&
);
// FP32
void
add_device_normalization_fwd_rank_5_3_swish_f32_instances
(
...
...
@@ -61,7 +61,7 @@ struct DeviceOperationInstanceFactory<
if
constexpr
(
is_same_v
<
XDataType
,
F16
>
&&
is_same_v
<
GammaDataType
,
F16
>
&&
is_same_v
<
BetaDataType
,
F16
>
&&
is_same_v
<
YDataType
,
F16
>
&&
is_same_v
<
SaveMeanInvStdDataType
,
F
32
>
)
is_same_v
<
SaveMeanInvStdDataType
,
F
16
>
)
{
if
constexpr
(
Rank
==
5
&&
NumReduceDim
==
3
)
{
...
...
library/include/ck/library/tensor_operation_instance/gpu/permute_scale.hpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/device_elementwise_scale.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/library/tensor_operation_instance/device_operation_instance_factory.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
void
add_device_permute_scale_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceElementwise
<
ck
::
Tuple
<
F16
>
,
ck
::
Tuple
<
F16
>
,
PassThrough
,
element_wise
::
UnarySquare
,
Scale
,
4
>>>&
);
void
add_device_permute_scale_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceElementwise
<
ck
::
Tuple
<
F32
>
,
ck
::
Tuple
<
F32
>
,
PassThrough
,
element_wise
::
UnarySquare
,
Scale
,
4
>>>&
);
template
<
typename
InDataTypeTuple
,
typename
OutDataTypeTuple
,
typename
ElementwiseOperation
,
typename
UnaryOperation
,
typename
Scale
,
index_t
NumDim
>
struct
DeviceOperationInstanceFactory
<
ck
::
tensor_operation
::
device
::
DeviceElementwise
<
InDataTypeTuple
,
OutDataTypeTuple
,
ElementwiseOperation
,
UnaryOperation
,
Scale
,
NumDim
>>
{
using
DeviceOp
=
DeviceElementwise
<
InDataTypeTuple
,
OutDataTypeTuple
,
ElementwiseOperation
,
UnaryOperation
,
Scale
,
NumDim
>
;
static
auto
GetInstances
()
{
std
::
vector
<
std
::
unique_ptr
<
DeviceOp
>>
op_ptrs
;
if
constexpr
(
is_same_v
<
InDataTypeTuple
,
ck
::
Tuple
<
F32
>>
&&
is_same_v
<
OutDataTypeTuple
,
ck
::
Tuple
<
F32
>>
)
{
add_device_permute_scale_f32_instances
(
op_ptrs
);
}
else
if
constexpr
(
is_same_v
<
InDataTypeTuple
,
ck
::
Tuple
<
F16
>>
&&
is_same_v
<
OutDataTypeTuple
,
ck
::
Tuple
<
F16
>>
)
{
add_device_permute_scale_f16_instances
(
op_ptrs
);
}
return
op_ptrs
;
}
};
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/gemm/device_gemm_xdl_c_shuffle_lds_direct_load_f16_f16_f16_mk_nk_mn_instance.cpp
View file @
d0f355a3
...
...
@@ -34,22 +34,19 @@ using device_gemm_xdl_c_shuffle_lds_direct_load_f16_f16_f16_mk_nk_mn_instances =
// ##################################| | | | Type| Type| Type| Type| DataType| Elementwise| Elementwise| Elementwise| Spacialization| Prefetch| Size| Block| Block| Block| | | XDL| XDL| Per| Per| ThreadCluster| SrcAccessOrder| SrcVectorDim| Scalar| AddExtraM| ThreadCluster| SrcAccessOrder| SrcVectorDim| Scalar| AddExtraN| MXdlPerWave| NXdlPerWave| _MBlock_MWaveMPerXdl| ScalarPerVector|
// ##################################| | | | | | | | | Operation| Operation| Operation| | Stage| | | | | | | | | Wave| Wave| Lengths_K0_M_K1| | | PerVector| | Lengths_K0_N_K1| | | PerVector| | PerShuffle| PerShuffle| _NBlock_NWaveNPerXdl| _NWaveNPerXdl|
// ##################################| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
1
,
256
,
64
,
64
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
1
,
256
,
128
,
128
,
32
,
8
,
8
,
32
,
32
,
2
,
2
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
1
,
256
,
128
,
64
,
32
,
8
,
8
,
32
,
32
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
1
,
64
,
32
,
32
,
64
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
1
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
1
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
1
,
64
,
64
,
32
,
32
,
8
,
8
,
32
,
32
,
2
,
1
,
S
<
1
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
1
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
1
,
128
,
64
,
32
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
256
,
64
,
64
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
256
,
128
,
64
,
32
,
8
,
8
,
32
,
32
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
256
,
128
,
128
,
32
,
8
,
8
,
32
,
32
,
2
,
2
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
256
,
32
,
128
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
64
,
32
,
32
,
64
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
1
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
1
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
128
,
64
,
32
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
1
,
256
,
64
,
64
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
2
,
256
,
64
,
64
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
4
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
256
,
64
,
64
,
64
,
16
,
16
,
32
,
32
,
1
,
1
,
S
<
4
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
4
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
128
,
16
,
32
,
32
,
8
,
8
,
16
,
16
,
1
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
1
,
128
,
16
,
32
,
64
,
16
,
16
,
16
,
16
,
1
,
1
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
2
,
128
,
16
,
32
,
64
,
16
,
16
,
16
,
16
,
1
,
1
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
1
,
256
,
64
,
64
,
64
,
16
,
16
,
16
,
16
,
2
,
2
,
S
<
4
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
4
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
2
,
128
,
64
,
32
,
32
,
8
,
8
,
32
,
32
,
1
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
1
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
1
,
128
,
16
,
32
,
64
,
16
,
16
,
16
,
16
,
1
,
1
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
2
,
128
,
16
,
32
,
64
,
16
,
16
,
16
,
16
,
1
,
1
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
2
,
128
,
16
,
32
,
32
,
8
,
8
,
16
,
16
,
1
,
1
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
16
,
4
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
8
,
1
,
8
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
1
,
128
,
32
,
16
,
64
,
16
,
16
,
16
,
16
,
1
,
1
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
2
,
128
,
32
,
16
,
64
,
16
,
16
,
16
,
16
,
1
,
1
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
2
,
8
,
8
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
1
,
64
,
16
,
16
,
128
,
32
,
32
,
16
,
16
,
1
,
1
,
S
<
1
,
4
,
16
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
1
,
4
,
16
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
,
DeviceGemm_Xdl_CShuffle_LdsDirectLoad
<
Row
,
Col
,
Row
,
F16
,
F16
,
F16
,
F32
,
F32
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmMNPadding
,
2
,
64
,
16
,
16
,
128
,
32
,
32
,
16
,
16
,
1
,
1
,
S
<
1
,
4
,
16
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
S
<
1
,
4
,
16
>
,
S
<
1
,
0
,
2
>
,
2
,
2
,
0
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
4
>
// clang-format on
>
;
...
...
library/src/tensor_operation_instance/gpu/normalization_bwd_data/CMakeLists.txt
0 → 100644
View file @
d0f355a3
set
(
DEVICE_NORMALIZATION_bwd_data_INSTANCES
)
list
(
APPEND DEVICE_NORMALIZATION_bwd_data_INSTANCES
device_groupnorm_bwd_data_f32_instance.cpp
device_layernorm2d_bwd_data_f16_instance.cpp
device_layernorm2d_bwd_data_f32_instance.cpp
)
add_instance_library
(
device_normalization_bwd_data_instance
${
DEVICE_NORMALIZATION_bwd_data_INSTANCES
}
)
library/src/tensor_operation_instance/gpu/normalization_bwd_data/device_groupnorm_bwd_data_f32_instance.cpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#include "normalization_bwd_data_instance_common.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
void
add_device_groupnorm_bwd_data_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdData
<
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_groupnorm_bwd_data_f32_generic_instance
{});
add_device_operation_instances
(
instances
,
device_groupnorm_bwd_data_f32_instances
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_bwd_data/device_layernorm2d_bwd_data_f16_instance.cpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#include "normalization_bwd_data_instance_common.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
void
add_device_layernorm2d_bwd_data_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdData
<
F16
,
F16
,
F16
,
F16
,
F16
,
2
,
1
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_layernorm_bwd_data_f16_generic_instance
<
2
,
1
>
{});
add_device_operation_instances
(
instances
,
device_layernorm_bwd_data_f16_instances
<
2
,
1
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_bwd_data/device_layernorm2d_bwd_data_f32_instance.cpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#include "normalization_bwd_data_instance_common.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
void
add_device_layernorm2d_bwd_data_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdData
<
F32
,
F32
,
F32
,
F32
,
F32
,
2
,
1
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_layernorm_bwd_data_f32_generic_instance
<
2
,
1
>
{});
add_device_operation_instances
(
instances
,
device_layernorm_bwd_data_f32_instances
<
2
,
1
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_bwd_data/normalization_bwd_data_instance_common.hpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_normalization_bwd_data_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
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_data_f16_instances
=
// clang-format off
std
::
tuple
<
// DYDataType, XDataType, GammaDataType, MeanInvStdDataType, ComputeDataType, DXDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, IsDYFastestDimReduced, DYSrcVectorSize, IsXFastestDimReduced, XSrcVectorSize, IsGammaFastestDimReduced, GammaSrcVectorSize, IsMeanInvStdFastestDimReduced, MeanInvStdSrcVectorSize, IsDXFastestDimReduced, DXDstVectorSize>
DeviceNormalizationBwdDataImpl
<
F16
,
F16
,
F16
,
F16
,
F32
,
F16
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
2
,
true
,
2
,
true
,
2
,
true
,
2
,
false
,
1
,
true
,
2
>
,
DeviceNormalizationBwdDataImpl
<
F16
,
F16
,
F16
,
F16
,
F32
,
F16
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
4
,
true
,
4
,
true
,
4
,
true
,
4
,
false
,
1
,
true
,
4
>
,
DeviceNormalizationBwdDataImpl
<
F16
,
F16
,
F16
,
F16
,
F32
,
F16
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
8
,
true
,
8
,
true
,
8
,
true
,
8
,
false
,
1
,
true
,
8
>
// clang-format on
>
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_data_f16_generic_instance
=
std
::
tuple
<
// clang-format off
DeviceNormalizationBwdDataImpl
<
F16
,
F16
,
F16
,
F16
,
F32
,
F16
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
1
,
true
,
1
,
true
,
1
,
true
,
1
,
false
,
1
,
true
,
1
>
// clang-format on
>
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_data_f32_instances
=
// clang-format off
std
::
tuple
<
// DYDataType, XDataType, GammaDataType, MeanInvStdDataType, ComputeDataType, DXDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, IsDYFastestDimReduced, DYSrcVectorSize, IsXFastestDimReduced, XSrcVectorSize, IsGammaFastestDimReduced, GammaSrcVectorSize, IsMeanInvStdFastestDimReduced, MeanInvStdSrcVectorSize, IsDXFastestDimReduced, DXDstVectorSize>
DeviceNormalizationBwdDataImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
2
,
true
,
2
,
true
,
2
,
true
,
2
,
false
,
1
,
true
,
2
>
,
DeviceNormalizationBwdDataImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
4
,
true
,
4
,
true
,
4
,
true
,
4
,
false
,
1
,
true
,
4
>
// clang-format on
>
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_data_f32_generic_instance
=
std
::
tuple
<
// clang-format off
DeviceNormalizationBwdDataImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
1
,
true
,
1
,
true
,
1
,
true
,
1
,
false
,
1
,
true
,
1
>
// clang-format on
>
;
using
device_groupnorm_bwd_data_f32_instances
=
// clang-format off
std
::
tuple
<
// DYDataType, XDataType, GammaDataType, MeanInvStdDataType, ComputeDataType, DXDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, IsDYFastestDimReduced, DYSrcVectorSize, IsXFastestDimReduced, XSrcVectorSize, IsGammaFastestDimReduced, GammaSrcVectorSize, IsMeanInvStdFastestDimReduced, MeanInvStdSrcVectorSize, IsDXFastestDimReduced, DXDstVectorSize>
DeviceNormalizationBwdDataImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
,
256
,
1
,
256
,
1
,
2
,
true
,
2
,
true
,
2
,
true
,
2
,
false
,
1
,
true
,
2
>
,
DeviceNormalizationBwdDataImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
,
256
,
1
,
256
,
1
,
4
,
true
,
4
,
true
,
4
,
true
,
4
,
false
,
1
,
true
,
4
>
// clang-format on
>
;
using
device_groupnorm_bwd_data_f32_generic_instance
=
std
::
tuple
<
// clang-format off
DeviceNormalizationBwdDataImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
,
64
,
1
,
64
,
1
,
1
,
true
,
1
,
true
,
1
,
true
,
1
,
false
,
1
,
true
,
1
>
// clang-format on
>
;
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/CMakeLists.txt
0 → 100644
View file @
d0f355a3
set
(
DEVICE_NORMALIZATION_BWD_GAMMA_BETA_INSTANCES
)
list
(
APPEND DEVICE_NORMALIZATION_BWD_GAMMA_BETA_INSTANCES
device_groupnorm_bwd_gamma_beta_f32_instance.cpp
device_layernorm2d_bwd_gamma_beta_f16_instance.cpp
device_layernorm2d_bwd_gamma_beta_f32_instance.cpp
)
add_instance_library
(
device_normalization_bwd_gamma_beta_instance
${
DEVICE_NORMALIZATION_BWD_GAMMA_BETA_INSTANCES
}
)
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/device_groupnorm_bwd_gamma_beta_f32_instance.cpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#include "normalization_bwd_gamma_beta_instance_common.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
void
add_device_groupnorm_bwd_gamma_beta_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdGammaBeta
<
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_groupnorm_bwd_gamma_beta_f32_instances
{});
add_device_operation_instances
(
instances
,
device_groupnorm_bwd_gamma_beta_f32_generic_instance
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/device_layernorm2d_bwd_gamma_beta_f16_instance.cpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#include "normalization_bwd_gamma_beta_instance_common.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
void
add_device_layernorm2d_bwd_gamma_beta_rank_2_1_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdGammaBeta
<
F16
,
F16
,
F16
,
F16
,
F16
,
2
,
1
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_layernorm_bwd_gamma_beta_f16_generic_instance
<
2
,
1
>
{});
add_device_operation_instances
(
instances
,
device_layernorm_bwd_gamma_beta_f16_instances
<
2
,
1
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/device_layernorm2d_bwd_gamma_beta_f32_instance.cpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#include "normalization_bwd_gamma_beta_instance_common.hpp"
namespace
ck
{
namespace
tensor_operation
{
namespace
device
{
namespace
instance
{
void
add_device_layernorm2d_bwd_gamma_beta_rank_2_1_f32_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationBwdGammaBeta
<
F32
,
F32
,
F32
,
F32
,
F32
,
2
,
1
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
device_layernorm_bwd_gamma_beta_f32_generic_instance
<
2
,
1
>
{});
add_device_operation_instances
(
instances
,
device_layernorm_bwd_gamma_beta_f32_instances
<
2
,
1
>
{});
}
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_bwd_gamma_beta/normalization_bwd_gamma_beta_instance_common.hpp
0 → 100644
View file @
d0f355a3
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/impl/device_normalization_bwd_gamma_beta_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
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_gamma_beta_f16_instances
=
// clang-format off
std
::
tuple
<
// DYDataType, XDataType, MeanInvStdDataType, ComputeDataType, DGammaDataType, DBetaDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, IsDYFastestDimReduced, DYSrcVectorSize, IsXFastestDimReduced, XSrcVectorSize, IsMeanInvStdFastestDimReduced, MeanInvStdSrcVectorSize, DGammaDstVectorSize, DBetaDstVectorSize>
DeviceNormalizationBwdGammaBetaImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F16
,
Rank
,
Reduce
,
256
,
1
,
256
,
2
,
1
,
false
,
2
,
false
,
2
,
true
,
1
,
2
,
2
>
,
DeviceNormalizationBwdGammaBetaImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F16
,
Rank
,
Reduce
,
256
,
1
,
256
,
4
,
1
,
false
,
4
,
false
,
4
,
true
,
1
,
4
,
4
>
,
DeviceNormalizationBwdGammaBetaImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F16
,
Rank
,
Reduce
,
256
,
1
,
256
,
8
,
1
,
false
,
8
,
false
,
8
,
true
,
1
,
8
,
8
>
// clang-format on
>
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_gamma_beta_f16_generic_instance
=
std
::
tuple
<
// clang-format off
DeviceNormalizationBwdGammaBetaImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F16
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
1
,
false
,
1
,
false
,
1
,
true
,
1
,
1
,
1
>
// clang-format on
>
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_gamma_beta_f32_instances
=
// clang-format off
std
::
tuple
<
// DYDataType, XDataType, MeanInvStdDataType, ComputeDataType, DGammaDataType, DBetaDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, IsDYFastestDimReduced, DYSrcVectorSize, IsXFastestDimReduced, XSrcVectorSize, IsMeanInvStdFastestDimReduced, MeanInvStdSrcVectorSize, DGammaDstVectorSize, DBetaDstVectorSize>
DeviceNormalizationBwdGammaBetaImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
Rank
,
Reduce
,
256
,
1
,
256
,
2
,
1
,
false
,
2
,
false
,
2
,
true
,
1
,
2
,
2
>
,
DeviceNormalizationBwdGammaBetaImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
Rank
,
Reduce
,
256
,
1
,
256
,
4
,
1
,
false
,
4
,
false
,
4
,
true
,
1
,
4
,
4
>
// clang-format on
>
;
template
<
index_t
Rank
,
index_t
Reduce
>
using
device_layernorm_bwd_gamma_beta_f32_generic_instance
=
std
::
tuple
<
// clang-format off
DeviceNormalizationBwdGammaBetaImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
1
,
false
,
1
,
false
,
1
,
true
,
1
,
1
,
1
>
// clang-format on
>
;
using
device_groupnorm_bwd_gamma_beta_f32_instances
=
// clang-format off
std
::
tuple
<
// DYDataType, XDataType, MeanInvStdDataType, ComputeDataType, DGammaDataType, DBetaDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, IsDYFastestDimReduced, DYSrcVectorSize, IsXFastestDimReduced, XSrcVectorSize, IsMeanInvStdFastestDimReduced, MeanInvStdSrcVectorSize, DGammaDstVectorSize, DBetaDstVectorSize>
DeviceNormalizationBwdGammaBetaImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
,
256
,
1
,
256
,
2
,
1
,
false
,
2
,
false
,
2
,
false
,
1
,
2
,
2
>
,
DeviceNormalizationBwdGammaBetaImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
,
256
,
1
,
256
,
4
,
1
,
false
,
4
,
false
,
4
,
false
,
1
,
4
,
4
>
// clang-format on
>
;
using
device_groupnorm_bwd_gamma_beta_f32_generic_instance
=
std
::
tuple
<
// clang-format off
DeviceNormalizationBwdGammaBetaImpl
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
,
5
,
3
,
64
,
1
,
64
,
1
,
1
,
false
,
1
,
false
,
1
,
false
,
1
,
1
,
1
>
// clang-format on
>
;
}
// namespace instance
}
// namespace device
}
// namespace tensor_operation
}
// namespace ck
library/src/tensor_operation_instance/gpu/normalization_fwd/device_groupnorm_fwd_f16_instance.cpp
View file @
d0f355a3
...
...
@@ -11,7 +11,7 @@ namespace instance {
using
Pass
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
void
add_device_normalization_fwd_rank_5_3_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
Pass
,
5
,
3
>>>&
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
Pass
,
5
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
...
...
library/src/tensor_operation_instance/gpu/normalization_fwd/device_groupnorm_fwd_swish_f16_instance.cpp
View file @
d0f355a3
...
...
@@ -11,7 +11,7 @@ namespace instance {
using
Swish
=
ck
::
tensor_operation
::
element_wise
::
Swish
;
void
add_device_normalization_fwd_rank_5_3_swish_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
Swish
,
5
,
3
>>>&
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
Swish
,
5
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
...
...
library/src/tensor_operation_instance/gpu/normalization_fwd/device_layernorm2d_fwd_f16_instance.cpp
View file @
d0f355a3
...
...
@@ -11,7 +11,7 @@ namespace instance {
using
Pass
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
void
add_device_normalization_fwd_rank_2_1_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
Pass
,
2
,
1
>>>&
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
Pass
,
2
,
1
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
...
...
library/src/tensor_operation_instance/gpu/normalization_fwd/device_layernorm4d_fwd_f16_instance.cpp
View file @
d0f355a3
...
...
@@ -11,7 +11,7 @@ namespace instance {
using
Pass
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
void
add_device_normalization_fwd_rank_4_3_f16_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
32
,
Pass
,
4
,
3
>>>&
std
::
vector
<
std
::
unique_ptr
<
DeviceNormalizationFwd
<
F16
,
F16
,
F16
,
F16
,
F
16
,
Pass
,
4
,
3
>>>&
instances
)
{
add_device_operation_instances
(
instances
,
...
...
library/src/tensor_operation_instance/gpu/normalization_fwd/normalization_fwd_instance_common.hpp
View file @
d0f355a3
...
...
@@ -23,24 +23,24 @@ using device_normalization_f16_instances =
// clang-format off
std
::
tuple
<
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdScalarPerVector>
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
2
,
1
,
2
,
1
,
2
,
1
,
2
,
2
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
4
,
1
,
4
,
1
,
4
,
1
,
4
,
4
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
2
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
2
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
2
,
1
,
2
,
1
,
2
,
1
,
2
,
2
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
4
,
1
,
4
,
1
,
4
,
1
,
4
,
4
,
1
>
,
// irregular size
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
2
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
2
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
// clang-format on
>
;
...
...
@@ -49,31 +49,31 @@ using device_normalization_splitk_f16_instances =
// clang-format off
std
::
tuple
<
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdScalarPerVector>
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
2
,
1
,
2
,
1
,
2
,
1
,
2
,
2
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
4
,
1
,
4
,
1
,
4
,
1
,
4
,
4
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
2
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
2
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
2
,
1
,
2
,
1
,
2
,
1
,
2
,
2
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
4
,
1
,
4
,
1
,
4
,
1
,
4
,
4
,
1
>
,
// irregular size
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
128
,
1
,
128
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
2
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
2
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
256
,
1
,
256
,
1
,
32
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
512
,
1
,
512
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
8
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
,
DeviceNormalizationFwdSplitKImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
1024
,
1
,
1024
,
1
,
16
,
1
,
8
,
1
,
8
,
1
,
8
,
8
,
1
>
// clang-format on
>
;
template
<
typename
OutElementwise
,
index_t
Rank
,
index_t
Reduce
>
using
device_normalization_f16_generic_instance
=
std
::
tuple
<
// clang-format off
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
32
,
OutElementwise
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
DeviceNormalizationFwdImpl
<
F16
,
F16
,
F16
,
F32
,
F16
,
F
16
,
OutElementwise
,
Rank
,
Reduce
,
64
,
1
,
64
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
>
// clang-format on
>
;
...
...
Prev
1
2
3
4
5
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