-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add support for SYCL 2020 accessor constructors along with new enums #33
Conversation
include/buffer.h
Outdated
return detail::make_device_accessor<DataT, Dims, Mode>(live_cgh.get_eventual_sycl_cgh(), sr, access_info.buffer, access_info.offset); | ||
} | ||
template <cl::sycl::access_mode Mode, cl::sycl::target Target, typename Functor> | ||
auto get_access(handler& cgh, Functor rmfn) const { |
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.
Same here.
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.
done in new commit.
|
||
#if WORKAROUND_COMPUTECPP | ||
template <cl::sycl::access_mode Mode, cl::sycl::access::target Trgt, typename Functor> | ||
auto get_access(handler& cgh, Functor rmfn) const { |
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.
Same here.
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.
done in new commit.
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.
We're keeping this deduced return type because we would otherwise implement some additional translation for cl::sycl::access::target
, and this workaround is temporary 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.
We're keeping this deduced return type because we would otherwise implement some additional translation for cl::sycl::access::target
, and this workaround is temporary anyway.
include/ccpp_adapt.h
Outdated
@@ -0,0 +1,63 @@ | |||
|
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.
Is there a more expressive name for this header file?
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.
renamed to ccpp_2020_compatibility_layer.h
I just noticed that the |
c1225f1
to
2b674f1
Compare
2b674f1
to
a2d9a76
Compare
along with new enums for modes/targets and deduction from new tags. A file for compatibility with ComputeCpp 2.5.0 was added since they do not provide support for some of the features of SYCL 2020 we are using. matmul, wave_sim and syncing examples were updated to the new accessor constructor syntax.
88faba5
to
001697e
Compare
Since Celerity supports many implementations of SYCL and they each have a different degree of support for the SYCL 2020 functionalities, in this first approach I intend to introduce to our users a new option for instantiating accessors, using the new Tags to specify Mode and Target.
A compatibility layer had to be implemented for ComputeCpp since they have not yet implemented some enums and types needed to provide this new functionalities to our users.