Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 54 for permutation (0.52 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc

      // Returns a new tensor type with the shape transposed according to the
      // permutation. The rank of `type` and the size of `permutation` must be
      // equal.
      TensorType GetTransposedTensorType(
          const TensorType type, const ArrayRef<int64_t> permutation) const {
        const SmallVector<int64_t> after_shape =
            Permute<int64_t>(type.getShape(), permutation);
        return type.cloneWith(after_shape, type.getElementType());
      }
    };
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  2. src/hash/maphash/smhasher_test.go

    	permutation(t, h, []uint32{0, 1}, 20)
    	permutation(t, h, []uint32{0, 1 << 31}, 20)
    	permutation(t, h, []uint32{0, 1, 2, 3, 4, 5, 6, 7, 1 << 29, 2 << 29, 3 << 29, 4 << 29, 5 << 29, 6 << 29, 7 << 29}, 6)
    }
    func permutation(t *testing.T, h *hashSet, s []uint32, n int) {
    	b := make([]byte, n*4)
    	genPerm(h, b, s, 0)
    	h.check(t)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:41:38 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/cc/BUILD

        ],
    )
    
    cc_library(
        name = "permutation",
        hdrs = ["permutation.h"],
        compatible_with = get_compatible_with_portable(),
        deps = [
            "@llvm-project//llvm:Support",
            "@llvm-project//mlir:Support",
        ],
    )
    
    tf_cc_test(
        name = "permutation_test",
        srcs = ["permutation_test.cc"],
        deps = [
            ":permutation",
            "@com_google_googletest//:gtest_main",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 22:58:42 UTC 2024
    - 17K bytes
    - Viewed (0)
  4. src/runtime/hash_test.go

    		t.Skip("Too long for race mode")
    	}
    	testenv.ParallelOn64Bit(t)
    	h := newHashSet()
    	permutation(t, h, []uint32{0, 1, 2, 3, 4, 5, 6, 7}, 8)
    	permutation(t, h, []uint32{0, 1 << 29, 2 << 29, 3 << 29, 4 << 29, 5 << 29, 6 << 29, 7 << 29}, 8)
    	permutation(t, h, []uint32{0, 1}, 20)
    	permutation(t, h, []uint32{0, 1 << 31}, 20)
    	permutation(t, h, []uint32{0, 1, 2, 3, 4, 5, 6, 7, 1 << 29, 2 << 29, 3 << 29, 4 << 29, 5 << 29, 6 << 29, 7 << 29}, 6)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 17:50:18 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

    //
    //  The update needs permuting to be in the form (a,b,d,e,f) so that the update
    //  window dims are the trailing dimensions.
    //
    // To canonicalize the updates above, replace the updates with:
    //   transpose(updates, permutation={3,4,0,1,2})
    //
    // Note: NormalizeIndexVector is assumed to have run on the indices already so
    // that the index_vector_dim is the trailing dimension in `indices`.
    LogicalResult CanonicalizeScatterUpdates(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

        //       input_shape[M+1], ..., input_shape[N-1]]
        SmallVector<int64_t> permutation(reshaped_shape.size());
        permutation[0] = block_rank;
        for (int i = 0; i < block_rank; ++i) {
          permutation[1 + 2 * i] = block_rank + 1 + i;
          permutation[1 + 2 * i + 1] = i;
        }
        std::iota(permutation.begin() + 1 + block_rank * 2, permutation.end(),
                  1 + block_rank * 2);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

        if (!isKernelFormatHWOI(dnums)) {
          SmallVector<int64_t, 4> permutation;
          for (int64_t dim : dnums.getKernelSpatialDimensions()) {
            permutation.push_back(dim);
          }
          permutation.push_back(dnums.getKernelOutputFeatureDimension());
          permutation.push_back(dnums.getKernelInputFeatureDimension());
    
          auto filter_transposed = rewriter.create<mhlo::TransposeOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.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: Thu Apr 25 16:01:03 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

          redux_op);
    }
    
    TF::TransposeOp createTransposeOp(Value value, Location loc,
                                      llvm::ArrayRef<int32_t> permutation,
                                      PatternRewriter* rewriter) {
      auto perm_op = createI32ConstantOp(permutation, loc, rewriter);
      auto value_type = mlir::cast<RankedTensorType>(value.getType());
      auto shape = value_type.getShape();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

              PushTransposeThroughEwisePass> {
     public:
      MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(PushTransposeThroughEwisePass)
      void runOnOperation() override;
    };
    
    // Compute the permutation that would take `arr` to the identity.
    llvm::SmallVector<int32_t> InvertPermutation(llvm::SmallVector<int32_t> arr) {
      llvm::SmallVector<int32_t> inverse_arr(arr.size());
      for (int32_t i = 0; i < arr.size(); ++i) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
Back to top