Home
last modified time | relevance | path

Searched refs:rhs_shape (Results 1 – 25 of 28) sorted by relevance

12

/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dxla_broadcast_helper_op.cc39 const TensorShape rhs_shape = context->InputShape(1); in Compile() local
41 const bool broadcast_lhs = lhs_shape.dims() < rhs_shape.dims(); in Compile()
42 const TensorShape* min_rank_shape = broadcast_lhs ? &lhs_shape : &rhs_shape; in Compile()
43 const TensorShape* max_rank_shape = broadcast_lhs ? &rhs_shape : &lhs_shape; in Compile()
51 lhs_shape.dims() == rhs_shape.dims() || lhs_shape.dims() == 0 || in Compile()
52 rhs_shape.dims() == 0, in Compile()
57 lhs_shape.DebugString(), " and ", rhs_shape.DebugString())); in Compile()
69 lhs_shape.DebugString(), " and ", rhs_shape.DebugString())); in Compile()
89 lhs_shape.DebugString(), " and ", rhs_shape.DebugString())); in Compile()
Dcwise_ops.cc35 const TensorShape rhs_shape = ctx->InputShape(1); in Compile() local
43 BCast bcast(BCast::FromShape(lhs_shape), BCast::FromShape(rhs_shape), in Compile()
48 rhs_shape.DebugString())); in Compile()
69 int max_rank = std::max(lhs_shape.dims(), rhs_shape.dims()); in Compile()
70 int min_rank = std::min(lhs_shape.dims(), rhs_shape.dims()); in Compile()
82 rhs_shape.dim_sizes(), bcast, extend_dimension); in Compile()
Dstrided_slice_op.cc262 const TensorShape rhs_shape = ctx->InputShape(4); in Compile() local
273 if (final_shape.num_elements() == 0 && rhs_shape.num_elements() == 0) { in Compile()
282 OP_REQUIRES(ctx, final_shape == rhs_shape, in Compile()
285 " does not match r-value shape ", rhs_shape.DebugString(), in Compile()
Dxla_dot_op.cc46 const TensorShape rhs_shape = context->InputShape(1); in Compile() local
Dcwise_ops.h61 const absl::Span<const int64>& rhs_shape, const BCast& broadcast_helper,
Dxla_conv_op.cc45 const TensorShape rhs_shape = context->InputShape(1); in Compile() local
Dbinary_ops.cc43 const absl::Span<const int64>& rhs_shape, \
49 (void)rhs_shape; \
/external/tensorflow/tensorflow/python/kernel_tests/
Dtridiagonal_solve_op_test.py297 def test_raises(diags_shape, rhs_shape): argument
298 self._assertRaises(_tf_ones(diags_shape), _tf_ones(rhs_shape), "compact")
307 def test_raises(diags_tuple_shapes, rhs_shape): argument
309 self._assertRaises(diagonals, _tf_ones(rhs_shape), "sequence")
320 def test_raises(diags_shape, rhs_shape): argument
321 self._assertRaises(_tf_ones(diags_shape), _tf_ones(rhs_shape), "matrix")
331 rhs_shape, argument
339 rhs = array_ops.placeholder(dtypes.float64, shape=rhs_shape)
348 rhs_shape=[None],
356 rhs_shape=[4],
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/
Ddot_decomposer.cc40 const Shape& rhs_shape = rhs->shape(); in DecomposeBatchDot() local
52 rhs_shape.dimensions(dnums.rhs_batch_dimensions(i))); in DecomposeBatchDot()
77 PrimitiveType rhs_type = rhs_shape.element_type(); in DecomposeBatchDot()
78 const int64 rhs_rows = rhs_shape.dimensions(num_batch_dims + 0); in DecomposeBatchDot()
79 const int64 rhs_cols = rhs_shape.dimensions(num_batch_dims + 1); in DecomposeBatchDot()
220 const auto& rhs_shape = original_dot->operand(1)->shape(); in CanonicalizeDot() local
221 const int64 rhs_rank = rhs_shape.rank(); in CanonicalizeDot()
230 rhs_contracting_size *= rhs_shape.dimensions(i); in CanonicalizeDot()
234 rhs_non_contracting_size *= rhs_shape.dimensions(i); in CanonicalizeDot()
253 rhs_shape), in CanonicalizeDot()
[all …]
Dshape_inference_test.cc405 Shape rhs_shape = ShapeUtil::MakeShape(F32, {2, 12, 11, 3}); in TEST_F() local
427 lhs_shape, rhs_shape, /*feature_group_count=*/1, /*batch_group_count=*/1, in TEST_F()
450 Shape rhs_shape = ShapeUtil::MakeShape(F32, {2, 12, 11, 3}); in TEST_F() local
473 lhs_shape, rhs_shape, /*feature_group_count=*/1, /*batch_group_count=*/1, in TEST_F()
496 Shape rhs_shape = ShapeUtil::MakeShape(F32, {2, 12, 11, 4}); in TEST_F() local
519 lhs_shape, rhs_shape, /*feature_group_count=*/1, /*batch_group_count=*/1, in TEST_F()
530 Shape rhs_shape = ShapeUtil::MakeShape(F32, {12, 11, 3, 2}); in TEST_F() local
558 lhs_shape, rhs_shape, /*feature_group_count=*/1, /*batch_group_count=*/1, in TEST_F()
1050 Shape rhs_shape = ShapeUtil::MakeShape(F32, {5, 2, 3, 14}); in TEST_F() local
1063 ShapeInference::InferDotOpShape(lhs_shape, rhs_shape, dot_dnums); in TEST_F()
[all …]
Dhlo_evaluator_typed_visitor.h1015 const Shape& rhs_shape = rhs->shape(); in HandleConvolution() local
1018 TF_CHECK_OK(ShapeUtil::ValidateShape(rhs_shape)); in HandleConvolution()
1020 CHECK(rhs_shape.IsArray()); in HandleConvolution()
1021 CHECK(ShapeUtil::SameElementType(lhs_shape, rhs_shape)); in HandleConvolution()
1032 const auto rhs_rank = rhs_shape.rank(); in HandleConvolution()
1039 lhs_shape, rhs_shape, conv->feature_group_count(), in HandleConvolution()
1051 window_dimension_sizes.push_back(ShapeUtil::GetDimension(rhs_shape, i)); in HandleConvolution()
1055 ShapeUtil::MakeShape(rhs_shape.element_type(), window_dimension_sizes); in HandleConvolution()
1058 DimensionVector rhs_dim_multipliers = MakeDimMultipliers(rhs_shape); in HandleConvolution()
1066 auto func = [&window_shape, &dnums, &lhs_shape, &rhs_shape, &window, in HandleConvolution()
[all …]
Dhlo_cost_analysis.cc440 const Shape& rhs_shape = rhs->shape(); in HandleConvolution() local
467 const int64 kernel_limit = rhs_shape.dimensions(kernel_spatial_dim); in HandleConvolution()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dcpu_layout_assignment_test.cc67 Shape rhs_shape = ShapeUtil::MakeShape(F32, {12, 24}); in TEST_F() local
72 HloInstruction::CreateConstant(Literal::CreateFromShape(rhs_shape))); in TEST_F()
102 Shape rhs_shape = ShapeUtil::MakeShape(F32, {12, 24}); in TEST_F() local
109 HloInstruction::CreateConstant(Literal::CreateFromShape(rhs_shape))); in TEST_F()
145 Shape rhs_shape = ShapeUtil::MakeShapeWithLayout(F32, {12, 24}, {0, 1}); in TEST_F() local
153 HloInstruction::CreateConstant(Literal::CreateFromShape(rhs_shape))); in TEST_F()
186 Shape rhs_shape = ShapeUtil::MakeShapeWithLayout(F32, {12, 24}, {0, 1}); in TEST_F() local
191 HloInstruction::CreateParameter(0, rhs_shape, "param0")); in TEST_F()
200 ShapeLayout(LayoutUtil::GetWithDefaultLayout(rhs_shape)); in TEST_F()
219 Shape rhs_shape = ShapeUtil::MakeShapeWithLayout(F32, {12, 24}, {0, 1}); in TEST_F() local
[all …]
Ddot_op_emitter.cc58 Shape rhs_shape; member
67 rhs_shape = instr.operand(1)->shape(); in DotInfo()
378 const Shape& rhs_shape = rhs_array_.GetShape(); in Emit() local
380 if (ShapeUtil::IsScalar(lhs_shape) || ShapeUtil::IsScalar(rhs_shape)) { in Emit()
383 ShapeUtil::IsScalar(rhs_shape)); in Emit()
410 const Shape& rhs_shape = rhs_array_.GetShape(); in EmitNaiveLlvmIrGemm() local
421 rhs_shape.dimensions(rhs_reduction_dimension)); in EmitNaiveLlvmIrGemm()
426 rhs_reduction_dimension == LayoutUtil::Minor(rhs_shape.layout(), 0); in EmitNaiveLlvmIrGemm()
461 llvm_ir::IrArray::Index rhs_index(rhs_multi_index, rhs_shape, in EmitNaiveLlvmIrGemm()
688 const Shape& rhs_shape = rhs_array_.GetShape(); in GetMatMultDims() local
[all …]
Ddot_op_emitter_internal.h39 Shape rhs_shape; member
46 rhs_shape = instr.operand(1)->shape(); in DotInfo()
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dir_emission_utils.cc47 bool AreValidGemmShapes(const Shape& lhs_shape, const Shape& rhs_shape, in AreValidGemmShapes() argument
59 IsRank2(rhs_shape, batch_dimensions_size) && in AreValidGemmShapes()
62 !ShapeUtil::IsZeroElementArray(rhs_shape); in AreValidGemmShapes()
68 const Shape& rhs_shape = dot.operand(1)->shape(); in DotImplementedAsGemm() local
73 if (AreValidGemmShapes(lhs_shape, rhs_shape, dot.shape(), in DotImplementedAsGemm()
79 rhs_shape.dimensions(dim_numbers.rhs_contracting_dimensions(0))); in DotImplementedAsGemm()
Dgpu_layout_assignment.cc102 Shape rhs_shape = instr->operand(1)->shape(); in AddBackendConstraintsToDnnConvCustomCall() local
114 filter_shape = &rhs_shape; in AddBackendConstraintsToDnnConvCustomCall()
119 filter_shape = &rhs_shape; in AddBackendConstraintsToDnnConvCustomCall()
125 output_shape = &rhs_shape; in AddBackendConstraintsToDnnConvCustomCall()
153 TF_RETURN_IF_ERROR(constraints->SetOperandLayout(rhs_shape, instr, 1)); in AddBackendConstraintsToDnnConvCustomCall()
Dcudnn_conv_runner.cc330 const auto& rhs_shape = conv->operand(1)->shape(); in GetCudnnConvParams() local
344 params.filter_shape = &rhs_shape; in GetCudnnConvParams()
352 params.filter_shape = &rhs_shape; in GetCudnnConvParams()
361 params.output_shape = &rhs_shape; in GetCudnnConvParams()
369 params.filter_shape = &rhs_shape; in GetCudnnConvParams()
Dir_emitter.cc475 const Shape& rhs_shape = rhs_instruction->shape(); in HandleDot() local
483 if (ShapeUtil::IsScalar(lhs_shape) && ShapeUtil::IsScalar(rhs_shape)) { in HandleDot()
508 !ShapeUtil::IsScalar(rhs_shape)); in HandleDot()
521 rhs_shape.dimensions(rhs_reduction_dimension)) in HandleDot()
525 << ") = " << rhs_shape.dimensions(rhs_reduction_dimension); in HandleDot()
Dgemm_thunk.h43 const Shape& lhs_shape, const Shape& rhs_shape,
Dgemm_thunk.cc296 const Shape& lhs_shape, const Shape& rhs_shape, in GemmThunk() argument
305 rhs_shape_(rhs_shape), in GemmThunk()
/external/tensorflow/tensorflow/core/kernels/
Dcwise_ops_test.cc146 TensorShape rhs_shape; in BiasAdd() local
147 rhs_shape = TensorShape({cols}); in BiasAdd()
148 Tensor rhs(type, rhs_shape); in BiasAdd()
247 TensorShape lhs_shape, rhs_shape; in BcastAdd() local
250 rhs_shape = TensorShape({rows, 1}); in BcastAdd()
253 rhs_shape = TensorShape({cols}); in BcastAdd()
256 rhs_shape = TensorShape({1, cols}); in BcastAdd()
259 rhs_shape = TensorShape({rows, 1}); in BcastAdd()
263 Tensor rhs(DT_FLOAT, rhs_shape); in BcastAdd()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dmatrix_ops_simple_test.cc198 Shape rhs_shape = in TestImpl() local
216 auto rhs_arg = Parameter(&builder, 1, rhs_shape, "rhs"); in TestImpl()
Dxla_hlo_profile_test.cc193 Shape rhs_shape = ShapeUtil::MakeShape(F32, {m, k}); in XLA_TEST_F() local
209 rhs_shape); in XLA_TEST_F()
/external/tensorflow/tensorflow/compiler/xla/client/
Dxla_builder.cc488 TF_ASSIGN_OR_RETURN(const Shape& rhs_shape, GetShape(rhs)); in BinaryOp()
491 binop, lhs_shape, rhs_shape, broadcast_dimensions)); in BinaryOp()
506 const int64 rhs_rank = rhs_shape.rank(); in BinaryOp()
514 const Shape& from_shape = should_broadcast_lhs ? lhs_shape : rhs_shape; in BinaryOp()
558 TF_ASSIGN_OR_RETURN(const Shape& rhs_shape, GetShape(rhs)); in TernaryOp()
562 rhs_shape, ehs_shape)); in TernaryOp()
573 if (!rhs_shape.IsTuple() && in TernaryOp()
574 !ShapeUtil::SameDimensions(shape, rhs_shape)) { in TernaryOp()
1029 TF_ASSIGN_OR_RETURN(const Shape& rhs_shape, GetShape(rhs)); in DotGeneral()
1031 if (ShapeUtil::IsScalar(lhs_shape) || ShapeUtil::IsScalar(rhs_shape)) { in DotGeneral()
[all …]

12