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
da2bce29
Commit
da2bce29
authored
Dec 02, 2022
by
Anthony Chang
Browse files
revert accidental example code changes
parent
16428e7f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
59 deletions
+59
-59
example/32_batched_gemm_scale_softmax_gemm/batched_gemm_scale_softmax_gemm_permute_xdl_fp16.cpp
...gemm/batched_gemm_scale_softmax_gemm_permute_xdl_fp16.cpp
+59
-59
No files found.
example/32_batched_gemm_scale_softmax_gemm/batched_gemm_scale_softmax_gemm_permute_xdl_fp16.cpp
View file @
da2bce29
...
@@ -8,7 +8,7 @@ Gemm + Softmax + Gemm fused operation. Computes C_g_m_o = Softmax(A_g_m_k * B0_g
...
@@ -8,7 +8,7 @@ Gemm + Softmax + Gemm fused operation. Computes C_g_m_o = Softmax(A_g_m_k * B0_g
|-------------------------------------|
|-------------------------------------|
Gemm1
Gemm1
*/
*/
#pragma clang diagnostic ignored "-Wunused-variable"
#include <iostream>
#include <iostream>
#include <numeric>
#include <numeric>
#include <initializer_list>
#include <initializer_list>
...
@@ -57,7 +57,7 @@ using Acc0ElementOp = ck::tensor_operation::element_wise::Scale;
...
@@ -57,7 +57,7 @@ using Acc0ElementOp = ck::tensor_operation::element_wise::Scale;
using
B1ElementOp
=
PassThrough
;
using
B1ElementOp
=
PassThrough
;
using
CElementOp
=
PassThrough
;
using
CElementOp
=
PassThrough
;
static
constexpr
auto
GemmSpec
=
ck
::
tensor_operation
::
device
::
GemmSpecialization
::
Default
;
static
constexpr
auto
GemmSpec
=
ck
::
tensor_operation
::
device
::
GemmSpecialization
::
MNKOPadding
;
static
constexpr
auto
MaskingSpec
=
static
constexpr
auto
MaskingSpec
=
ck
::
tensor_operation
::
device
::
MaskingSpecialization
::
MaskDisabled
;
ck
::
tensor_operation
::
device
::
MaskingSpecialization
::
MaskDisabled
;
...
@@ -73,65 +73,65 @@ using DeviceGemmInstance =
...
@@ -73,65 +73,65 @@ using DeviceGemmInstance =
NumDimN
,
NumDimN
,
NumDimK
,
NumDimK
,
NumDimO
,
NumDimO
,
ck
::
half_t
,
ADataType
,
ck
::
half_t
,
B0DataType
,
ck
::
half_t
,
B1DataType
,
ck
::
half_t
,
CDataType
,
ck
::
Tuple
<>
,
Acc0BiasDataType
,
ck
::
Tuple
<>
,
Acc1BiasDataType
,
float
,
AccDataType
,
float
,
//
CShuffleDType,
CShuffleD
ata
Type
,
ck
::
tensor_operation
::
element_wise
::
PassThrough
,
AElementOp
,
ck
::
tensor_operation
::
element_wise
::
PassThrough
,
B0ElementOp
,
ck
::
tensor_operation
::
element_wise
::
Scale
,
Acc0ElementOp
,
ck
::
tensor_operation
::
element_wise
::
PassThrough
,
B1ElementOp
,
ck
::
tensor_operation
::
element_wise
::
PassThrough
,
CElementOp
,
GemmSpec
,
GemmSpec
,
ck
::
tensor_operation
::
device
::
TensorSpecialization
::
Default
,
TensorSpecA
,
ck
::
tensor_operation
::
device
::
TensorSpecialization
::
Default
,
TensorSpecB0
,
ck
::
tensor_operation
::
device
::
TensorSpecialization
::
Default
,
TensorSpecB1
,
ck
::
tensor_operation
::
device
::
TensorSpecialization
::
Default
,
TensorSpecC
,
1
,
1
,
256
,
// block_size
256
,
64
,
// m_per_b
lock
128
,
// MPerB
lock
256
,
// n_per_b
lock
128
,
// NPerB
lock
32
,
// k_per_b
lock
32
,
// KPerB
lock
64
,
// Gemm1NPerBlock
64
,
// Gemm1NPerBlock
32
,
// Gemm1KPerBlock
32
,
// Gemm1KPerBlock
8
,
//
ak
1
8
,
//
AK
1
8
,
//
bk
1
8
,
//
BK
1
2
,
// b1k
1
2
,
// B1K
1
16
,
// m_per_xdl
32
,
// MPerXDL
16
,
// n_per_xdl
32
,
// NPerXDL
1
,
// m_xdl_per_w
ave
1
,
// MXdlPerW
ave
16
,
// n_xdl_per_w
ave
4
,
// NXdlPerW
ave
4
,
// Gemm1NXdlPerWave
2
,
// Gemm1NXdlPerWave
ck
::
Sequence
<
4
,
64
,
1
>
,
// thread_cluster_length
S
<
4
,
64
,
1
>
,
// ABlockTransfer
ck
::
Sequence
<
1
,
0
,
2
>
,
// thread_cluster_arrange_order
S
<
1
,
0
,
2
>
,
ck
::
Sequence
<
1
,
0
,
2
>
,
// src_access_order
S
<
1
,
0
,
2
>
,
2
,
// src_vector_dim
2
,
8
,
// src_scalar_per_vector
8
,
8
,
// dst_scalar_per_vector
8
,
1
,
// add_extra_dim
true
,
ck
::
Sequence
<
4
,
64
,
1
>
,
// thread_cluster_length
S
<
4
,
64
,
1
>
,
// BBlockTransfer
ck
::
Sequence
<
1
,
0
,
2
>
,
// thread_cluster_arrange_order
S
<
1
,
0
,
2
>
,
ck
::
Sequence
<
1
,
0
,
2
>
,
// src_access_order
S
<
1
,
0
,
2
>
,
2
,
// src_vector_dim
2
,
8
,
// src_scalar_per_vector
8
,
8
,
// dst_scalar_per_vector
8
,
1
,
// add_extra_dim
true
,
ck
::
Sequence
<
16
,
16
,
1
>
,
//
thread_cluster_length
S
<
16
,
16
,
1
>
,
//
B1BlockTransfer
ck
::
Sequence
<
0
,
2
,
1
>
,
// thread_cluster_arrange_order
S
<
0
,
2
,
1
>
,
ck
::
Sequence
<
0
,
2
,
1
>
,
// src_access_order
S
<
0
,
2
,
1
>
,
1
,
// src_vector_dim
1
,
4
,
// src_scalar_per_vector
4
,
2
,
// dst_scalar_per_vector
2
,
0
,
// add_extra_dim
false
,
1
,
// m_xdl_per_wav
e
1
,
// CShuffleMXdlPerWavePerShuffl
e
4
,
//
n_xdl_per_wav
e
2
,
//
CShuffleNXdlPerWavePerShuffl
e
ck
::
Sequence
<
1
,
32
,
1
,
8
>
,
//
m_n_block_wave_per_xdl
S
<
1
,
32
,
1
,
8
>
,
//
CShuffleBlockTransferClusterLengths_MBlock_MPerBlock_NBlock_NPerBlock
8
,
// scalar_per_vector
8
,
// CShuffleBlockTransferScalarPerVector_NPerBlock
ck
::
tensor_operation
::
device
::
MaskingSpecialization
::
MaskDisabled
>
;
// causal_mask
MaskingSpec
>
;
// MaskingSpecialization
// Ref Gemm0: fp16 in, fp32 out
// Ref Gemm0: fp16 in, fp32 out
using
ReferenceGemm0Instance
=
ck
::
tensor_operation
::
host
::
ReferenceBatchedGemm
<
ADataType
,
using
ReferenceGemm0Instance
=
ck
::
tensor_operation
::
host
::
ReferenceBatchedGemm
<
ADataType
,
...
...
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