Skip to content

Correctly enable architecture extensions in CMSIS-NN Zephyr Demo#10458

Merged
manupak merged 2 commits intoapache:mainfrom
Mousius:cmsis-demo-fixes
Mar 4, 2022
Merged

Correctly enable architecture extensions in CMSIS-NN Zephyr Demo#10458
manupak merged 2 commits intoapache:mainfrom
Mousius:cmsis-demo-fixes

Conversation

@Mousius
Copy link
Member

@Mousius Mousius commented Mar 3, 2022

Without CONFIG_FPU being set the correct architecture extensions weren't being applied which means the buffer sizes didn't necessarily match up - this corrects it so that they align.

Without `CONFIG_FPU` being set the correct architecture extensions weren't being applied which means the buffer sizes didn't necessarily match up - this corrects it so that they align.
The stack allocator forcibly aligns memory by removing parts of it which causes there not to be enough memory and the CMSIS-NN integration uses more stack than the demo with pure TVM operators (we should look to remove some of our stack usage)
@Mousius Mousius force-pushed the cmsis-demo-fixes branch from 757d4a1 to da18936 Compare March 3, 2022 14:35
Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

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

LGTM! oh we haven't aligned it before. have we ? -- this make sense!

@manupak manupak merged commit d1046f5 into apache:main Mar 4, 2022
@manupak
Copy link
Contributor

manupak commented Mar 4, 2022

Thanks @Mousius !

@Mousius
Copy link
Member Author

Mousius commented Mar 4, 2022

LGTM! oh we haven't aligned it before. have we ? -- this make sense!

Nope, the allocators behaviour is to try to fix it rather than producing an error so it instead fails at the allocate - which lead me to assume it was a miscalculation, it all makes sense now 😸 .

ziqiangxu8457 pushed a commit to ziqiangxu8457/tvm that referenced this pull request Mar 6, 2022
…che#10458)

* Correctly enable architecture extensions in CMSIS-NN Zephyr Demo

Without `CONFIG_FPU` being set the correct architecture extensions weren't being applied which means the buffer sizes didn't necessarily match up - this corrects it so that they align.

* Fix memory allocation in demo

The stack allocator forcibly aligns memory by removing parts of it which causes there not to be enough memory and the CMSIS-NN integration uses more stack than the demo with pure TVM operators (we should look to remove some of our stack usage)
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
…che#10458)

* Correctly enable architecture extensions in CMSIS-NN Zephyr Demo

Without `CONFIG_FPU` being set the correct architecture extensions weren't being applied which means the buffer sizes didn't necessarily match up - this corrects it so that they align.

* Fix memory allocation in demo

The stack allocator forcibly aligns memory by removing parts of it which causes there not to be enough memory and the CMSIS-NN integration uses more stack than the demo with pure TVM operators (we should look to remove some of our stack usage)
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.

2 participants