/external/tensorflow/tensorflow/core/util/ |
bcast_test.cc | 16 #include "tensorflow/core/util/bcast.h" 26 string BCast(const tensorflow::BCast::Vec& x, const tensorflow::BCast::Vec& y, 28 tensorflow::BCast b(x, y, fewer_dims_optimization); 48 EXPECT_EQ("invalid", BCast({5, 3, 2}, {3}, use_optimization)); 49 EXPECT_EQ("invalid", BCast({5, 3, 2}, {2, 2}, use_optimization)); 50 EXPECT_EQ("invalid", BCast({5, 3, 2}, {10, 1, 1}, use_optimization)); 52 BCast({1, 2, 1, 2, 1, 2}, {2, 4, 2, 1, 2, 1}, use_optimization)); 58 EXPECT_EQ(BCast({11, 7, 5, 3, 2}, {11, 7, 5, 3, 2}) [all...] |
bcast.h | 28 // BCast is a helper for broadcasting binary tensor operation. 43 // BCast takes the shape of two tensors and computes a few vectors of 49 // BCast b(x.shape(), y.shape()); 69 class BCast { 85 BCast(const Vec& x, const Vec& y, const bool fewer_dims_optimization = true); 86 ~BCast() {} 106 static TensorShape ToShape(const BCast::Vec& vec); 110 const BCast::Vec& vec) { 130 TF_DISALLOW_COPY_AND_ASSIGN(BCast);
|
bcast.cc | 16 #include "tensorflow/core/util/bcast.h" 22 void BCast::Reverse(Vec* shape) { std::reverse(shape->begin(), shape->end()); } 24 BCast::BCast(const Vec& sx, const Vec& sy, const bool fewer_dims_optimization) { 158 BCast::Vec BCast::FromShape(const TensorShape& shape) { 160 BCast::Vec ret(N); 167 TensorShape BCast::ToShape(const BCast::Vec& vec) {
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
cwise_ops.h | 25 #include "tensorflow/core/util/bcast.h" 62 const gtl::ArraySlice<int64>& rhs_shape, const BCast& broadcast_helper, 74 const BCast& broadcast_helper);
|
cwise_ops.cc | 28 #include "tensorflow/core/util/bcast.h" 42 BCast bcast(BCast::FromShape(lhs_shape), BCast::FromShape(rhs_shape)); 43 if (!bcast.IsValid()) { 49 TensorShape bcast_shape = BCast::ToShape(bcast.output_shape()); 80 rhs_shape.dim_sizes(), bcast, extend_dimension); 92 const BCast& broadcast_helper) [all...] |
bcast_ops.cc | 25 #include "tensorflow/core/util/bcast.h" 41 gtl::InlinedVector<BCast::Vec, 2> shapes; 49 shapes.push_back(BCast::Vec(shape.begin(), shape.end())); 51 BCast bcast(shapes[0], shapes[1]); 52 OP_REQUIRES(ctx, bcast.IsValid(), 57 const int64 len = bcast.output_shape().size(); 60 output.flat<int32>()(i) = static_cast<int32>(bcast.output_shape()[i]); 90 gtl::InlinedVector<BCast::Vec, 4> shapes; 99 BCast::Vec vec [all...] |
binary_ops.cc | 42 const BCast& broadcast_helper, \ 70 const BCast& broadcast_helper) { 94 const BCast& broadcast_helper) {
|
/external/tensorflow/tensorflow/core/kernels/ |
betainc_op.cc | 30 #include "tensorflow/core/util/bcast.h" 83 auto merged_shape_vec = BCast::FromShape(merged_shape); 84 BCast a_shaper(BCast::FromShape(a_shape), merged_shape_vec); 85 BCast b_shaper(BCast::FromShape(b_shape), merged_shape_vec); 86 BCast x_shaper(BCast::FromShape(x_shape), merged_shape_vec); 97 functor.BCast(ctx->eigen_device<Device>(), a_value, \ 98 BCast::ToIndexArray<NDIM>(a_shaper.x_bcast()), b_value, [all...] |
substr_op.cc | 28 #include "tensorflow/core/util/bcast.h" 95 // Create BCast helper with shape of input and pos/len 96 BCast bcast(BCast::FromShape(input_shape), BCast::FromShape(pos_shape)); 97 OP_REQUIRES(context, bcast.IsValid(), 101 TensorShape output_shape = BCast::ToShape(bcast.result_shape()); 108 // Reshape tensors according to BCast result [all...] |
cwise_ops_common.cc | 58 bcast(BCast::FromShape(in0.shape()), BCast::FromShape(in1.shape())) { 59 if (!bcast.IsValid()) { 65 const TensorShape output_shape = BCast::ToShape(bcast.output_shape()); 72 ndims = static_cast<int>(bcast.x_reshape().size());
|
bcast_ops.cc | 20 #include "tensorflow/core/util/bcast.h" 34 gtl::InlinedVector<BCast::Vec, 4> shapes; 40 BCast::Vec vec; 46 BCast bcast(shapes[0], shapes[1]); 47 OP_REQUIRES(ctx, bcast.IsValid(), 51 Output(ctx, 0, bcast.output_shape()); 57 void Output(OpKernelContext* ctx, int idx, const BCast::Vec& v) { 83 gtl::InlinedVector<BCast::Vec, 4> shapes; 89 BCast::Vec vec [all...] |
sparse_dense_binary_op_shared.cc | 46 #include "tensorflow/core/util/bcast.h" 87 const auto lhs_dims = BCast::FromShape(TensorShape(shape_vec)); 88 const auto rhs_dims = BCast::FromShape(dense_t->shape()); 89 BCast b(lhs_dims, rhs_dims, false); // false for keeping the same num dims. 129 .broadcast(BCast::ToIndexArray<NDIM>(b.y_bcast())); \
|
cwise_ops_common.h | 35 #include "tensorflow/core/util/bcast.h" 51 // Sets up bcast with the shape of in0 and in1, ensures that the bcast 62 BCast bcast; member in struct:tensorflow::BinaryOpShared::BinaryOpState 94 BCast* bcast = &state.bcast; variable 122 functor::BinaryFunctor<Device, Functor, 2>().BCast( 123 eigen_device, out->shaped<Tout, 2>(bcast->result_shape()) [all...] |
betainc_op.h | 36 void BCast(const Device& d, typename TTypes<T, NDIM>::ConstTensor a,
|
quantized_mul_op.cc | 31 #include "tensorflow/core/util/bcast.h" 293 BCast bcast(BCast::FromShape(x.shape()), BCast::FromShape(y.shape())); 294 if (!bcast.IsValid()) { 302 0, BCast::ToShape(bcast.output_shape()), &z)); 317 const int ndims = bcast.x_reshape().size(); 356 LOG(INFO) << "bcast.x_reshape()= [all...] |
quantized_add_op.cc | 32 #include "tensorflow/core/util/bcast.h" 466 BCast bcast(BCast::FromShape(x.shape()), BCast::FromShape(y.shape())); 467 if (!bcast.IsValid()) { 475 0, BCast::ToShape(bcast.output_shape()), &z)); 499 const int ndims = bcast.x_reshape().size(); 548 LOG(INFO) << "bcast.x_reshape()= [all...] |
cwise_ops_gpu_common.cu.h | 78 void BCast(const GPUDevice& d,
|
cwise_ops_sycl_common.h | 81 void BCast(const SYCLDevice& d,
|
cwise_ops.h | 972 // TODO(zhifengc): makes BCast a template member function on NDIMS 974 void BCast(const Device& d, [all...] |
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
constant_folding.cc | 41 #include "tensorflow/core/util/bcast.h" 406 BCast::Vec* shape, int64* min_id) { 454 BCast::Vec shape1; 458 BCast::Vec shape2; 476 // Beware: the reduction dimensions computed by the BCast class are valid iff 506 BCast bcast(shape1, shape2); 507 if (!bcast.IsValid()) { 511 BCast::Vec reduce_dims[2]; 512 reduce_dims[0] = bcast.grad_x_reduce_idx() [all...] |
/external/clang/lib/CodeGen/ |
CGBuiltin.cpp | [all...] |