openaccel-lab
aien-dev/openaccel-lab
Brought by drakestapleton
openaccel-lab / workloads / silu / kernel.cl
| 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | __kernel void silu(__global const float *x, __global float *y, const int n) |
| 3 | { |
| 4 | int i = get_global_id(0); |
| 5 | if (i < n) { |
| 6 | float v = x[i]; |
| 7 | y[i] = v / (1.0f + exp(-v)); |
| 8 | } |
| 9 | } |