-
Notifications
You must be signed in to change notification settings - Fork 75
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
Introduce accelerator tags #1246
Comments
I think this may also be related to #966. |
I would like to add my proposition during the last alpaka VC, that we should just declare all backend accelerator templates upfront. This way, users can specialize their traits based on the incomplete accelerator types and no extra tag types are needed. This has the drawback, that we cannot refer to members of incomplete accelerators. Still, I would like this solution to be explored. Another solution would be a global enum of all accelerators. Each accelerator has a getter for his enumerator and traits on the user side are specialized on these enumerators. |
I think tag types are almost always same or better than enum for these purposes. Tags can be added from anywhere, including user code, while enum is one and centralized. |
What @sbastrakov said. Enums can not be extended from the user code. I try to write a draft with my thoughts, soon. |
Is this related to the enumeration of accelerator types in:
As a new alpaka user, I'm held up by the difficulty of storing |
Yes, it's sometimes awkward due to alpaka operating with conditionally defined accelerator types, e.g. In user code we normally make corresponding template parameters. Those could in principle mirror alpaka examples e.g. take Acc type and derive the rest from there. Of course it's also possible to start from another level, like Dev or Queue type. If you just want to specialize kernel code, perhaps you mean for accelerator, not device in alpaka speech? There is a recent example added on it #1271. If you meant something else, please clarify Edit: fixed typos, fat fingers |
In today's meeting @psychocoderHPC brought up the idea of having special Accelerator tags that are always visible - the backends that are actually activated do not matter. This enables the user to easier specialize traits for accelerators without having to guard them with
#ifdef
.We would like to implement this for alpaka 0.7.0. Due to time constraints this has been marked as an optional feature.
The text was updated successfully, but these errors were encountered: