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

Avoid double-copying in serialize(View<const T, DeviceSpace>) #245

Open
PhilMiller opened this issue Jun 1, 2022 · 0 comments · May be fixed by #246
Open

Avoid double-copying in serialize(View<const T, DeviceSpace>) #245

PhilMiller opened this issue Jun 1, 2022 · 0 comments · May be fixed by #246

Comments

@PhilMiller
Copy link
Member

We have full-View-size bounce buffer serialization to handle Views with each of const element type and whose contents live in host-inaccessible device memory space (e.g. CudaSpace sans UVM). It looks like the code as currently written may naively allocate a mirror and copy the whole View to unwrap each of these.

Given that we're potentially serializing View<T const> already, I don't think we need to worry about the underlying storage not actually being writable. So, I think the right solution to this would be to not copy View<T const>, but rather to just alias it by an equivalent View<T>

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