apeforest commented on a change in pull request #15943: Added tests to verify
Large Vector Support for initial set of ops
URL: https://github.com/apache/incubator-mxnet/pull/15943#discussion_r317309189
##########
File path: python/mxnet/test_utils.py
##########
@@ -262,6 +262,19 @@ def assign_each2(input1, input2, function):
return output
+# For testing Large Tensors having total size > 2^32 elements
+def create_2d_tensor(rows, columns, dtype=np.int64):
+ a = nd.arange(0, rows, dtype=dtype).reshape(rows, 1)
+ b = nd.broadcast_to(a, shape=(a.shape[0], columns))
+ return nd.array(b, dtype=dtype)
+
+# For testing Large Vectors having total size > 2^32 elements
+def create_vector(size, dtype=np.int64):
+ a = nd.arange(0, size, dtype=dtype)
+ # Implicitly calling nd.waitall()
+ assert a[0] == 0
Review comment:
shouldn't this call be done outside?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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