Skip to content

[Relay][Topi][CPU] Dense with weight transform - #7404

Merged
icemelon merged 15 commits into
apache:mainfrom
kevinthesun:DenseWeightTransform
Feb 9, 2021
Merged

[Relay][Topi][CPU] Dense with weight transform#7404
icemelon merged 15 commits into
apache:mainfrom
kevinthesun:DenseWeightTransform

Conversation

@kevinthesun

Copy link
Copy Markdown
Contributor

This PR adds weight transformed dense to avoid weight layout conversion. With this PR, current dense pack template can achieve 2x performance on CPU targets.

@icemelon9

@kevinthesun
kevinthesun requested a review from icemelon February 3, 2021 23:40

@icemelon icemelon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall LGTM

Comment thread python/tvm/relay/op/strategy/x86.py
Comment thread src/relay/op/nn/nn.h
@kevinthesun

Copy link
Copy Markdown
Contributor Author

@icemelon9 PTAL

@icemelon icemelon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@icemelon
icemelon merged commit 68b7e71 into apache:main Feb 9, 2021
@icemelon

icemelon commented Feb 9, 2021

Copy link
Copy Markdown
Member

Thanks @kevinthesun

alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 11, 2021
* Add CPU dense weight transform

* Fix format

* Fix python format

* Fix pylint

* Minor fix

* Add test

* Do not need to infer layout for dense

* Fix test

* Rename dense_pack

* Fix test

* Fix lint

* Fix dynamic shape dense

* Fix lint

* Fix autotvm task extraction test

* Disable AlterOpLayout in micro_tflite.py tutorial
Lokiiiiii pushed a commit to Lokiiiiii/tvm that referenced this pull request Mar 2, 2021
* Add CPU dense weight transform

* Fix format

* Fix python format

* Fix pylint

* Minor fix

* Add test

* Do not need to infer layout for dense

* Fix test

* Rename dense_pack

* Fix test

* Fix lint

* Fix dynamic shape dense

* Fix lint

* Fix autotvm task extraction test

* Disable AlterOpLayout in micro_tflite.py tutorial
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2021
* Add CPU dense weight transform

* Fix format

* Fix python format

* Fix pylint

* Minor fix

* Add test

* Do not need to infer layout for dense

* Fix test

* Rename dense_pack

* Fix test

* Fix lint

* Fix dynamic shape dense

* Fix lint

* Fix autotvm task extraction test

* Disable AlterOpLayout in micro_tflite.py tutorial
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.

3 participants