Skip to content

Commit

Permalink
add api test with one config
Browse files Browse the repository at this point in the history
  • Loading branch information
asyms committed Sep 22, 2023
1 parent cdf0de8 commit 49ecbac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
24 changes: 24 additions & 0 deletions tests/main/test_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Test the zigzag api call
import pytest

from zigzag.api import get_hardware_performance_zigzag


@pytest.fixture
def workload():
return "zigzag/inputs/examples/workload/mobilenetv2.onnx"


@pytest.fixture
def mapping():
return "zigzag.inputs.examples.mapping.tpu_like"


@pytest.fixture
def accelerator():
return "zigzag.inputs.examples.hardware.TPU_like"


def test_api(workload, mapping, accelerator):
answer = get_hardware_performance_zigzag(workload, accelerator, mapping)
assert answer
9 changes: 0 additions & 9 deletions tests/main/test_main_onnx.py

This file was deleted.

0 comments on commit 49ecbac

Please sign in to comment.