-
Notifications
You must be signed in to change notification settings - Fork 97
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
Pass setup/interpolated variables through as run
arguments instead of closing over them in the harness
#127
Labels
Comments
Yeah, I noticed this when reading https://discourse.julialang.org/t/when-does-the-garbage-collector-runs/15142/3 (which made me make #117 but that, of course, doesn't change that values get captured in the generated function). Is there any way to use anonymous functions which gets garbage collected and then release the resources they close over. Perhaps that would give nasty closure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cc @maleadt
cc @KristofferC (this approach could help with the optimization-brittleness issues you've said run into)
See my comment here: https://github.com/JuliaGPU/CuArrays.jl/issues/210#issuecomment-442860840
I'm not sure this would've been possible to implement easily in the pre-NamedTuple era, but now that we have them, we might be able to use them to forward variables through to the benchmark kernel.
E.g. the whole
setup
expression could be rendered into a thunk that gets called with the interpolated variable arguments, and returns a NamedTuple of all the resulting setup variables.The text was updated successfully, but these errors were encountered: