[OpenCL] Transpose to go through Eigen (#10321)
This commit is contained in:
parent
b0ecc7d2c1
commit
af0cbace1d
@ -132,6 +132,13 @@ template <typename Device, typename T, int NDIMS>
|
|||||||
void TransposeUsingEigen(const Device& d, const Tensor& in,
|
void TransposeUsingEigen(const Device& d, const Tensor& in,
|
||||||
const gtl::ArraySlice<int32> perm, Tensor* out);
|
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
|
} // namespace internal
|
||||||
|
|
||||||
template <typename Device, typename T>
|
template <typename Device, typename T>
|
||||||
|
@ -233,10 +233,7 @@ Status TransposeSyclOp::DoTranspose(OpKernelContext* ctx, const Tensor& in,
|
|||||||
.TypeConstraint<int32>("Tperm") \
|
.TypeConstraint<int32>("Tperm") \
|
||||||
.HostMemory("perm"), \
|
.HostMemory("perm"), \
|
||||||
TransposeSyclOp);
|
TransposeSyclOp);
|
||||||
REGISTER(float);
|
TF_CALL_POD_TYPES(REGISTER);
|
||||||
REGISTER(bool);
|
|
||||||
REGISTER(int32);
|
|
||||||
#undef REGISTER
|
#undef REGISTER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace tensorflow
|
} // namespace tensorflow
|
||||||
|
Loading…
Reference in New Issue
Block a user