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

1D1V Buffer compilance #171

Open
will-saunders-ukaea opened this issue Apr 5, 2023 · 0 comments
Open

1D1V Buffer compilance #171

will-saunders-ukaea opened this issue Apr 5, 2023 · 0 comments

Comments

@will-saunders-ukaea
Copy link
Contributor

The TwoStream and FFT tests - Essentially any tests where host arrays are modified directly rather than using a host accessor (which is all of them).

What NESO (the original 1D1V code) does is create std::vectors then create buffer member variables using the std::vector::data pointers (e.g. this one [1]). These buffers then have the same lifetime as the object. Tests modify data in the original vector directly not via a buffer host accessor.

However the Buffer spec says "The ownership of this memory is given to the constructed SYCL buffer for the duration of its lifetime.". Hence when we modify the original vector directly this is non-compliant. The SYCL implementation doesn't see these writes and hence doesn't copy the new values to the device - hence the test fails when the buffer memory is separate from the host memory e.g. on the GPU.

[1]

sycl::buffer<double, 1> charge_density_d;

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

No branches or pull requests

1 participant