Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

      // Rewrite the branches.
      Region& then_branch = if_op.getThenBranch();
      Region& else_branch = if_op.getElseBranch();
      if (failed(DecomposeTensorListOpsInternal(
              &then_branch.front(), module, buffer_to_size,
              decomposed_partitioned_call_callees)))
        return failure();
      if (failed(DecomposeTensorListOpsInternal(
              &else_branch.front(), module, buffer_to_size,
              decomposed_partitioned_call_callees)))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/rearrange_function_argument_pass_test.cc

    namespace tensorflow {
    
    TEST(RearrangeFunctionArgumentForFunctionTest, Basic) {
      FunctionDefLibrary fdl;
      {
        // Function for StatefulPartitionedCall's "f", If's
        // "then_branch"/"else_branch".
        // "arg0" (T=DT_RESOURCE), "arg1" (T=DT_BOOL)
        // "ret0" = "arg1"
        // "ret1" = "arg0"
        tensorflow::Scope s = tensorflow::Scope::NewRootScope();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/compilability_check_util.cc

      if (!s.ok()) {
        *uncompilable_reason = s.message();
        return false;
      }
      return true;
    }
    
    // Tests whether 'if_node' is compilable. Every operator in the then_branch and
    // else_branch functions must be compilable for 'if_node' to be compilable.
    bool RecursiveCompilabilityChecker::IsCompilableIf(
        const Node& if_node, FunctionLibraryRuntime* lib_runtime,
        std::vector<StackFrameView>* stack_trace,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfrt/tests/hoist_invariant_ops.mlir

      // CHECK:  "tf._TfrtGetResource"()
      %cond = "tf.Const"() {device = "/CPU:0", value = dense<true> : tensor<i1>} : () -> tensor<i1>
      // CHECK: tf.If
      %x = "tf.If"(%cond, %handle) {then_branch = @some_func, else_branch = @some_func, is_stateless = false} : (tensor<i1>, tensor<!tf_type.resource<tensor<i32>>>) -> tensor<i32>
      %r = "tf.AddV2"(%arg, %x) {device = "/CPU:0"} : (tensor<i32>, tensor<i32>) -> tensor<i32>
      func.return %r : tensor<i32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 01 23:54:14 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/insert_calibration_statistics_saver.mlir

        %1 = "tf.Greater"(%0, %cst_0) {device = ""} : (tensor<f32>, tensor<f32>) -> tensor<i1>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfrt/tests/mlrt/tf_to_mlrt.mlir

    // CHECK: [[z:%.*]] = mlrt.cond [[cond]] @then @else([[x]], [[y]])
    // CHECK: return [[z]]
    func.func @main(%cond: tensor<i1>, %x: tensor<i32>, %y: tensor<i32>) -> tensor<i32> {
      %z = "tf.If"(%cond, %x, %y) {then_branch = @then, else_branch = @else, is_stateless = true} : (tensor<i1>, tensor<i32>, tensor<i32>) -> tensor<i32>
      return %z: tensor<i32>
    }
    
    // -----
    
    // Test lowering AsyncOpKernel
    
    // CHECK-LABEL: func @main
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 20:44:15 UTC 2024
    - 24.7K bytes
    - Viewed (0)
Back to top