Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for transpose_ops (0.21 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc

    namespace {
    
    // Helper method that returns an op from 'transpose_ops' that match criteria
    // for an 'operand' and 'permutation'
    TransposeOp ReuseExistingTranspose(const OpOperand* operand,
                                       const SmallVector<int64_t, 4>& permutation,
                                       Operation* op, ConstOp permutation_op,
                                       SmallVector<TransposeOp, 2>* transpose_ops) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

            transpose_op.getLoc(), transpose_op.getType().getShape(), new_qtype);
        rewriter.setInsertionPointAfter(transpose_op);
        auto new_q_op = rewriter.create<quantfork::QuantizeCastOp>(
            transpose_op.getLoc(), new_tensor_type, q_op.getArg());
        auto new_dq_op = rewriter.create<quantfork::DequantizeCastOp>(
            new_q_op.getLoc(), transpose_op.getResult().getType(),
            new_q_op.getResult());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/defer_activation_transpose.cc

    using ::mlir::stablehlo::TransposeOp;
    
    // Returns `success()` if `op` is a `TransposeOp` with permutation attribute
    // equivalent to `permuation`.
    LogicalResult IsTransposeOpWithPermuation(absl::Nullable<Operation*> op,
                                              const ArrayRef<int64_t> permutation) {
      auto transpose_op = dyn_cast_or_null<TransposeOp>(op);
      return success(transpose_op != nullptr && transpose_op.getPermutation() ==
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

      EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1);
    
      auto transpose_op = fused_lstm_func_.getBody().front().begin();
      transpose_op++;
      EXPECT_EQ(mlir::cast<RankedTensorType>(transpose_op->getOperand(0).getType())
                    .getDimSize(0),
                3);
      EXPECT_EQ(mlir::cast<RankedTensorType>(transpose_op->getOperand(0).getType())
                    .getDimSize(1),
                12);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

      // Transpose.
      auto transpose_op = GetTransposeOpForConv2DFilter(&builder, reshape_op);
    
      // Reshape Back.
      SmallVector<int64_t, 4> final_shape = {
          height / block_size, width / block_size,
          channel * block_size * block_size, out_channel};
      auto final_reshape_op =
          GetReshapeOpForConv2DFilter(final_shape, transpose_op, &builder);
      // Update filter of Conv2D.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

        if (any_blargs) {
          return failure();
        }
    
        TFL::TransposeOp tpose_arg = nullptr;
        Operation *cst_arg = nullptr;
    
        for (Value opr : op->getOperands()) {
          auto *defining_op = opr.getDefiningOp();
          if (llvm::isa<TFL::TransposeOp>(defining_op) && !tpose_arg) {
            tpose_arg = llvm::dyn_cast<TFL::TransposeOp>(defining_op);
            continue;
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      // Transpose and constant-fold the weight if needed.
      if (transpose_b.getValue()) {
        Value perm = Create1DConstValue<int32_t>(builder, loc, {1, 0});
        auto transpose_op = builder.create<TF::TransposeOp>(loc, weight, perm);
        weight = ConstantFoldOpIfPossible(transpose_op).front();
      }
    
      xla::DotDimensionNumbers dnums;
      dnums.add_rhs_contracting_dimensions(0);
      if (transpose_a.getValue()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

          return success();
        }
        return failure();
      }
    };
    
    // Fold the constant quantized Transpose ops.
    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
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

          auto permutation_and_shape = GetPermutationAndTransposedShape(
              permutation_array, operand_type, rewriter);
    
          Location loc = scatter_op.getLoc();
          auto transposed_operand = rewriter.create<mhlo::TransposeOp>(
              loc, permutation_and_shape.shape, operands[0],
              permutation_and_shape.permutation);
    
          Value new_indices = indices;
          int64_t index_depth =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_patterns.td

    def FoldTrivialReshapeIntoTranspose : Pat<
      (TF_ReshapeOp:$output
          (TF_TransposeOp:$transpose_out1 $input, (Arith_ConstantOp:$permutation1 $p1)), $_),
      (TF_TransposeOp:$transpose_op $input,
          (Arith_ConstantOp
            (RemapPermutation $permutation1,
                (GetPermutationFromTrivialReshape $transpose_out1, $output)))),
      [(IsReshapeEquivalentToTranspose $transpose_out1, $output),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 10.5K bytes
    - Viewed (0)
Back to top