Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for OptionalGetValue (0.25 sec)

  1. tensorflow/compiler/mlir/tensorflow/tests/decompose_optionals.mlir

      return
    }
    
    // -----
    
    // CHECK-LABEL: @get_value
    func.func @get_value(%arg0: tensor<!tf_type.variant<tensor<f32>>>) {
      // CHECK-NOT: Optional
      %1 = "tf.OptionalGetValue"(%arg0) : (tensor<!tf_type.variant<tensor<f32>>>) -> tensor<f32>
      return
    }
    
    // -----
    
    // CHECK-LABEL: @none
    func.func @none(%arg0: tensor<!tf_type.variant<tensor<f32>>>) {
      // CHECK-NOT: Optional
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/integration/node_expansion_pass.cc

      // their "no-op" expansion is known to cause problems in some cases.
      static const char* kOpsToSkip[] = {
          "IdentityOp",
          "NoOp",              // b/174596063
          "OptionalHasValue",  // b/173136483
          "OptionalGetValue",  // b/173136483
          "VarHandleOp",       // b/176819198
      };
      for (const char* skip : kOpsToSkip) {
        if (absl::StartsWith(orig_op->op_name(), skip)) return absl::OkStatus();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Feb 25 16:22:36 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        auto input = op.getOptional();
        auto elementType = getElementTypeOrSelf(input.getType());
        if (isa<TF::VariantType>(elementType)) {
          // We can only replace OptionalGetValue after the inputs have been
          // replaced.
          return failure();
        }
        rewriter.replaceOpWithNewOp<TF::CastOp>(op, op.getResult(0).getType(),
                                                input);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/passes.h

        raw_ostream* os = nullptr);
    
    // Moves TPUCompileMlir ops as far to the front as possible.
    std::unique_ptr<OperationPass<func::FuncOp>> CreateMoveTpuCompileToFrontPass();
    
    // Decomposes OptionalFromValue, OptionalGetValue, OptionalNone,
    // and OptionalHasValue
    std::unique_ptr<OperationPass<ModuleOp>> CreateDecomposeOptionalsPass();
    
    //===----------------------------------------------------------------------===//
    // XlaCallModule
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.td

      let summary = "Decomposes ops of the 'Optional' family";
      let description = [{
        Turns OptionalFromValue, OptionalGetValue, OptionalNone,
        and OptionalHasValue into identities.
    
        For example, if we have:
    
          %1 = "tf.OptionalFromValue"(%0) : (tensor<f32>) -> !tf_type.variant
          %2 = "tf.OptionalGetValue"(%1) : (tensor<!tf_type.variant>) -> tensor<f32>
    
        then after the pass, this will have been transformed to:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 99.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td

      let results = (outs
        TF_VariantTensor:$optional
      );
    
      TF_DerivedOperandTypeListAttr Toutput_types = TF_DerivedOperandTypeListAttr<0>;
    }
    
    def TF_OptionalGetValueOp : TF_Op<"OptionalGetValue", [Pure]> {
      let summary = [{
    Returns the value stored in an Optional variant or raises an error if none exists.
      }];
    
      let arguments = (ins
        TF_VariantTensor:$optional
      );
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 23:24:08 UTC 2024
    - 793K bytes
    - Viewed (0)
Back to top