mxnet.ndarray.sparse.RowSparseNDArray.wait_to_read¶
-
RowSparseNDArray.
wait_to_read
()¶ Waits until all previous write operations on the current array are finished.
This method guarantees that all previous write operations that pushed into the backend engine for execution are actually finished.
Examples
>>> import time >>> tic = time.time() >>> a = mx.nd.ones((1000,1000)) >>> b = mx.nd.dot(a, a) >>> print(time.time() - tic) # doctest: +SKIP 0.003854036331176758 >>> b.wait_to_read() >>> print(time.time() - tic) # doctest: +SKIP 0.0893700122833252