Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BYOC][Verilator] Skip mobilenet test if Verilator is not available #8094

Merged
merged 3 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/python/contrib/test_verilator/test_mobilenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
from tvm.contrib import graph_executor as runtime

import os
import pytest
from PIL import Image
import numpy as np

from test_verilator.infrastructure import (
skip_test,
compile_hardware,
compiler_opts,
offload,
Expand Down Expand Up @@ -213,13 +215,16 @@ def is_tflite_available():
return False


@pytest.mark.skipif(skip_test(), reason="Skip because Verilator codegen is not available")
def tmobilenet(lanes):
"""Mobilenet test template.
Paramters
---------
lanes : Int
The number of vector lanes.
"""
if skip_test():
leandron marked this conversation as resolved.
Show resolved Hide resolved
return
if not is_tflite_available():
return
model = get_mobilenet_model()
Expand Down
3 changes: 3 additions & 0 deletions tests/python/contrib/test_verilator/test_verilator_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import tvm
from tvm import relay
import pytest

from test_verilator.infrastructure import (
skip_test,
Expand Down Expand Up @@ -138,6 +139,7 @@ def print_test_info(test, lanes, cycles):
print("test:{} vector-lanes:{} number of cycles:{}".format(test, lanes, cycles))


@pytest.mark.skipif(skip_test(), reason="Skip because Verilator codegen is not available")
def tadd(lanes):
"""Print counter

Expand All @@ -158,6 +160,7 @@ def tadd(lanes):
print_test_info("add", lanes, cycles)


@pytest.mark.skipif(skip_test(), reason="Skip because Verilator codegen is not available")
def tbias(lanes):
"""Print counter

Expand Down