Skip to content

Commit

Permalink
[microNPU] Update Conv2D Tests to Use TF API to Gen Test Cases (apach…
Browse files Browse the repository at this point in the history
…e#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.
  • Loading branch information
dchauhan-arm authored and mikepapadim committed Dec 9, 2021
1 parent 8928068 commit d590490
Show file tree
Hide file tree
Showing 6 changed files with 295 additions and 562 deletions.
1 change: 0 additions & 1 deletion python/tvm/relay/backend/contrib/ethosu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from . import util
from . import legalize
from . import preprocess
from . import errors
from . import codegen
from . import vela_api
from . import tir_to_cs_translator
35 changes: 0 additions & 35 deletions python/tvm/relay/backend/contrib/ethosu/errors.py

This file was deleted.

3 changes: 0 additions & 3 deletions python/tvm/relay/backend/contrib/ethosu/legalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from tvm.relay.dataflow_pattern import rewrite
from tvm.relay.dataflow_pattern import CallPattern
from tvm.relay.backend.contrib.ethosu import op as ethosu_ops # type: ignore
from tvm.relay.backend.contrib.ethosu.errors import UnsupportedLayout # type: ignore
from tvm.relay.backend.contrib.ethosu import vela_api
from tvm.relay.backend.contrib.ethosu import util
from tvm.relay.op.contrib import ethosu as ethosu_patterns # type: ignore
Expand Down Expand Up @@ -266,8 +265,6 @@ def callback(
channels_map = {
"NHWC": 3,
}
if str(params.ofm.layout) not in channels_map.keys():
raise UnsupportedLayout(str(params.ofm.layout))
kernel_size_map = {
"HWIO": params.weights.shape[0:2],
"OHWI": params.weights.shape[1:3],
Expand Down
295 changes: 0 additions & 295 deletions tests/python/contrib/test_ethosu/relay_ir_builder.py

This file was deleted.

Loading

0 comments on commit d590490

Please sign in to comment.