Permalink
Browse files

Making CUDA_AXIS_KERNEL_LOOP always defined, as recent tensorflow has…

… an incompatible definition
  • Loading branch information...
pmh47 committed Aug 17, 2018
1 parent e7d0b39 commit ae10f9f7e2b534d25013f91ae3b005d78a2fbe73
Showing with 2 additions and 4 deletions.
  1. +1 −2 csrc/rasterise_egl.cu
  2. +1 −2 csrc/rasterise_grad_egl.cu
View
@@ -5,11 +5,10 @@
#include <tensorflow/core/framework/tensor.h>
#include <tensorflow/core/util/cuda_kernel_helper.h>
#ifndef CUDA_AXIS_KERNEL_LOOP // i.e. for older versions of tensorflow
// If tensorflow is too old, this does not exist; if tensorflow is too new, it has an incompatible definition
#define CUDA_AXIS_KERNEL_LOOP(i, n, axis) \
for (int i = blockIdx.axis * blockDim.axis + threadIdx.axis; i < n.axis; \
i += blockDim.axis * gridDim.axis)
#endif
using namespace tensorflow;
@@ -7,11 +7,10 @@
#include "rasterise_grad_common.h"
#ifndef CUDA_AXIS_KERNEL_LOOP // i.e. for older versions of tensorflow
// If tensorflow is too old, this does not exist; if tensorflow is too new, it has an incompatible definition
#define CUDA_AXIS_KERNEL_LOOP(i, n, axis) \
for (int i = blockIdx.axis * blockDim.axis + threadIdx.axis; i < n.axis; \
i += blockDim.axis * gridDim.axis)
#endif
using namespace tensorflow;

0 comments on commit ae10f9f

Please sign in to comment.