!18535 add RDR export point for SyncStream failed

Merge pull request !18535 from liangyongxiong/master
This commit is contained in:
i-robot 2021-06-21 17:09:22 +08:00 committed by Gitee
commit 538fb5dd8a
1 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,9 @@
#include "debug/tensor_load.h"
#include "debug/debugger/debugger.h"
#endif
#ifdef ENABLE_DUMP_IR
#include "debug/rdr/running_data_recorder.h"
#endif
namespace mindspore {
namespace device {
@ -47,6 +50,9 @@ bool GPUDeviceAddress::SyncDeviceToHost(size_t size, void *host_ptr) const {
MS_EXCEPTION_IF_NULL(stream);
auto ret = GPUDeviceManager::GetInstance().SyncStream(stream);
if (!ret) {
#ifdef ENABLE_DUMP_IR
mindspore::RDR::TriggerAll();
#endif
MS_LOG(ERROR) << "SyncStream failed";
return ret;
}