提交 e1534625 编写于 作者: R Ray Liu 提交者: GitHub

Merge pull request #1110 from codeWorm2015/opencl

 update fusion conv
...@@ -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.
先完成此消息的编辑!
想要评论请 注册