Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for else_branch (0.25 sec)

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

    // CHECK-LABEL: @if
    func.func @if() {
      // CHECK-NOT: Optional
      %0 = builtin.unrealized_conversion_cast to tensor<5xi1>
      %1 = "tf.OptionalNone"() : () -> tensor<!tf_type.variant<tensor<f32>>>
      %2 = "tf.If"(%0, %1) <{else_branch = @false, is_stateless = false, then_branch = @true}>
          : (tensor<5xi1>, tensor<!tf_type.variant<tensor<f32>>>) -> (tensor<!tf_type.variant<tensor<f32>>>)
      return
    }
    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/tensorflow/tests/region-control-flow-to-functional.mlir

    // CHECK-NEXT: "tf.Asin"
    // CHECK-NEXT: "tf.If"({{.+}}) <{else_branch = @tf.IfRegion_else, {{.+}} then_branch = @tf.IfRegion_then}
    
    // CHECK: func private @tf.IfRegion_else
    // CHECK-NEXT: "tf.Neg"
    // CHECK: func private @tf.IfRegion_then
    // CHECK-NEXT: "tf.Abs"
    
    func.func @testNested(%arg0: tensor<i1>, %arg1: tensor<*xf32>) -> tensor<*xf32> {
      // CHECK: "tf.If"({{.+}}) <{else_branch = @tf.IfRegion1_else, {{.+}} then_branch = @tf.IfRegion1_then}
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 02 11:15:34 UTC 2024
    - 44.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

      dataset_if->setAttr("_lower_using_switch_merge", builder.getBoolAttr(true));
      // Empty else branch, if there is no more data, do nothing.
      auto& else_branch = dataset_if.getElseBranch();
      else_branch.push_back(new Block);
      builder.setInsertionPointToEnd(&else_branch.front());
      // Return only the state variables from the body arguments.
      SmallVector<Value, 4> else_returns;
      for (int i = 1; i < state_size + 1; i++) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/extract_outside_compilation_pass.cc

        bool* has_outside_compilation) {
      // Instantiate "then_branch" and "else_branch".
      NameAttrList then_branch, else_branch;
      TF_RETURN_IF_ERROR(GetNodeAttr(n->attrs(), "then_branch", &then_branch));
      TF_RETURN_IF_ERROR(GetNodeAttr(n->attrs(), "else_branch", &else_branch));
    
      // Extract outside compilation for then_branch and else_branch.
      bool then_branch_has_outside_compilation = false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 104.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/tests/tpu_tail_with_tobool_op.mlir

        %4 = "tf.If"(%3, %3, %arg0, %cst) {_tpu_replicate = "cluster", _xla_outside_compilation = "0", device = "", else_branch = @if_else_branch, is_stateless = false, then_branch = @if_then_branch} : (tensor<*xi1>, tensor<*xi1>, tensor<*xi64>, tensor<i64>) -> tensor<*xi1>
        func.return %4 : tensor<*xi1>
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 13 21:23:47 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/tests/fuse-tftext.mlir

      %16 = "tf.Const"() {value = dense<1> : tensor<1xi32>} : () -> tensor<1xi32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 460.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfrt/tests/mlrt/inline.mlir

    // CHECK: return [[z]]
    func.func @while_cond_if(%cond: tensor<i1>, %x: tensor<i1>, %y: tensor<i1>, %z: tensor<i32>) -> (tensor<i1>) {
      %r = "tf.If"(%cond, %x, %y, %z) {then_branch = @then, else_branch = @else, is_stateless = true} : (tensor<i1>, tensor<i1>, tensor<i1>, tensor<i32>) -> tensor<i1>
      return %r : tensor<i1>
    }
    
    // CHECK-LABEL: func @while_body_if
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 01:01:31 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

          if (type_from_body.has_value()) return type_from_body;
        } else if (auto if_op = llvm::dyn_cast<TF::IfOp>(use.getOwner())) {
          auto then_branch = if_op.then_function();
          auto else_branch = if_op.else_function();
          assert(then_branch && else_branch);
          auto type_from_then = GetElementTypeFromAccess(
              then_branch.getArgument(use.getOperandNumber() - 1), module,
              infer_from_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td

        tensors, whose types are the same as what else_branch returns.
    else_branch: A function that takes 'inputs' and returns a list of
        tensors.  whose types are the same as what then_branch returns.
      }];
    
      let arguments = (ins
        TF_Tensor:$cond,
        Variadic<TF_Tensor>:$input,
    
        FlatSymbolRefAttr:$then_branch,
        FlatSymbolRefAttr:$else_branch,
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 04:08:35 UTC 2024
    - 90.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfrt/tests/tf_to_corert/control_flow.mlir

      // CHECK: [[cond_res:%.*]]:2 = tfrt.cond [[cond]]
      // CHECK-SAME: @cond_true @cond_false(%arg0, %arg2) : (!tfrt.chain, !tfrt_fallback.tf_tensor)
      %2 = "tf.If"(%arg0, %arg1) {else_branch = @cond_false, then_branch = @cond_true, is_stateless = true} : (tensor<i1>, tensor<i32>) -> tensor<i32>
      // CHECK: [[out_ch:%.*]] = tfrt.merge.chains [[cond_res]]#0, %arg0 : !tfrt.chain, !tfrt.chain
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 00:40:32 UTC 2024
    - 17.5K bytes
    - Viewed (0)
Back to top