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
5fa209af
Commit
5fa209af
authored
Apr 20, 2022
by
rocking
Browse files
Add padding
parent
0f421d6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
example/19_gemm_softmax/gemm_softmax_xdl_fp16.cpp
example/19_gemm_softmax/gemm_softmax_xdl_fp16.cpp
+0
-1
include/ck/tensor_operation/gpu/device/device_elementwise_2d.hpp
.../ck/tensor_operation/gpu/device/device_elementwise_2d.hpp
+15
-4
No files found.
example/19_gemm_softmax/gemm_softmax_xdl_fp16.cpp
View file @
5fa209af
...
@@ -468,7 +468,6 @@ int main(int argc, char* argv[])
...
@@ -468,7 +468,6 @@ int main(int argc, char* argv[])
auto
broadcastDiv_invoker_ptr
=
broadcastDiv
.
MakeInvokerPointer
();
auto
broadcastDiv_invoker_ptr
=
broadcastDiv
.
MakeInvokerPointer
();
broadcastDiv_invoker_ptr
->
Run
(
broadcastDiv_argument_ptr
.
get
(),
nrepeat
);
broadcastDiv_invoker_ptr
->
Run
(
broadcastDiv_argument_ptr
.
get
(),
nrepeat
);
// TODO = do_verification
if
(
do_verification
)
if
(
do_verification
)
{
{
std
::
cout
<<
"verification..."
<<
std
::
endl
;
std
::
cout
<<
"verification..."
<<
std
::
endl
;
...
...
include/ck/tensor_operation/gpu/device/device_elementwise_2d.hpp
View file @
5fa209af
...
@@ -34,10 +34,21 @@ struct DeviceElementwise_2D : public DeviceElementwise<ElementwiseFunctor>
...
@@ -34,10 +34,21 @@ struct DeviceElementwise_2D : public DeviceElementwise<ElementwiseFunctor>
make_naive_tensor_descriptor
(
make_tuple
(
m
,
n
),
make_tuple
(
stride
[
0
],
stride
[
1
]));
make_naive_tensor_descriptor
(
make_tuple
(
m
,
n
),
make_tuple
(
stride
[
0
],
stride
[
1
]));
// 1d desc - [m * n]
// 1d desc - [m * n]
return
transform_tensor_descriptor
(
desc_m_n
,
const
auto
desc_m0
=
make_tuple
(
make_merge_transform
(
make_tuple
(
m
,
n
))),
transform_tensor_descriptor
(
desc_m_n
,
make_tuple
(
Sequence
<
0
,
1
>
{}),
make_tuple
(
make_merge_transform
(
make_tuple
(
m
,
n
))),
make_tuple
(
Sequence
<
0
>
{}));
make_tuple
(
Sequence
<
0
,
1
>
{}),
make_tuple
(
Sequence
<
0
>
{}));
// pad
const
auto
m0
=
desc_m0
.
GetLength
(
I0
);
const
auto
pad
=
math
::
integer_least_multiple
(
m0
,
ScalarPerVector
)
-
m0
;
const
auto
desc_m0_pad
=
transform_tensor_descriptor
(
desc_m0
,
make_tuple
(
make_right_pad_transform
(
m0
,
pad
)),
make_tuple
(
Sequence
<
0
>
{}),
make_tuple
(
Sequence
<
0
>
{}));
return
desc_m0_pad
;
}
}
using
GridDesc_M0
=
decltype
(
MakeDescriptor_M0
({
1
,
1
},
{
1
,
1
}));
using
GridDesc_M0
=
decltype
(
MakeDescriptor_M0
({
1
,
1
},
{
1
,
1
}));
...
...
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