Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 36 for while_loop (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. tensorflow/compiler/mlir/lite/tests/canonicalize.mlir

      // CHECK: return %0#1 : tensor<f32>
      func.return %0#1 : tensor<f32>
    }
    
    // -----
    
    // Test case to test bug due to checking
    // `while_op.getResult(arg_index).use_empty()` instead of
    // `while_op.getResult(while_index).use_empty()` in the tfl.while
    // canonicalization.
    // arg0 is a pass through. After first iteration, arg_index = 0
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

        auto new_while = rewriter.create<TF::WhileRegionOp>(
            while_op.getLoc(), while_op->getResultTypes(), while_op->getOperands(),
            /*parallel_iterations=*/10,
            /*is_stateless=*/false, /*shape_invariant=*/false);
        new_while.getCond().takeBody(while_op.getCond());
        new_while.getBody().takeBody(while_op.getBody());
        ReplaceReturnOp(new_while.getCond(), rewriter);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_pipelining.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
    - 92.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.cc

          AddRegionSideEffectsForOp(if_op.then_function().getBody(), op);
          AddRegionSideEffectsForOp(if_op.else_function().getBody(), op);
        } else if (auto while_op = dyn_cast<WhileOp>(op)) {
          AddRegionSideEffectsForOp(while_op.body_function().getBody(), op);
        } else if (auto while_region_op = dyn_cast<WhileRegionOp>(op)) {
          AddRegionSideEffectsForOp(while_region_op.getBody(), op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 41.2K bytes
    - Viewed (0)
Back to top