Skip to content

Commit

Permalink
fix gcc-7 / cuda10 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
soumith committed May 5, 2019
1 parent 85bc391 commit 1031028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cuda/lltm_cuda_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __device__ __forceinline__ scalar_t d_tanh(scalar_t z) {

template <typename scalar_t>
__device__ __forceinline__ scalar_t elu(scalar_t z, scalar_t alpha = 1.0) {
return fmax(0.0, z) + fmin(0.0, alpha * (exp(z) - 1.0));
return fmaxf(0.0, z) + fminf(0.0, alpha * (exp(z) - 1.0));
}

template <typename scalar_t>
Expand Down

0 comments on commit 1031028

Please sign in to comment.