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

[SCFToCalyx] Memory banking for Calyx #7671

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

Conversation

jiahanxie353
Copy link
Contributor

@jiahanxie353 jiahanxie353 commented Oct 6, 2024

Breaking down #7409

This patch will support memory banking in Calyx by user specifying the number of available banks for each memory (in the order they are declared in the source .mlir file) in a json file

@rachitnigam
Copy link
Contributor

rachitnigam commented Oct 6, 2024

This should be done using attributes on memories. An extra JSON file that lives separate from the source program seems unnecessary

@jiahanxie353
Copy link
Contributor Author

This should be done using attributes on memories. An extra JSON file that lives separate from the source program seems unnecessary

I agree, and I have thought of that, too. The cons are users have to go to the source .mlir file and manually insert attributes like {calyx.num_banks = n} to each memref::alloc, memref::alloca, memref::getglobal, etc. I thought JSON could be a automated way, but using attributes does make more sense.

And I'd appreciate it if anyone could let me know that attribute insertion can be automated.

@rachitnigam
Copy link
Contributor

And I'd appreciate it if anyone could let me know that attribute insertion can be automated.

Attributes can be automatically inserted by frontends.

@jiahanxie353
Copy link
Contributor Author

Attributes can be automatically inserted by frontends.

That's great!

And just removed the needs for passing JSON and now only relies on attributes on memory allocations

@rachitnigam
Copy link
Contributor

Cool! Can you add tests and fix the failures? I can review it then and we can merge after the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Calyx The Calyx dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants