def test_run_profile(train, pytestconfig): net = benchmarks.integrator(3, 2, nengo.RectifiedLinear()) benchmarks.run_profile( net, train=train, n_steps=10, do_profile=False, device=pytestconfig.getvalue("--device"), unroll_simulation=pytest.config.getvalue("--unroll_simulation"), dtype=(tf.float32 if pytest.config.getvalue("dtype") == "float32" else tf.float64)) assert net.config[net].inference_only == (not train)
def test_performance(net, train, minibatch_size, eager, min, max): # performance is based on Azure NC6 VM # CPU: Intel Xeon E5-2690 v3 @ 2.60Ghz # GPU: Nvidia Tesla K80 # Python version: 3.6.10 # TensorFlow GPU version: 2.3.0 # Nengo version: 3.1.0 # NengoDL version: 3.3.0 if not eager: tf.compat.v1.disable_eager_execution() tf.compat.v1.disable_control_flow_v2() time = benchmarks.run_profile( net, minibatch_size=minibatch_size, train=train, n_steps=1000, unroll_simulation=25, progress_bar=False, do_profile=False, reps=15, ) assert time > min assert time < max
def test_run_profile(network, train, pytestconfig, monkeypatch, tmpdir): monkeypatch.chdir(tmpdir) if network == "integrator": net = benchmarks.integrator(3, 2, nengo.SpikingRectifiedLinear()) elif network == "cconv": net = benchmarks.cconv(3, 10, nengo.LIF()) elif network == "test": with nengo.Network() as net: ens = nengo.Ensemble(10, 1) net.p = nengo.Probe(ens) benchmarks.run_profile( net, train=train, n_steps=10, do_profile=True, device=pytestconfig.getoption("--device"), unroll_simulation=pytestconfig.getoption("--unroll-simulation"), dtype=pytestconfig.getoption("dtype"), ) assert net.config[net].inference_only == (not train)
def test_performance(net, train, minibatch_size, min, max): # performance is based on Azure NC6 VM # CPU: Intel Xeon E5-2690 v3 @ 2.60Ghz # GPU: Nvidia Tesla K80 # Python version: 3.6.10 # TensorFlow GPU version: 2.1.0 # Nengo version: 3.1.0 # NengoDL version: 3.1.0 time = benchmarks.run_profile( net, minibatch_size=minibatch_size, train=train, n_steps=1000, unroll_simulation=25, progress_bar=False, do_profile=False, reps=15, ) assert time > min assert time < max
def test_performance(net, train, minibatch_size, min, max): # performance is based on ABR GPU server # CPU: Intel Xeon E5-1650 v3 @ 3.50GHz # GPU: GeForce GTX Titan X # Python version: 3.6.8 # TensorFlow GPU version: 2.0.0 # Nengo version: 3.1.0 # NengoDL version: 3.1.0 time = benchmarks.run_profile( net, minibatch_size=minibatch_size, train=train, n_steps=1000, unroll_simulation=25, progress_bar=False, do_profile=False, reps=15, ) assert time > min assert time < max