Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for GetNhwcReturnTypeFromNchw (0.35 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool_patterns.td

                                /*stride_w*/(GetI32At<1> (GetAsVectorAttr<"stride"> $attrs)),
                                /*fused_activation_function*/TFL_AF_None,
                                (returnType (GetNhwcReturnTypeFromNchw $old_val))), 
                            (Arith_ConstantOp
                                ConstantAttr<RankedI32ElementsAttr<[4]>,"{0, 3, 1, 2}">)), 
                        [(IsBoolCompositeAttribute<"ceil_mode", "false"> $attrs),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.td

    #ifndef COMPOSITE_UTILS_TD
    #define COMPOSITE_UTILS_TD
    
    include "mlir/IR/PatternBase.td"
    
    // See the function doc in the header file.
    def GetNhwcReturnTypeFromNchw: NativeCodeCall<
      "GetNhwcReturnTypeFromNchw((*$0.begin()).getDefiningOp())">;
    
    // When given a DenseIntElementsAttr containing I64 elements, this extracts
    // one I32IntegerAttr from the given index.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 19:05:30 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_lowering_patterns.td

            (Arith_ConstantOp:$output_size (GetI32DenseAttr (GetAsVectorAttr<"output"> $attrs))),
            (GetCompositeAttributeAs<"align_corners", "BoolAttr"> $attrs),
            ConstBoolAttrTrue,
            (returnType (GetNhwcReturnTypeFromNchw $old_val))),
          (Arith_ConstantOp
            ConstantAttr<RankedI32ElementsAttr<[4]>,"{0, 3, 1, 2}">))>;
    
    // pattern to lower a stablehlo.composite of `jax` and `pytorch` image resize fuctions
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 18:45:51 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.cc

      if (!attr) return std::nullopt;
      if (auto bool_attr = mlir::dyn_cast_or_null<BoolAttr>(attr)) {
        return bool_attr.getValue();
      }
      return std::nullopt;
    }
    
    ShapedType GetNhwcReturnTypeFromNchw(Operation* old_op) {
      auto composite_result_shape =
          mlir::cast<ShapedType>(old_op->getResults().front().getType()).getShape();
      std::array<int64_t, 4> output_shape;
      // NHWC <- NCHW
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 18:33:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.h

    // returns the return type of the tfl.average_pool_2d emitted. Note that the
    // aten.avg_pool2d works with the NCHW layout while tfl.average_pool_2d assumes
    // NHWC.
    ShapedType GetNhwcReturnTypeFromNchw(Operation* old_op);
    
    }  // namespace odml
    
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 18:33:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
Back to top