Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 36 for while_loop (0.13 sec)

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

      // Create the new while op.
      auto new_while_operands = llvm::to_vector<8>(while_op.getOperands());
      OpBuilder builder(while_op);
      assert(while_op.getNumOperands() == while_op.getNumResults());
      for (int64_t i = 0; i < while_op.getNumResults(); ++i) {
        auto it = data_var_to_size_var.find(while_op.getOperand(i));
        if (it == data_var_to_size_var.end()) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

    llvm::SmallVector<std::pair<int64_t, llvm::SmallVector<Value, 4>>, 4>
    AnnotateCompileOpAndGetExecuteArgToWhileArgsMapping(
        TF::WhileRegionOp while_op, tf_device::ReplicateOp replicate,
        TF::TPUExecuteAndUpdateVariablesOp execute,
        tf_device::LaunchOp compile_launch) {
      Region& body = while_op.getBody();
      Region& cond = while_op.getCond();
    
      llvm::SmallVector<std::pair<int64_t, llvm::SmallVector<Value, 4>>, 4> mapping;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

      auto loc = NameLoc::get(
          builder.getStringAttr("chain_control_outputs@" + while_op.getBody()));
      IslandOp const_wrapper = GetDummyConstant(builder, const_type, loc);
    
      // Get new operand and result types.
      auto new_operands = llvm::to_vector<4>(while_op->getOperands());
      auto new_result_types = llvm::to_vector<4>(while_op->getResultTypes());
      Value const_output = const_wrapper.getOutputs()[0];
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.cc

            PropagateInputToOutput(op->getOperand(result.getResultNumber()),
                                   result);
        } else if (auto while_op = dyn_cast<WhileOp>(op)) {
          AnalyzeWhileLoop(while_op, backtrack_analysis.GetAnalysisForFunc(
                                         while_op.body_function()));
        } else if (auto while_region = dyn_cast<WhileRegionOp>(op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

      module.walk([&](mlir::TFL::WhileOp while_op) {
        auto cond = symbol_table.lookup<mlir::func::FuncOp>(
            while_op->getAttr("cond").cast<mlir::FlatSymbolRefAttr>().getValue());
        AddCallOpInWhileOpRegion(while_op.getCond(), cond);
        while_op->removeAttr("cond");
        auto body = symbol_table.lookup<mlir::func::FuncOp>(
            while_op->getAttr("body").cast<mlir::FlatSymbolRefAttr>().getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc

      // Recreate the while op.
      OpBuilder builder(while_op);
      // Now use the filtered original operands, which will be replaced by
      // AddLoadsStoresOutsideControlFlowOp().
      auto new_while = builder.create<TF::WhileOp>(
          while_op.getLoc(), body.getFunctionType().getResults(),
          FilterRange<Value, OperandRange>(while_op.getOperands(),
                                           resource_arg_uses),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

          MarkOutsideCompiled(host_if.getOperation());
        }
        if (auto while_op = llvm::dyn_cast<mlir::TF::WhileRegionOp>(op)) {
          if (!HasOutsideCompilationNested(op)) return WalkResult::advance();
          OpBuilder builder(while_op);
          auto host_while = CloneEmptyWhile(while_op.getParallelIterations(),
                                            while_op.getLoc(), builder);
          const auto condition_send_recv_key =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_sequencing.cc

                                    TF::WhileOp* while_op) {
      // Given a while loop body function 'body_func', find the tf.While Op that
      // uses it.
      auto uses_optional = body_func.getSymbolUses(module);
      if (!uses_optional.has_value()) {
        body_func.emitOpError() << "no use of while loop body";
        return LogicalResult::failure();
      }
      *while_op = nullptr;
      for (auto& use : uses_optional.value()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

      LogicalResult matchAndRewrite(WhileRegionOp while_op,
                                    PatternRewriter &rewriter) const override {
        auto &body_block = while_op.getBody().front();
        auto &cond_block = while_op.getCond().front();
        bool changed = false;
        for (int op_idx : llvm::seq<int>(0, while_op.getNumOperands())) {
          auto body_arg = body_block.getArgument(op_idx);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

              return logical_device;
            }
    
            if (auto while_op = llvm::dyn_cast<mlir::TF::WhileRegionOp>(owner)) {
              const int operand_number = use.getOperandNumber();
              next_values_to_visit.push_back(
                  while_op.getCond().front().getArgument(operand_number));
              next_values_to_visit.push_back(
                  while_op.getBody().front().getArgument(operand_number));
              continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
Back to top