Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 55 for while_loop (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc

                if (!func) continue;
                next_values_to_visit.push_back(
                    func.getArgument(next_op_operand_num));
              } else if (auto while_op =
                             llvm::dyn_cast_or_null<TF::WhileOp>(next_op)) {
                func::FuncOp func = while_op.body_function();
                auto func_argument = func.getArgument(next_op_operand_num);
                // Check if the op is returned without mutation. Returning values
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  6. 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)
  7. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

              while_op.getInput().getTypes(), while_op.getOutput().getTypes(),
              while_op.getBody().getArgumentTypes());
          return PropagateShapeToRegions(compatible_types,
                                         {&while_op.getCond(), &while_op.getBody()},
                                         max_iterations);
        }
        return PropagateShapeToRegions(while_op.getInput().getTypes(),
    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/tensorflow/transforms/resource_op_lifting_cleanup.cc

          result =
              CanonicalizeFunctionalIfCase(case_op, branches, case_op.getInput());
        } else if (auto while_op = dyn_cast<TF::WhileOp>(op)) {
          if (while_op.cond_function().walk(check_while_cond).wasInterrupted())
            return WalkResult::interrupt();
          result = CanonicalizeFunctionalWhile(while_op);
        } else if (isa<TF::IfRegionOp, TF::CaseRegionOp, tf_device::ClusterOp>(
                       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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_cfg.cc

            if (failed(LowerIfOp(if_op))) {
              return signalPassFailure();
            }
            break;
          }
          if (WhileOp while_op = llvm::dyn_cast<WhileOp>(op)) {
            if (failed(LowerWhileOp(while_op))) {
              return signalPassFailure();
            }
            break;
          }
        }
      }
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 13 11:42:59 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

        Value collection, ModuleOp module,
        llvm::function_ref<std::optional<Type>(Operation*)> infer_from_op) {
      for (auto& use : collection.getUses()) {
        if (auto while_op = llvm::dyn_cast<TF::WhileOp>(use.getOwner())) {
          auto body = while_op.body_function();
          assert(body);
          auto type_from_body = GetElementTypeFromAccess(
              body.getArgument(use.getOperandNumber()), module, infer_from_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
Back to top