Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

error in function tohalf(float f) #90

Open
xingjinglu opened this issue Jun 10, 2019 · 0 comments
Open

error in function tohalf(float f) #90

xingjinglu opened this issue Jun 10, 2019 · 0 comments

Comments

@xingjinglu
Copy link

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;
}           
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant