Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 62 for while_loop (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

        SmallVector<Value, 4> new_body_yield;
        SmallVector<bool, 4> removed_operand(while_op.getNumOperands(), false);
        llvm::SmallVector<Type, 4> types;
        new_operands.reserve(while_op.getNumOperands());
        new_body_yield.reserve(while_op.getNumOperands());
        types.reserve(while_op.getNumOperands());
    
        // Remove block arguments not used in either cond or body. This leaves the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

      OpBuilder builder(while_region);
      auto while_op = builder.create<WhileOp>(
          while_region.getLoc(), new_result_types, new_inputs, cond_name, body_name,
          while_region.getParallelIterations(), while_region.getIsStateless(),
          while_region.getShapeInvariant());
      CopyAndOverrideAttributes(while_region, while_op, &builder);
    
      // Redirect old results to new results.
      for (auto it : llvm::zip(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.h

      // Analyzes while loops to compute resource IDs for the loop results.
      // `body_info` is the backtrack analysis info for the loop body.
      void AnalyzeWhileLoop(Operation* while_op,
                            const BacktrackAnalysisInfo& body_info);
    
      // Analyzes tf.Case/tf.If ops to compute resource IDs.
      template <class CaseOrIfOp>
      void AnalyzeFunctionalCaseOrIfOp(CaseOrIfOp case_or_if_op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top