Table Of Contents
Table Of Contents

bulk

mxnet.engine.bulk(size)[source]

Bulk execution bundles many operators to run together. This can improve performance when running a lot of small operators sequentially.

Returns a scope for managing bulk size:

with mx.engine.bulk(10):
    x = mx.nd.zeros((1,))
    for i in range(100):
        x += 1