-
Notifications
You must be signed in to change notification settings - Fork 407
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
Allow Kokkos::create_mirror* to be used with WithoutInitializing #4486
Allow Kokkos::create_mirror* to be used with WithoutInitializing #4486
Conversation
With int main(int argc, char* argv[]) {
Kokkos::initialize(argc, argv);
{
Kokkos::View<int*, Kokkos::Experimental::SYCLDeviceUSMSpace> device_view("device view", 10);
Kokkos::View<int*, Kokkos::HostSpace> host_view("host view", 10);
auto mirror_device = Kokkos::create_mirror(device_view);
auto mirror_host = Kokkos::create_mirror(Kokkos::Experimental::SYCLDeviceUSMSpace{}, host_view);
auto mirror_device_view = Kokkos::create_mirror_view(device_view);
auto mirror_host_view = Kokkos::create_mirror_view(Kokkos::Experimental::SYCLDeviceUSMSpace{}, host_view);
}
{
Kokkos::View<int*, Kokkos::Experimental::SYCLDeviceUSMSpace> device_view("device view", 10);
Kokkos::View<int*, Kokkos::HostSpace> host_view("host view", 10);
auto mirror_device_wi = Kokkos::create_mirror(Kokkos::WithoutInitializing, device_view);
auto mirror_host_wi = Kokkos::create_mirror(Kokkos::WithoutInitializing, Kokkos::Experimental::SYCLDeviceUSMSpace{}, host_view);
auto mirror_device_view_wi = Kokkos::create_mirror(Kokkos::WithoutInitializing, device_view);
auto mirror_host_view_wi = Kokkos::create_mirror(Kokkos::WithoutInitializing, Kokkos::Experimental::SYCLDeviceUSMSpace{}, host_view);
}
Kokkos::finalize();
} I am getting
for the overloads without
with |
e965035
to
00ee5c8
Compare
00ee5c8
to
597d312
Compare
I added a test after we merged #4331. This only fixes some issues when including the basic testing include files. |
Retest this please. |
597d312
to
5028a81
Compare
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.
LGTM
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.
Are we introducing all kinds of overloads with unconstrained additional arguments here? If so shouldn't those be functions in the Impl namespace?
All the overloads with unconstrained arguments (for |
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.
Ah saw the namespace stuff now.
Fixes #4259. For the moment, I only considered the overloads for
Kokkos::View
and not yet the otherView
-like containers.