Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 150 for RewritePatternSet (0.27 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.h

    namespace TFL {
    namespace tac {
    
    // Returns true if 'op' is supported to run on 'hardware'.
    bool IsSupported(Operation* op, const std::string& hardware);
    
    // Return proper rewriter patterns for different hardwares.
    RewritePatternSet GetHardwareRewritePatterns(MLIRContext* context,
                                                 const std::string& hardware);
    
    // Convert quantized ops to float, this will essentially insert dequantize &
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 07 18:43:51 UTC 2022
    - 2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/optimize.cc

      }
    
      void runOnOperation() override;
    };
    
    #include "tensorflow/compiler/mlir/quantization/tensorflow/passes/optimize.inc"
    
    void OptimizePass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      populateWithGenerated(patterns);
      auto func = getOperation();
      if (failed(applyPatternsAndFoldGreedily(func, std::move(patterns)))) {
        signalPassFailure();
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/passes.h

    CreateConvertTFQuantOpsToMHLOPass();
    
    // TODO(b/288094093): Migrate uniform quantization legalization in a separate
    // pass.
    void PopulateLegalizeTfQuantizationPatterns(MLIRContext *context,
                                                RewritePatternSet *patterns);
    
    // Creates an instance of the ConvertTFQuantTypes pass, which will convert TF
    // qint types to int types and surround TF UniformQuantized ops with qint <->
    // int casts.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 23 01:41:18 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_fake_quant_to_qdq.cc

        func.emitError() << "quant-convert-fake-quant-to-qdq pass failed.";
        signalPassFailure();
      }
    
      // For removing dead FakeQuant* ops
      RewritePatternSet patterns(ctx);
      if (failed(applyPatternsAndFoldGreedily(func, std::move(patterns)))) {
        signalPassFailure();
      }
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 15 00:56:15 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/transforms/legalization_op_config_test.cc

      DialectRegistry dialect_registry;
      mlir::RegisterCommonToolingDialects(dialect_registry);
    
      MLIRContext context(dialect_registry);
      context.loadAllAvailableDialects();
    
      RewritePatternSet mlir_legalize_lower_patterns(&context);
      PopulateLegalizeTfPatterns(&context, &mlir_legalize_lower_patterns);
    
      int mlir_only_patterns = 0;
      for (auto& pattern : mlir_legalize_lower_patterns.getNativePatterns()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 30 03:31:01 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/legalize_variables.cc

        if (auto legalize_tfl_variables_attr =
                module->getAttr(kLegalizeTflVariables)) {
          if (!mlir::cast<BoolAttr>(legalize_tfl_variables_attr).getValue()) return;
        }
    
        RewritePatternSet patterns(&getContext());
        populateWithGenerated(patterns);
        (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
    - 3.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc

      MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LiftTfliteFlexOpsPass)
    
      void runOnOperation() override {
        MLIRContext* context = &getContext();
        func::FuncOp func = getOperation();
    
        mlir::RewritePatternSet patterns(context);
        AddLiftTfliteFlexOpsPatterns(context, patterns);
        if (failed(applyPatternsAndFoldGreedily(func, std::move(patterns)))) {
          signalPassFailure();
          return;
        }
      }
    };
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

        RewritePatternSet &patterns, MLIRContext *context) {
      patterns.add<EraseDeadVarIsInitializedOp>(context);
    }
    
    //===----------------------------------------------------------------------===//
    // VariableOp
    //===----------------------------------------------------------------------===//
    
    void VariableOp::getCanonicalizationPatterns(RewritePatternSet &results,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/README.md

    `SimpleHardware` interface.
    
    For example:
    
    ```
    class FooHardware : public SimpleHardware {
     public:
      static constexpr char kId[] = "FOO";
    
      mlir::RewritePatternSet GetTransformations(
          MLIRContext* context) const override {
        mlir::RewritePatternSet patterns;
        // Pick the transformations that we want to perform,
        // We can add other transformations we like here.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 29 18:32:13 UTC 2022
    - 11.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        ParseCustomOpSpecs(enable_custom_op_no_side_effect_,
                           quant::CustomOpUpdateOptions::kNoSideEffect,
                           custom_op_map_);
      }
    
      RewritePatternSet patterns(&getContext());
      auto func = getOperation();
      auto* ctx = func.getContext();
      TFL::populateWithGenerated(patterns);
      patterns.add<quant::FoldTrivalRequantizeOp<QuantizeOp>>(ctx);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top