Skip to content

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.

@sonarqubecloud
Copy link

@MiloLurati MiloLurati closed this Feb 21, 2025
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