Browse Source

Fix Segmentation fault on Ascend

tags/v1.2.0-rc1
caifubi 5 years ago
parent
commit
7bfc2a3143
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc

+ 4
- 0
mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc View File

@@ -710,6 +710,10 @@ bool AscendKernelRuntime::RunTask(const session::KernelGraph *graph) {

bool AscendKernelRuntime::SyncStream() {
InnerSetContext();
if (stream_ == nullptr) {
MS_LOG(ERROR) << "SyncStream failed. stream_ is nullptr";
return false;
}
if (RT_ERROR_NONE != rtStreamSynchronize(stream_)) { // o for switch stream
MS_LOG(ERROR) << "Call runtime rtStreamSynchronize error.";
return false;


Loading…
Cancel
Save