Home
last modified time | relevance | path

Searched refs:Array2D (Results 1 – 25 of 63) sorted by relevance

123

/external/tensorflow/tensorflow/compiler/xla/tests/
Ddot_operation_test.cc145 auto lhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(0, 2)); in XLA_TYPED_TEST()
146 auto rhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(2, 0)); in XLA_TYPED_TEST()
149 this->template ComputeAndCompareR2<T>(&builder, Array2D<T>(0, 0), {}, in XLA_TYPED_TEST()
156 auto lhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(0, 2)); in XLA_TYPED_TEST()
161 this->template ComputeAndCompareR2<T>(&builder, Array2D<T>(0, 3), {}, in XLA_TYPED_TEST()
170 auto rhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(2, 0)); in XLA_TYPED_TEST()
173 this->template ComputeAndCompareR2<T>(&builder, Array2D<T>(3, 0), {}, in XLA_TYPED_TEST()
180 auto lhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(2, 0)); in XLA_TYPED_TEST()
181 auto rhs = ConstantR2FromArray2D<T>(&builder, Array2D<T>(0, 2)); in XLA_TYPED_TEST()
185 &builder, Array2D<T>(2, 2, static_cast<T>(0.0f)), {}, this->error_spec_); in XLA_TYPED_TEST()
[all …]
Dtriangular_solve_test.cc41 Array2D<float> AValsLower() { in AValsLower()
48 Array2D<float> AValsUpper() { in AValsUpper()
55 Array2D<float> AValsLowerUnitDiagonal() { in AValsLowerUnitDiagonal()
62 Array2D<float> AValsUpperUnitDiagonal() { in AValsUpperUnitDiagonal()
69 Array2D<float> BValsRight() { in BValsRight()
73 Array2D<float> BValsLeft() { in BValsLeft()
79 Array2D<complex64> AValsLowerComplex() { in AValsLowerComplex()
86 Array2D<complex64> AValsUpperComplex() { in AValsUpperComplex()
93 Array2D<complex64> BValsRightComplex() { in BValsRightComplex()
97 Array2D<complex64> BValsLeftComplex() { in BValsLeftComplex()
[all …]
Dselect_and_scatter_test.cc253 Array2D<int32> expected({{0, 0, 0, 0, 6, 0}, {0, 0, 2, 0, 0, 0}}); in XLA_TEST_F()
267 Array2D<float> expected( in XLA_TEST_F()
282 Array2D<int32> expected({{0, 0, 0, 0, 6, 0}, {0, 0, 2, 0, 0, 0}}); in XLA_TEST_F()
294 Array2D<int32> expected({{0, 0, 0, 0, 0}, {0, 0, 12, 0, 0}}); in XLA_TEST_F()
306 Array2D<int32> expected({{0, 0, 0, 0, 4}, {0, 2, 6, 0, 0}}); in XLA_TEST_F()
320 Array2D<int32> expected({{0, 0, 0, 0, 8}, {0, 5, 23, 0, 19}}); in XLA_TEST_F()
332 Array2D<float> expected( in XLA_TEST_F()
341 Array2D<float> pzo = {{7.0f, 2.0f, 5.0f, 3.0f, 10.0f, 2.0f}, in TEST_F()
345 Array2D<float> pzs = {{2.0f, 6.0f}, {3.0f, 1.0f}}; in TEST_F()
346 Array2D<float> pze = {{0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f}, in TEST_F()
[all …]
Dtranspose_test.cc41 auto lhs = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
44 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 0), {}, error_spec_); in XLA_TEST_F()
49 auto lhs = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 42)); in XLA_TEST_F()
52 ComputeAndCompareR2<float>(&builder, Array2D<float>(42, 0), {}, error_spec_); in XLA_TEST_F()
57 auto lhs = ConstantR2FromArray2D<float>(&builder, Array2D<float>(7, 0)); in XLA_TEST_F()
60 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 7), {}, error_spec_); in XLA_TEST_F()
71 Array2D<float> expected({{1.0f, 3.0f}, {2.0f, 4.0f}}); in TEST_F()
119 Array2D<float> input({{1.0f, 2.0f}, {3.0f, 4.0f}, {5.0f, 6.0f}}); in TEST_F()
120 Array2D<float> transposed({{1.0f, 3.0f, 5.0f}, {2.0f, 4.0f, 6.0f}}); in TEST_F()
128 const Array2D<float>& expected = transposes % 2 == 0 ? input : transposed; in TEST_F()
Dmatrix_ops_simple_test.cc135 std::unique_ptr<Array2D<T>> alhs = in TestImpl()
137 auto arhs = absl::make_unique<Array2D<T>>(rows, cols, static_cast<T>(1.0f)); in TestImpl()
144 Array2D<T> expected(rows, cols); in TestImpl()
188 Array2D<T> lhs({{1.0f, 2.0f}, {3.0f, 4.0f}}); in TestImpl()
189 Array2D<T> rhs({{10.0f, 11.0f}, {12.0f, 13.0f}}); in TestImpl()
218 Array2D<T> expected; in TestImpl()
222 expected = Array2D<T>({{47.0f, 52.0f}, {71.0f, 78.0f}}); in TestImpl()
224 expected = Array2D<T>({{35.0f, 39.0f}, {81.0f, 89.0f}}); in TestImpl()
229 expected = Array2D<T>({{56.0f, 61.0f}, {80.0f, 87.0f}}); in TestImpl()
231 expected = Array2D<T>({{44.0f, 48.0f}, {90.0f, 98.0f}}); in TestImpl()
Dconcat_test.cc143 auto a = ConstantR2FromArray2D(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
144 auto b = ConstantR2FromArray2D(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
147 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 0), {}, in XLA_TEST_F()
160 Array2D<float> expected({ in XLA_TEST_F()
175 Array2D<float> expected({ in XLA_TEST_F()
184 auto a = ConstantR2FromArray2D(&builder, Array2D<float>(2, 0)); in XLA_TEST_F()
199 Array2D<float> expected({ in XLA_TEST_F()
210 auto b = ConstantR2FromArray2D(&builder, Array2D<float>(0, 2)); in XLA_TEST_F()
224 Array2D<float> expected({ in XLA_TEST_F()
341 Array2D<float> lhs(1, 1024); in XLA_TEST_F()
[all …]
Dslice_test.cc82 auto original = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 0)); in XLA_TEST_F()
85 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 0), {}); in XLA_TEST_F()
90 auto original = ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 20)); in XLA_TEST_F()
93 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 5), {}); in XLA_TEST_F()
98 auto original = ConstantR2FromArray2D<float>(&builder, Array2D<float>(3, 0)); in XLA_TEST_F()
101 ComputeAndCompareR2<float>(&builder, Array2D<float>(2, 0), {}); in XLA_TEST_F()
105 Array2D<float> values(256, 256); in XLA_TEST_F()
116 Array2D<float> expected(128, 128); in XLA_TEST_F()
127 Array2D<float> values(1, 4096); in TEST_F()
134 Array2D<float> expected(1, 1024); in TEST_F()
[all …]
Dcholesky_test.cc43 Array2D<float> a_vals({ in XLA_TEST_F()
54 Array2D<float> expected({ in XLA_TEST_F()
69 Array2D<float> a_vals({ in XLA_TEST_F()
80 Array2D<float> expected({ in XLA_TEST_F()
94 Array2D<float> a_vals({ in XLA_TEST_F()
105 Array2D<float> expected({{4, 0, 0, 0}, // in XLA_TEST_F()
Dbroadcast_simple_test.cc73 Array2D<float>* r2_array, float start, in MakeR2Data()
117 Array2D<float> expected(2, 3, 2.25); in XLA_TEST_F()
129 Array2D<float> expected(2, 3, 2.25); in XLA_TEST_F()
137 Array2D<float> expected(2, 0); in XLA_TEST_F()
144 Array2D<float> expected(0, 2); in XLA_TEST_F()
152 Array2D<float> expected(2, 3);
166 Array2D<float> expected(2, 2);
179 Array2D<float> expected(2, 2);
228 Array2D<float> expected(3, 2);
243 Array2D<bool> x_vals(2, 1); in XLA_TEST_F()
[all …]
Dreshape_test.cc56 Array2D<float> input_array(1, 1); in XLA_TEST_P()
98 Array2D<float> input_array(1, 1); in XLA_TEST_P()
130 Array2D<float> input_array(0, 3); in XLA_TEST_P()
145 LiteralUtil::CreateR2FromArray2D<float>(Array2D<float>(0, 3)); in XLA_TEST_P()
157 Array2D<float> input_array(3, 0); in XLA_TEST_P()
227 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(0, 2)); in XLA_TEST_P()
275 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(0, 4)); in XLA_TEST_P()
305 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(6, 0)); in XLA_TEST_P()
325 auto expected_literal = LiteralUtil::CreateFromArray(Array2D<float>(24, 0)); in XLA_TEST_P()
350 auto input_literal = LiteralUtil::CreateFromArray(Array2D<float>(0, 6)); in XLA_TEST_P()
[all …]
Dclient_library_test_base.h152 const Array2D<NativeT>& expected,
156 const Array2D<NativeT>& expected,
241 std::unique_ptr<Array2D<NativeT>> CreatePseudorandomR2(const int rows,
256 std::unique_ptr<Array2D<float>> CreatePatternedMatrix(const int rows,
263 std::unique_ptr<Array2D<float>> CreatePatternedMatrixWithZeroPadding(
357 const Array2D<NativeT>& array_2d, int64 parameter_number,
469 XlaBuilder* builder, const Array2D<NativeT>& expected, in ComputeAndCompareR2()
479 XlaBuilder* builder, const Array2D<NativeT>& expected, in ComputeAndCompareR2()
578 const Array2D<NativeT>& array_2d, int64 parameter_number, in CreateR2Parameter()
616 std::unique_ptr<Array2D<NativeT>> ClientLibraryTestBase::CreatePseudorandomR2( in CreatePseudorandomR2()
[all …]
Dreduce_test.cc177 Array2D<uint8> input_data(rows, cols); in RunR2ToR1PredTest()
210 Array2D<float> input_data(rows, cols); in RunR2ToR0Test()
237 Array2D<float> input_data(rows, cols); in RunR2ToR1Test()
294 Array2D<NativeT> input_data(rows, cols); in RunVectorizedReduceTestForType()
448 Array2D<float> input_data(rows, cols); in XLA_TEST_F()
479 Array2D<float> input_data(rows, cols); in XLA_TEST_F()
588 Array2D<float> input(300, 250); in XLA_TEST_F()
603 Array2D<float> input(150, 130); in XLA_TEST_F()
617 Array2D<uint32> input({{1}, {2}}); in XLA_TEST_F()
629 Array2D<uint32> input({{1}, {2}}); in XLA_TEST_F()
[all …]
Dconstants_test.cc99 ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 2)); in TEST_F()
101 ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 2), {}, error_spec_); in TEST_F()
105 std::unique_ptr<Array2D<float>> constant = in TEST_F()
139 Array2D<float> pz({ in TEST_F()
Dpad_test.cc144 Array2D<float> input_xy({ in TEST_P()
273 Array2D<uint8> input_xy({ in XLA_TEST_F()
324 auto ones = absl::make_unique<Array2D<float>>(4, 4); in XLA_TEST_P()
345 auto operand = absl::make_unique<Array2D<float>>(in_rows, in_cols); in XLA_TEST_P()
370 auto operand = absl::make_unique<Array2D<float>>(in_rows, in_cols); in XLA_TEST_P()
397 auto operand = absl::make_unique<Array2D<float>>(in_rows, in_cols); in XLA_TEST_P()
425 auto operand = absl::make_unique<Array2D<float>>(in_rows, in_cols); in XLA_TEST_P()
/external/tensorflow/tensorflow/compiler/xla/
Darray2d_test.cc26 Array2D<int> empty; in TEST()
33 Array2D<int> uninit(2, 3); in TEST()
40 Array2D<int> fullof7(2, 3, 7); in TEST()
53 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
67 Array2D<Eigen::half> arr = {{1.0f, 2.0f, 3.0f}, {4.0f, 5.0f, 6.0f}}; in TEST()
81 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
91 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
102 Array2D<bool> arr = {{false, true, false}, {true, true, false}}; in TEST()
113 Array2D<int> fullof7(2, 3, 7); in TEST()
129 Array2D<int> arr = {{1, 2, 3}, {4, 5, 6}}; in TEST()
[all …]
Dreference_util.h43 static std::unique_ptr<Array2D<T>> TransposeArray2D( in TransposeArray2D()
44 const Array2D<T>& operand) { in TransposeArray2D()
46 absl::make_unique<Array2D<T>>(operand.width(), operand.height()); in TransposeArray2D()
57 static std::unique_ptr<Array2D<Eigen::half>> MatmulArray2D(
58 const Array2D<Eigen::half>& lhs, const Array2D<Eigen::half>& rhs);
59 static std::unique_ptr<Array2D<float>> MatmulArray2D(
60 const Array2D<float>& lhs, const Array2D<float>& rhs);
61 static std::unique_ptr<Array2D<double>> MatmulArray2D(
62 const Array2D<double>& lhs, const Array2D<double>& rhs);
65 static std::unique_ptr<Array2D<double>> Array2DF32ToF64(
[all …]
Darray2d.h39 class Array2D : public Array<T> {
41 Array2D() : Array<T>(std::vector<int64>{0, 0}) {} in Array2D() function
43 Array2D(const int64 n1, const int64 n2) in Array2D() function
46 Array2D(const int64 n1, const int64 n2, const T value) in Array2D() function
52 Array2D(std::initializer_list<std::initializer_list<T>> values) in Array2D() function
63 Array2D(std::initializer_list<std::initializer_list<T2>> values) in Array2D() function
66 Array2D(const Array2D<T>& other) : Array<T>(other) {} in Array2D() function
101 std::unique_ptr<Array2D<NativeT>> MakeLinspaceArray2D(double from, double to, in MakeLinspaceArray2D()
103 auto array = absl::make_unique<Array2D<NativeT>>(n1, n2); in MakeLinspaceArray2D()
Dreference_util_test.cc39 matrix_ = absl::make_unique<Array2D<float>>(rows_, cols_); in ReferenceUtilTest()
51 std::unique_ptr<Array2D<float>> matrix_;
62 Array2D<float> rhs({ in TEST_F()
243 input.FillWithYX(Array2D<float>({ in TEST_F()
252 weights.FillWithYX(Array2D<float>({ in TEST_F()
261 expected.FillWithYX(Array2D<float>({ in TEST_F()
278 input.FillWithYX(Array2D<float>({ in TEST_F()
287 weights.FillWithYX(Array2D<float>({ in TEST_F()
296 expected.FillWithYX(Array2D<float>({ in TEST_F()
419 Array2D<float> a({{1, 2}, {3, 4}}); in TEST_F()
[all …]
Dreference_util.cc35 /* static */ std::unique_ptr<Array2D<Eigen::half>> ReferenceUtil::MatmulArray2D( in MatmulArray2D()
36 const Array2D<Eigen::half>& lhs, const Array2D<Eigen::half>& rhs) { in MatmulArray2D()
40 /* static */ std::unique_ptr<Array2D<float>> ReferenceUtil::MatmulArray2D( in MatmulArray2D()
41 const Array2D<float>& lhs, const Array2D<float>& rhs) { in MatmulArray2D()
45 /* static */ std::unique_ptr<Array2D<double>> ReferenceUtil::MatmulArray2D( in MatmulArray2D()
46 const Array2D<double>& lhs, const Array2D<double>& rhs) { in MatmulArray2D()
50 /* static */ std::unique_ptr<Array2D<double>> ReferenceUtil::Array2DF32ToF64( in Array2DF32ToF64()
51 const Array2D<float>& input) { in Array2DF32ToF64()
53 absl::make_unique<Array2D<double>>(input.height(), input.width()); in Array2DF32ToF64()
202 /* static */ std::unique_ptr<Array2D<float>>
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dcpu_runtime_test.cc42 std::unique_ptr<Array2D<float>> MaybeTransposeArray2D(const Array2D<T>& array, in MaybeTransposeArray2D()
49 auto output = absl::make_unique<Array2D<float>>(output_height, output_width); in MaybeTransposeArray2D()
64 void CheckMatrixMultiply(const Array2D<float>& a, const Array2D<float>& b, in CheckMatrixMultiply()
65 const Array2D<float>& c) { in CheckMatrixMultiply()
77 std::unique_ptr<Array2D<float>> EigenMatrixMultiply(const Array2D<float>& a, in EigenMatrixMultiply()
78 const Array2D<float>& b, in EigenMatrixMultiply()
96 auto c_transpose = absl::make_unique<Array2D<float>>(n, m); in EigenMatrixMultiply()
189 std::unique_ptr<Array2D<float>> MKLMatrixMultiply(const Array2D<float>& a, in MKLMatrixMultiply()
190 const Array2D<float>& b, in MKLMatrixMultiply()
208 auto c_transpose = absl::make_unique<Array2D<float>>(n, m); in MKLMatrixMultiply()
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dquantize_test.cc45 Array2D<NativeT> GenerateLargeSizeInput(int num_columns, int num_rows) { in GenerateLargeSizeInput()
46 Array2D<NativeT> input(num_columns, num_rows); in GenerateLargeSizeInput()
54 Array2D<uint32> PackLargeInput(Array2D<NativeT> &input) { in PackLargeInput()
60 Array2D<uint32> pack_input(input.height(), padded_output_width); in PackLargeInput()
79 Array2D<bfloat16> GenerateLargeSizeMinCombinedOutput( in GenerateLargeSizeMinCombinedOutput()
80 Array2D<NativeT> &input, const QuantizedRange &range, in GenerateLargeSizeMinCombinedOutput()
98 Array2D<bfloat16> output(output_height, output_width, bfloat16(0.0)); in GenerateLargeSizeMinCombinedOutput()
216 const Array2D<bfloat16> expected = { in XLA_TEST_F()
239 const Array2D<bfloat16> expected = { in XLA_TEST_F()
265 const Array2D<bfloat16> expected = { in XLA_TEST_F()
[all …]
Dself_adjoint_eig_test.cc53 matrix2d_8x8_ = Array2D<float>{ in SetUp()
63 low_rank_4x4_ = Array2D<float>{ in SetUp()
126 Array2D<float> GenerateRandomSymmetricMatrix(int size) { in GenerateRandomSymmetricMatrix()
127 Array2D<float> result{size, size, 0.0}; in GenerateRandomSymmetricMatrix()
140 Array2D<float> matrix2d_8x8_;
141 Array2D<float> low_rank_4x4_;
142 Array2D<int> wrong_type_4x4_;
253 Array2D<float> a_val = GenerateRandomSymmetricMatrix(size); in XLA_TEST_F()
266 Array2D<float> a_val = GenerateRandomSymmetricMatrix(size); in XLA_TEST_F()
279 Array2D<float> a_val = GenerateRandomSymmetricMatrix(size); in XLA_TEST_F()
[all …]
Dsvd_test.cc125 Array2D<float> GenerateRandomMatrix(int xsize, int ysize) { in GenerateRandomMatrix()
126 Array2D<float> result{xsize, ysize, 0.0}; in GenerateRandomMatrix()
137 Array2D<float> simple_2d_4x4_ = Array2D<float>{ in XLA_TEST_F()
192 auto singular_values = Array2D<float>{ in XLA_TEST_F()
208 Array2D<float> a_val = GenerateRandomMatrix(512, 128); in XLA_TEST_F()
220 Array2D<float> a_val = GenerateRandomMatrix(128, 256); in XLA_TEST_F()
232 Array2D<float> a_val = GenerateRandomMatrix(256, 128); in XLA_TEST_F()
244 Array2D<float> a_val = GenerateRandomMatrix(128, 512); in XLA_TEST_F()
256 Array2D<float> a_val = GenerateRandomMatrix(512, 256); in XLA_TEST_F()
268 Array2D<float> a_val = GenerateRandomMatrix(512, 512); in XLA_TEST_F()
Dslicing_test.cc30 xla::Array2D<float> BValsRight() { in BValsRight()
34 xla::Array2D<float> BValsLeft() { in BValsLeft()
38 xla::Array2D<float> AValsFull() { in AValsFull()
97 xla::Array2D<float> expected( in XLA_TEST_F()
/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_evaluator.h155 static std::unique_ptr<Array2D<Eigen::half>> MatmulArray2D(
156 const Array2D<Eigen::half>& lhs, const Array2D<Eigen::half>& rhs);
157 static std::unique_ptr<Array2D<float>> MatmulArray2D(
158 const Array2D<float>& lhs, const Array2D<float>& rhs);
159 static std::unique_ptr<Array2D<double>> MatmulArray2D(
160 const Array2D<double>& lhs, const Array2D<double>& rhs);
353 std::unique_ptr<Array2D<float>> MatmulArray2D(const Array2D<float>& lhs,
354 const Array2D<float>& rhs);

123