21 const std::unordered_set<BinaryEWOpCode, utility::hash_enum_class>
46 if (broadcasted_input_shape != dst.
GetShape()) {
48 "The broadcasted input shape {} does not match the output "
50 broadcasted_input_shape, dst.
GetShape());
56 #ifdef BUILD_SYCL_MODULE
62 #ifdef BUILD_CUDA_MODULE
63 BinaryEWCUDA(lhs, rhs, dst, op_code);
std::string ToString() const
Returns string representation of device, e.g. "CPU:0", "CUDA:0".
Device GetDevice() const override
SizeVector GetShape() const
void BinaryEWCPU(const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)
const std::unordered_set< BinaryEWOpCode, utility::hash_enum_class > s_boolean_binary_ew_op_codes
void BinaryEW(const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)
void BinaryEWSYCL(const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)
SizeVector BroadcastedShape(const SizeVector &l_shape, const SizeVector &r_shape)
Returns the broadcasted shape of two shapes.
Generic file read and write utility for python interface.