Skip to content

Commit 1566fb1

Browse files
authored
[microNPU] Update Conv2D Tests to Use TF API to Gen Test Cases (#9508)
* Current conv2d tests compare the conv2d operator against tvm's execution of the default schedule of conv2d as defined in TOPI and that is not bitexact with tflite runtime's implemention. Therefore a tolerance of "1" in quantized 8-bit domain is used. * Converts the current conv2d tests to use TensorFlow APIs to create a test cases for conv2D and compare against TFLite runtime.
1 parent ee629b1 commit 1566fb1

File tree

6 files changed

+295
-562
lines changed

6 files changed

+295
-562
lines changed

python/tvm/relay/backend/contrib/ethosu/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from . import util
1919
from . import legalize
2020
from . import preprocess
21-
from . import errors
2221
from . import codegen
2322
from . import vela_api
2423
from . import tir_to_cs_translator

python/tvm/relay/backend/contrib/ethosu/errors.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

python/tvm/relay/backend/contrib/ethosu/legalize.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from tvm.relay.dataflow_pattern import rewrite
3131
from tvm.relay.dataflow_pattern import CallPattern
3232
from tvm.relay.backend.contrib.ethosu import op as ethosu_ops # type: ignore
33-
from tvm.relay.backend.contrib.ethosu.errors import UnsupportedLayout # type: ignore
3433
from tvm.relay.backend.contrib.ethosu import vela_api
3534
from tvm.relay.backend.contrib.ethosu import util
3635
from tvm.relay.op.contrib import ethosu as ethosu_patterns # type: ignore
@@ -266,8 +265,6 @@ def callback(
266265
channels_map = {
267266
"NHWC": 3,
268267
}
269-
if str(params.ofm.layout) not in channels_map.keys():
270-
raise UnsupportedLayout(str(params.ofm.layout))
271268
kernel_size_map = {
272269
"HWIO": params.weights.shape[0:2],
273270
"OHWI": params.weights.shape[1:3],

tests/python/contrib/test_ethosu/relay_ir_builder.py

Lines changed: 0 additions & 295 deletions
This file was deleted.

0 commit comments

Comments
 (0)