Skip to content

Instantly share code, notes, and snippets.

@yzhliu
Created December 10, 2019 00:09
Show Gist options
  • Save yzhliu/217e997157efcfc2a34e5c27b357fcaa to your computer and use it in GitHub Desktop.
Save yzhliu/217e997157efcfc2a34e5c27b357fcaa to your computer and use it in GitHub Desktop.
extern "C" __global__ void tvmop_kernel0( float* __restrict__ buffer, float* __restrict__ buffer1, float* __restrict__ buffer2, int tindex, int tindex1, int tindex2, int stride, int stride1, int stride2, int stride3, int stride4, int stride5, int stride6, int stride7, int stride8) {
if (((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) / tindex1) < tindex2) {
if (((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) % tindex1) < tindex1) {
if ((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) % tindex) < tindex) {
if ((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) < (tindex2 * tindex1)) {
if (((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) < ((tindex2 * tindex1) * tindex)) {
if (((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) / tindex1) < tindex2) {
if (0 <= ((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) % tindex1)) {
if (((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) % tindex1) < tindex1) {
if (0 <= (((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) % tindex)) {
if ((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) % tindex) < tindex) {
buffer[(((((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) / tindex1) * stride6) + (((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) % tindex1) * stride7)) + ((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) % tindex) * stride8))] = (buffer1[(((((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) / tindex1) * stride) + (((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) % tindex1) * stride1)) + ((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) % tindex) * stride2))] + buffer2[(((((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) / tindex1) * stride3) + (((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) / tindex) % tindex1) * stride4)) + ((((((int)blockIdx.x) * 64) + ((int)threadIdx.x)) % tindex) * stride5))]);
}
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment