Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for getTerminator (0.15 sec)

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

    void UpdateTerminatorArguments(T& func,
                                   const ArrayRef<unsigned> arguments_to_erase,
                                   llvm::BitVector& erase_indices) {
      auto terminator = func.front().getTerminator();
      int num_operands = terminator->getNumOperands();
      erase_indices.resize(num_operands);
      for (auto arg_index : arguments_to_erase) {
        auto argument = func.getArgument(arg_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)
  2. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

      Block& block = region.front();
      if (std::distance(block.begin(), block.end()) != 2) return std::nullopt;
      TF::YieldOp yield =
          llvm::dyn_cast_or_null<TF::YieldOp>(block.getTerminator());
      if (!yield) return std::nullopt;
      func::CallOp call = llvm::dyn_cast_or_null<func::CallOp>(*block.begin());
      if (!call) return std::nullopt;
      if (block.getNumArguments() != call.getNumOperands() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

      OpBuilder builder(replicate);
      auto new_replicate = builder.create<tf_device::ReplicateOp>(
          replicate.getLoc(), num_replicas, devices, new_replicated_inputs,
          new_packed_inputs,
          replicate.GetBody().getTerminator()->getOperandTypes());
      for (auto arg : replicate.GetBody().getArguments()) {
        if (replicate.IsReplicatedBlockArgument(arg)) {
          arg.replaceAllUsesWith(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        //   ^main(%x : bar):
        //     yield %x : bar
        // }
        //
        // to
        //
        // func.func @f(%x : bar) -> bar {
        //   ...
        // }
        auto ret = f.getBody().front().getTerminator();
        std::vector<Type> argument_types;
        for (auto arg : f.getBody().front().getArguments()) {
          argument_types.push_back(arg.getType());
        }
        std::vector<Type> return_types;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

      if (!llvm::hasSingleElement(block.without_terminator())) return false;
    
      auto graph = llvm::dyn_cast<tf_executor::GraphOp>(block.front());
      if (!graph) return false;
    
      Operation* terminator = block.getTerminator();
      if (graph.getNumResults() != terminator->getNumOperands()) return false;
      for (auto result : llvm::zip(graph.getResults(), terminator->getOperands()))
        if (std::get<0>(result) != std::get<1>(result)) return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/defer_activation_transpose.cc

      bool IsMaxFunction(Block& block) const {
        if (block.getNumArguments() != 2) return false;
    
        auto return_op = cast<mlir::stablehlo::ReturnOp>(block.getTerminator());
        if (return_op.getNumOperands() != 1) return false;
    
        auto max_op = dyn_cast_or_null<MaxOp>(
            return_op.getOperands().front().getDefiningOp());
        if (!max_op) return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.cc

          if (!passthrough_arg) break;
          value = call.getArgOperands()[passthrough_arg.value()];
        } else if (isa<tf_device::LaunchOp, tf_device::ClusterOp>(op)) {
          value = op->getRegion(0).front().getTerminator()->getOperand(res_index);
        } else {
          break;
        }
      }
      return value;
    }
    
    // Analyze the region.
    BacktrackAnalysisInfo::BacktrackAnalysisInfo(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/tf_tfl_translate.cc

        mlir::Operation *terminator = nullptr;
        if (subgraph->name()) {
          if (auto fn = module.lookupSymbol<FuncOp>(subgraph->name()->str()))
            terminator = fn.back().getTerminator();
        }
        i = 0;
        for (auto output : *subgraph->outputs()) {
          print_buffer(*subgraph, i, output, [&](int i) {
            return terminator ? terminator->getOperand(i).getLoc() : unknown_loc;
          });
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 14K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        arg.replaceAllUsesWith(new_arg);
        arg.dropAllUses();
        bb.eraseArgument(0);
      }
    
      // Edit the return ops and remove the dequantize ops in place.
      auto* terminator = bb.getTerminator();
      int num_return_operands = terminator->getNumOperands();
      llvm::SmallVector<Type, 4> output_types;
      output_types.reserve(num_return_operands);
      for (int i = 0; i != num_return_operands; ++i) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc

        func::FuncOp function,
        llvm::ArrayRef<std::string> var_handle_shared_names) {
      Block& block = function.front();
    
      auto return_op =
          llvm::dyn_cast_or_null<func::ReturnOp>(block.getTerminator());
      if (!return_op)
        return function.emitError() << "expects function '" << function.getName()
                                    << "' to have a MLIR ReturnOp";
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top