Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 61 for if_builder (0.13 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/canonicalize.td

    // Gather op patterns.
    //===----------------------------------------------------------------------===//
    
    class GetI32Attr<int x>: NativeCodeCall<
      "$_builder.getI32IntegerAttr(" # x # ")">;
    
    class GetI64Attr<int x>: NativeCodeCall<
      "$_builder.getI64IntegerAttr(" # x # ")">;
    
    // The deprecated validate_indices attribute is NOT verified during
    // canonicalization because it is neither supported in the old bridge
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 06 18:42:28 UTC 2023
    - 17K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.td

        "$_builder.create<TF::ReadVariableOp>("
        "$0.getLoc(), GetResourceSubtype($1), $1)">;
    
    def CreateTFSelectOp: NativeCodeCall<
        "$_builder.create<TF::SelectOp>("
        "$0.getLoc(), $3.getType(), $1, $2, $3)">;
    
    def ConstAttrIfThenElse: NativeCodeCall<
        "($0).getValue() ? ($1) : ($2)">;
    
    // Convert clamp(lo, x, hi) to clipbyvalue(x, lo, hi).
    def Clamp: NativeCodeCall<
        "$_builder.create<TF::ClipByValueOp>("
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/utils.td

    include "mlir/IR/OpBase.td"
    include "mlir/Dialect/Func/IR/FuncOps.td"
    include "mlir/IR/PatternBase.td"
    
    def CreateNoneValue : NativeCodeCall<
      "$_builder.create<TFL::NoValueOp>($0.getLoc(), $_builder.getUnitAttr())">;
    
    // Returns shape of a ranked tensor.
    // if called without a ranked tensor it will fail.
    def GetShape: NativeCodeCall<"GetShape($0)">;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tf_data_optimization.td

    include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td"
    
    // TODO(jpienaar): Move this somewhere general.
    class GetI64ScalarElementsAttr<int value> :
      NativeCodeCall<"DenseElementsAttr::get<int64_t>(RankedTensorType::get({}, $_builder.getIntegerType(64)), " # value # ")">;
    
    def FuseMapAndBatch : Pat<
      (TF_BatchDatasetV2Op
         (TF_MapDatasetOp $input_dataset, $other_arguments, $f, $output_types,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 23:24:08 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/tf_to_tfl_flatbuffer.cc

      if (::tflite::optimize::QuantizeWeights(
              &q_builder, input_model, quantized_type, use_updated_hybrid_scheme,
              ::tflite::optimize::QuantizerType::OLD_QUANTIZER) != kTfLiteOk) {
        return absl::InvalidArgumentError(
            "Quantize weights transformation failed.");
      }
      const uint8_t* q_buffer = q_builder.GetBufferPointer();
      *result =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter_test.cc

        return absl::OkStatus();
      }
    
      Status LegalizeSingleOp(Operation& op) {
        SourceMgrDiagnosticHandler sourceMgrHandler(source_manager_, &context_);
    
        OpBuilder op_builder(&op);
        EmptyPatternRewriter pattern_rewriter(op_builder);
    
        LogicalResult result =
            Tf2XlaRewriter::RewriteOp(&op, pattern_rewriter,
                                      /*device_type=*/"XLA_CPU_JIT");
        if (!result.succeeded()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfr/passes/decompose_patterns.td

    include "mlir/Dialect/Arith/IR/ArithOps.td"
    include "mlir/Dialect/Func/IR/FuncOps.td"
    include "tensorflow/compiler/mlir/tfr/ir/tfr_ops.td"
    
    class Quantize<string value> : NativeCodeCall<"TFR::Quantize(" # value # ", $0, $1, $_builder)">;
    
    class HasStringAttr<string value> : AttrConstraint<
        CPred<"$_self.cast<StringAttr>().getValue() == \"" # value # "\"">>;
    
    def QuantActRangeNonePattern :
      Pattern<
        (TFR_TFRQuantActRangeOp
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils_test.cc

    using QuantMethod = tensorflow::quantization::QuantizationMethod::PresetMethod;
    
    class EmptyPatternRewriter : public mlir::PatternRewriter {
     public:
      explicit EmptyPatternRewriter(const OpBuilder& op_builder)
          : mlir::PatternRewriter(op_builder) {}
      ~EmptyPatternRewriter() override = default;
    };
    
    class TfToUniformAttributeUtilsTestPeer {
     public:
      explicit TfToUniformAttributeUtilsTestPeer() = delete;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Sep 11 00:47:05 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_patterns.td

    include "mlir/Dialect/Arith/IR/ArithOps.td"
    include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td"
    
    // Marks the op as no fallback.
    def MarkNoFallback : NativeCodeCall<"SetNoFallbackAttr($_builder, $0)">;
    
    def NoFallbackAttrNotSet : Constraint<CPred<
      "!$0.getDefiningOp()->hasAttr(kNoFallbackAttr)">>;
    
    class FloatValueEquals<string val> : Constraint<CPred<
      "FloatValueEquals($0, " # val # ")">>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_lowering_patterns.td

                        (TFL_HardSwishOp $input)>;
    
    def IsNchwLayoutOp: Constraint<CPred<
      "$0.get(\"is_nchw_op\") && $0.get(\"is_nchw_op\").dyn_cast<BoolAttr>() "
          "== mlir::BoolAttr::get($_builder.getContext(), true)">>;
    
    def IsNhwcLayoutOp: Constraint<Neg<IsNchwLayoutOp.predicate>>;
    
    // TODO(b/343278954): Move the creation of transposes to a separate prepare pass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 18:45:51 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top