Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 80 for getCond (0.54 sec)

  1. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_communication.cc

                                               new_result_types, new_val_operands);
    
      // Move all regions from the old `mhlo.while` op to its replacement.
      new_while.getCond().takeBody(region_while.getCond());
      new_while.getBody().takeBody(region_while.getBody());
    
      // Forward result from old `mhlo.while` with replacement.
      SmallVector<Value> old_while_results = region_while.getResults();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 40.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

    // condition of whether to continue to next iteration.
    void PopulateDatasetWhileCond(OpBuilder builder, WhileRegionOp dataset_while,
                                  Location loc) {
      auto& cond_region = dataset_while.getCond();
      Block* cond_block = builder.createBlock(&cond_region);
      auto while_input_types = dataset_while.getOperandTypes();
      cond_block->addArguments(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

        return failure();
      }
      auto output_buffer_to_size = AddTensorListSizesToTerminator<TF::YieldOp>(
          body_region.front(), *buffer_to_size);
    
      // Rewrite cond.
      Region& cond_region = while_op.getCond();
      modify_region_arguments(cond_region);
      if (failed(DecomposeTensorListOpsInternal(
              &cond_region.front(), module, buffer_to_size,
              decomposed_partitioned_call_callees))) {
        return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

        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;
      auto mirrored_variable_indices_attr =
          replicate->getAttrOfType<ArrayAttr>(kMirroredVariableIndicesAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

            }
    
            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)
  6. 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)
  7. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

            op.getNumOperands(), op.getNumResults()));
      if (op.getCond().front().getNumArguments() !=
          op.getBody().front().getNumArguments())
        return op.emitOpError(llvm::formatv(
            "number of arguments in condition function does not match number of "
            "arguments in body function ({0} != {1})",
            op.getCond().front().getNumArguments(),
            op.getBody().front().getNumArguments()));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

            /*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);
        ReplaceReturnOp(new_while.getBody(), rewriter);
        rewriter.replaceOp(while_op, new_while.getResults());
        return success();
      }
    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/ir/tf_ops_a_m.cc

    };
    
    LogicalResult FoldConstantIfOp::matchAndRewrite(
        TF::IfOp op, PatternRewriter& rewriter) const {
      // Extract the constant cond value.
      DenseIntElementsAttr cond_attr;
      if (!matchPattern(op.getCond(), m_Constant(&cond_attr))) return failure();
    
      // Cond value must be a scalar.
      if (cond_attr.getNumElements() != 1) return failure();
    
      // Select a branch function.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

          return subgraph_index_map_.at(call_op.getCallee().str());
        return std::nullopt;
      };
      auto body_subgraph_index = get_call_index(op.getBody().front());
      auto cond_subgraph_index = get_call_index(op.getCond().front());
      if (!body_subgraph_index || !cond_subgraph_index)
        return op.emitOpError("only single call cond/body while export supported"),
               std::nullopt;
      auto builtin_options =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
Back to top