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

[Auto Scheduler] Mali Support #7132

Merged
merged 5 commits into from
Dec 22, 2020
Merged

[Auto Scheduler] Mali Support #7132

merged 5 commits into from
Dec 22, 2020

Conversation

FrozenGene
Copy link
Member

@FrozenGene FrozenGene commented Dec 18, 2020

This is the auto sheduler support for mali gpu.

On one T880-MP4 mali gpu, the performance of TFLite mobilenet v2:

  Mobilenet V2
MNN 89
Auto Scheduler 73

As AutoTVM need much time, I don't test it. But according to previous experience and we beyond one good accelerate framework MNN, I am confident that AutoScheduler's performance is better than AutoTVM.

@FrozenGene
Copy link
Member Author

@merrymercy @comaniac @jcf94

@FrozenGene
Copy link
Member Author

cc @antinucleon Apple's M1 GPU is more like Mali (such as unified memory) compared with nv gpu, maybe you could modify a little code and try.

@FrozenGene
Copy link
Member Author

cc @giuseros @u99127 I heard you have interest on auto scheduler for mali gpu on TVM Conf.

python/tvm/relay/op/strategy/mali.py Show resolved Hide resolved
python/tvm/relay/op/strategy/mali.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/mali.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/mali.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/mali.py Outdated Show resolved Hide resolved
src/auto_scheduler/search_task.cc Outdated Show resolved Hide resolved
tutorials/auto_scheduler/tune_network_mali.py Outdated Show resolved Hide resolved
tutorials/auto_scheduler/tune_network_mali.py Show resolved Hide resolved
Copy link
Contributor

@jcf94 jcf94 left a comment

Choose a reason for hiding this comment

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

Looks good to me. It should be fine after you addressing @comaniac 's comments.

Copy link
Contributor

@giuseros giuseros left a comment

Choose a reason for hiding this comment

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

Thanks for the amazing PR @FrozenGene ! We are definitely interested, even though it's not in our immediate plans. I attempted a review and I left few minor comments.

python/tvm/topi/mali/conv2d.py Outdated Show resolved Hide resolved
python/tvm/topi/nn/conv2d.py Show resolved Hide resolved
src/auto_scheduler/search_task.cc Show resolved Hide resolved
@FrozenGene
Copy link
Member Author

@comaniac @jcf94 @giuseros have addressed the comments. Please have another one round of look.

Copy link
Contributor

@jcf94 jcf94 left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@FrozenGene FrozenGene merged commit 98ca771 into apache:main Dec 22, 2020
@FrozenGene
Copy link
Member Author

Thanks everyone @comaniac @jcf94 @giuseros

node->sketch_rules.push_back(&rule_multi_level_tiling);
node->sketch_rules.push_back(&rule_skip_stage);
if (node->search_task->target->GetAttr<String>("device", "") == "mali") {
node->sketch_rules.push_back(&rule_always_inline);
Copy link
Contributor

Choose a reason for hiding this comment

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

@FrozenGene @merrymercy I think it worth to export sketch API to Python, make it more configurable. For a given workload, we may want to try multiple sketches pattern, exporting will enable these experiments without rebuild.

Copy link
Member Author

Choose a reason for hiding this comment

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

i agree with you

masahi pushed a commit to masahi/tvm that referenced this pull request Dec 24, 2020
* [Auto Scheduler] Mali Support

* Fix doc

* fix lint

* address comments

* fix doc
tkonolige pushed a commit to tkonolige/incubator-tvm that referenced this pull request Jan 11, 2021
* [Auto Scheduler] Mali Support

* Fix doc

* fix lint

* address comments

* fix doc
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Jan 20, 2021
* [Auto Scheduler] Mali Support

* Fix doc

* fix lint

* address comments

* fix doc
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jan 21, 2021
* [Auto Scheduler] Mali Support

* Fix doc

* fix lint

* address comments

* fix doc
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
* [Auto Scheduler] Mali Support

* Fix doc

* fix lint

* address comments

* fix doc
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.

5 participants