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
e698fdb4
Commit
e698fdb4
authored
May 31, 2023
by
Po-Yen, Chen
Browse files
Rename readfirstlane() to amd_wave_read_first_lane()
parent
ae8b307a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
include/ck/utility/readfirstlane.hpp
include/ck/utility/readfirstlane.hpp
+4
-4
No files found.
include/ck/utility/readfirstlane.hpp
View file @
e698fdb4
...
@@ -40,7 +40,7 @@ using get_unsigned_int_t = typename get_unsigned_int<Size>::type;
...
@@ -40,7 +40,7 @@ using get_unsigned_int_t = typename get_unsigned_int<Size>::type;
}
// namespace detail
}
// namespace detail
__device__
inline
int32_t
readfirstlane
(
int32_t
value
)
__device__
inline
int32_t
amd_wave_
read
_
first
_
lane
(
int32_t
value
)
{
{
return
__builtin_amdgcn_readfirstlane
(
value
);
return
__builtin_amdgcn_readfirstlane
(
value
);
}
}
...
@@ -48,7 +48,7 @@ __device__ inline int32_t readfirstlane(int32_t value)
...
@@ -48,7 +48,7 @@ __device__ inline int32_t readfirstlane(int32_t value)
template
<
template
<
typename
Object
,
typename
Object
,
typename
=
std
::
enable_if_t
<
std
::
is_class_v
<
Object
>
&&
std
::
is_trivially_copyable_v
<
Object
>>>
typename
=
std
::
enable_if_t
<
std
::
is_class_v
<
Object
>
&&
std
::
is_trivially_copyable_v
<
Object
>>>
__device__
auto
readfirstlane
(
const
Object
&
obj
)
__device__
auto
amd_wave_
read
_
first
_
lane
(
const
Object
&
obj
)
{
{
using
Size
=
unsigned
;
using
Size
=
unsigned
;
constexpr
Size
SgprSize
=
4
;
constexpr
Size
SgprSize
=
4
;
...
@@ -65,7 +65,7 @@ __device__ auto readfirstlane(const Object& obj)
...
@@ -65,7 +65,7 @@ __device__ auto readfirstlane(const Object& obj)
for
(
Size
offset
=
0
;
offset
<
CompleteSgprCopyBoundary
;
offset
+=
SgprSize
)
for
(
Size
offset
=
0
;
offset
<
CompleteSgprCopyBoundary
;
offset
+=
SgprSize
)
{
{
*
reinterpret_cast
<
Sgpr
*>
(
to_obj
+
offset
)
=
*
reinterpret_cast
<
Sgpr
*>
(
to_obj
+
offset
)
=
readfirstlane
(
*
reinterpret_cast
<
const
Sgpr
*>
(
from_obj
+
offset
));
amd_wave_
read
_
first
_
lane
(
*
reinterpret_cast
<
const
Sgpr
*>
(
from_obj
+
offset
));
}
}
if
constexpr
(
0
<
RemainedSize
)
if
constexpr
(
0
<
RemainedSize
)
...
@@ -73,7 +73,7 @@ __device__ auto readfirstlane(const Object& obj)
...
@@ -73,7 +73,7 @@ __device__ auto readfirstlane(const Object& obj)
using
Carrier
=
detail
::
get_unsigned_int_t
<
RemainedSize
>
;
using
Carrier
=
detail
::
get_unsigned_int_t
<
RemainedSize
>
;
*
reinterpret_cast
<
Carrier
>
(
to_obj
+
CompleteSgprCopyBoundary
)
=
*
reinterpret_cast
<
Carrier
>
(
to_obj
+
CompleteSgprCopyBoundary
)
=
readfirstlane
(
*
reinterpret_cast
<
const
Carrier
*>
(
from_obj
+
CompleteSgprCopyBoundary
));
amd_wave_
read
_
first
_
lane
(
*
reinterpret_cast
<
const
Carrier
*>
(
from_obj
+
CompleteSgprCopyBoundary
));
}
}
/// NOTE: Implicitly start object lifetime. It's better to use std::start_lifetime_at() in this
/// NOTE: Implicitly start object lifetime. It's better to use std::start_lifetime_at() in this
...
...
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