提交 2a078c2c 编写于 作者: L liuruilong

update fusion conv

上级 f791a439
...@@ -12,11 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,11 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once;
#pragma OPENCL EXTENSION cl_khr_fp16 : enable #pragma OPENCL EXTENSION cl_khr_fp16 : enable
inline hafl4 activation(half4 in inline half4 activation(half4 in
#ifdef PRELU #ifdef PRELU
, ,
half4 prelu_alpha half4 prelu_alpha
...@@ -28,7 +26,7 @@ inline hafl4 activation(half4 in ...@@ -28,7 +26,7 @@ inline hafl4 activation(half4 in
#endif #endif
#ifdef RELU #ifdef RELU
fmax(in, 0.0); output = fmax(in, (half4)(0.0f));
#endif #endif
return output; return output;
} }
...@@ -12,10 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,10 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
#define BIASE #define BIASE
#define BATCH_NORM #define BATCH_NORM
#define RELU
#include "cl_kernel/cl_common.h"
__kernel void conv_3x3(__private const int global_size_dim0, __kernel void conv_3x3(__private const int global_size_dim0,
__private const int global_size_dim1, __private const int global_size_dim1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册