Browse Source

!9776 fix heterogeneity SyncHostToDevice failed

From: @zhaosida1994
Reviewed-by: @chujinjin,@zhoufeng54
Signed-off-by: @chujinjin
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
8bd2143500
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/runtime/device/ascend/ascend_device_address.cc

+ 1
- 1
mindspore/ccsrc/runtime/device/ascend/ascend_device_address.cc View File

@@ -575,7 +575,7 @@ bool AscendDeviceAddress::ConvertFormatAndSyncHostToDevice(const ShapeVector &sh
host_shape.emplace_back(1);
}
std::vector<size_t> device_shape;
if (format_ == kOpFormat_FRAC_NZ || format_ == kOpFormat_NCDHW || kOpFormat_NDC1HWC0) {
if (format_ == kOpFormat_FRAC_NZ || format_ == kOpFormat_NCDHW || format_ == kOpFormat_NDC1HWC0) {
device_shape = trans::TransShapeToDevice(host_shape, format_);
} else {
host_shape = trans::PaddingShapeTo4d(host_shape);


Loading…
Cancel
Save