Skip to content
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

Experiment with ISO C++ P1393R0: A General Property Customization Mechanism #241

Open
keryell opened this issue Mar 26, 2019 · 7 comments
Open
Labels
extension SYCL extension

Comments

@keryell
Copy link
Member

keryell commented Mar 26, 2019

I was stunned by the presentation from David Hollman at the last ISO C++ meeting about how to manage properties in the context of the executor mechanism http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1393r0.html
It is actually a very generic framework to create some objects with some properties, such as creating some new kernel with some execution restrictions, some buffers with some storage details or whatever.
For example std::require(E, P0, P1, P3) will return some object from expression E with the properties P0, P1 and P2 added.
It looks like we could experiment how we can use this mechanism to add and query some properties in SYCL, for example setting the work-group size of a kernel.

@keryell keryell added the extension SYCL extension label Mar 26, 2019
@MathiasMagnus
Copy link
Contributor

Is the presentation available publicly? And/Or some demo of its usage?

@keryell
Copy link
Member Author

keryell commented Apr 3, 2019

@dhollman : is your presentation publicly accessible somewhere?

@dhollman
Copy link

dhollman commented Apr 3, 2019

https://gitpitch.com/dhollman/p1393-kona-private

Let me know if you have any questions or need any help! @chriskohlhoff has written a version of the library support part of this and made it public. It's called propria. I believe we still slightly differ in opinion/interpretation on a couple of small things, but it should be sufficient for most purposes.

@dhollman
Copy link

dhollman commented Apr 3, 2019

Actually, I read through @chriskohlhoff's code, and I think we're on the same page on everything that's in there. At one point there was some difference of opinion on how adapters should work, but that's not in his library and I think we are on the same page on that now anyway.

@keryell
Copy link
Member Author

keryell commented Apr 3, 2019

Thank you for the slides!
Nice there is also some implementation of this.

@chriskohlhoff
Copy link

@keryell Would you mind expanding a little on your ideas for using properties with buffers and 'storage details or whatever'? I plan to add some example programs to propria and want to base them on real-world use cases that are hopefully not too domain-specific (and also not related to executors). Buffers sound like they could be a good candidate.

@keryell
Copy link
Member Author

keryell commented Apr 5, 2019

@chriskohlhoff In SYCL we focus on heterogeneous computing, where we do not have a uniform memory model following the standard C++ one. So typically you want some buffers to be allocated specifically on some special memories or registers, with some time or space locality hints, etc.

The problem is that it is domain-specific so I do not know how we can extract this as a good example for you... Actually time & space locality, mostly-read or mostly-write, discard-write properties seem interesting at large outside of SYCL, so you could build a trivial example with such properties.

For some wild ideas about properties, you could also look at https://github.com/keryell/accessors

This is already 3 year old, so you can imagine that now we need even more something like properties (and something like SYCL in ISO C++ ;-) ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension SYCL extension
Projects
None yet
Development

No branches or pull requests

4 participants