Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 150 for RewritePatternSet (0.37 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc

      StringRef getDescription() const final {
        return "Fuses MHLO binary element-wise ops and convolution op";
      }
    
      void runOnOperation() override {
        RewritePatternSet patterns(&getContext());
        patterns.add<FuseMhloMulAndConvolutionPattern>(&getContext());
        if (failed(applyPatternsAndFoldGreedily(getOperation(),
                                                std::move(patterns)))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 22:21:19 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

                                         true>;
    
    // TODO(fengliuai): add the support of the tf.QuantizeAndDequantize*
    // legalization.
    
    void LegalizeTFToQuant::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      auto func = getOperation();
      auto *ctx = func.getContext();
      patterns.add<PreparePerTensorFakeQuant, PreparePerChannelFakeQuant>(ctx);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/fold_broadcast.cc

        rewriter.modifyOpInPlace(
            op, [&]() { op->getOpOperand(i).set(broadcast.getInput()); });
        changed = true;
      }
      return success(changed);
    }
    
    void BroadcastFoldPass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      auto func = getOperation();
    
      patterns.add<ConvertResultsBroadcastableShapeOp>(func.getContext());
      (void)applyPatternsAndFoldGreedily(func, std::move(patterns));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

          }
          changed = true;
        }
        return changed ? success() : failure();
      }
    };
    
    void PropagateQuantizeType::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      auto module_op = getOperation();
      MLIRContext* ctx = &getContext();
    
      patterns.add<PropagateDequantizeOpIfAllowed>(ctx);
      FrozenRewritePatternSet frozen_patterns(std::move(patterns));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

        // return type should be updated.
        UpdateFuncType(parent_op);
    
        return success();
      }
    };
    
    void OptimizeFunctionalOpsPass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
    
      patterns.add<FoldIfOp>(&getContext());
    
      ModuleOp module = getOperation();
      (void)applyPatternsAndFoldGreedily(module, std::move(patterns));
    }
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/experimental/tac/hardwares/target_hardware.h

      virtual double GetHardwareSwitchingCost(const TargetHardware* from,
                                              size_t buffer_size) const = 0;
    
      // Returns a list of all patterns to apply for this hardware.
      virtual mlir::RewritePatternSet GetTransformations(
          MLIRContext* context) const = 0;
    
      // Returns TypeId for the provided hardware.
      // Usually should be something like mlir::TypeID::get<MyType>()
      virtual mlir::TypeID GetTypeId() const = 0;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 09 21:39:59 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.cc

    #include "tensorflow/compiler/mlir/tensorflow/transforms/generated_decompose_resource_ops.inc"
    }  // namespace
    
    void PopulateDecomposeResourceOpsPatterns(MLIRContext *context,
                                              RewritePatternSet *patterns) {
      patterns->add<DecomposeRngReadAndSkipOp>(context);
      populateWithGenerated(*patterns);
    }
    
    }  // namespace TF
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

          !quant_specs_.disable_infer_tensor_range;
    
      // During the legalization, unsigned quantized type is used, so we have to
      // convert all of them to signed.
      RewritePatternSet patterns(ctx);
      populateWithGenerated(patterns);
      patterns.add<quant::ConvertUnsignedToSigned<quantfork::QuantizeCastOp>>(ctx);
      // Convert quant stats to int8 quantization parameters.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize_layout.cc

        rewriter.replaceOp(reduce_op, orig_reduce_op);
        return success();
      }
    };
    
    void TransposeCommuteOpsPass::runOnOperation() {
      auto* ctx = &getContext();
    
      RewritePatternSet patterns(ctx);
      patterns.add<TransposeCommuteWithPad, TransposeCommuteWithReduceWindow>(ctx);
      if (failed(
              applyPatternsAndFoldGreedily(getOperation(), std::move(patterns)))) {
        return signalPassFailure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 21:59:06 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc

     private:
      void runOnOperation() override;
    };
    
    void FoldConstantTransposePass::runOnOperation() {
      func::FuncOp func_op = getOperation();
      MLIRContext& ctx = getContext();
    
      RewritePatternSet patterns(&ctx);
      patterns.add<FoldTransposedConstantOp>(&ctx);
      if (failed(applyPatternsAndFoldGreedily(func_op, std::move(patterns)))) {
        func_op.emitError("Failed to fold constant->transpose pattern.");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.7K bytes
    - Viewed (0)
Back to top