Skip to content

Parser: Support User defined functions #4425

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

Merged
merged 2 commits into from
May 13, 2025

Conversation

WeiqunZhang
Copy link
Member

The user defined functions can have up to 4 arguments. If more is needed, we can support it in the future. Getting device function pointers requires GPU relocatable device code (RDC) support. Moreover, these user defined device functions should be defined in cpp files not headers to ensure the function pointers are unique.

For now, we only support CPU, CUDA, and HIP. In the future, we can try to support SYCL.

@WeiqunZhang
Copy link
Member Author

Depend on #4442.

@WeiqunZhang WeiqunZhang force-pushed the parser_uf branch 5 times, most recently from 1739a58 to 495c0aa Compare May 8, 2025 23:09
The user defined functions can have up to 4 arguments. If more is needed, we
can support it in the future. Getting device function pointers requires GPU
relocatable device code (RDC) support. Moreover, these user defined device
functions should be defined in cpp files not headers to ensure the function
pointers are unique.

For now, we only support CPU, CUDA, and HIP. In the future, we can try to
support SYCL.
@WeiqunZhang WeiqunZhang marked this pull request as ready for review May 11, 2025 17:59
@WeiqunZhang WeiqunZhang requested review from atmyers and asalmgren May 11, 2025 22:07
@WeiqunZhang WeiqunZhang merged commit 7911bc6 into AMReX-Codes:development May 13, 2025
78 of 79 checks passed
@WeiqunZhang WeiqunZhang deleted the parser_uf branch May 13, 2025 22:06
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