Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for MatchBinaryReduceFunction (0.27 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.h

    // inputs, passes it to an instance of the specified reduction op and then
    // returns the result.
    template <typename ReductionOp>
    LogicalResult MatchBinaryReduceFunction(mlir::Region& function) {
      Block& body = function.front();
      if (body.getNumArguments() != 2) return failure();
    
      mhlo::ReturnOp return_op = dyn_cast<mhlo::ReturnOp>(body.back());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 08 11:35:25 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc

    }
    
    // Check if the specified region is a binary reduction function that takes 2
    // inputs and returns the second input. Functions like this are used by update
    // scatter like ops.
    template <>
    LogicalResult MatchBinaryReduceFunction<void>(mlir::Region& function) {
      Block& body = function.front();
      if (body.getNumArguments() != 2) return failure();
    
      mhlo::ReturnOp return_op = dyn_cast<mhlo::ReturnOp>(body.back());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

              !updates_type.hasStaticShape()) {
            return failure();
          }
    
          // Match the scatter computation against computations supported by TF.
          if (failed(MatchBinaryReduceFunction<BinaryOp>(
                  scatter_op.getUpdateComputation()))) {
            return failure();
          }
    
          auto scatter_dimension_numbers = scatter_op.getScatterDimensionNumbers();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          mhlo::ReduceOp reduce_op, OpAdaptor adaptor,
          ConversionPatternRewriter& rewriter) const final {
        if (failed(MatchReduceOpOperand(reduce_op))) return failure();
    
        if (failed(MatchBinaryReduceFunction<BinaryOp>(reduce_op.getBody())))
          return failure();
    
        auto operand = reduce_op.getInputs()[0];
    
        // Get reduction dimension.
        DenseIntElementsAttr dimension = reduce_op.getDimensions();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

    class RewriteQuantizedReduceWindowOpWithMax
        : public OpRewritePattern<stablehlo::ReduceWindowOp> {
     public:
      using OpRewritePattern<stablehlo::ReduceWindowOp>::OpRewritePattern;
    
      LogicalResult MatchBinaryReduceFunction(Region& function) const {
        Block& body = function.front();
        if (body.getNumArguments() != 2) return failure();
    
        auto return_op = dyn_cast<stablehlo::ReturnOp>(body.back());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
Back to top