-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
asyms
committed
Sep 25, 2023
1 parent
6484207
commit e74e243
Showing
6 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
|
||
from zigzag.api import get_hardware_performance_zigzag | ||
|
||
workloads = ( | ||
"zigzag/inputs/examples/workload/alexnet.onnx", | ||
"zigzag/inputs/examples/workload/mobilenetv2.onnx", | ||
"zigzag/inputs/examples/workload/resnet18.onnx", | ||
"zigzag.inputs.examples.workload.resnet18", | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def mapping(): | ||
return "zigzag.inputs.examples.mapping.ascend_like" | ||
|
||
|
||
@pytest.fixture | ||
def accelerator(): | ||
return "zigzag.inputs.examples.hardware.Ascend_like" | ||
|
||
|
||
@pytest.mark.parametrize("workload", workloads) | ||
def test_api(workload, accelerator, mapping): | ||
answer = get_hardware_performance_zigzag(workload, accelerator, mapping) | ||
assert answer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
|
||
from zigzag.api import get_hardware_performance_zigzag | ||
|
||
workloads = ( | ||
"zigzag/inputs/examples/workload/alexnet.onnx", | ||
"zigzag/inputs/examples/workload/mobilenetv2.onnx", | ||
"zigzag/inputs/examples/workload/resnet18.onnx", | ||
"zigzag.inputs.examples.workload.resnet18", | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def mapping(): | ||
return "zigzag.inputs.examples.mapping.edge_tpu_like" | ||
|
||
|
||
@pytest.fixture | ||
def accelerator(): | ||
return "zigzag.inputs.examples.hardware.Edge_TPU_like" | ||
|
||
|
||
@pytest.mark.parametrize("workload", workloads) | ||
def test_api(workload, accelerator, mapping): | ||
answer = get_hardware_performance_zigzag(workload, accelerator, mapping) | ||
assert answer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
|
||
from zigzag.api import get_hardware_performance_zigzag | ||
|
||
workloads = ( | ||
"zigzag/inputs/examples/workload/alexnet.onnx", | ||
"zigzag/inputs/examples/workload/mobilenetv2.onnx", | ||
"zigzag/inputs/examples/workload/resnet18.onnx", | ||
"zigzag.inputs.examples.workload.resnet18", | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def mapping(): | ||
return "zigzag.inputs.examples.mapping.meta_prototype_like" | ||
|
||
|
||
@pytest.fixture | ||
def accelerator(): | ||
return "zigzag.inputs.examples.hardware.Meta_prototype" | ||
|
||
|
||
@pytest.mark.parametrize("workload", workloads) | ||
def test_api(workload, accelerator, mapping): | ||
answer = get_hardware_performance_zigzag(workload, accelerator, mapping) | ||
assert answer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
|
||
from zigzag.api import get_hardware_performance_zigzag | ||
|
||
workloads = ( | ||
"zigzag/inputs/examples/workload/alexnet.onnx", | ||
"zigzag/inputs/examples/workload/mobilenetv2.onnx", | ||
"zigzag/inputs/examples/workload/resnet18.onnx", | ||
"zigzag.inputs.examples.workload.resnet18", | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def mapping(): | ||
return "zigzag.inputs.examples.mapping.tesla_npu_like" | ||
|
||
|
||
@pytest.fixture | ||
def accelerator(): | ||
return "zigzag.inputs.examples.hardware.Tesla_NPU_like" | ||
|
||
|
||
@pytest.mark.parametrize("workload", workloads) | ||
def test_api(workload, accelerator, mapping): | ||
answer = get_hardware_performance_zigzag(workload, accelerator, mapping) | ||
assert answer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.