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
953da942
Commit
953da942
authored
Sep 12, 2022
by
turneram
Browse files
Formatting
parent
9a7bb6d2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
src/targets/gpu/jit/ck_elementwise.cpp
src/targets/gpu/jit/ck_elementwise.cpp
+7
-7
src/targets/gpu/kernels/include/migraphx/kernels/ck_elementwise.hpp
...s/gpu/kernels/include/migraphx/kernels/ck_elementwise.hpp
+4
-4
No files found.
src/targets/gpu/jit/ck_elementwise.cpp
View file @
953da942
...
...
@@ -50,7 +50,6 @@ using namespace migraphx::gpu::gen; // NOLINT
// #include <migraphx/kernels/generic_constant.hpp>
// #include <args.hpp>
// #include <migraphx/kernels/index.hpp>
// #include <migraphx/kernels/algorithm.hpp>
// #include <migraphx/kernels/integral_constant.hpp>
...
...
@@ -78,7 +77,8 @@ using namespace migraphx::gpu::gen; // NOLINT
// auto blockSize = 1024;
// //constexpr auto ndim = 1;
// // auto idx = make_index();
// auto tupleOfShape = generate_tuple([&](auto I) { return static_cast<ck::index_t>(lengths[I]); },
// auto tupleOfShape = generate_tuple([&](auto I) { return static_cast<ck::index_t>(lengths[I]);
// },
// ck::Number<ndim>{});
// auto tupleOfStride = generate_tuple(
// [&](auto I) { return static_cast<ck::index_t>(strides[I]); }, ck::Number<1>{});
...
...
@@ -95,9 +95,9 @@ using namespace migraphx::gpu::gen; // NOLINT
// }
// const auto M = desc_m.GetLength(I0);
// 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 =
// 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,
// make_tuple(ck::make_right_pad_transform(M, pad)),
// make_tuple(ck::Sequence<0>{}),
...
...
src/targets/gpu/kernels/include/migraphx/kernels/ck_elementwise.hpp
View file @
953da942
...
...
@@ -37,9 +37,9 @@
namespace
migraphx
{
using
ADataType
=
ck
::
half_t
;
//float;
using
BDataType
=
ck
::
half_t
;
//float;
using
CDataType
=
ck
::
half_t
;
//float;
using
ADataType
=
ck
::
half_t
;
//
float;
using
BDataType
=
ck
::
half_t
;
//
float;
using
CDataType
=
ck
::
half_t
;
//
float;
using
ElementwiseFunctor
=
float
;
static
constexpr
auto
I0
=
ck
::
Number
<
0
>
{};
...
...
@@ -90,7 +90,7 @@ struct Add
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();
//
auto idx = make_index();
constexpr
auto
lengths
=
get_shape_c
<
T
>
{}.
lens
;
constexpr
auto
strides
=
get_shape_c
<
T
>
{}.
strides
;
constexpr
auto
a_desc
=
MakeDescriptor_M
(
lengths
,
strides
,
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