Exemple #1
0
 def test_popdist_inference(self):
     executable = get_current_interpreter_executable()
     out = run_script(
         "poprun",
         f"--mpi-global-args='--allow-run-as-root' --num-instances=2 --numa-aware=yes --num-replicas=2 {executable} inference/run_benchmark.py --data generated --model resnet18 --batch-size 4 --precision 16.16 --iterations 10 --dataloader-worker 4",
         python=False)
     max_thoughput = get_max_thoughput(out)
     assert max_thoughput > 0
Exemple #2
0
def test_normlayer_efficientnet(norm_layer):
    out = run_script("inference/run_benchmark.py", f"--data synthetic --batch-size 1 --model efficientnet-b0 --norm-type {norm_layer} --norm-num-groups 4 --iterations 10 --precision 16.16 --dataloader-worker 4 --random-weights")
    max_thoughput = get_max_thoughput(out)
    assert max_thoughput > 0
Exemple #3
0
def test_normlayer_resnet(norm_layer):
    out = run_script("inference/run_benchmark.py", f"--data synthetic --batch-size 1 --model resnet18 --norm-type {norm_layer} --iterations 10 --precision 16.16 --dataloader-worker 4")
    max_thoughput = get_max_thoughput(out)
    assert max_thoughput > 0
Exemple #4
0
def test_single_ipu_models(model_name):
    out = run_script("inference/run_benchmark.py", f"--data synthetic --batch-size 1 --model {model_name} --iterations 10 --precision 16.16 --dataloader-worker 4")
    max_throughput = get_max_thoughput(out)
    assert max_throughput > 0
Exemple #5
0
 def test_IO_overlap(self):
     out = run_script("inference/run_benchmark.py", f"--config resnet50-mk2 --data generated --replicas 1 --batch-size 1 --iterations 10 --num-io-tiles 32")
     max_thoughput = get_max_thoughput(out)
     assert max_thoughput > 0
Exemple #6
0
 def test_full_precision(self):
     out = run_script("inference/run_benchmark.py", f"--data synthetic --model resnet18 --batch-size 1 --precision 32.32 --iterations 10 --dataloader-worker 4")
     max_thoughput = get_max_thoughput(out)
     assert max_thoughput > 0
Exemple #7
0
 def test_realdata_pipeline(self):
     out = run_script("inference/run_benchmark.py", "--data real --batch-size 2 --model resnet18 --pipeline-splits layer3/0 --device-iterations 4 --precision 16.16 --iterations 10 --dataloader-worker 4")
     max_throughput = get_max_thoughput(out)
     assert max_throughput > 0
Exemple #8
0
 def test_replicate(self):
     out = run_script("inference/run_benchmark.py", "--data synthetic --replicas 2 --model resnet18 --precision 16.16 --iterations 10 --dataloader-worker 4")
     max_throughput = get_max_thoughput(out)
     assert max_throughput > 0