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
58945ac2
"docs/vscode:/vscode.git/clone" did not exist on "d087e46bd193b1101cef13e28841185a465a077f"
Commit
58945ac2
authored
Sep 05, 2022
by
Po-Yen, Chen
Browse files
Move common parts into common.hpp
parent
ccd26cbd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
example/36_elementwise_permute/common.hpp
example/36_elementwise_permute/common.hpp
+7
-0
example/36_elementwise_permute/elementwise_permute_fp16.cpp
example/36_elementwise_permute/elementwise_permute_fp16.cpp
+2
-11
No files found.
example/36_elementwise_permute/common.hpp
View file @
58945ac2
...
...
@@ -16,6 +16,8 @@
#include "ck/library/utility/host_tensor.hpp"
#include "ck/library/utility/host_tensor_generator.hpp"
using
F16
=
ck
::
half_t
;
struct
ExecutionConfig
final
{
bool
do_verification
=
true
;
...
...
@@ -28,6 +30,11 @@ struct Problem final
std
::
array
<
std
::
size_t
,
4
>
axes
=
{
0
,
2
,
3
,
1
};
};
template
<
ck
::
index_t
...
Is
>
using
S
=
ck
::
Sequence
<
Is
...
>
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
inline
bool
parse_cmd_args
(
int
argc
,
char
*
argv
[],
ExecutionConfig
&
config
,
Problem
&
problem
)
{
return
true
;
...
...
example/36_elementwise_permute/elementwise_permute_fp16.cpp
View file @
58945ac2
...
...
@@ -3,20 +3,11 @@
#include "common.hpp"
using
F16
=
ck
::
half_t
;
using
ADataType
=
F16
;
using
BDataType
=
F16
;
using
PassThrough
=
ck
::
tensor_operation
::
element_wise
::
PassThrough
;
using
DeviceElementwisePermuteInstance
=
ck
::
tensor_operation
::
device
::
DeviceElementwise
<
ck
::
Tuple
<
ADataType
>
,
ck
::
Tuple
<
BDataType
>
,
PassThrough
,
4
,
8
,
ck
::
Sequence
<
8
>
,
ck
::
Sequence
<
1
>>
;
using
DeviceElementwisePermuteInstance
=
ck
::
tensor_operation
::
device
::
DeviceElementwise
<
ck
::
Tuple
<
ADataType
>
,
ck
::
Tuple
<
BDataType
>
,
PassThrough
,
4
,
8
,
S
<
8
>
,
S
<
1
>>
;
#include "run_elementwise_permute_example.inc"
...
...
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