add passthrough for int32->float32 (#2062)

This commit is contained in:
valarLip
2025-04-09 06:16:30 +08:00
committed by GitHub
parent 263ff689e0
commit 2c563fecf7

View File

@@ -357,6 +357,12 @@ struct PassThrough
y = type_convert<half_t>(x);
}
template <>
__host__ __device__ void operator()<float, int32_t>(float& y, const int32_t& x) const
{
y = type_convert<float>(x);
}
template <>
__host__ __device__ void operator()<bhalf_t, bhalf_t>(bhalf_t& y, const bhalf_t& x) const
{