szha commented on a change in pull request #12804: CudnnFind() usage
improvements
URL: https://github.com/apache/incubator-mxnet/pull/12804#discussion_r224922688
##########
File path: tests/python/gpu/test_gluon_gpu.py
##########
@@ -233,6 +236,47 @@ def test_symbol_block_fp16():
break
assert np.dtype(net_fp16.params[param_name].dtype) == np.dtype(np.float16)
+
+@with_seed()
+def test_large_models():
+ ctx = default_context()
+ # Create model
+ net = gluon.nn.HybridSequential()
+
+ largest_num_features = 256
+ with net.name_scope():
+ net.add(nn.Conv2D(128, 3))
+ net.add(nn.LeakyReLU(0.1))
+ net.add(nn.Conv2D(largest_num_features, 3))
+ net.add(nn.LeakyReLU(0.1))
+ net.add(nn.Conv2D(1, 3))
+
+ net.hybridize()
+ net.initialize(mx.init.Normal(sigma=0.01), ctx=ctx)
+ mx.nd.waitall()
Review comment:
the first time it runs through this line of code, it will trigger actual
allocation. I'm merely pointing out that the waitall is likely not needed.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services