Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for getNumRegions (0.17 sec)

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

      }
    
      num_new_results_ = op_->getNumResults();
    
      for (auto resource : all_resources) {
        ResourceInfo info;
        info.data_type = GetResourceSubtype(resource);
        llvm::BitVector written_regions(op_->getNumRegions());
        bool unsupported_use = false;
        for (OpOperand& use : resource.getUses()) {
          Operation* user = use.getOwner();
          // If the user is not in one of the regions, we are not interested in it.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

                    tf_saved_model::TensorFlowSavedModelDialect>();
      }
    };
    
    // Returns true iff func_op has either no Region or the body has no Blocks.
    bool IsFuncOpEmpty(func::FuncOp func_op) {
      return func_op->getNumRegions() == 0 || func_op.getBody().empty();
    }
    
    // Gets the GraphOp from the function op. Returns an empty op iff it doesn't
    // exist.
    GraphOp GetGraphOpFromFuncOp(func::FuncOp func_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_communication.cc

      builder.setInsertionPoint(region_if);
    
      if (!region_idx) {
        RewriteRegionIfOp(builder, region_if, ops_to_visit, token);
        return true;
      }
    
      if (*region_idx < region_if.getNumRegions()) {
        // For the region-blocks of If op, we create a dummy token argument. Later
        // we replace that block-argument's uses with the same (implicitly captured)
        // token 'token', used for If op, and erase the argument.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 40.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc

      OpBuilder builder(op);
      Operation *new_op = Operation::create(
          op->getLoc(), op->getName(), new_result_types, op->getOperands(),
          op->getAttrs(), op->getPropertiesStorage(), op->getSuccessors(),
          op->getNumRegions());
      builder.insert(new_op);
    
      // Move region bodies to the new operation.
      for (auto it : llvm::zip(op->getRegions(), new_op->getRegions())) {
        Region &old_region = std::get<0>(it);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

                                   output_types, quantizing_op->getAttrs());
          for (int i = 0; i < quantizing_op->getNumRegions(); ++i) {
            new_state.addRegion();
          }
          Operation* quantized_op = rewriter.create(new_state);
          if (quantizing_op->getNumRegions() != 0) {
            for (const auto& indexed_regions :
                 llvm::enumerate(quantizing_op->getRegions())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_merge_variables_with_execute.cc

      output_types.append(merged_execute_launch.getResultTypes().begin(),
                          merged_execute_launch.getResultTypes().end());
      const int num_regions = parallel_execute_op->getNumRegions();
      const int num_results_after_region = AppendTypes(
          &output_types, parallel_execute, region_index + 1, num_regions);
    
      builder->setInsertionPoint(parallel_execute);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 17:52:11 UTC 2024
    - 27K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

            for (const auto& index_and_output :
                 llvm::enumerate(partitioned_output.getOutput())) {
              auto idx = (cluster_idx + index_and_output.index()) %
                         new_parallel_execute->getNumRegions();
              const auto output_from_logical_device =
                  new_parallel_execute.GetRegionOutputs(
                      idx)[tpu_cluster_output_index];
              index_and_output.value().replaceAllUsesWith(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

                                   op_with_region->getName().getStringRef(), inputs,
                                   output_types, op_with_region->getAttrs());
          for (int i = 0; i < op_with_region->getNumRegions(); ++i) {
            new_state.addRegion();
          }
          Operation* quantized_op = rewriter.create(new_state);
          for (const auto& [index, region] :
               llvm::enumerate(op_with_region->getRegions())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

      auto new_op = OpBuilder(case_op).create<TF::CaseRegionOp>(
          case_op.getLoc(),
          first_branch->front().getTerminator()->getOperandTypes(),
          case_op.getOperand(), case_op->getAttrs(), case_op.getNumRegions());
      for (const auto& entry : output_buffer_to_size) {
        (*buffer_to_size)[new_op.getResult(std::get<0>(entry))] = {
            new_op.getResult(std::get<1>(entry)), std::get<2>(entry)};
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

        auto new_op = CreateTfOp<CaseOrIfRegionOp>(rewriter, op, new_result_types,
                                                   op.getOperand(), op->getAttrs(),
                                                   op.getNumRegions());
    
        int next_index = 0;
        for (auto result : op.getResults()) {
          if (!result_to_extern_value.count(result)) {
            result.replaceAllUsesWith(new_op.getResult(next_index++));
            continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
Back to top