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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL2020] Implement sycl::atomic_fence #1031
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to work on this! There's already https://github.com/OpenSYCL/OpenSYCL/blob/develop/include/hipSYCL/sycl/libkernel/detail/mem_fence.hpp
which does basically the same thing, except that it comes from the SYCL 1.2.1 days. Can we implement the old mem_fence
on top of the newer one?
For SSCP I would suggest looking at barrier - every barrier is effectively a combination of a memfence and a blocking synchronization primitive. So probably we can factor the mem_fence
out from there :)
// older, so comment out that statement for now. | ||
//__hipsycl_if_target_host(/* todo */); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of these structs, when we do runtime if-else in atomic_fence()
anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little perhaps.
It was mostly to keep it similar to mem_fence.hpp
and perhaps bring more clarity to which of the order and scope combinations we actually support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely rewritten, structs gone.
Done.
Done.
I've completely rewritten my implementation so it reflects my understanding of the intended semantics. |
6ebbc85
to
b4e5618
Compare
Hi Aksel,
Less than a year later, I'm trying to bring it full circle here. 馃コ
This (properly) closes #767.
Let me know what you think so far.
I haven't implemented the SSCP path because I could only find existing implementations for barriers but not memory fences, and so I think I should wait for you to tell me where and how you want this. 馃檪
Cheers,
-N