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
8a1ccdd4
Commit
8a1ccdd4
authored
Sep 05, 2022
by
Po-Yen, Chen
Browse files
Use more strict input
parent
58945ac2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
example/36_elementwise_permute/common.hpp
example/36_elementwise_permute/common.hpp
+2
-0
example/36_elementwise_permute/run_elementwise_permute_example.inc
...6_elementwise_permute/run_elementwise_permute_example.inc
+2
-2
No files found.
example/36_elementwise_permute/common.hpp
View file @
8a1ccdd4
...
...
@@ -6,6 +6,8 @@
#include <cstddef>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <numeric>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/element/binary_element_wise_operation.hpp"
...
...
example/36_elementwise_permute/run_elementwise_permute_example.inc
View file @
8a1ccdd4
...
...
@@ -30,7 +30,7 @@ bool run_elementwise_permute(const ExecutionConfig& config, const Problem& probl
Tensor
<
ADataType
>
a
(
nchw
);
Tensor
<
BDataType
>
b
(
nhwc
);
a
.
GenerateTensorValue
(
GeneratorTensor_3
<
ADataType
>
{
0.0
,
1.0
}
);
std
::
iota
(
begin
(
a
.
mData
),
end
(
a
.
mData
),
0
);
DeviceMem
a_device_buf
(
sizeof
(
ADataType
)
*
a
.
mDesc
.
GetElementSpaceSize
());
DeviceMem
b_device_buf
(
sizeof
(
BDataType
)
*
b
.
mDesc
.
GetElementSpaceSize
());
...
...
@@ -72,7 +72,7 @@ bool run_elementwise_permute(const ExecutionConfig& config, const Problem& probl
host_b
,
a
,
nhwc
,
PassThrough
{});
return
ck
::
utils
::
check_err
(
b
.
mData
,
host_b
.
mData
,
"Error:
I
ncorrect results
b
"
,
1
e
-
3
,
1
e
-
3
);
b
.
mData
,
host_b
.
mData
,
"Error:
i
ncorrect results
in tensor B
"
,
1
e
-
10
,
1
e
-
10
);
}
return
true
;
...
...
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