提交 5f249a3e 编写于 作者: A Alexander Alekhin

Merge pull request #21356 from alalek:core_ocl_option_to_abort_on_kernel_build_error

......@@ -278,7 +278,7 @@ __kernel void CeluForward(const int n, __global T* in, __global T* out,
{
int index = get_global_id(0);
if(index < n)
out[index] = max(0.f, in[index]) + min(0.f, alpha * expm1(in[index] / alpha));
out[index] = max((T)0.f, in[index]) + (T)min(0.f, alpha * expm1(in[index] / alpha));
}
__kernel void HardSigmoidForward(const int n, __global T* in, __global T* out,
......@@ -287,7 +287,7 @@ __kernel void HardSigmoidForward(const int n, __global T* in, __global T* out,
{
int index = get_global_id(0);
if(index < n)
out[index] = max(0.f, min(1.f, alpha * in[index] + beta));
out[index] = max((T)0.f, (T)min(1.f, alpha * in[index] + beta));
}
__kernel void SeluForward(const int n, __global T* in, __global T* out,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册