Skip to content

Commit

Permalink
[OpenCL] Transpose to go through Eigen (tensorflow#10321)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Iwanski authored and benoitsteiner committed Jun 22, 2017
1 parent b0ecc7d commit af0cbac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions tensorflow/core/kernels/transpose_functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ template <typename Device, typename T, int NDIMS>
void TransposeUsingEigen(const Device& d, const Tensor& in,
const gtl::ArraySlice<int32> perm, Tensor* out);


#ifdef TENSORFLOW_USE_SYCL
// For SYCL lets always go through Eigen
template <typename Device, typename T>
void TransposeSYCL(const Device& d, const Tensor& in,
const gtl::ArraySlice<int32> perm, Tensor* out);
#endif // TENSORFLOW_USE_SYCL
} // namespace internal

template <typename Device, typename T>
Expand Down
5 changes: 1 addition & 4 deletions tensorflow/core/kernels/transpose_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,7 @@ Status TransposeSyclOp::DoTranspose(OpKernelContext* ctx, const Tensor& in,
.TypeConstraint<int32>("Tperm") \
.HostMemory("perm"), \
TransposeSyclOp);
REGISTER(float);
REGISTER(bool);
REGISTER(int32);
TF_CALL_POD_TYPES(REGISTER);
#undef REGISTER
#endif

} // namespace tensorflow

0 comments on commit af0cbac

Please sign in to comment.