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

Use pinned memory for doing transfers #80

Open
coreylowman opened this issue Feb 25, 2023 · 3 comments
Open

Use pinned memory for doing transfers #80

coreylowman opened this issue Feb 25, 2023 · 3 comments

Comments

@coreylowman
Copy link
Owner

No description provided.

@emchristiansen
Copy link
Contributor

Hey, just to be clear, you mean something like RustaCUDA's LockedBuffer, right?

FYI I need this to switch from RustaCUDA to cudarc.

@coreylowman
Copy link
Owner Author

Yep, this will be utilizing cuMemAllocHost and cuMemFreeHost underneath the hood, which is also what the LockedBuffer is using.

As far as how this would be integrated into result/safe APIs, we could either:

  1. Have a separate htod copy method for pinned transfers (htod_pinned_copy)
  2. Change the existing htod_copy methods to accept something like AsRef<[T]> and make sure we can implement that trait for the page locked memory.

@tie-pilot-qxw
Copy link

Do you know if this feature has been supported? And how should I pin a certain array? I'm binding my Rust code with my Cuda code, so I really need the support to pin memory in safe Rust code.

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

3 participants