Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for canMove (0.17 sec)

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

        return failure();
      }
      return success();
    }
    
    // Check if we can move TPUCopyWithDynamicShapeOp out of a launch. This is the
    // case if its results aren't used by other ops except for the return op.
    bool CanMove(Operation* op) {
      auto launch_op = llvm::dyn_cast<tf_device::LaunchOp>(op->getParentOp());
      if (!launch_op) return false;
      for (Value result : op->getResults()) {
        for (Operation* user : result.getUsers()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. tensorflow/c/tf_tensor.cc

      if (Type() == DT_STRING && NumElements() > 0) {
        TF_TString* data = static_cast<TF_TString*>(Data());
        if (CanMove() && data != nullptr) {
          for (int64_t i = 0; i < NumElements(); ++i) {
            TF_TString_Dealloc(&data[i]);
          }
        }
      }
      delete this;
    }
    
    bool TensorInterface::CanMove() const {
      // It is safe to move the Tensor if and only if we own the unique reference to
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top