block transdata to change format for now.

This commit is contained in:
lvchangquan 2020-08-18 12:26:00 +08:00
parent 9d1a6c1a9d
commit 0b63a1ffe4
1 changed files with 2 additions and 1 deletions

View File

@ -477,7 +477,8 @@ bool AscendDeviceAddress::SyncDeviceToHostAndConvertFormat(const std::vector<int
std::vector<size_t> device_shape = GetDeviceShape(&host_shape);
auto ms_context = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(ms_context);
if (ms_context->execution_mode() == kPynativeMode && type_id_name_map.find(type_id_) != type_id_name_map.end()) {
if (ms_context->execution_mode() != kGraphMode && ms_context->execution_mode() != kPynativeMode &&
type_id_name_map.find(type_id_) != type_id_name_map.end()) {
std::pair<std::string, std::string> type_format = std::make_pair(type_id_name_map.at(type_id_), format_);
if (use_trans_data.find(type_format) != use_trans_data.end()) {
sync_ok = SyncDeviceToHostAndConvertFormatBasedOnTransData(host_shape, device_shape, size, type, host_ptr);