Skip to content

Commit

Permalink
Fix for int4 tuning (apache#37)
Browse files Browse the repository at this point in the history
* set lower precision

* add flop for conv2d on arm cpu
  • Loading branch information
merrymercy authored and tmoreau89 committed Mar 21, 2019
1 parent a98b713 commit cf39305
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/autotvm/measure/measure_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def run_through_rpc(measure_input, build_result,
# check correctness of output
if ref_output:
for expected, real in zip(ref_output, args):
if not np.allclose(expected, real.asnumpy(), rtol=1e-4):
if not np.allclose(expected, real.asnumpy(), rtol=1e-2):
logger.warning("Wrong Answer!")
errno = MeasureErrorNo.WRONG_ANSWER
except TVMError as exc:
Expand Down
1 change: 1 addition & 0 deletions topi/python/topi/arm_cpu/conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def _decl_spatial_pack(cfg, data, kernel, strides, padding, dilation, layout, ou
output = tvm.compute(oshape, lambda n, co, h, w:
conv[n][co//VC][h//VH][w//VW][h%VH][w%VW][co%VC],
name='output_unpack', tag='spatial_conv2d_output')

cfg.add_flop(2 * np.prod(oshape) * CI * KH * KW)
return output

Expand Down

0 comments on commit cf39305

Please sign in to comment.