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
caa488a9
Commit
caa488a9
authored
Jul 06, 2022
by
Paul
Browse files
Format
parent
33716162
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
10 deletions
+25
-10
src/targets/gpu/kernels/include/migraphx/kernels/reduce.hpp
src/targets/gpu/kernels/include/migraphx/kernels/reduce.hpp
+25
-10
No files found.
src/targets/gpu/kernels/include/migraphx/kernels/reduce.hpp
View file @
caa488a9
...
...
@@ -79,16 +79,31 @@ __device__ void dpp_reduce(T& in, Op op)
#endif
// NOLINTNEXTLINE
#define MIGRAPHX_DPP_REDUCE(op, prefix) \
__device__ inline void dpp_reduce(double& x, op) { MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_f64); } \
__device__ inline void dpp_reduce(float& x, op) { MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_f32); } \
__device__ inline void dpp_reduce(half& x, op) { MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_f16); } \
__device__ inline void dpp_reduce(int32_t& x, op) \
{ \
MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_u32); \
} \
__device__ inline void dpp_reduce(uint32_t& x, op) { MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_u32); } \
__device__ inline void dpp_reduce(vec<half, 2>& x, op) { MIGRAPHX_DPP_REDUCE_ASM(x, v_pk_##prefix##_f16); }
#define MIGRAPHX_DPP_REDUCE(op, prefix) \
__device__ inline void dpp_reduce(double& x, op) \
{ \
MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_f64); \
} \
__device__ inline void dpp_reduce(float& x, op) \
{ \
MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_f32); \
} \
__device__ inline void dpp_reduce(half& x, op) \
{ \
MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_f16); \
} \
__device__ inline void dpp_reduce(int32_t& x, op) \
{ \
MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_u32); \
} \
__device__ inline void dpp_reduce(uint32_t& x, op) \
{ \
MIGRAPHX_DPP_REDUCE_ASM(x, v_##prefix##_u32); \
} \
__device__ inline void dpp_reduce(vec<half, 2>& x, op) \
{ \
MIGRAPHX_DPP_REDUCE_ASM(x, v_pk_##prefix##_f16); \
}
MIGRAPHX_DPP_REDUCE
(
op
::
sum
,
add
)
MIGRAPHX_DPP_REDUCE
(
op
::
max
,
max
)
...
...
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