Script:
from mxnet import nd
from benchmark.opperf.utils.benchmark_utils import run_performance_test
print(run_performance_test(nd.RNN, run_backward=True, inputs=[{'data': (2**28,4,4), 'parameters': nd.random_normal(shape=(28,)), 'state': nd.random_normal(shape=(1, 4, 1)), 'state_cell': nd.random_normal(shape=(1, 4, 1)), 'mode': 'lstm', 'state_size': 1, 'num_layers': 1}], warmup=1, runs=1))
Output:
INFO:root:Begin Benchmark - RNN
INFO:root:Complete Benchmark - RNN
[{'RNN': [{'inputs': {'data': (268435456, 4, 4), 'parameters': '<NDArray 28 @cpu(0)>', 'state': '<NDArray 1x4x1 @cpu(0)>', 'state_cell': '<NDArray 1x4x1 @cpu
(0)>', 'mode': 'lstm', 'state_size': 1, 'num_layers': 1}, 'max_storage_mem_alloc_cpu/0': 32212254.0, 'avg_time_forward_RNN': 1674036.0, 'avg_time_backward_RN
N': 6374651.0}]}]