NVIDIA / nv-wavenet

Reference implementation of real-time autoregressive wavenet inference
BSD 3-Clause "New" or "Revised" License
735 stars 126 forks source link

error in function tohalf(float f) #90

Open xingjinglu opened 5 years ago

xingjinglu commented 5 years ago

In file matrix_math.cuh, the function toHalf(float f) does not convert the float value to half explicitly.

static __device__ __forceinline__ half toHalf(float f) {
    return f;  // It should be __float2half(f)
}

static __device__ __forceinline__ half toHalf(half f) {
    return __float2half(f);  // retrun f;
}