Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for CanOptimizeIdentitySliceOp (0.2 sec)

  1. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

    }
    
    def CanOptimizeIdentitySliceOp : Constraint<CPred<
      "TFL::CanOptimizeIdentitySliceOp($0, $1, $2)">>;
    
    // Remove Slice ops slicing the whole input tensor, effectively no-op.
    def OptimizeSliceOp : Pat<
      (TFL_SliceOp:$output $input, (Arith_ConstantOp $begin), (Arith_ConstantOp $size)),
      (replaceWithValue $input),
      [(CanOptimizeIdentitySliceOp $input, $begin, $size)]>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize.cc

    // Returns true if we can eliminate the SliceOp. When the values of `begin` are
    // all 0s and `size[i]` is equal to either -1 or `input.shape[i]`
    // for each dim i, the output tensor is identical to `input`.
    bool CanOptimizeIdentitySliceOp(Value input, Attribute begin, Attribute size) {
      // Checks if `begin` and `size` are i32 or i64.
      auto begin_attr = mlir::dyn_cast<DenseIntElementsAttr>(begin);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
Back to top