Home
last modified time | relevance | path

Searched refs:Shape (Results 1 – 25 of 489) sorted by relevance

12345678910>>...20

/external/tensorflow/tensorflow/compiler/xla/service/
Dshape_inference.h49 static StatusOr<Shape> InferUnaryOpShape(UnaryOperation operation,
50 const Shape& arg);
51 static StatusOr<Shape> InferUnaryOpShape(HloOpcode opcode,
56 static StatusOr<Shape> InferBinaryOpShape(
57 BinaryOperation operation, const Shape& lhs, const Shape& rhs,
59 static StatusOr<Shape> InferBinaryOpShape(HloOpcode opcode,
65 static StatusOr<Shape> InferTernaryOpShape(TernaryOperation operation,
66 const Shape& lhs, const Shape& rhs,
67 const Shape& ehs);
68 static StatusOr<Shape> InferTernaryOpShape(HloOpcode opcode,
[all …]
Dshape_inference.cc169 tensorflow::Status ExpectNotTupleOrOpaque(const Shape& shape, in ExpectNotTupleOrOpaque()
185 const Shape& init_value_shape, in VerifyReducerShape()
194 const Shape& accumulator_shape = reducer_shape.result(); in VerifyReducerShape()
222 const Shape& input_element_shape = in VerifyReducerShape()
247 StatusOr<Shape> InferWindowOutputShape(const Shape& base_shape, in InferWindowOutputShape()
303 /* static */ StatusOr<Shape> ShapeInference::InferUnaryOpShape( in InferUnaryOpShape()
313 /* static */ StatusOr<Shape> ShapeInference::InferUnaryOpShape( in InferUnaryOpShape()
314 UnaryOperation operation, const Shape& arg) { in InferUnaryOpShape()
388 /* static */ StatusOr<Shape> ShapeInference::InferConcatOpShape( in InferConcatOpShape()
389 tensorflow::gtl::ArraySlice<const Shape*> arg_shapes, in InferConcatOpShape()
[all …]
Dshape_inference_test.cc37 const Shape s32_ = ShapeUtil::MakeShape(S32, {});
38 const Shape f32_ = ShapeUtil::MakeShape(F32, {});
39 const Shape f64_ = ShapeUtil::MakeShape(F64, {});
40 const Shape pred_ = ShapeUtil::MakeShape(PRED, {});
44 const Shape vector_32_ = ShapeUtil::MakeShape(F32, {32});
45 const Shape vector_64_ = ShapeUtil::MakeShape(F32, {64});
46 const Shape matrix_32_48_ = ShapeUtil::MakeShape(F32, {32, 48});
47 const Shape matrix_32_64_ = ShapeUtil::MakeShape(F32, {32, 64});
48 const Shape matrix_64_48_ = ShapeUtil::MakeShape(F32, {64, 48});
51 const Shape s32matrix_64_64_ = ShapeUtil::MakeShape(S32, {64, 64});
[all …]
Dhlo_instruction.h199 const Shape& shape,
208 const Shape& shape, HloInstruction* operand, int64 index);
217 const Shape& shape, RandomDistribution distribution,
222 static std::unique_ptr<HloInstruction> CreateUnary(const Shape& shape,
228 static std::unique_ptr<HloInstruction> CreateBinary(const Shape& shape,
235 static std::unique_ptr<HloInstruction> CreateTernary(const Shape& shape,
244 const Shape& shape, HloOpcode opcode,
251 const Shape& shape, tensorflow::gtl::ArraySlice<HloInstruction*> operands,
258 const Shape& shape, HloInstruction* lhs, HloInstruction* rhs,
264 const Shape& shape, HloInstruction* operand, FftType fft_type,
[all …]
Ddot_decomposer.cc37 const Shape& lhs_shape = lhs->shape(); in DecomposeBatchDot()
38 const Shape& rhs_shape = rhs->shape(); in DecomposeBatchDot()
39 const Shape& dot_shape = dot->shape(); in DecomposeBatchDot()
67 Shape lhs_shape_r3 = in DecomposeBatchDot()
69 Shape lhs_slice_shape_r3 = in DecomposeBatchDot()
71 Shape lhs_slice_shape_r2 = in DecomposeBatchDot()
78 Shape rhs_shape_r3 = in DecomposeBatchDot()
80 Shape rhs_slice_shape_r3 = in DecomposeBatchDot()
82 Shape rhs_slice_shape_r2 = in DecomposeBatchDot()
89 Shape dot_shape_r2 = ShapeUtil::MakeShape(dot_type, {dot_rows, dot_cols}); in DecomposeBatchDot()
[all …]
Dlayout_assignment_test.cc67 Shape ashape = ShapeUtil::MakeShape(F32, {42, 12}); in TEST_F()
78 Shape shape(ashape); in TEST_F()
97 Shape ashape = ShapeUtil::MakeShape(F32, {42, 12}); in TEST_F()
108 Shape col_major_shape(ashape); in TEST_F()
113 Shape row_major_shape(ashape); in TEST_F()
140 Shape ashape = constant_literal1->shape(); in TEST_F()
160 Shape shape(ashape); in TEST_F()
245 Shape result_shape = in TEST_F()
280 Shape result_shape = nested_tuple->shape(); in TEST_F()
304 [](const Shape&, const Shape&) { return false; }) in TEST_F() argument
[all …]
Dhlo_element_type_converter.cc40 Shape shape = ShapeUtil::ChangeElementType(hlo->shape(), type); in ToElementType()
66 Shape GetConvertedTupleShape(const Shape& shape, PrimitiveType from_type, in GetConvertedTupleShape()
68 std::vector<Shape> new_tuple_subshapes; in GetConvertedTupleShape()
70 Shape subshape = ShapeUtil::GetTupleElementShape(shape, i); in GetConvertedTupleShape()
86 const Shape& to_shape) { in ConvertTupleElements()
87 const Shape& shape = hlo->shape(); in ConvertTupleElements()
91 const Shape& ele_shape = ShapeUtil::GetTupleElementShape(shape, i); in ConvertTupleElements()
94 const Shape& to_ele_shape = ShapeUtil::GetTupleElementShape(to_shape, i); in ConvertTupleElements()
179 Shape shape = in Run()
185 Shape old_shape = hlo->shape(); in Run()
[all …]
/external/tensorflow/tensorflow/compiler/xla/
Dshape_util.h155 static int64 ElementsIn(const Shape& shape);
158 static bool HasZeroElements(const Shape& shape);
167 static int64 ByteSizeOf(const Shape& shape, int64 pointer_size = -1);
177 static int64 ByteSizeOfTupleIndexTable(const Shape& shape,
188 static int64 ByteSizeOfElements(const Shape& shape);
193 static int64 ByteSizeOfSparseIndices(const Shape& shape);
197 static string HumanString(const Shape& shape);
198 static string HumanStringWithLayout(const Shape& shape);
207 static StatusOr<Shape> ParseShapeString(tensorflow::StringPiece s);
211 static bool SameDimensions(const Shape& lhs, const Shape& rhs);
[all …]
Dshape_util.cc72 bool CompareShapes(const Shape& lhs, const Shape& rhs, bool compare_layouts) { in CompareShapes()
76 [=](const Shape& l, const Shape& r) { in CompareShapes()
119 StatusOr<Shape> MakeShapeWithLayoutInternal( in MakeShapeWithLayoutInternal()
130 Shape shape = ShapeUtil::MakeShape(element_type, dimensions); in MakeShapeWithLayoutInternal()
145 /* static */ bool ShapeUtil::Equal(const Shape& lhs, const Shape& rhs) { in Equal()
155 /* static */ int64 ShapeUtil::Rank(const Shape& shape) { in Rank()
161 /* static */ int64 ShapeUtil::TrueRank(const Shape& shape) { in TrueRank()
173 std::initializer_list<Shape> parameters, Shape result) { in MakeProgramShape()
182 /* static */ Shape ShapeUtil::MakeShape( in MakeShape()
186 Shape result; in MakeShape()
[all …]
Dlayout_util.h44 static Layout GetDefaultLayoutForShape(const Shape& shape);
53 static void SetToDefaultLayout(Shape* shape);
57 static Shape GetWithDefaultLayout(const Shape& shape);
64 static tensorflow::Status ValidateLayoutInShape(const Shape& shape);
69 const Shape& shape);
73 static void ClearLayout(Shape* shape);
79 static bool IsDenseArray(const Shape& shape);
99 static bool IsPadded(const Shape& shape);
104 const Shape& shape);
108 static int64 PaddedDimension(const Shape& shape, int64 index);
[all …]
Dshape_util_test.cc32 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3}); in TEST()
43 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3}); in TEST()
48 Shape shape = ShapeUtil::MakeShape(F32, {3}); in TEST()
53 Shape shape = ShapeUtil::MakeShape(F32, {3, 2}); in TEST()
59 Shape shape = ShapeUtil::MakeShape(F32, {3, 2, 7}); in TEST()
66 Shape shape = ShapeUtil::MakeShape(F32, {3, 2, 7, 8}); in TEST()
75 TF_ASSERT_OK_AND_ASSIGN(Shape actual, in TEST()
77 Shape expected = ShapeUtil::MakeShape(F32, {123, 456}); in TEST()
85 TF_ASSERT_OK_AND_ASSIGN(Shape actual, in TEST()
87 Shape expected = in TEST()
[all …]
Dlayout_util_test.cc29 Shape MakeShapeWithLayout(PrimitiveType element_type, in MakeShapeWithLayout()
32 Shape shape = ShapeUtil::MakeShape(element_type, dimensions); in MakeShapeWithLayout()
37 Shape MakeShapeWithSparseLayout(PrimitiveType element_type, in MakeShapeWithSparseLayout()
40 Shape shape = ShapeUtil::MakeShape(element_type, dimensions); in MakeShapeWithSparseLayout()
47 Shape shape = in TEST_F()
49 Shape other_shape = in TEST_F()
52 Shape tuple0 = ShapeUtil::MakeTupleShape({}); in TEST_F()
53 Shape tuple1 = ShapeUtil::MakeTupleShape({shape}); in TEST_F()
54 Shape tuple2 = ShapeUtil::MakeTupleShape({shape, shape}); in TEST_F()
66 Shape other_tuple2 = ShapeUtil::MakeTupleShape({shape, other_shape}); in TEST_F()
[all …]
Dlayout_util.cc89 /* static */ Layout LayoutUtil::GetDefaultLayoutForShape(const Shape& shape) { in GetDefaultLayoutForShape()
111 /* static */ void LayoutUtil::SetToDefaultLayout(Shape* shape) { in SetToDefaultLayout()
129 /* static */ Shape LayoutUtil::GetWithDefaultLayout(const Shape& shape) { in GetWithDefaultLayout()
130 Shape copy(shape); in GetWithDefaultLayout()
143 const Shape& shape) { in ValidateLayoutInShape()
169 const Layout& layout, const Shape& shape) { in ValidateLayoutForShape()
230 /* static */ void LayoutUtil::ClearLayout(Shape* shape) { in ClearLayout()
244 /* static */ bool LayoutUtil::IsDenseArray(const Shape& shape) { in IsDenseArray()
265 /* static */ bool LayoutUtil::IsPadded(const Shape& shape) { in IsPadded()
281 const Shape& shape) { in PaddedDimensions()
[all …]
/external/gemmlowp/test/
Dbenchmark_meta_gemm.cc64 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/contrib/lite/toco/
Dtooling_util_test.cc29 Shape left;
30 Shape right;
37 {Shape({3}), Shape({3}), Agreement::kBroadcast}, in CreateShapePairs()
38 {Shape({256, 256, 3}), Shape({256, 256, 3}), Agreement::kBroadcast}, in CreateShapePairs()
39 {Shape({256, 256, 3}), Shape({3}), Agreement::kBroadcast}, in CreateShapePairs()
40 {Shape({8, 1, 6, 1}), Shape({7, 1, 5}), Agreement::kBroadcast}, in CreateShapePairs()
43 {Shape({3}), Shape({3}), Agreement::kExtend}, in CreateShapePairs()
44 {Shape({256, 256, 3}), Shape({256, 256, 3}), Agreement::kExtend}, in CreateShapePairs()
45 {Shape({1, 1, 3}), Shape({1, 1, 3}), Agreement::kExtend}, in CreateShapePairs()
46 {Shape({1, 1, 3}), Shape({3}), Agreement::kExtend}, in CreateShapePairs()
[all …]
Dtooling_util.h98 void ExtendShape(Shape* shape, int new_shape_size);
101 void UnextendShape(Shape* shape, int new_shape_size);
104 void CheckShapeDimensions(const Shape& shape);
113 bool ShapesAgreeUpToBroadcasting(const Shape& shape0, const Shape& shape1);
124 bool ShapesAgreeUpToExtending(const Shape& shape0, const Shape& shape1);
129 int RequiredBufferSizeForShape(const Shape& shape);
220 inline int Offset(const Shape& shape, const std::vector<int>& indices) {
233 inline std::vector<int> ReverseOffset(const Shape& shape, int index) {
257 string ShapeToString(const Shape& shape);
283 void ShuffleDims(const Shape& input_shape, AxesOrder input_axes_order,
[all …]
/external/tensorflow/tensorflow/java/src/test/java/org/tensorflow/
DShapeTest.java31 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/tensorflow/tensorflow/core/framework/
Dtensor_shape.cc35 template <class Shape>
36 static void AppendTo(const TensorShapeBase<Shape>& s, in AppendTo()
54 template <class Shape>
55 bool TensorShapeBase<Shape>::IsValid(const TensorShapeProto& proto) { in IsValid()
74 template <class Shape>
75 Status TensorShapeBase<Shape>::IsValidShape(const TensorShapeProto& proto) { in IsValidShape()
116 template <class Shape>
117 TensorShapeBase<Shape>::TensorShapeBase(const TensorShapeProto& proto) { in TensorShapeBase()
135 template <class Shape>
136 TensorShapeBase<Shape>::TensorShapeBase(gtl::ArraySlice<int64> dim_sizes) { in TensorShapeBase()
[all …]
/external/tensorflow/tensorflow/cc/gradients/
Darray_grad_test.cc59 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/go/
Dshape.go29 type Shape struct { struct
34 func ScalarShape() Shape {
35 return Shape{dims: make([]int64, 0)}
42 func MakeShape(shape ...int64) Shape {
45 return Shape{dims: cpy}
50 func (s Shape) NumDimensions() int { argument
61 func (s Shape) Size(dim int) int64 { argument
70 func (s Shape) IsFullySpecified() bool { argument
84 func (s Shape) ToSlice() ([]int64, error) { argument
93 func (s Shape) String() string { argument
/external/tensorflow/tensorflow/java/src/main/java/org/tensorflow/
DShape.java21 public final class Shape { class
24 public static Shape unknown() { in unknown()
25 return new Shape(null); in unknown()
29 public static Shape scalar() { in scalar()
30 return new Shape(new long[0]); in scalar()
54 public static Shape make(long firstDimensionSize, long... otherDimensionSizes) { in make()
58 return new Shape(shape); in make()
91 if (obj instanceof Shape && Arrays.equals(this.shape, ((Shape) obj).shape)) { in equals()
108 Shape(long[] shape) { in Shape() method in Shape
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dgpu_layout_assignment_test.cc37 Shape ashape = ShapeUtil::MakeShape(F32, {42, 12}); in TEST_F()
38 Shape ashape_in_row_major(ashape); in TEST_F()
39 Shape ashape_in_col_major(ashape); in TEST_F()
44 for (const Shape& lhs_shape_with_layout : in TEST_F()
46 for (const Shape& rhs_shape_with_layout : in TEST_F()
48 for (const Shape& result_shape_with_layout : in TEST_F()
86 std::vector<Shape> AllLayoutsOf(const Shape& s) { in AllLayoutsOf()
90 std::vector<Shape> shapes; in AllLayoutsOf()
107 Shape shape = ShapeUtil::MakeShape(F32, {42, 12, 1, 100}); in TEST_F()
112 Shape aux_shape = in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dcpu_layout_assignment.cc80 static Shape RowMajorShape(const Shape& old_shape) { in RowMajorShape()
81 Shape new_shape(old_shape); in RowMajorShape()
88 static Shape ColMajorShape(const Shape& old_shape) { in ColMajorShape()
89 Shape new_shape(old_shape); in ColMajorShape()
113 Shape output_shape(RowMajorShape(convolution->shape())); in AddBackendConstraints()
114 Shape input_shape(RowMajorShape(lhs_instruction->shape())); in AddBackendConstraints()
115 Shape filter_shape(RowMajorShape(rhs_instruction->shape())); in AddBackendConstraints()
136 Shape output_shape(RowMajorShape(dot->shape())); in AddBackendConstraints()
139 Shape lhs_shape(RowMajorShape(lhs_instruction->shape())); in AddBackendConstraints()
146 Shape rhs_shape(RowMajorShape(rhs_instruction->shape())); in AddBackendConstraints()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dir_array.h75 Index(llvm::Value* linear, const Shape& shape,
84 const Shape& shape, llvm::IRBuilder<>* ir_builder);
90 llvm::Value* linear, const Shape& shape);
113 bool LinearValidOnShape(const Shape& a) const;
117 Index SourceIndexOfReshape(const Shape& shape, const Shape& operand_shape,
125 Index SourceIndexOfSlice(const Shape& shape,
133 const Shape& shape, const Shape& operand_shape,
172 IrArray(llvm::Value* base_ptr, const Shape& shape);
183 const Shape& GetShape() const { in GetShape()
219 IrArray CastToShape(const Shape& new_shape,
[all …]
/external/tensorflow/tensorflow/compiler/xla/tests/
Dconvolution_test.cc64 Shape MakeShapeWrapper(tensorflow::gtl::ArraySlice<int64> dimensions);
67 Shape MakeShapeWrapper<float>(tensorflow::gtl::ArraySlice<int64> dimensions) { in MakeShapeWrapper()
72 Shape MakeShapeWrapper<Eigen::half>( in MakeShapeWrapper()
125 Shape input_shape = MakeShapeWrapper<T>({1, 1, 1, 2}); in RunTest()
126 Shape filter_shape = MakeShapeWrapper<T>({1, 1, 1, 2}); in RunTest()
156 Shape input_shape = MakeShapeWrapper<T>({1, 1, 4, 4}); in RunTest()
157 Shape filter_shape = MakeShapeWrapper<T>({1, 1, 2, 2}); in RunTest()
190 Shape input_shape = MakeShapeWrapper<T>({1, 1, 4, 4}); in RunTest()
191 Shape filter_shape = MakeShapeWrapper<T>({1, 1, 2, 2}); in RunTest()
226 Shape input_shape = MakeShapeWrapper<T>({1, 1, 4, 4}); in RunTest()
[all …]

12345678910>>...20