/external/tensorflow/tensorflow/python/ops/linalg/ |
D | linalg.py | 23 from tensorflow.python.ops.linalg import adjoint_registrations as _adjoint_registrations 24 from tensorflow.python.ops.linalg import cholesky_registrations as _cholesky_registrations 25 from tensorflow.python.ops.linalg import inverse_registrations as _inverse_registrations 26 from tensorflow.python.ops.linalg import linear_operator_algebra as _linear_operator_algebra 27 from tensorflow.python.ops.linalg import matmul_registrations as _matmul_registrations 28 from tensorflow.python.ops.linalg import solve_registrations as _solve_registrations 29 from tensorflow.python.ops.linalg.linalg_impl import * 30 from tensorflow.python.ops.linalg.linear_operator import * 31 from tensorflow.python.ops.linalg.linear_operator_block_diag import * 32 from tensorflow.python.ops.linalg.linear_operator_block_lower_triangular import * [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/linalg/ |
D | linear_operator_addition_test.py | 24 from tensorflow.python.ops.linalg import linalg as linalg_lib 25 from tensorflow.python.ops.linalg import linear_operator_addition 28 linalg = linalg_lib variable 60 op_a = linalg.LinearOperatorDiag([1., 1.]) 75 op_a = linalg.LinearOperatorDiag( 77 op_b = linalg.LinearOperatorDiag( 96 op1 = linalg.LinearOperatorDiag( 98 op2 = linalg.LinearOperatorDiag( 100 op3 = linalg.LinearOperatorDiag( 117 op1 = linalg.LinearOperatorDiag( [all …]
|
D | linear_operator_composition_test.py | 26 from tensorflow.python.ops.linalg import linalg as linalg_lib 27 from tensorflow.python.ops.linalg import linear_operator_test_util 30 linalg = linalg_lib variable 76 operator = linalg.LinearOperatorComposition( 77 [linalg.LinearOperatorFullMatrix(l) for l in lin_op_matrices], 93 operator = linalg.LinearOperatorComposition( 94 [linalg.LinearOperatorFullMatrix(matrix)], 106 operator_1 = linalg.LinearOperatorFullMatrix(matrix, is_non_singular=True) 107 operator_2 = linalg.LinearOperatorFullMatrix(matrix, is_non_singular=True) 109 operator = linalg.LinearOperatorComposition( [all …]
|
D | linear_operator_block_lower_triangular_test.py | 28 from tensorflow.python.ops.linalg import linalg as linalg_lib 29 from tensorflow.python.ops.linalg import linear_operator_block_lower_triangular as block_lower_tria… 30 from tensorflow.python.ops.linalg import linear_operator_test_util 31 from tensorflow.python.ops.linalg import linear_operator_util 34 linalg = linalg_lib variable 126 [[linalg.LinearOperatorFullMatrix( # pylint:disable=g-complex-comprehension 156 [[linalg.LinearOperatorFullMatrix(matrix)]], 167 [[linalg.LinearOperatorFullMatrix(matrix, is_non_singular=True)], 168 [linalg.LinearOperatorFullMatrix(matrix, is_non_singular=True), 169 linalg.LinearOperatorFullMatrix(matrix, is_non_singular=True)]], [all …]
|
D | linear_operator_adjoint_test.py | 26 from tensorflow.python.ops.linalg import linalg as linalg_lib 27 from tensorflow.python.ops.linalg import linear_operator_adjoint 28 from tensorflow.python.ops.linalg import linear_operator_test_util 31 linalg = linalg_lib variable 66 linalg.LinearOperatorFullMatrix( 70 linalg.LinearOperatorLowerTriangular(lin_op_matrix)) 72 return operator, linalg.adjoint(matrix) 77 operator = linalg.LinearOperatorFullMatrix( 90 operator = linalg.LinearOperatorFullMatrix(matrix) 103 operator = linalg.LinearOperatorFullMatrix( [all …]
|
D | linear_operator_kronecker_test.py | 27 from tensorflow.python.ops.linalg import linalg as linalg_lib 28 from tensorflow.python.ops.linalg import linear_operator_kronecker as kronecker 29 from tensorflow.python.ops.linalg import linear_operator_lower_triangular as lower_triangular 30 from tensorflow.python.ops.linalg import linear_operator_test_util 31 from tensorflow.python.ops.linalg import linear_operator_util 34 linalg = linalg_lib variable 125 [linalg.LinearOperatorFullMatrix( 146 [linalg.LinearOperatorFullMatrix(matrix), 147 linalg.LinearOperatorFullMatrix(matrix)], 159 operator_1 = linalg.LinearOperatorFullMatrix(matrix, is_non_singular=True) [all …]
|
D | linear_operator_block_diag_test.py | 27 from tensorflow.python.ops.linalg import linalg as linalg_lib 28 from tensorflow.python.ops.linalg import linear_operator_block_diag as block_diag 29 from tensorflow.python.ops.linalg import linear_operator_lower_triangular as lower_triangular 30 from tensorflow.python.ops.linalg import linear_operator_test_util 31 from tensorflow.python.ops.linalg import linear_operator_util 34 linalg = linalg_lib variable 111 [linalg.LinearOperatorFullMatrix( 139 [linalg.LinearOperatorFullMatrix(matrix)], 149 sub_operator = linalg.LinearOperatorFullMatrix(matrix) 180 linalg.LinearOperatorFullMatrix( [all …]
|
D | linear_operator_inversion_test.py | 24 from tensorflow.python.ops.linalg import linalg as linalg_lib 25 from tensorflow.python.ops.linalg import linear_operator_inversion 26 from tensorflow.python.ops.linalg import linear_operator_test_util 29 linalg = linalg_lib variable 64 linalg.LinearOperatorFullMatrix( 68 linalg.LinearOperatorLowerTriangular(lin_op_matrix)) 70 return operator, linalg.inv(matrix) 75 operator = linalg.LinearOperatorFullMatrix( 88 operator = linalg.LinearOperatorFullMatrix(matrix) 101 operator = linalg.LinearOperatorFullMatrix( [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/ |
D | lhlo-fuse-linalg.mlir | 1 // RUN: mlir-hlo-opt -lhlo-fuse-linalg %s -split-input-file | FileCheck %s --dump-input=always 2 // RUN: mlir-hlo-opt -lhlo-fuse-linalg=tile-sizes=2,3 %s -split-input-file | FileCheck %s -check-pr… 3 // RUN: mlir-hlo-opt -lhlo-fuse-linalg=use-parallel-loops %s -split-input-file | FileCheck %s -chec… 11 linalg.generic #pointwise_2d_trait 16 linalg.yield %out : f32 18 linalg.generic #pointwise_2d_trait 23 linalg.yield %out : f32 30 // CHECK-NOT: linalg.generic 34 // CHECK: linalg.generic 36 // CHECK: linalg.generic [all …]
|
D | hlo-legalize-to-linalg.mlir | 1 // RUN: mlir-hlo-opt %s -hlo-legalize-to-linalg -split-input-file | FILECHECK_OPTS="" FileCheck %s 7 // CHECK: linalg.generic 12 // CHECK: linalg.yield %[[RESULT]] 23 // CHECK: linalg.generic 35 // CHECK: linalg.generic 47 // CHECK: linalg.generic 59 // CHECK: linalg.generic 71 // CHECK: linalg.generic 83 // CHECK: linalg.generic 96 // CHECK: linalg.generic [all …]
|
D | lhlo-legalize-to-linalg.mlir | 1 // RUN: mlir-hlo-opt %s -lhlo-legalize-to-linalg -split-input-file | FILECHECK_OPTS="" FileCheck %s 11 // CHECK: linalg.generic 14 // CHECK-NEXT: linalg.yield %[[RESULT]] : f32 26 // CHECK: linalg.generic 29 // CHECK-NEXT: linalg.yield %[[RESULT]] : f32 41 // CHECK: linalg.generic 44 // CHECK-NEXT: linalg.yield %[[RESULT]] : f32 70 // CHECK: linalg.generic 77 // CHECK-NEXT: linalg.yield %[[RESULT]] : f32 88 // CHECK: linalg.generic [all …]
|
/external/llvm-project/mlir/include/mlir/Dialect/Linalg/ |
D | Passes.td | 14 def ConvertElementwiseToLinalg : FunctionPass<"convert-elementwise-to-linalg"> { 15 let summary = "Convert ElementwiseMappable ops to linalg"; 17 Convert ops with the `ElementwiseMappable` trait to linalg parallel loops. 22 let dependentDialects = ["linalg::LinalgDialect"]; 25 def LinalgFoldUnitExtentDims : FunctionPass<"linalg-fold-unit-extent-dims"> { 34 let dependentDialects = ["linalg::LinalgDialect"]; 37 def LinalgFusionOfTensorOps : Pass<"linalg-fusion-for-tensor-ops"> { 38 let summary = "Fuse operations on RankedTensorType in linalg dialect"; 40 let dependentDialects = ["linalg::LinalgDialect", "AffineDialect"]; 44 Pass<"linalg-fold-reshape-ops-by-linearization"> { [all …]
|
/external/llvm-project/mlir/test/Dialect/Linalg/ |
D | canonicalize.mlir | 12 %r0 = linalg.range %c0:%c8:%c1 : !linalg.range 14 // CHECK: linalg.slice {{.*}} : memref<16x16xf32>, !linalg.range, !linalg.range, memref<?x?xf32> 15 %4 = linalg.slice %3[%r0, %r0] : memref<?x?xf32>, !linalg.range, !linalg.range, memref<?x?xf32> 17 …// CHECK: linalg.matmul ins({{.*}}memref<16x16xf32>, memref<16x16xf32>) outs({{.*}}memref<16x16xf… 18 linalg.matmul ins(%3, %3: memref<?x?xf32>, memref<?x?xf32>) 27 %0 = linalg.tensor_reshape %arg0 32 %1 = linalg.tensor_reshape %0 41 // CHECK: linalg.tensor_reshape %{{.*}} [#[[$MAP0]], #[[$MAP1]]] 42 // CHECK-NOT: linalg.tensor_reshape 50 %0 = linalg.tensor_reshape %arg0 [affine_map<(d0, d1, d2) -> (d0, d1, d2)>] : [all …]
|
D | reshape_linearization_fusion.mlir | 1 // RUN: mlir-opt -split-input-file -linalg-fold-reshape-ops-by-linearization %s | FileCheck %s 12 %0 = linalg.tensor_reshape %arg0 [affine_map<(i, j, k, l) -> (i)>, 16 %1 = linalg.generic { 22 linalg.yield %1 : f32 28 // CHECK: linalg.generic 30 // CHECK-NOT: linalg.generic 43 %0 = linalg.generic { 49 linalg.yield %1 : f32 51 %1 = linalg.tensor_reshape %0 [affine_map<(i, j, k, l) -> (i)>, 58 // CHECK: linalg.generic [all …]
|
D | roundtrip.mlir | 7 // DISABLED: mlir-opt %s --convert-linalg-to-llvm -o=/dev/null 2>&1 10 %0 = linalg.range %arg0:%arg1:%arg2 : !linalg.range 14 // CHECK-NEXT: linalg.range %{{.*}} : %{{.*}} : %{{.*}} : !linalg.range 24 %2 = linalg.range %arg0:%arg1:%arg2 : !linalg.range 26 %4 = linalg.slice %3[%2, %2] : 28 !linalg.range, 29 !linalg.range, 31 %5 = linalg.slice %3[%2, %arg2] : memref<?x?xf32>, 32 !linalg.range, 35 %6 = linalg.slice %3[%arg2, %2] : memref<?x?xf32>, [all …]
|
D | sparse_invalid.mlir | 16 // expected-error@+1 {{'linalg.generic' op expected sparse annotations on tensors only}} 17 %0 = linalg.generic #trait_memref 21 linalg.yield %0 : f32 43 // expected-error@+1 {{'linalg.generic' op expected single output tensor}} 44 %0, %1 = linalg.generic #trait_two_out 48 linalg.yield %a, %0 : f32, f32 68 // expected-error@+1 {{'linalg.generic' op expects region #0 to have 0 or 1 blocks}} 69 %0 = linalg.generic #trait_two_blocks 74 linalg.yield %0 : f32 92 // expected-error@+1 {{'linalg.generic' op expected region with 1 block}} [all …]
|
D | drop-unit-extent-dims.mlir | 1 // RUN: mlir-opt %s -linalg-fold-unit-extent-dims -split-input-file | FileCheck %s 16 %0 = linalg.generic #trait 19 linalg.yield %arg1 : f32 31 // CHECK: linalg.tensor_reshape %{{.*}} [#[[$MAP0]], #[[$MAP1]]] 32 // CHECK: linalg.generic 35 // CHECK: linalg.tensor_reshape %{{.*}} [#[[$MAP4]], #[[$MAP5]], #[[$MAP6]]] 53 %0 = linalg.indexed_generic #trait 63 linalg.yield %6 : i32 68 // CHECK: linalg.indexed_generic 76 // CHECK: linalg.yield %[[T6]] : i32 [all …]
|
D | invalid.mlir | 14 …%0 = linalg.slice %arg0[%c0] : memref<?x?xf32, affine_map<(i, j)[off, M]->(off + M * i + j)>>, ind… 22 …%0 = linalg.slice %arg0[%c0, %c0] : memref<?x?xf32, affine_map<(i, j)[off, M]->(off + M * i + j)>>… 38 linalg.yield %arg0: memref<?xf32, affine_map<(i)[off]->(off + i)>> 45 linalg.generic { 55 linalg.generic { 60 linalg.yield 68 linalg.generic { 73 linalg.yield %i : i32 81 linalg.generic { 86 linalg.yield %f: f32 [all …]
|
D | fusion-tensor.mlir | 1 // RUN: mlir-opt %s -linalg-fusion-for-tensor-ops -split-input-file | FileCheck %s 9 …%0 = linalg.generic {indexing_maps = [#map0, #map0, #map0], iterator_types = ["parallel", "paralle… 13 linalg.yield %1 : f32 15 // CHECK: linalg.generic { 17 …%2 = linalg.generic {indexing_maps = [#map0, #map0, #map0], iterator_types = ["parallel", "paralle… 25 // CHECK-NOT: linalg.yield 27 // CHECK: linalg.yield 29 linalg.yield %3 : f32 44 …%0 = linalg.generic {indexing_maps = [#map0, #map1, #map0], iterator_types = ["parallel", "paralle… 48 linalg.yield %1 : f32 [all …]
|
/external/llvm-project/mlir/lib/Dialect/Linalg/Transforms/ |
D | Generalization.cpp | 33 static linalg::GenericOp createGenericOpFromNamedOp(linalg::LinalgOp namedOp, in createGenericOpFromNamedOp() 47 return builder.create<linalg::GenericOp>( in createGenericOpFromNamedOp() 66 LinalgGeneralizationPattern(MLIRContext *context, linalg::LinalgMarker marker, in LinalgGeneralizationPattern() 72 auto linalgOp = dyn_cast<linalg::LinalgOp>(rootOp.getOperation()); in matchAndRewrite() 79 linalg::GenericOp genericOp = pattern->createGenericOp(rootOp, rewriter); in matchAndRewrite() 89 linalg::LinalgMarker marker; 93 : public LinalgGeneralizationPattern<GeneralizeConvOp, linalg::ConvOp> { 96 linalg::GenericOp createGenericOp(linalg::ConvOp, OpBuilder &rewriter) const; 103 linalg::LinalgMarker marker, in LinalgNamedOpGeneralizationPattern() 110 auto linalgOp = dyn_cast<linalg::LinalgOp>(rootOp); in matchAndRewrite() [all …]
|
/external/llvm-project/mlir/test/lib/Transforms/ |
D | TestSparsification.cpp | 48 linalg::SparseParallelizationStrategy parallelOption() { in parallelOption() 51 return linalg::SparseParallelizationStrategy::kNone; in parallelOption() 53 return linalg::SparseParallelizationStrategy::kDenseOuterLoop; in parallelOption() 55 return linalg::SparseParallelizationStrategy::kAnyStorageOuterLoop; in parallelOption() 57 return linalg::SparseParallelizationStrategy::kDenseAnyLoop; in parallelOption() 59 return linalg::SparseParallelizationStrategy::kAnyStorageAnyLoop; in parallelOption() 64 linalg::SparseVectorizationStrategy vectorOption() { in vectorOption() 67 return linalg::SparseVectorizationStrategy::kNone; in vectorOption() 69 return linalg::SparseVectorizationStrategy::kDenseInnerLoop; in vectorOption() 71 return linalg::SparseVectorizationStrategy::kAnyStorageInnerLoop; in vectorOption() [all …]
|
/external/llvm-project/mlir/include/mlir/Dialect/Linalg/Transforms/ |
D | CodegenStrategy.h | 19 namespace linalg { 26 buildRewritePatterns(MLIRContext *context, linalg::LinalgMarker m) = 0; 27 linalg::LinalgMarker marker; 34 explicit Tile(linalg::LinalgTilingOptions options) : options(options) {} in Tile() 37 buildRewritePatterns(MLIRContext *context, linalg::LinalgMarker m) override { in buildRewritePatterns() 39 tilingPatterns.insert<linalg::LinalgTilingPattern<LinalgOpType>>( in buildRewritePatterns() 45 linalg::LinalgTilingOptions options; 52 explicit Promote(linalg::LinalgPromotionOptions options) : options(options) {} in Promote() 55 buildRewritePatterns(MLIRContext *context, linalg::LinalgMarker m) override { in buildRewritePatterns() 57 promotionPatterns.insert<linalg::LinalgPromotionPattern<LinalgOpType>>( in buildRewritePatterns() [all …]
|
/external/llvm-project/mlir/include/mlir/Dialect/Linalg/EDSC/ |
D | Intrinsics.h | 18 using linalg_copy = OperationBuilder<linalg::CopyOp>; 19 using linalg_dot = OperationBuilder<linalg::DotOp>; 20 using linalg_fill = OperationBuilder<linalg::FillOp>; 21 using linalg_matmul = OperationBuilder<linalg::MatmulOp>; 22 using linalg_matvec = OperationBuilder<linalg::MatvecOp>; 23 using linalg_vecmat = OperationBuilder<linalg::VecmatOp>; 24 using linalg_range = ValueBuilder<linalg::RangeOp>; 25 using linalg_reshape = ValueBuilder<linalg::ReshapeOp>; 26 using linalg_slice = ValueBuilder<linalg::SliceOp>; 27 using linalg_yield = OperationBuilder<linalg::YieldOp>;
|
/external/llvm-project/mlir/test/mlir-cpu-runner/ |
D | linalg_integration_test.mlir | 1 // RUN: mlir-opt %s -convert-linalg-to-std -convert-linalg-to-llvm \ 5 // RUN: mlir-opt %s -convert-linalg-to-loops -convert-linalg-to-std -convert-linalg-to-llvm \ 9 // RUN: mlir-opt %s -convert-linalg-to-std -convert-linalg-to-llvm \ 13 // RUN: mlir-opt %s -convert-linalg-to-loops -convert-linalg-to-std -convert-linalg-to-llvm \ 17 …mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,4" -linalg-promote-subviews -convert-linalg-to-loo… 21 // RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,4" -linalg-promote-subviews -convert-linalg… 33 linalg.fill(%V, %f) : memref<?xf32>, f32 37 // Test for linalg.dot. 54 linalg.dot ins(%A, %B : memref<?xf32>, memref<?xf32>) 65 // Test for linalg.matmul. [all …]
|
/external/llvm-project/mlir/test/Transforms/ |
D | copy-removal.mlir | 4 // All linalg copies except the linalg.copy(%1, %9) must be removed since the 20 // CHECK: linalg.copy({{.*}}, %[[PERCENT9:.*]]) 21 linalg.copy(%1, %9) : memref<?x?xf32>, memref<?x?xf32> 32 // CHECK-NOT: linalg.copy(%[[PERCENT7]], %{{.*}}) 35 linalg.copy(%7, %10) : memref<?x?xf32>, memref<?x?xf32> 45 // CHECK-NOT: linalg.copy(%[[PERCENT3]], %{{.*}}) 48 linalg.copy(%3, %6) : memref<?x?xf32>, memref<?x?xf32> 60 // CHECK-NOT: linalg.copy(%[[PERCENT3]], %{{.*}}) 63 linalg.copy(%3, %6) : memref<?x?xf32>, memref<?x?xf32> 78 linalg.copy(%ret, %temp) : memref<5xf32>, memref<5xf32> [all …]
|