-
Notifications
You must be signed in to change notification settings - Fork 15
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
ReservePolicies not independent from CreationPolicies #111
Comments
For the NULL-check: sounds very reasonable, PR coming soon. For the discussion about the policies: The solution might be a combination of extensive policy documentation and better constraints checking that enforces all the CUDA default allocator-specific policies to be used together. The constraints checking system itself is not really equipped to deal with groups of policies (" |
Well what I mean: If the |
can you please split the thread and open a new issue for the "bug"/safety feature aka NULL check? (for 2.2.1crp) |
Actually this cannot be split. The bug/safety feature is a work-around for the problem described here. The issue IS that the policies cannot be combined freely as suggested by the syntax. However one can consider the missing null check in the scatter policy as a bug, so I'll open that as an issue: #115 |
The
CudaSetLimits
policy could never be used with e.g. theScatter
creation policy which would lead to undefined behaviour. The reason is, that this ReservePolicy returns a NULL pointer but the creation policy expects a pointer to valid memory of the given size.The Scatter policy should at least check, if the given pointer is non-NULL (which also helps #110) and it should be checked, if the creation and reserve policies should be merged and/or the
CudaSetLimits
policy removed to avoid these kind of pitfalls.The text was updated successfully, but these errors were encountered: