Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for IfRegionOp (0.18 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/merge_control_flow.cc

    void MergeIfPerSegment(
        llvm::SmallVector<TF::IfRegionOp, 8>& if_op_segment,
        llvm::SmallVector<Operation*, 8>& moved_ops_list,
        llvm::SmallSetVector<TF::IfRegionOp, 8>& regions_to_remove,
        llvm::SmallDenseMap<Operation*, TF::IfRegionOp>& old_to_new_IfRegion_map) {
      TF::IfRegionOp first_if = if_op_segment[0];
      llvm::SmallVector<Type, 4> merged_return_types;
      llvm::SmallVector<TF::IfRegionOp, 8> sources_if_ops(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 25.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

      builder.create<YieldOp>(loc, cond_block->getArgument(0));
    }
    
    // Create an IfRegionOp with a predicate from `optional_has_value`.  If true, it
    // uses `get_next` to get the next value and calls `reduce_func`.  `body_args`
    // is used as pass through of state values for else branch.  `dataset_types` is
    // used for constructing the CallOp for `reduce_func`.
    IfRegionOp CreateOptionalDatasetIf(
    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/functional_control_flow_to_regions.cc

      return to_bool;
    }
    
    // Transform a functional IfOp to a region based IfRegionOp.
    LogicalResult ConvertIfOp(IfOp if_op) {
      Value cond = ConvertConditionToBoolean(if_op, if_op.getCond());
      OpBuilder builder(if_op);
      auto if_region = builder.create<TF::IfRegionOp>(
          if_op.getLoc(), if_op.getResultTypes(), cond, if_op.getIsStateless(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

        callee_names = {first_call.value().getCallee(),
                        second_call.value().getCallee()};
      }
    };
    
    // Transform IfRegionOp to IfOp.
    LogicalResult RegionControlFlowToFunctional::ConvertIfOp(
        SymbolTableCollection& symbol_table, IfRegionOp if_region) {
      llvm::SmallVector<Value, 4> extern_values;
    
      // For IfOp, arguments of calls in the then and else regions match if they
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

      }
      while_op.replaceAllUsesWith(
          new_while.getResults().take_front(while_op.getNumResults()));
      while_op.erase();
      return success();
    }
    
    LogicalResult HandleIfRegionOp(
        TF::IfRegionOp if_op, ModuleOp module,
        llvm::SmallDenseMap<Value, SizeInfo>* buffer_to_size,
        llvm::StringMap<PartitionedCallDecompositionInfo>*
            decomposed_partitioned_call_callees) {
      // Rewrite the branches.
    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/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

          op);
    }
    
    // Returns true if the given op is one of ops supported to have communication
    // subcomputation in the TF/XLA bridge.
    bool SupportsCommunicationComputation(Operation* op) {
      return isa<TF::IfRegionOp, TF::WhileRegionOp, TF::CaseRegionOp,
                 TF::XlaCallModuleOp, TF::StatefulPartitionedCallOp,
                 TF::PartitionedCallOp, TF::LegacyCallOp>(op);
    }
    
    #define GEN_PASS_DEF_PREPARETPUCOMPUTATIONFORTFEXPORTPASS
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc

                           IRMapping &valueMapping) const final {
        // Allow inlining in regions attached to region based control flow
        // operations only if the src region is a single block region
        return isa<IfRegionOp, CaseRegionOp, WhileRegionOp>(dest->getParentOp()) &&
               llvm::hasSingleElement(*src);
      }
    
      // Returns true if its legal to inline a TF operation `op` into the `dest`
      // region.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.cc

            AddRegionSideEffectsForOp(branch_func.getBody(), op);
          }
        } else if (isa<tf_device::LaunchOp, tf_device::ClusterOp,
                       tf_executor::IslandOp, tf_executor::GraphOp, IfRegionOp,
                       CaseRegionOp>(op)) {
          for (Region& region : op->getRegions()) {
            AddRegionSideEffectsForOp(region, op);
          }
        } else if (auto xla_call_module_op = dyn_cast<XlaCallModuleOp>(op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 41.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

          (*arguments_to_erase)[callee].push_back(argument_index - 1);
          work_list->push_back(
              std::make_pair(&callee.getBody(), argument_index - 1));
        }
      } else if (auto if_op = dyn_cast<TF::IfRegionOp>(user_op)) {
        (*arguments_to_erase)[if_op].push_back(argument_index);
        for (auto callee : {&if_op.getThenBranch(), &if_op.getElseBranch()}) {
          work_list->push_back(std::make_pair(callee, argument_index));
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc

          if (while_op.cond_function().walk(check_while_cond).wasInterrupted())
            return WalkResult::interrupt();
          result = CanonicalizeFunctionalWhile(while_op);
        } else if (isa<TF::IfRegionOp, TF::CaseRegionOp, tf_device::ClusterOp>(
                       op)) {
          result = CanonicalizeRegionIfCaseCluster(op);
        } else if (auto while_region = dyn_cast<TF::WhileRegionOp>(op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top