Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VTA] Support for batched inference #3661

Merged
merged 12 commits into from
Jul 30, 2019
Merged

[VTA] Support for batched inference #3661

merged 12 commits into from
Jul 30, 2019

Conversation

tmoreau89
Copy link
Contributor

This PR addresses some bugs that occur when setting LOG_BATCH to a value greater than 0 (i.e. batch size greater than 1).

  • IR pass bug fix for load2d pattern matching
  • fast simulator bug fix in ALU code
  • CI tests, and tutorials support batched inference
  • AutoTVM autotuning works for batched VTA

In addition, TOPHUB schedules were updated: tlc-pack/tophub@102b9b4

And a bitstream was added to test batched inference in hardware: uwsampl/vta-distro@e28d9d5

To reproduce in sim, set vta_config.json to:

{
  "TARGET" : "sim",
  "HW_VER" : "0.0.1",
  "LOG_INP_WIDTH" : 3,
  "LOG_WGT_WIDTH" : 3,
  "LOG_ACC_WIDTH" : 5,
  "LOG_BATCH" : 2,
  "LOG_BLOCK" : 3,
  "LOG_UOP_BUFF_SIZE" : 15,
  "LOG_INP_BUFF_SIZE" : 16,
  "LOG_WGT_BUFF_SIZE" : 16,
  "LOG_ACC_BUFF_SIZE" : 18
}

To run on pynq, set TARGET to pynq.

@tmoreau89 tmoreau89 changed the title [VTA] Support for batching in inference [VTA] Support for batched inference Jul 30, 2019
@tmoreau89 tmoreau89 requested review from jroesch and tqchen and removed request for tqchen July 30, 2019 06:40
@tmoreau89
Copy link
Contributor Author

@vegaluisjose @liangfu @tqchen please review

Copy link
Member

@liangfu liangfu left a comment

Choose a reason for hiding this comment

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

LGTM

vta/tutorials/frontend/deploy_resnet_on_vta.py Outdated Show resolved Hide resolved
@jroesch jroesch merged commit 6c7f0c4 into apache:master Jul 30, 2019
@tmoreau89 tmoreau89 deleted the hotfix-2 branch August 2, 2019 17:59
wweic pushed a commit to wweic/tvm that referenced this pull request Aug 9, 2019
* fix in IR pass to support padding on 6-d tensors

* support for both N>1 and N==1 for padding

* batch size > 1 tuning and base config

* output formatting

* batch conv2d

* print all category results

* revert to single-batch config

* pick record best

* fix conv test

* improving reporting

* address batching bug in fast simulator

* fix
wweic pushed a commit to neo-ai/tvm that referenced this pull request Sep 6, 2019
* fix in IR pass to support padding on 6-d tensors

* support for both N>1 and N==1 for padding

* batch size > 1 tuning and base config

* output formatting

* batch conv2d

* print all category results

* revert to single-batch config

* pick record best

* fix conv test

* improving reporting

* address batching bug in fast simulator

* fix
tqchen pushed a commit to tqchen/tvm that referenced this pull request Mar 29, 2020
* fix in IR pass to support padding on 6-d tensors

* support for both N>1 and N==1 for padding

* batch size > 1 tuning and base config

* output formatting

* batch conv2d

* print all category results

* revert to single-batch config

* pick record best

* fix conv test

* improving reporting

* address batching bug in fast simulator

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants