Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for getRegions (0.14 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

    // Returns true if the op contains a `CalibrationStatisticsSaverOp`.
    bool ContainCalibrationStatisticsSaverOp(Operation* op) {
      // Check the region for CaseRegionOp, IfRegionOp and WhileRegionOp.
      for (Region& region : op->getRegions()) {
        if (!region.getOps<TF::CalibrationStatisticsSaverOp>().empty()) {
          return true;
        }
      }
    
      SymbolTable symbol_table(op->getParentOfType<ModuleOp>());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc

          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);
        Region &new_region = std::get<1>(it);
        new_region.takeBody(old_region);
      }
    
      // Replace used results and erase the old 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)
  3. tensorflow/compiler/mlir/lite/experimental/tac/transforms/raise_target_subgraphs.cc

      added_call_op->setAttr(kInterfaceNameAttr, interface_name);
    
      StringAttr device = mlir::cast<StringAttr>(
          added_func_op->getRegion(0).getBlocks().front().front().getAttr(kDevice));
      StringAttr inference_type = mlir::cast<StringAttr>(
          added_func_op->getRegion(0).getBlocks().front().front().getAttr(
              kInferenceType));
      added_call_op->setAttr(kDevice, device);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

      llvm::SmallVector<Value, 4> extern_values =
          CollectExternValues(case_region.getRegions());
    
      // These external values need to be added as inputs to the generated Case. The
      // order is determined by the order of these values the `extern_vales`.
    
      for (const auto& item : llvm::enumerate(case_region.getRegions())) {
        std::string branch_name =
    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/resource_op_lifting.cc

          op_->getAttrs(), op_->getPropertiesStorage(), op_->getSuccessors(),
          op_->getNumRegions());
      builder.insert(new_op);
    
      // Move regions to the new op.
      for (auto it : llvm::zip(op_->getRegions(), new_op->getRegions())) {
        Region& old_region = std::get<0>(it);
        Region& new_region = std::get<1>(it);
        new_region.takeBody(old_region);
      }
    
      // Insert stores to all written resources.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

            PropagatePotentiallyWrittenUpFromCallee(func.getRegion(),
                                                    call.getArgOperands());
          }
          return;
        }
        if (auto if_op = dyn_cast<TF::IfOp>(op)) {
          for (auto callee : {if_op.then_function(), if_op.else_function()}) {
            PropagatePotentiallyWrittenUpFromCallee(callee.getRegion(),
                                                    if_op.getInput());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

    void RewriteTPUEmbeddingOps::runOnOperation() {
      func::FuncOp func = getOperation();
      if (failed(RunOnRegion(&func.getBody()))) return signalPassFailure();
    
      func.walk([&](Operation* op) {
        for (Region& region : op->getRegions()) {
          if (failed(RunOnRegion(&region))) return signalPassFailure();
        }
      });
    }
    
    }  // anonymous namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>>
    CreateRewriteTPUEmbeddingOpsPass() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

                                        cluster_result_types.size() *
                                            num_cores_per_replica);
      for (mlir::Region& region : old_parallel_execute.getRegions()) {
        if (!llvm::isa<tf_device::ClusterFuncOp>(region.front().front())) {
          for (Type t : region.front().front().getResultTypes())
            concatenated_output_types.emplace_back(t);
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.cc

          }
        } 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)) {
          for (auto func_symbol : xla_call_module_op.getFunctionList().getAsRange<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 41.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        // while creating the tf operations.
        new_types.pop_back();
    
        llvm::SmallVector<std::unique_ptr<Region>, 1> new_regions;
        for (auto &region : op->getRegions()) {
          new_regions.push_back(std::make_unique<Region>());
          new_regions.back()->takeBody(region);
        }
    
        llvm::SmallVector<NamedAttribute, 4> attrs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
Back to top