forked from huawei/mindspore2022
Do not Sync data from device to host if datatype is Monad
This commit is contained in:
parent
2135552c52
commit
9abf49057d
|
|
@ -175,6 +175,9 @@ bool AscendDeviceAddress::SyncDeviceToHost(const ShapeVector &shape, size_t size
|
|||
void *host_ptr) const {
|
||||
MS_LOG(INFO) << "SyncDeviceToHost, Device(format:" << format_ << ", type_id:" << TypeIdLabel(type_id_)
|
||||
<< ", size:" << size_ << "), Host(type_id:" << TypeIdLabel(type) << ", size:" << size << ")";
|
||||
if (type_id_ > kMonadTypeBegin && type_id_ < kMonadTypeEnd) {
|
||||
return true;
|
||||
}
|
||||
SyncStream();
|
||||
bool sync_ok = false;
|
||||
std::vector<size_t> host_shape;
|
||||
|
|
|
|||
Loading…
Reference in New Issue