-
Notifications
You must be signed in to change notification settings - Fork 83
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
add im2col app example #478
Conversation
The verification script generates both an image and the golden im2col matrix, depending on filter parameters, padding and strides. main.c has been written, needs to be compiled and tested.
Also wrote a script for fast and modular simulation with Verilator
Still gives problems with the verification due to the malloc not working
First stable point of the code
Still some issues in the python script
Also added tesnorflow support on the verification script for nhwc (to be tested w server). Improved bash script for easy simulation
Fixed cases of padding (ker < pad and ker > pad) with the DMA, fixed multi batch input generation & successful test of multi batch with CPU. To be tested: multi batch with 1D DMA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How many memory banks are needed to run the application? Maybe it could be better to shrink it to run with only two banks, so that the basic memory configuration can run all the applications.
To run the script to generate the golden values, it is necessary to use packages that are not in core-v-mini-mcu
conda environment, or we clearly state that you need pytorch to generate new test samples or I think that this script can be used just by Tommaso to generate the values once. If we want to generate a new set of random values for every run, it can be useful to add the run of the script to an application specific makefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've executed the code on the pynq-z2 and it works even with the minimal configuration (2 BANKS), after these last updates it can be merged.
@davideschiavone please enable the CI checks on this PR so that we can check either there that everything works.
These modifications allow the test, verification and performance analysis of the im2col function, implemented in C code, with the ultimate goal of testing the capabilities of the multichannel DMA.
The python script "verification_script.py" generates a random tensor with configurable channels and dimensions, together with a "golden result" used for the verification of the C code, i.e. the output matrix of the im2col.