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

[Target] 64-bit RPi4b target #6211

Merged
merged 2 commits into from
Aug 5, 2020
Merged

[Target] 64-bit RPi4b target #6211

merged 2 commits into from
Aug 5, 2020

Conversation

tmoreau89
Copy link
Contributor

@tmoreau89 tmoreau89 commented Aug 5, 2020

A 64-bit raspbian operating system is still not fully supported (in beta mode: https://www.raspberrypi.org/forums/viewtopic.php?t=275370), however, it's still possible to boot Ubuntu Server 64bit on the raspberry pi 4.

64bit code-generation should result in better performance overall, so it's recommended to boot a 64bit operating system on the pi by default.

I've also updated the 32bit target for better code-generation overall. Untuned results on Rpi4b below:

Old 32-bit target runtime for mobilenetv2: 84ms
New 32-bit target runtime for mobilenetv2: 72ms
New 64-bit target runtime for mobilenetv2: 54ms

@tmoreau89
Copy link
Contributor Author

The PR proposes having two targets rasp4b and rasp4b64 since by default Raspbian OS is 32bit. There are two options:

A. Keep 2 targets until Raspbian 64bit OS is not in beta anymore and ships with Rpi4b
B. Deprecate 32bit codegen, and do 64bit codegen by default, thereby keeping only one ARM CPU target, rasp4b

Copy link
Member

@junrushao junrushao 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 Thierry!

@@ -188,7 +188,8 @@ def arm_cpu(model='unknown', options=None):
"p20": ["-model=kirin970", "-mtriple=arm64-linux-android", "-mattr=+neon"],
"p20pro": ["-model=kirin970", "-mtriple=arm64-linux-android", "-mattr=+neon"],
"rasp3b": ["-model=bcm2837", "-mtriple=armv7l-linux-gnueabihf", "-mattr=+neon"],
"rasp4b": ["-model=bcm2711", "-mtriple=arm-linux-gnueabihf", "-mattr=+neon"],
"rasp4b": ["-model=bcm2711", "-mtriple=armv8l-linux-gnueabihf", "-mattr=+neon"],
"rasp4b64": ["-model=bcm2711", "-mtriple=aarch64-linux-gnu", "-mattr=+neon"],
Copy link
Member

Choose a reason for hiding this comment

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

I think we should add -mcpu=cortex-a72 for rasp4. We should get better performance after it than generic cpu instruction.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, I've added this additional field.

@tqchen tqchen merged commit 343074f into master Aug 5, 2020
@tqchen tqchen deleted the tmoreau89-patch-1 branch August 10, 2020 00:18
wjliu1998 pushed a commit to wjliu1998/incubator-tvm that referenced this pull request Aug 13, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
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