Skip to content

Commit 2c563fe

Browse files
authored
add passthrough for int32->float32 (#2062)
1 parent 263ff68 commit 2c563fe

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

include/ck/tensor_operation/gpu/element/unary_element_wise_operation.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ struct PassThrough
357357
y = type_convert<half_t>(x);
358358
}
359359

360+
template <>
361+
__host__ __device__ void operator()<float, int32_t>(float& y, const int32_t& x) const
362+
{
363+
y = type_convert<float>(x);
364+
}
365+
360366
template <>
361367
__host__ __device__ void operator()<bhalf_t, bhalf_t>(bhalf_t& y, const bhalf_t& x) const
362368
{

0 commit comments

Comments
 (0)