zheng-da commented on a change in pull request #10731: Fix a bug in getting MKLDNN memory
URL: https://github.com/apache/incubator-mxnet/pull/10731#discussion_r184826063
##########
File path: tests/python/gpu/test_gluon_model_zoo_gpu.py
##########
@@ -81,15 +81,16 @@ def test_inference():
gpu_param = gpu_params.get(k)
gpu_param.set_data(cpu_param.data().as_in_context(mx.gpu()))
- # Run inference.
- with autograd.record(train_mode=False):
- cpu_out = cpu_model(mx.nd.array(data, ctx=mx.cpu()))
- gpu_out = gpu_model(gpu_data)
- out = cpu_out.asnumpy()
- max_val = np.max(np.abs(out))
- gpu_max_val = np.max(np.abs(gpu_out.asnumpy()))
- eprint(model_name + ": CPU " + str(max_val) + ", GPU " + str(gpu_max_val))
- assert_almost_equal(out / max_val, gpu_out.asnumpy() / max_val, rtol=1e-3, atol=1e-3)
+ for i in range(5):
Review comment:
this is one way of reproducing the bug in https://github.com/apache/incubator-mxnet/issues/10580.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
|