mxnet.engine¶
Engine properties management.
Functions
|
Bulk execution bundles many operators to run together. |
|
Set size limit on bulk execution. |
-
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
-
mxnet.engine.
set_bulk_size
(size)[source]¶ Set size limit on bulk execution.
Bulk execution bundles many operators to run together. This can improve performance when running a lot of small operators sequentially.
- Parameters
size (int) – Maximum number of operators that can be bundled in a bulk.
- Returns
Previous bulk size.
- Return type
int