Skip to content

Commit

Permalink
[microNPU] Remove spurious prints and improve documentation (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalda authored and Yuanjing Shi committed May 17, 2022
1 parent 898bf9c commit 91730be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/python/contrib/test_ethosu/test_encode_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ def _get_func():
func = _get_func()
mod, consts = _lower_to_tir(func)

print(mod.script())
script = mod.script(show_meta=True)
test_mod = tvm.script.from_source(script)
tvm.ir.assert_structural_equal(test_mod["main"], reference_mod["main"], True)
Expand Down Expand Up @@ -513,7 +512,6 @@ def _get_func():

script = mod.script(show_meta=True)
test_mod = tvm.script.from_source(script)
print(mod.script())
tvm.ir.assert_structural_equal(test_mod["main"], reference_mod["main"], True)

test_const_size = [value.size for value in list(consts.values())]
Expand Down
8 changes: 8 additions & 0 deletions tests/python/contrib/test_ethosu/test_replace_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ def get_conv2d_args(call, include_buffers=False, remove_constants=False):
conv_args = []
remove_indices = [0]

# call.args[41]: BufferLoad for the first half of the weights
# call.args[42]: length of the load of the first half of the weights
# call.args[43]: BufferLoad for the second half of the weights
# call.args[44]: length of the load of the second half of the weights
# call.args[46]: BufferLoad for the first half of the bias
# call.args[47]: length of the load of the first half of the bias
# call.args[48]: BufferLoad for the second half of the bias
# call.args[49]: length of the load of the second half of the bias
if remove_constants:
remove_indices += [41, 42, 43, 44, 46, 47, 48, 49]

Expand Down

0 comments on commit 91730be

Please sign in to comment.