We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f42b994 + 744daef commit 42da428Copy full SHA for 42da428
deep_core/src/tensor.cpp
@@ -119,7 +119,7 @@ Tensor::Tensor(const Tensor & other)
119
if (is_owner_) {
120
allocate_memory();
121
if (other.data_ && data_) {
122
- if (allocator_ && other.allocator_ && allocator_ == other.allocator_) {
+ if (allocator_ && other.allocator_) {
123
allocator_->copy_device_to_device(data_, other.data_, byte_size_);
124
} else {
125
allocator_->copy_from_host(data_, other.data_, byte_size_);
0 commit comments