Home
last modified time | relevance | path

Searched refs:BCast (Results 1 – 25 of 26) sorted by relevance

12

/external/tensorflow/tensorflow/core/util/
Dbcast_test.cc26 string BCast(const tensorflow::BCast::Vec& x, const tensorflow::BCast::Vec& y, in BCast() function
28 tensorflow::BCast b(x, y, fewer_dims_optimization); in BCast()
48 EXPECT_EQ("invalid", BCast({5, 3, 2}, {3}, use_optimization)); in TEST()
49 EXPECT_EQ("invalid", BCast({5, 3, 2}, {2, 2}, use_optimization)); in TEST()
50 EXPECT_EQ("invalid", BCast({5, 3, 2}, {10, 1, 1}, use_optimization)); in TEST()
52 BCast({1, 2, 1, 2, 1, 2}, {2, 4, 2, 1, 2, 1}, use_optimization)); in TEST()
58 EXPECT_EQ(BCast({11, 7, 5, 3, 2}, {11, 7, 5, 3, 2}), in TEST()
64 EXPECT_EQ(BCast({11, 7, 5, 3, 2}, {11, 7, 5, 3, 2}, false), in TEST()
73 EXPECT_EQ(BCast({11, 7, 0, 3, 2}, {11, 7, 0, 3, 2}), in TEST()
79 EXPECT_EQ(BCast({11, 7, 0, 3, 2}, {11, 7, 0, 3, 2}, false), in TEST()
[all …]
Dbcast.h69 class BCast {
85 BCast(const Vec& x, const Vec& y, const bool fewer_dims_optimization = true);
86 ~BCast() {} in ~BCast()
106 static TensorShape ToShape(const BCast::Vec& vec);
110 const BCast::Vec& vec) { in ToIndexArrayType()
119 const BCast::Vec& vec) { in ToIndexArray()
136 TF_DISALLOW_COPY_AND_ASSIGN(BCast);
Dbcast.cc22 void BCast::Reverse(Vec* shape) { std::reverse(shape->begin(), shape->end()); } in Reverse()
24 BCast::BCast(const Vec& sx, const Vec& sy, const bool fewer_dims_optimization) { in BCast() function in tensorflow::BCast
158 BCast::Vec BCast::FromShape(const TensorShape& shape) { in FromShape()
160 BCast::Vec ret(N); in FromShape()
167 TensorShape BCast::ToShape(const BCast::Vec& vec) { in ToShape()
/external/tensorflow/tensorflow/core/kernels/
Dbetainc_op.cc83 auto merged_shape_vec = BCast::FromShape(merged_shape); in Compute()
84 BCast a_shaper(BCast::FromShape(a_shape), merged_shape_vec); in Compute()
85 BCast b_shaper(BCast::FromShape(b_shape), merged_shape_vec); in Compute()
86 BCast x_shaper(BCast::FromShape(x_shape), merged_shape_vec); in Compute()
97 functor.BCast(ctx->eigen_device<Device>(), a_value, \ in Compute()
98 BCast::ToIndexArray<NDIM>(a_shaper.x_bcast()), b_value, \ in Compute()
99 BCast::ToIndexArray<NDIM>(b_shaper.x_bcast()), x_value, \ in Compute()
100 BCast::ToIndexArray<NDIM>(x_shaper.x_bcast()), \ in Compute()
136 void Betainc<GPUDevice, T, NDIM>::BCast( \
Dbcast_ops.cc34 gtl::InlinedVector<BCast::Vec, 4> shapes; in Compute()
40 BCast::Vec vec; in Compute()
46 BCast bcast(shapes[0], shapes[1]); in Compute()
57 void Output(OpKernelContext* ctx, int idx, const BCast::Vec& v) { in Output()
83 gtl::InlinedVector<BCast::Vec, 4> shapes; in Compute()
89 BCast::Vec vec; in Compute()
95 BCast bcast(shapes[0], shapes[1]); in Compute()
107 void Output(OpKernelContext* ctx, int idx, const BCast::Vec& v) { in Output()
Dxent_op.cc49 BCast bcast(BCast::FromShape(logits_in.shape()), in Compute()
50 BCast::FromShape(labels_in.shape())); in Compute()
57 shape_in = BCast::ToShape(bcast.output_shape()); in Compute()
90 BCast::ToIndexArray<2>(bcast.x_bcast()), in Compute()
91 BCast::ToIndexArray<2>(bcast.y_bcast()), in Compute()
Dsubstr_op.cc131 BCast bcast(BCast::FromShape(input_shape), BCast::FromShape(pos_shape)); in Compute()
136 TensorShape output_shape = BCast::ToShape(bcast.result_shape()); in Compute()
156 input.broadcast(BCast::ToIndexArray<1>(bcast.x_bcast())); in Compute()
166 pos_shaped.broadcast(BCast::ToIndexArray<1>(bcast.y_bcast())); in Compute()
176 len_shaped.broadcast(BCast::ToIndexArray<1>(bcast.y_bcast())); in Compute()
219 input.broadcast(BCast::ToIndexArray<2>(bcast.x_bcast())); in Compute()
229 pos_shaped.broadcast(BCast::ToIndexArray<2>(bcast.y_bcast())); in Compute()
239 len_shaped.broadcast(BCast::ToIndexArray<2>(bcast.y_bcast())); in Compute()
Dbroadcast_to_op.cc77 BCast bcast(BCast::FromShape(input_shape), BCast::FromShape(output_shape), in Compute()
107 const TensorShape& input_shape, const BCast& bcast) const; \
Dbroadcast_to_op.h51 const Tensor &input_tensor, const BCast &bcast) const { in ReshapeAndBCast()
59 BCast::ToIndexArrayType<int, NDIMS>(bcast.x_bcast())); in ReshapeAndBCast()
64 BCast::ToIndexArrayType<Eigen::DenseIndex, NDIMS>(bcast.x_bcast())); in ReshapeAndBCast()
74 const BCast &bcast) const { in operator()
Dcwise_ops_common.h64 BCast bcast;
96 BCast* bcast = &state.bcast; in Compute()
124 functor::BinaryFunctor<Device, Functor, 2>().BCast( in Compute()
127 BCast::ToIndexArray<2>(bcast->x_bcast()), in Compute()
129 BCast::ToIndexArray<2>(bcast->y_bcast()), error_ptr); in Compute()
131 functor::BinaryFunctor<Device, Functor, 3>().BCast( in Compute()
134 BCast::ToIndexArray<3>(bcast->x_bcast()), in Compute()
136 BCast::ToIndexArray<3>(bcast->y_bcast()), error_ptr); in Compute()
138 functor::BinaryFunctor<Device, Functor, 4>().BCast( in Compute()
141 BCast::ToIndexArray<4>(bcast->x_bcast()), in Compute()
[all …]
Dcwise_ops_common.cc58 bcast(BCast::FromShape(in0.shape()), BCast::FromShape(in1.shape())) { in BinaryOpState()
65 const TensorShape output_shape = BCast::ToShape(bcast.output_shape()); in BinaryOpState()
Dsparse_dense_binary_op_shared.cc84 const auto lhs_dims = BCast::FromShape(TensorShape(shape_vec)); in Compute()
85 const auto rhs_dims = BCast::FromShape(dense_t->shape()); in Compute()
86 BCast b(lhs_dims, rhs_dims, false); // false for keeping the same num dims. in Compute()
126 .broadcast(BCast::ToIndexArray<NDIM>(b.y_bcast())); \ in Compute()
Dquantized_mul_op.cc292 BCast bcast(BCast::FromShape(x.shape()), BCast::FromShape(y.shape())); in Compute()
301 0, BCast::ToShape(bcast.output_shape()), &z)); in Compute()
Dbetainc_op.h36 void BCast(const Device& d, typename TTypes<T, NDIM>::ConstTensor a, in BCast() function
Dquantized_add_op.cc465 BCast bcast(BCast::FromShape(x.shape()), BCast::FromShape(y.shape())); in Compute()
474 0, BCast::ToShape(bcast.output_shape()), &z)); in Compute()
Dcwise_ops_sycl_common.h81 void BCast(const SYCLDevice& d,
Dcwise_ops_gpu_common.cu.h78 void BCast(const GPUDevice& d,
Dcwise_ops.h1160 void BCast(const Device& d,
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dbcast_ops.cc42 absl::InlinedVector<BCast::Vec, 2> shapes; in Compile()
50 shapes.push_back(BCast::Vec(shape.begin(), shape.end())); in Compile()
52 BCast bcast(shapes[0], shapes[1]); in Compile()
91 absl::InlinedVector<BCast::Vec, 4> shapes; in Compile()
100 shapes.push_back(BCast::Vec(vec.begin(), vec.end())); in Compile()
102 BCast bcast(shapes[0], shapes[1]); in Compile()
112 void Output(XlaOpKernelContext* ctx, int idx, const BCast::Vec& v) { in Output()
Dcwise_ops.cc43 BCast bcast(BCast::FromShape(lhs_shape), BCast::FromShape(rhs_shape), in Compile()
51 TensorShape bcast_shape = BCast::ToShape(bcast.output_shape()); in Compile()
91 xla::XlaOp lhs, xla::XlaOp rhs, const BCast& broadcast_helper) { in Broadcast()
Dbinary_ops.cc44 const BCast& broadcast_helper, \
71 xla::XlaOp y, const BCast& broadcast_helper) { in DivNoNanImpl()
89 xla::XlaOp y, const BCast& broadcast_helper) { in MulNoNanImpl()
112 xla::XlaOp y, const BCast& broadcast_helper) { in FloorDivImpl()
132 const BCast& broadcast_helper) { in XlogyImpl()
141 const BCast& broadcast_helper) { in XdivyImpl()
153 xla::XlaOp y, const BCast& broadcast_helper) { in FloorModImpl()
Dcwise_ops.h61 const absl::Span<const int64>& rhs_shape, const BCast& broadcast_helper,
70 xla::XlaOp lhs, xla::XlaOp rhs, const BCast& broadcast_helper);
/external/tensorflow/tensorflow/core/grappler/utils/
Dsymbolic_shapes.cc23 BCast::Vec ShapeDims(const TensorShapeProto& shape) { in ShapeDims()
24 BCast::Vec dims; in ShapeDims()
99 BCast bcast(ShapeDims(left), ShapeDims(right), in ShapesBroadcastable()
115 BCast bcast(ShapeDims(left), ShapeDims(right), in ShapeAfterBroadcast()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dconstant_folding.cc509 BCast::Vec* shape, int64* min_id) { in ExtractShape()
565 BCast::Vec shape1; in MaterializeBroadcastGradientArgs()
569 BCast::Vec shape2; in MaterializeBroadcastGradientArgs()
617 BCast bcast(shape1, shape2); in MaterializeBroadcastGradientArgs()
622 BCast::Vec reduce_dims[2]; in MaterializeBroadcastGradientArgs()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/
DAMDGPULibCalls.cpp620 auto *BCast = B.CreatePointerCast(PtrArg, PtrTy); in fold_read_write_pipe() local
624 Args.push_back(BCast); in fold_read_write_pipe()

12