/external/tensorflow/tensorflow/compiler/xla/service/ |
D | shape_inference.h | 47 static StatusOr<Shape> InferUnaryOpShape(HloOpcode opcode, 48 const Shape& shape); 49 static StatusOr<Shape> InferUnaryOpShape(HloOpcode opcode, 54 static StatusOr<Shape> InferBinaryOpShape( 55 HloOpcode opcode, const Shape& lhs, const Shape& rhs, 57 static StatusOr<Shape> InferBinaryOpShape(HloOpcode opcode, 63 static StatusOr<Shape> InferTernaryOpShape(HloOpcode opcode, const Shape& lhs, 64 const Shape& rhs, 65 const Shape& ehs); 66 static StatusOr<Shape> InferTernaryOpShape(HloOpcode opcode, [all …]
|
D | shape_inference.cc | 55 Status ExpectArray(const Shape& shape, absl::string_view op_type) { in ExpectArray() 64 absl::Span<const Shape* const> init_value_shapes, in VerifyReducerShape() 74 const Shape& accumulator_shape = reducer_shape.result(); in VerifyReducerShape() 75 std::vector<const Shape*> accumulator_subshapes; in VerifyReducerShape() 91 for (const Shape& element_shape : accumulator_shape.tuple_shapes()) { in VerifyReducerShape() 101 for (const Shape* element_shape : accumulator_subshapes) { in VerifyReducerShape() 132 const Shape input_element_shape = in VerifyReducerShape() 162 StatusOr<Shape> InferWindowOutputShape(const Shape& base_shape, in InferWindowOutputShape() 229 /* static */ StatusOr<Shape> ShapeInference::InferUnaryOpShape( in InferUnaryOpShape() 234 /* static */ StatusOr<Shape> ShapeInference::InferUnaryOpShape( in InferUnaryOpShape() [all …]
|
D | shape_inference_test.cc | 41 const Shape s32_ = ShapeUtil::MakeShape(S32, {}); 42 const Shape f16_ = ShapeUtil::MakeShape(F16, {}); 43 const Shape f32_ = ShapeUtil::MakeShape(F32, {}); 44 const Shape f64_ = ShapeUtil::MakeShape(F64, {}); 45 const Shape pred_ = ShapeUtil::MakeShape(PRED, {}); 49 const Shape vector_32_ = ShapeUtil::MakeShape(F32, {32}); 50 const Shape vector_64_ = ShapeUtil::MakeShape(F32, {64}); 51 const Shape matrix_32_48_ = ShapeUtil::MakeShape(F32, {32, 48}); 52 const Shape matrix_32_64_ = ShapeUtil::MakeShape(F32, {32, 64}); 53 const Shape matrix_64_48_ = ShapeUtil::MakeShape(F32, {64, 48}); [all …]
|
D | hlo_instructions.h | 63 HloDimensionsInstruction(HloOpcode opcode, const Shape& shape, in HloDimensionsInstruction() 103 explicit HloBatchNormInstruction(HloOpcode opcode, const Shape& shape, 125 const Shape& shape, HloInstruction* operand, HloInstruction* scale, 135 const Shape& shape, absl::Span<HloInstruction* const> new_operands, 142 const Shape& shape, HloInstruction* operand, HloInstruction* scale, 153 const Shape& shape, absl::Span<HloInstruction* const> new_operands, 160 const Shape& shape, HloInstruction* operand, HloInstruction* scale, 171 const Shape& shape, absl::Span<HloInstruction* const> new_operands, 177 explicit HloFftInstruction(const Shape& shape, HloInstruction* operand, 201 const Shape& shape, absl::Span<HloInstruction* const> new_operands, [all …]
|
D | optimize_input_output_buffer_alias_test.cc | 53 bool BuildAliasConfig(const Shape& input_shape, const Shape& output_shape) { in BuildAliasConfig() 65 Shape r1f32_; 66 Shape r2f32_; 67 Shape r3f32_; 68 Shape r4f32_; 73 Shape input = ShapeUtil::MakeTupleShape({r1f32_, r2f32_}); in TEST_F() 74 Shape output = ShapeUtil::MakeTupleShape({r3f32_, r4f32_}); in TEST_F() 82 Shape input = ShapeUtil::MakeTupleShape({r1f32_, r2f32_, r3f32_, r4f32_}); in TEST_F() 83 Shape output = ShapeUtil::MakeTupleShape({r1f32_, r2f32_, r3f32_, r4f32_}); in TEST_F() 97 Shape input = ShapeUtil::MakeTupleShape({r1f32_, r1f32_, r2f32_, r2f32_}); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/lite/kernels/shim/ |
D | shape_test.cc | 24 TEST(Shape, Eq) { in TEST() argument 25 EXPECT_TRUE(Shape({1, 2}) == Shape({1, 2})); in TEST() 27 EXPECT_TRUE(Shape(std::vector<int>{}) == Shape(std::vector<int>{})); in TEST() 29 EXPECT_TRUE(Shape({1}) == Shape({1})); in TEST() 31 EXPECT_FALSE(Shape({1, 2, 1}) == Shape({1, 2})); in TEST() 33 EXPECT_FALSE(Shape({1, 3}) == Shape({1, 2})); in TEST() 35 EXPECT_FALSE(Shape({3, -1, 2}) == Shape({3, -1, 2})); in TEST() 37 EXPECT_FALSE(Shape() == Shape()); in TEST() 39 EXPECT_FALSE(Shape({3, 4}) == Shape()); in TEST() 41 EXPECT_FALSE(Shape(std::vector<int>{}) == Shape({1})); in TEST() [all …]
|
D | shape.h | 30 class Shape { 34 Shape() = default; 35 Shape(const Shape& o) = default; 36 Shape(Shape&& o) = default; 37 Shape& operator=(const Shape& o) = default; 38 Shape& operator=(Shape&& o) = default; 41 Shape(const std::initializer_list<int>& o) : value_(o), has_value_(true) {} in Shape() function 43 explicit Shape(Args&&... args) // forward ctor args to that of std::vector in Shape() function 45 explicit Shape(const absl::Span<int> value) in Shape() function 75 bool operator==(const Shape& rhs) const; [all …]
|
/external/tensorflow/tensorflow/compiler/xla/ |
D | shape_util.h | 99 IndexedShape(ShapeIndex index, Shape shape) in IndexedShape() 102 Shape shape; 108 static int64_t ElementsIn(const Shape& shape); 111 static int64_t ElementsInRecursive(const Shape& shape); 114 static bool HasPrimitiveType(const Shape& shape, 118 static bool IsZeroElementArray(const Shape& shape); 125 static int64_t ByteSizeOf(const Shape& shape, int64_t pointer_size = -1); 135 static int64_t ByteSizeOfTupleIndexTable(const Shape& shape, 143 static int64_t ByteSizeOfElements(const Shape& shape); 147 static std::string HumanString(const Shape& shape); [all …]
|
D | shape_util.cc | 99 StatusOr<Shape> MakeShapeWithLayoutInternal( in MakeShapeWithLayoutInternal() 114 TF_ASSIGN_OR_RETURN(Shape shape, in MakeShapeWithLayoutInternal() 140 Shape MakeTupleShapeImpl(absl::Span<ShapePtrOrRef> shapes) { in MakeTupleShapeImpl() 141 Shape result; in MakeTupleShapeImpl() 153 /* static */ bool ShapeUtil::Equal(const Shape& lhs, const Shape& rhs) { in Equal() 154 bool equal = Shape::Equal()(lhs, rhs); in Equal() 164 /* static */ bool ShapeUtil::EqualIgnoringElementType(const Shape& lhs, in EqualIgnoringElementType() 165 const Shape& rhs) { in EqualIgnoringElementType() 166 bool equal = Shape::Equal().IgnoreElementType()(lhs, rhs); in EqualIgnoringElementType() 175 /* static */ bool ShapeUtil::EqualIgnoringFpPrecision(const Shape& lhs, in EqualIgnoringFpPrecision() [all …]
|
D | layout_util.h | 57 static Layout GetDefaultLayoutForShape(const Shape& shape); 66 static void SetToDefaultLayout(Shape* shape); 70 static Shape GetWithDefaultLayout(const Shape& shape); 79 static Status ValidateLayoutInShape(const Shape& shape, 85 const Shape& shape); 89 static void ClearLayout(Shape* shape); 95 static void ClearTiles(Shape* shape); 99 static bool IsDenseArray(const Shape& shape); 103 static bool IsSparseArray(const Shape& shape); 107 static bool IsCOOArray(const Shape& shape); [all …]
|
D | shape.h | 35 class Shape { 37 Shape() = default; 40 explicit Shape(const ShapeProto& shape_proto); 42 Shape(PrimitiveType element_type, absl::Span<const int64_t> dimensions, in Shape() function 44 std::vector<Shape> tuple_shapes) in Shape() 145 const Shape& tuple_shapes(int index) const { return tuple_shapes_.at(index); } in tuple_shapes() 146 Shape* mutable_tuple_shapes(int index) { return &tuple_shapes_.at(index); } in mutable_tuple_shapes() 147 Shape* add_tuple_shapes() { in add_tuple_shapes() 148 tuple_shapes_.push_back(Shape()); in add_tuple_shapes() 152 const std::vector<Shape>& tuple_shapes() const { return tuple_shapes_; } in tuple_shapes() [all …]
|
D | layout_util_test.cc | 29 Shape MakeShapeWithLayout( in MakeShapeWithLayout() 33 Shape shape = ShapeUtil::MakeShape(element_type, dimensions); 41 Shape shape = in TEST_F() 43 Shape other_shape = in TEST_F() 46 Shape tuple0 = ShapeUtil::MakeTupleShape({}); in TEST_F() 47 Shape tuple1 = ShapeUtil::MakeTupleShape({shape}); in TEST_F() 48 Shape tuple2 = ShapeUtil::MakeTupleShape({shape, shape}); in TEST_F() 60 Shape other_tuple2 = ShapeUtil::MakeTupleShape({shape, other_shape}); in TEST_F() 67 Shape src = MakeShapeWithLayout(F32, {2, 3}, {0, 1}); in TEST_F() 68 Shape dst = MakeShapeWithLayout(F32, {2, 3}, {1, 0}); in TEST_F() [all …]
|
D | shape_util_test.cc | 38 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3}); in TEST() 49 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3}); in TEST() 54 Shape shape = ShapeUtil::MakeShape(F32, {3}); in TEST() 59 Shape shape = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() 65 Shape shape = ShapeUtil::MakeShape(F32, {3, 2, 7}); in TEST() 72 Shape shape = ShapeUtil::MakeShape(F32, {3, 2, 7, 8}); in TEST() 80 Shape shape1 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() 81 Shape shape2 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() 121 Shape shape_1 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() 127 Shape shape_2 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() [all …]
|
/external/gemmlowp/test/ |
D | benchmark_meta_gemm.cc | 64 struct Shape { struct 73 Shape(std::int32_t n, std::int32_t m, std::int32_t k) in Shape() argument 104 double run_gemms(std::vector<Shape>* shapes) { in run_gemms() argument 159 void time_all(std::vector<Shape>* shapes, std::int32_t repetitions, in time_all() 179 void time_one(Shape* shape, double max_time) { in time_one() 204 std::vector<Shape> googlenet_gemms; in main() 205 googlenet_gemms.push_back(Shape(12544, 64, 147)); in main() 206 googlenet_gemms.push_back(Shape(3136, 64, 64)); in main() 207 googlenet_gemms.push_back(Shape(3136, 192, 576)); in main() 208 googlenet_gemms.push_back(Shape(784, 64, 192)); in main() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/gpu/ |
D | cublas_pad_for_gemms_test.cc | 59 op::Shape("f16[2048, 33708]"), in TEST_F() 61 op::Shape("f16[2048, 33712]"), in TEST_F() 62 op::Dot(AllOf(op::Shape("f16[2048, 1024]"), in TEST_F() 63 op::Pad(AllOf(op::Shape("f16[2048, 1024]"), in TEST_F() 65 AllOf(op::Shape("f16[]"), op::Constant()))), in TEST_F() 66 AllOf(op::Shape("f16[1024, 33712]"), in TEST_F() 67 op::Pad(AllOf(op::Shape("f16[1024, 33708]"), in TEST_F() 69 AllOf(op::Shape("f16[]"), op::Constant()))), in TEST_F() 95 op::Shape("s32[2047, 33707]"), in TEST_F() 97 op::Shape("s32[2048, 33708]"), in TEST_F() [all …]
|
D | all_reduce_blueconnect_test.cc | 72 auto bitcast = AllOf(op::Shape("f32[16]"), op::Bitcast(op::Parameter(0))); in TEST_F() 73 auto reduce_scatter = AllOf(op::Shape("f32[4]"), op::ReduceScatter(bitcast), in TEST_F() 75 auto all_reduce = AllOf(op::Shape("f32[4]"), op::AllReduce(reduce_scatter), in TEST_F() 77 auto all_gather = AllOf(op::Shape("f32[16]"), op::AllGather(all_reduce), in TEST_F() 80 AllOf(op::Shape("f32[4,4]"), op::Bitcast(all_gather))); in TEST_F() 111 auto bitcast0 = AllOf(op::Shape("f32[16]"), op::Bitcast(op::Parameter(0))); in TEST_F() 112 auto reduce_scatter0 = AllOf(op::Shape("f32[4]"), op::ReduceScatter(bitcast0), in TEST_F() 114 auto bitcast1 = AllOf(op::Shape("f32[4]"), op::Bitcast(reduce_scatter0)); in TEST_F() 115 auto reduce_scatter1 = AllOf(op::Shape("f32[2]"), op::ReduceScatter(bitcast1), in TEST_F() 117 auto all_reduce = AllOf(op::Shape("f32[2]"), op::AllReduce(reduce_scatter1), in TEST_F() [all …]
|
/external/tensorflow/tensorflow/java/src/test/java/org/tensorflow/ |
D | ShapeTest.java | 31 assertEquals(-1, Shape.unknown().numDimensions()); in unknown() 32 assertEquals("<unknown>", Shape.unknown().toString()); in unknown() 37 assertEquals(0, Shape.scalar().numDimensions()); in scalar() 38 assertEquals("[]", Shape.scalar().toString()); in scalar() 43 Shape s = Shape.make(2); in make() 48 s = Shape.make(2, 3); in make() 54 s = Shape.make(-1, 2, 3); in make() 84 assertEquals(Shape.scalar(), Shape.scalar()); in equalsWorksCorrectly() 85 assertEquals(Shape.make(1, 2, 3), Shape.make(1, 2, 3)); in equalsWorksCorrectly() 87 assertNotEquals(Shape.make(1, 2), null); in equalsWorksCorrectly() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Coroutines/ |
D | CoroSplit.cpp | 97 coro::Shape &Shape; member in __anon8874ecf00111::CoroCloner 109 CoroCloner(Function &OrigF, const Twine &Suffix, coro::Shape &Shape, in CoroCloner() argument 111 : OrigF(OrigF), NewF(nullptr), Suffix(Suffix), Shape(Shape), in CoroCloner() 113 assert(Shape.ABI == coro::ABI::Switch); in CoroCloner() 117 CoroCloner(Function &OrigF, const Twine &Suffix, coro::Shape &Shape, in CoroCloner() argument 119 : OrigF(OrigF), NewF(NewF), Suffix(Suffix), Shape(Shape), in CoroCloner() 122 assert(Shape.ABI == coro::ABI::Retcon || in CoroCloner() 123 Shape.ABI == coro::ABI::RetconOnce); in CoroCloner() 162 const coro::Shape &Shape, Value *FramePtr, in maybeFreeRetconStorage() argument 164 assert(Shape.ABI == coro::ABI::Retcon || in maybeFreeRetconStorage() [all …]
|
/external/tensorflow/tensorflow/lite/toco/ |
D | tooling_util_test.cc | 32 Shape left; 33 Shape right; 40 {Shape({3}), Shape({3}), Agreement::kBroadcast}, in CreateShapePairs() 41 {Shape({256, 256, 3}), Shape({256, 256, 3}), Agreement::kBroadcast}, in CreateShapePairs() 42 {Shape({256, 256, 3}), Shape({3}), Agreement::kBroadcast}, in CreateShapePairs() 43 {Shape({8, 1, 6, 1}), Shape({7, 1, 5}), Agreement::kBroadcast}, in CreateShapePairs() 44 {Shape({}), Shape({3}), Agreement::kBroadcast}, in CreateShapePairs() 45 {Shape({}), Shape({3, 1}), Agreement::kBroadcast}, in CreateShapePairs() 48 {Shape({3}), Shape({3}), Agreement::kExtend}, in CreateShapePairs() 49 {Shape({256, 256, 3}), Shape({256, 256, 3}), Agreement::kExtend}, in CreateShapePairs() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/spmd/ |
D | spmd_partitioner_test.cc | 114 op::Shape("s32[2,3]"))); in TEST_F() 138 op::Shape("s32[2,3]"))); in TEST_F() 157 op::Shape("s32[2,3]")))); in TEST_F() 183 op::Shape("s32[1,3]"))); in TEST_F() 202 op::Broadcast(), AllOf(op::Constant(), op::Shape("s32[1,3]")), in TEST_F() 205 op::Shape("s32[2,3]"))))); in TEST_F() 224 op::Broadcast(), AllOf(op::Constant(), op::Shape("s32[1,3]")), in TEST_F() 227 op::Shape("s32[2,3]")))))); in TEST_F() 246 op::Reshape(op::Parameter()), op::Shape("s32[4,2,1]")))))), in TEST_F() 247 op::Shape("s32[8,1]"))); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/xla/ir/ |
D | mlir_hlo_builder.h | 109 StatusOr<const Shape*> GetShapePtr(XlaOp op) const override; 121 const Shape& shape, XlaOp lhs, XlaOp rhs, const Window& window, 130 StatusOr<XlaOp> FftInternal(const Shape& shape, XlaOp operand, 135 const Shape& shape, XlaOp a, XlaOp b, 138 StatusOr<XlaOp> CholeskyInternal(const Shape& shape, XlaOp a, 143 const XlaComputation* computation, const Shape& shape, 145 std::optional<absl::Span<const Shape>> operand_shapes_with_layout, 154 const Shape& shape, absl::Span<const XlaOp> all_operands, 158 StatusOr<XlaOp> ReduceWindowInternal(const Shape& shape, XlaOp operand, 163 XlaOp Iota(const Shape& shape, int64_t iota_dimension) override; [all …]
|
/external/tensorflow/tensorflow/cc/gradients/ |
D | array_grad_test.cc | 59 xs.push_back(Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape))); in TEST_F() 60 xs.push_back(Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape))); in TEST_F() 69 xs.push_back(Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape))); in TEST_F() 70 xs.push_back(Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape))); in TEST_F() 78 auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape)); in TEST_F() 87 auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape)); in TEST_F() 96 auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(shape)); in TEST_F() 103 auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape)); in TEST_F() 113 auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape)); in TEST_F() 121 auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape)); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/core/framework/ |
D | tensor_shape.cc | 36 template <class Shape> 37 static void AppendTo(const TensorShapeBase<Shape>& s, in AppendTo() 56 template <class Shape> 57 bool TensorShapeBase<Shape>::IsValid() { in IsValid() 76 template <class Shape> 77 bool TensorShapeBase<Shape>::IsValid(const TensorShapeProto& proto) { in IsValid() 96 template <class Shape> 97 Status TensorShapeBase<Shape>::IsValidShape(const TensorShapeProto& proto) { in IsValidShape() 138 template <class Shape> 139 TensorShapeBase<Shape>::TensorShapeBase(const TensorShapeProto& proto) { in TensorShapeBase() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/ |
D | ir_array.h | 66 Index(llvm::Value* linear, const Shape& shape, llvm::IRBuilder<>* b); 73 const Shape& shape, llvm::IRBuilder<>* b); 77 Index(llvm::Value* linear, const Shape& shape, 85 Index(absl::Span<llvm::Value* const> multidim, const Shape& shape, 117 bool LinearValidOnShape(const Shape& a) const; 119 static bool ShapeIsCompatible(const Shape& a, const Shape& b); 121 bool ShapeIsCompatible(const Shape& a) const { in ShapeIsCompatible() 125 Shape AsShapeWithType(PrimitiveType element_type) const { in AsShapeWithType() 132 Index SourceIndexOfReshape(const Shape& output_shape, 133 const Shape& input_shape, [all …]
|
/external/skia/src/gpu/graphite/geom/ |
D | Shape.h | 28 class Shape { 35 Shape() {} in Shape() function 36 Shape(const Shape& shape) { *this = shape; } in Shape() function 37 Shape(Shape&&) = delete; 39 Shape(SkPoint p0, SkPoint p1) { this->setLine(p0, p1); } in Shape() function 40 Shape(SkV2 p0, SkV2 p1) { this->setLine(p0, p1); } in Shape() function 41 Shape(skvx::float2 p0, skvx::float2 p1) { this->setLine(p0, p1); } in Shape() function 42 explicit Shape(const Rect& rect) { this->setRect(rect); } in Shape() function 43 explicit Shape(const SkRect& rect) { this->setRect(rect); } in Shape() function 44 explicit Shape(const SkRRect& rrect) { this->setRRect(rrect); } in Shape() function [all …]
|