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
b7d7d6d0
"git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "6daef9933efbd78864a8d9a1b84177268a6d49c1"
Commit
b7d7d6d0
authored
Oct 06, 2022
by
Astha Rai
Browse files
temporarily removing vector load on 2nd dim
parent
194bf17e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
example/43_elementwise_permute_2d/elementwise_permute_4D_fp16_2d.cpp
...elementwise_permute_2d/elementwise_permute_4D_fp16_2d.cpp
+4
-4
No files found.
example/43_elementwise_permute_2d/elementwise_permute_4D_fp16_2d.cpp
View file @
b7d7d6d0
...
...
@@ -27,7 +27,7 @@ using DeviceElementwisePermuteInstance =
8
,
8
,
ck
::
Sequence
<
8
>
,
ck
::
Sequence
<
8
>>
;
ck
::
Sequence
<
1
>>
;
template
<
typename
HostTensorA
,
typename
HostTensorB
,
typename
Functor
>
void
host_elementwise4D
(
HostTensorB
&
B_nhwc
,
...
...
@@ -61,7 +61,7 @@ int main()
DeviceMem
b_device_buf
(
sizeof
(
BDataType
)
*
b
.
mDesc
.
GetElementSpaceSize
());
a_device_buf
.
ToDevice
(
a
.
mData
.
data
());
LogRangeAsType
<
float
>
(
std
::
cout
<<
"Tensor a : "
,
a
.
mData
,
","
)
<<
std
::
endl
;
//
LogRangeAsType<float>(std::cout << "Tensor a : ", a.mData, ",") << std::endl;
std
::
array
<
const
void
*
,
1
>
input
=
{
a_device_buf
.
GetDeviceBuffer
()};
std
::
array
<
void
*
,
1
>
output
=
{
b_device_buf
.
GetDeviceBuffer
()};
...
...
@@ -101,12 +101,12 @@ int main()
if
(
do_verification
)
{
b_device_buf
.
FromDevice
(
b
.
mData
.
data
());
LogRangeAsType
<
float
>
(
std
::
cout
<<
"Tensor b : "
,
b
.
mData
,
","
)
<<
std
::
endl
;
//
LogRangeAsType<float>(std::cout << "Tensor b : ", b.mData, ",") << std::endl;
Tensor
<
BDataType
>
host_b
(
nhwc
);
host_elementwise4D
<
Tensor
<
ADataType
>
,
Tensor
<
BDataType
>
,
PassThrough
>
(
host_b
,
a
,
nchw
,
PassThrough
{});
LogRangeAsType
<
float
>
(
std
::
cout
<<
"Host b : "
,
host_b
.
mData
,
","
)
<<
std
::
endl
;
//
LogRangeAsType<float>(std::cout << "Host 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