Skip to content

Instantly share code, notes, and snippets.

@jacobkahn
Created October 28, 2020 01:12
Show Gist options
  • Save jacobkahn/628659c9d7adbfc7c713fb44b1afed4c to your computer and use it in GitHub Desktop.
Save jacobkahn/628659c9d7adbfc7c713fb44b1afed4c to your computer and use it in GitHub Desktop.
ArrayFire JIT kernel Generated from AF_JIT_KERNEL_TRACE=stderr ./test/cast_opencl --gtest_filter="*Test_JIT_DuplicateCastNoop"
__kernel void
KER9041217350160086296(
__global float *in0, dim_t iInfo0_offset,
__global float *out0,
KParam oInfo, uint groups_0, uint groups_1, uint num_odims)
{
uint groupId = get_group_id(1) * get_num_groups(0) + get_group_id(0);
uint threadId = get_local_id(0);
int idx = groupId * get_local_size(0) * get_local_size(1) + threadId;
if (idx >= oInfo.dims[3] * oInfo.strides[3]) return;
int idx0 = idx + iInfo0_offset;
float val0 = in0[idx0];
out0[idx] = val0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment