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
30348daa
Commit
30348daa
authored
Apr 13, 2022
by
rocking
Browse files
[What] Refine naming
[Why] Prepare to add reduceSum
parent
f2540aa5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
example/19_gemm_softmax/gemm_softmax_xdl_fp16.cpp
example/19_gemm_softmax/gemm_softmax_xdl_fp16.cpp
+9
-9
No files found.
example/19_gemm_softmax/gemm_softmax_xdl_fp16.cpp
View file @
30348daa
...
...
@@ -85,25 +85,25 @@ using DeviceGemmInstance = ck::tensor_operation::device::DeviceGemmXdl_C_Shuffle
8
>
;
// CBlockTransferScalarPerVector_NWaveNPerXdl
// clang-format on
constexpr
int
Rank
=
2
;
constexpr
int
Reduce
Rank
=
2
;
constexpr
int
NumReduceDim
=
1
;
constexpr
ck
::
ReduceTensorOp
Reduce
Op
Id
=
ck
::
ReduceTensorOp
::
MAX
;
constexpr
ck
::
ReduceTensorOp
Reduce
Max
Id
=
ck
::
ReduceTensorOp
::
MAX
;
constexpr
ck
::
NanPropagation
NanOpt
=
ck
::
NanPropagation
::
PROPAGATE_NAN
;
constexpr
bool
PropagateNan
=
(
NanOpt
==
ck
::
NanPropagation
::
NOT_PROPAGATE_NAN
)
?
false
:
true
;
// constexpr ck::ReduceTensorIndices_t IndicesOpt = ck::ReduceTensorIndices_t::NO_INDICES;
using
Reduce
Operation
=
typename
ck
::
reduce_binary_operator
<
CDataType
,
Reduce
Op
Id
>::
opType
;
using
Reduce
MaxOp
=
typename
ck
::
reduce_binary_operator
<
CDataType
,
Reduce
Max
Id
>::
opType
;
using
InElementwiseOperation
=
typename
ck
::
reduce_unary_operator
<
CDataType
,
Reduce
Op
Id
,
true
,
true
>::
InElementwiseOperation
;
typename
ck
::
reduce_unary_operator
<
CDataType
,
Reduce
Max
Id
,
true
,
true
>::
InElementwiseOperation
;
using
AccElementwiseOperation
=
typename
ck
::
reduce_unary_operator
<
CDataType
,
Reduce
Op
Id
,
true
,
true
>::
AccElementwiseOperation
;
typename
ck
::
reduce_unary_operator
<
CDataType
,
Reduce
Max
Id
,
true
,
true
>::
AccElementwiseOperation
;
using
DeviceReduceInstance
=
using
DeviceReduce
Max
Instance
=
ck
::
tensor_operation
::
device
::
DeviceReduceBlockWise
<
CDataType
,
CDataType
,
CDataType
,
Rank
,
Reduce
Rank
,
NumReduceDim
,
Reduce
Operation
,
Reduce
MaxOp
,
InElementwiseOperation
,
AccElementwiseOperation
,
PropagateNan
,
...
...
@@ -264,7 +264,7 @@ int main(int argc, char* argv[])
gemm_invoker
.
Run
(
gemm_argument
,
nrepeat
);
// do reduce max
auto
reduce_max
=
DeviceReduceInstance
{};
auto
reduce_max
=
DeviceReduce
Max
Instance
{};
auto
wsSizeInBytes
=
reduce_max
.
GetWorkspaceSizeInBytes
(
i_inLengths
,
reduceDims
);
DeviceMem
ws_dev
(
wsSizeInBytes
);
...
...
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