Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 54 for permutation (0.12 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/tests/tfl_legalize_hlo.mlir

    // CHECK-LABEL: main
    // CHECK: return %arg0 : tensor<5x7xf32>
    }
    
    // - transpose
    //
    func.func @transpose_2d(%arg0: tensor<2x3xf32>) -> tensor<3x2xf32> {
      %0 = "mhlo.transpose"(%arg0) <{permutation = dense<[1, 0]> : tensor<2xi64>}> : (tensor<2x3xf32>) -> tensor<3x2xf32>
      func.return %0 : tensor<3x2xf32>
    
    // CHECK-LABEL:   transpose_2d
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 40.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

    Value Transpose(OpBuilder* builder, Value value_to_transpose,
                    SmallVector<int32_t, 4> perm, RankedTensorType original_type,
                    mlir::Location location) {
      // Create a constant op for transpose permutation.
      auto perm_op = CreateI32DenseConst(builder, perm, location);
    
      // Create tensor type for the transpose result.
      auto transpose_type = original_type;
      auto transpose_shape =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  3. src/io/pipe_test.go

    				t.Errorf("Write() = (%d, %v); want (%d, nil)", n, err, len(input))
    			}
    		}
    
    		// Since each read is independent, the only guarantee about the output
    		// is that it is a permutation of the input in readSized groups.
    		got := make([]byte, 0, count*len(input))
    		for i := 0; i < cap(c); i++ {
    			got = append(got, (<-c)...)
    		}
    		got = sortBytesInGroups(got, readSize)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

    struct FoldTransposeOp : public OpRewritePattern<TransposeOp> {
      explicit FoldTransposeOp(MLIRContext* context)
          : OpRewritePattern<TransposeOp>(context, 1) {}
    
      // Computes the permutation of a constant `input_tensor` according to `perm`.
      // The function recursively traverses the dimensions of the output tensor in
      // a row-major order and writes the value in the output tensor into
      // `new_values`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/issues_test.go

    	for i, src := range sources {
    		orig[i] = mustParse(src)
    	}
    
    	// run the test for all order permutations of the incoming files
    	for _, perm := range [][len(sources)]int{
    		{0, 1, 2},
    		{0, 2, 1},
    		{1, 0, 2},
    		{1, 2, 0},
    		{2, 0, 1},
    		{2, 1, 0},
    	} {
    		// create file order permutation
    		files := make([]*syntax.File, len(sources))
    		for i := range perm {
    			files[i] = orig[perm[i]]
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/tests/legalize-tf.mlir

      %permutation = "tf.Const"() {value = dense<[2, 1, 0]> : tensor<3xi32>} : () -> (tensor<3xi32>)
      // CHECK: "mhlo.transpose"
      %0 = "tf.Transpose"(%arg0, %permutation) : (tensor<1x2x3xf32>, tensor<3xi32>) -> tensor<3x2x1xf32>
      func.return %0 : tensor<3x2x1xf32>
    }
    
    // -----
    
    // CHECK-LABEL: @transpose_3d
    func.func @transpose_3d(%arg0: tensor<1x2x3xf32>) -> tensor<3x2x1xf32> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 06 18:46:23 UTC 2024
    - 335.5K bytes
    - Viewed (0)
  7. src/go/types/issues_test.go

    	for i, src := range sources {
    		orig[i] = mustParse(fset, src)
    	}
    
    	// run the test for all order permutations of the incoming files
    	for _, perm := range [][len(sources)]int{
    		{0, 1, 2},
    		{0, 2, 1},
    		{1, 0, 2},
    		{1, 2, 0},
    		{2, 0, 1},
    		{2, 1, 0},
    	} {
    		// create file order permutation
    		files := make([]*ast.File, len(sources))
    		for i := range perm {
    			files[i] = orig[perm[i]]
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

        // Create a 1D I32 tensor for representing the dimension permutation.
        auto permuation_tensor_type =
            RankedTensorType::get({input_rank}, rewriter.getIntegerType(32));
        llvm::SmallVector<Attribute, 4> permute;
        permute.reserve(input_rank);
        // First create an identity permutation tensor.
        for (int i = 0; i < input_rank; i++) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

      (TFL_TransposeOp
        (TFL_TransposeOp:$transpose_out1 $input, (Arith_ConstantOp:$permutation1 $p1)),
        (Arith_ConstantOp:$permutation2 $p2)),
      (TFL_TransposeOp $input,
        (Arith_ConstantOp (RemapPermutation $permutation1, $permutation2))),
      [(HasOneUse $transpose_out1)]>;
    
    // Convert expand_dims to reshape if possible.
    def ConvertExpandDimsToReshape : Pat<
      (TFL_ExpandDimsOp:$expand_dims_op $input, $dim),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

          if (perm_type.getNumElements() != input_type.getRank()) {
            return transpose_op.emitOpError(
                "perm tensor elements size is not equal to input tensor rank");
          }
        }
    
        // Get permutation axes of the TransposeOp
        DenseIntElementsAttr perm;
        if (!matchPattern(transpose_op.getPerm(), m_Constant(&perm))) {
          return failure();
        }
    
        SmallVector<int64_t, 4> axes;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
Back to top