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

Add setup/cleanup functionality to compiler backend #286

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

MiloLurati
Copy link
Contributor

This PR adds setup and cleanup functionality to the compiler backend. When using the compiler backend, users can now provide setup and cleanup code that runs before and after each kernel benchmark. The setup code can allocate and prepare resources that the kernel needs, while the cleanup code ensures proper resource deallocation. This is implemented through two new dictionaries in kernel_options: setup_dict and cleanup_dict, which contain the setup/cleanup source code, function name, and number of arguments to pass from the kernel's argument list. The setup function can modify arguments and these modifications are visible to both the kernel and cleanup functions.

@MiloLurati
Copy link
Contributor Author

This PR includes changes from PR #285 and requires that PR to be merged first.

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