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
1419eb8f
Commit
1419eb8f
authored
Sep 21, 2023
by
Astha Rai
Browse files
more formatting fixes
parent
745cca7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
example/44_elementwise_permute/elementwise_permute_4D_fp16.cpp
...le/44_elementwise_permute/elementwise_permute_4D_fp16.cpp
+4
-8
No files found.
example/44_elementwise_permute/elementwise_permute_4D_fp16.cpp
View file @
1419eb8f
...
...
@@ -45,10 +45,8 @@ int main()
bool
do_verification
=
true
;
bool
time_kernel
=
true
;
//std::vector<std::size_t> nchw = {16, 128, 32, 64};
//std::vector<std::size_t> nhwc = {16, 32, 64, 128};
std
::
vector
<
std
::
size_t
>
nchw
=
{
16
,
8
,
8
,
8
};
std
::
vector
<
std
::
size_t
>
nhwc
=
{
16
,
8
,
8
,
8
};
std
::
vector
<
std
::
size_t
>
nchw
=
{
16
,
128
,
32
,
64
};
std
::
vector
<
std
::
size_t
>
nhwc
=
{
16
,
32
,
64
,
128
};
Tensor
<
ADataType
>
a
(
nchw
);
Tensor
<
BDataType
>
b
(
nhwc
);
...
...
@@ -101,8 +99,6 @@ int main()
std
::
cout
<<
"Perf: "
<<
ave_time
<<
" ms, "
<<
tflops
<<
" TFlops, "
<<
gb_per_sec
<<
" GB/s"
<<
std
::
endl
;
//LogRangeAsType<float>(std::cout << "A : ", a.mData, ",") << std::endl;
//LogRangeAsType<float>(std::cout << "B : ", b.mData, ",") << std::endl;
bool
pass
=
true
;
if
(
do_verification
)
...
...
@@ -110,8 +106,8 @@ int main()
b_device_buf
.
FromDevice
(
b
.
mData
.
data
());
Tensor
<
BDataType
>
host_b
(
nhwc
);
host_elementwise4D
(
host_b
,
a
,
PassThrough
{});
//LogRangeAsType<float>(std::cout << "A : ", a.mData, ",") << std::endl;
//LogRangeAsType<float>(std::cout << "B : ", host_b.mData, ",") << std::endl;
//
LogRangeAsType<float>(std::cout << "A : ", a.mData, ",") << std::endl;
//
LogRangeAsType<float>(std::cout << "B : ", host_b.mData, ",") << std::endl;
pass
&=
ck
::
utils
::
check_err
(
b
.
mData
,
host_b
.
mData
,
"Error: Incorrect results b"
,
1e-3
,
1e-3
);
...
...
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