Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 42 for getTerminator (0.24 sec)

  1. tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc

    }
    
    LogicalResult ModifyIONodesPass::ModifyOutputNodes(
        func::FuncOp func, llvm::SmallVectorImpl<Type>& new_output_types,
        OpBuilder builder) {
      Block& block = func.front();
      auto* terminator = block.getTerminator();
      builder.setInsertionPoint(terminator);
    
      if (mlir::isa<FloatType>(output_type)) {
        return success();
      }
    
      int num_return_operands = terminator->getNumOperands();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

    LogicalResult IfRegionOp::verifyRegions() {
      IfRegionOp op = *this;
      TypeRange then_types =
          op.getThenBranch().front().getTerminator()->getOperandTypes();
      TypeRange else_types =
          op.getElseBranch().front().getTerminator()->getOperandTypes();
    
      TypeRangeWithDesc results{op.getResultTypes(), "result"};
      TypeRangeWithDesc then_results{then_types, "then result"};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

      }
      return changed;
    }
    
    bool ShapeInference::InferShapeForIfRegion(IfRegionOp op) {
      bool changed = false;
    
      Operation* then_yield = op.getThenBranch().front().getTerminator();
      Operation* else_yield = op.getElseBranch().front().getTerminator();
      for (auto result : zip(op.getResults(), then_yield->getOperandTypes(),
                             else_yield->getOperandTypes())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K 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