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

[WIP] Set up CNN accelerator codegen skeleton + counting utilities #10

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

slyubomirsky
Copy link
Collaborator

@slyubomirsky slyubomirsky commented Mar 30, 2021

It took a little bit of hacking to get attributes working, but I have an efficientnet import example and a codegen skeleton for the CNN accelerator. Once we have the ASM worked out, it should be pretty easy to do all the plumbing.

Right now the runtime will only print things; it won't actually do anything because I don't know what to target.

There's a small function in ilacnn.py that rewrites any conv2d with padding into conv2d(pad(data), weight) so that padding will be handled entirely by our codegen. In theory, the runtime can do that part implicitly, but doing this tiny rewrite saves us a ton of debugging.

The script for running the EfficientNet trial is a little wacky. Let me know if there's anything I can better implement about it or how to improve it. Note that you will need mxnet installed for the import to work (I don't know if the dockerfile has it), though otherwise everything is handled seamlessly by TVM's importer.

Also includes some simple utilities for counting the number ops, overloads, etc

Please review and comment @AD1024 @LeeOHzzZ @Bo-Yuan-Huang @ttambe

@slyubomirsky slyubomirsky changed the title [WIP] Set up CNN accelerator codegen skeleton [WIP] Set up CNN accelerator codegen skeleton + counting utilities Mar 31, 2021
@Bo-Yuan-Huang
Copy link
Collaborator

Can the new updates be merged to a branch under uwsample/3la-tvm or can we have access to the private fork slyubomirsky:hlscnn? So that we can try out the code. Thanks!

@slyubomirsky
Copy link
Collaborator Author

slyubomirsky commented Apr 4, 2021

Oh, i thought you would already have access. You are welcome to fork my branch (or to push to this PR). I will give you all appropriate permissions

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