Skip to content

[TOPI] bitserial_conv2d move to autotvm template and updates - #2819

Merged
tqchen merged 10 commits into
apache:masterfrom
cowanmeg:master
Apr 4, 2019
Merged

tqchen merged 10 commits into
apache:masterfrom
cowanmeg:master

Conversation

@cowanmeg

Copy link
Copy Markdown

Updates to arm_cpu and x86 bitserial_conv2d operators

  • Moved to autotvm template
  • Support kernels that are pre-bitpacked for arm_cpu

@cowanmeg

Copy link
Copy Markdown
Author

@ZihengJiang

@tqchen

tqchen commented Mar 15, 2019

Copy link
Copy Markdown
Member

Please request reviewers

@cowanmeg

Copy link
Copy Markdown
Author

@eqy @ZihengJiang, please review

policy='candidate', candidate=[
[n, oh, ow, co, vh, vw, kh, kw, ci_o, kb, ib, vc, ci_i],
[n, oh, ow, co, vh, vw, kw, kh, ci_o, kb, ib, vc, ci_i],])
cfg.add_flop(2 * N * OH * OW * CO * CI * 8 * KH * KW)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the automatic flop calculation in #2776 work for this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly no :( it gives an error about multiple output in the compute.

Comment thread topi/python/topi/nn/bitserial_conv2d.py Outdated
re_axes = cfg.define_reorder("reorder_0",
[n, oh, ow, co, vh, vw, kh, kw, kb, ib, vc, ci],
policy='interval_all', interval=(3, 7))
cfg.add_flop(2 * N * OH * OW * CO * CI * 8 * KH * KW)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

""

Comment thread topi/python/topi/nn/bitserial_conv2d.py Outdated
re_axes = cfg.define_reorder("reorder_0",
[n, co, oh, ow, vc, vh, vw, kh, kw, kb, ib, ci],
policy='interval_all', interval=(6, 11))
cfg.add_flop(2 * N * OH * OW * CO * CI * 8 * KH * KW)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

""

verify_bitserial_conv2d_nhwc(1, in_size, ic, oc, k, stride, pad, 1, 1, False)
verify_bitserial_conv2d_nhwc(1, in_size, ic, oc, k, stride, pad, 2, 1, False)

verify_bitserial_conv2d_nhwc(1, in_size, ic, oc, k, stride, pad, 1, 1, True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a correctness check here for random or precomputed inputs? It looks like generate_quantized_np is no longer used.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, but it will only run on an arm device.

@tqchen

tqchen commented Mar 30, 2019

Copy link
Copy Markdown
Member

@ajtulloch @vinx13 please also help review the PR if you have time. @cowanmeg please try to rebase and fix the CI problem

@tqchen tqchen added the status: need update need update based on feedbacks label Mar 30, 2019
Comment thread topi/python/topi/arm_cpu/bitserial_conv2d.py Outdated
Comment thread topi/python/topi/x86/bitserial_conv2d.py Outdated
@tqchen
tqchen merged commit 1735187 into apache:master Apr 4, 2019
@tqchen

tqchen commented Apr 4, 2019

Copy link
Copy Markdown
Member

Thanks, @vinx13 @cowanmeg @eqy, this is now merged

@tqchen tqchen added status: accepted and removed status: need review status: need update need update based on feedbacks labels Apr 4, 2019
wweic pushed a commit to wweic/tvm that referenced this pull request Apr 7, 2019
wweic pushed a commit to wweic/tvm that referenced this pull request Apr 7, 2019
wweic pushed a commit to wweic/tvm that referenced this pull request Apr 8, 2019
wweic pushed a commit to wweic/tvm that referenced this pull request Apr 10, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants