Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 68 for then_branch (0.42 sec)

  1. tensorflow/compiler/mlir/tfrt/tests/sink_in_invariant_ops.mlir

      // CHECK: [[cond:%.*]] = "tf.Const"()
      %cond = "tf.Const"() {device = "/CPU:0", value = dense<true> : tensor<i1>} : () -> tensor<i1>
      // CHECK: "tf.If"([[cond]], [[handle]])
      %x = "tf.If"(%cond, %handle) {then_branch = @some_other_func, else_branch = @some_other_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>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 21K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/tests/fuse-tftext.mlir

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

    // CHECK: [[z:%.*]] = mlrt.cond [[cond]] @then @else
    // 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)
  4. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

        } 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)
  5. tensorflow/compiler/mlir/tensorflow/tests/resource-device-inference.mlir

            : () -> !tf_res
          "tf.If"(%arg1, %id0, %var_handle) {
              then_branch = @if_then_and_else,
              else_branch = @if_then_and_else, is_stateless = false}
            : (tensor<i1>, !tf_res,
               !tf_res) -> ()
          "tf.If"(%arg1, %var_handle, %id0) {
          // expected-error@above {{Conflicting device assignment for resource}}
              then_branch = @if_then_and_else,
              else_branch = @if_then_and_else,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 17 16:01:45 UTC 2022
    - 18.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

                             llvm::StringMap<PartitionedCallTensorArrayOpsInfo>*
                                 decomposed_partitioned_call_callees) {
      auto then_branch = if_op.then_function();
      auto else_branch = if_op.else_function();
      auto grads = AccessedGradients({then_branch, else_branch}, module);
      auto ta_arg_buffer_type = [&](int64_t index) -> Type {
        auto it = stats->find(if_op.getOperand(index + 1));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/if_op.mlir

    func.func @main(%arg0: tensor<1xf32>, %arg1: tensor<1xf32>) -> tensor<1xf32> {
      %0 = "tfl.less"(%arg0, %arg1) : (tensor<1xf32>, tensor<1xf32>) -> tensor<1xi1>
      %1 = "tf.If"(%0, %arg0, %arg1) {else_branch = @cond_false, then_branch = @cond_true, is_stateless = false} : (tensor<1xi1>, tensor<1xf32>, tensor<1xf32>) -> tensor<1xf32>
      func.return %1 : tensor<1xf32>
    }
    
    func.func @cond_true(%arg0: tensor<*xf32>, %arg1: tensor<*xf32>) -> tensor<*xf32> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jul 14 16:41:28 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

        llvm::StringMap<PartitionedCallDecompositionInfo>*
            decomposed_partitioned_call_callees) {
      // 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(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td

        TF_Int32Tensor:$max_num_elements
      );
    }
    
    def TF_IfOp : TF_Op<"If", [DeclareOpInterfaceMethods<SymbolUserOpInterface>]> {
      let summary = "output = cond ? then_branch(input) : else_branch(input)";
    
      let description = [{
    output = cond ? then_branch(input) : else_branch(input)
    
    cond: A Tensor. If the tensor is a scalar of non-boolean type, the
        scalar is converted to a boolean according to the
    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/tensorflow/tests/tensor_array_ops_decomposition.mlir

      // CHECK: %[[GVAR2:.*]] = "tf.MlirLocalVarOp"() : () -> tensor<!tf_type.resource<tensor<5x3xf32>>>
      // CHECK: "tf.If"(%[[COND]], %[[VAR]], %[[GVAR1]], %[[GVAR2]])
      %1 = "tf.If"(%cond, %ta#0) {
        then_branch = @then_branch, else_branch = @else_branch, device = "", is_stateless = false}
           : (tensor<i1>, tensor<!tf_type.resource>) -> tensor<!tf_type.resource>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 49K bytes
    - Viewed (0)
Back to top