forked from mindspore-Ecosystem/mindspore
!20110 fix the test case of CPU dump
Merge pull request !20110 from limingqi107/bug_fix
This commit is contained in:
commit
0f6d55289f
|
@ -25,6 +25,9 @@ namespace device {
|
|||
namespace gpu {
|
||||
void GPUDeviceManager::InitDevice() {
|
||||
CHECK_OP_RET_WITH_EXCEPT(CudaDriver::SetDevice(SizeToInt(cur_dev_id_)), "Failed to set current device id");
|
||||
if (dev_alive_) {
|
||||
return;
|
||||
}
|
||||
CHECK_OP_RET_WITH_EXCEPT(CreateStream(&default_stream_), "Failed to create CUDA stream.");
|
||||
CHECK_CUDNN_RET_WITH_EXCEPT_NOTRACE(cudnnCreate(&cudnn_handle_), "Failed to create cuDNN handle");
|
||||
CHECK_CUDNN_RET_WITH_EXCEPT_NOTRACE(cudnnSetStream(cudnn_handle_, reinterpret_cast<cudaStream_t>(default_stream())),
|
||||
|
|
|
@ -90,6 +90,9 @@ def run_e2e_dump():
|
|||
if context.get_context("device_target") == "Ascend":
|
||||
assert len(os.listdir(dump_file_path)) == 5
|
||||
output_name = "Add.Add-op1.0.0.*.output.0.DefaultFormat.npy"
|
||||
elif context.get_context("device_target") == "CPU":
|
||||
assert len(os.listdir(dump_file_path)) == 5
|
||||
output_name = "Add.Add-op3.0.0.*.output.0.DefaultFormat.npy"
|
||||
else:
|
||||
assert len(os.listdir(dump_file_path)) == 3
|
||||
output_name = "Add.Add-op3.0.0.*.output.0.DefaultFormat.npy"
|
||||
|
|
Loading…
Reference in New Issue