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
MIGraphX
Commits
bf523dbe
Commit
bf523dbe
authored
Sep 07, 2022
by
turneram
Browse files
Formatting
parent
44a12304
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/targets/gpu/kernels/include/migraphx/kernels/ck_elementwise.hpp
...s/gpu/kernels/include/migraphx/kernels/ck_elementwise.hpp
+9
-9
No files found.
src/targets/gpu/kernels/include/migraphx/kernels/ck_elementwise.hpp
View file @
bf523dbe
...
...
@@ -50,7 +50,7 @@ constexpr auto MakeDescriptor_M(const L& lengths, const S& strides, const N& /*
auto
gridSize
=
72
;
auto
blockSize
=
1024
;
constexpr
auto
ndim
=
1
;
//auto idx = make_index();
//
auto idx = make_index();
auto
tupleOfShape
=
generate_tuple
([
&
](
auto
I
)
{
return
static_cast
<
ck
::
index_t
>
(
lengths
[
I
]);
},
ck
::
Number
<
ndim
>
{});
auto
tupleOfStride
=
generate_tuple
(
...
...
@@ -68,7 +68,7 @@ constexpr auto MakeDescriptor_M(const L& lengths, const S& strides, const N& /*
}
const
auto
M
=
desc_m
.
GetLength
(
I0
);
const
ck
::
index_t
loop_step
=
/* idx.nglobal(); // */
gridSize
*
blockSize
/* * MPerThread */
;
const
ck
::
index_t
loop_step
=
/* idx.nglobal(); // */
gridSize
*
blockSize
/* * MPerThread */
;
const
auto
pad
=
ck
::
math
::
integer_least_multiple
(
M
,
loop_step
)
-
M
;
const
auto
desc_m_pad
=
transform_tensor_descriptor
(
desc_m
,
...
...
@@ -91,7 +91,7 @@ template <class T, class U, class V>
__device__
void
ck_elementwise
(
const
T
&
a_t
,
const
U
&
b_t
,
const
V
&
c_t
)
{
auto
idx
=
make_index
();
if
(
idx
.
global
==
0
)
if
(
idx
.
global
==
0
)
{
constexpr
auto
lengths
=
get_shape_c
<
T
>
{}.
lens
;
constexpr
auto
strides
=
get_shape_c
<
T
>
{}.
strides
;
...
...
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