32 if (std::find(float_only_ops.begin(), float_only_ops.end(), op_code) !=
33 float_only_ops.end() &&
42 if (src_device != dst_device) {
47 if (src_device.
IsCPU()) {
49 }
else if (src_device.
IsSYCL()) {
50 #ifdef BUILD_SYCL_MODULE
55 }
else if (src_device.
IsCUDA()) {
56 #ifdef BUILD_CUDA_MODULE
57 UnaryEWCUDA(src, dst, op_code);
80 if (src_device.
IsCPU() && dst_device.
IsCPU()) {
82 }
else if ((src_device.
IsCPU() || src_device.
IsCUDA()) &&
84 #ifdef BUILD_CUDA_MODULE
89 }
else if ((src_device.
IsCPU() || src_device.
IsSYCL()) &&
91 #ifdef BUILD_SYCL_MODULE
bool IsCUDA() const
Returns true iff device type is CUDA.
bool IsCPU() const
Returns true iff device type is CPU.
std::string ToString() const
Returns string representation of device, e.g. "CPU:0", "CUDA:0".
bool IsSYCL() const
Returns true iff device type is SYCL GPU.
std::string ToString() const
Device GetDevice() const override
SizeVector GetShape() const
void UnaryEWCPU(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
void Copy(const Tensor &src, Tensor &dst)
void UnaryEWSYCL(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
void UnaryEW(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
void CopySYCL(const Tensor &src, Tensor &dst)
void CopyCPU(const Tensor &src, Tensor &dst)
bool CanBeBrocastedToShape(const SizeVector &src_shape, const SizeVector &dst_shape)
Returns true if src_shape can be brocasted to dst_shape.
Generic file read and write utility for python interface.