-
Notifications
You must be signed in to change notification settings - Fork 168
Mempool memory resource - IPC #446
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
base: main
Are you sure you want to change the base?
Conversation
/ok to test |
/ok to test |
|
/ok to test |
/ok to test |
1 similar comment
/ok to test |
/ok to test |
/ok to test |
/ok to test |
/ok to test |
/ok to test |
# Check if pywin32 is available on Windows | ||
_PYWIN32_AVAILABLE = False | ||
if platform.system() == "Windows": | ||
try: | ||
import win32security | ||
|
||
_PYWIN32_AVAILABLE = True | ||
except ImportError: | ||
import warnings | ||
|
||
warnings.warn( | ||
"pywin32 module not found. For better IPC support on Windows, " "install it with: pip install pywin32", | ||
stacklevel=2, | ||
) |
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.
How hard would it be to recreate the functionality we need from here to avoid this optional dependency?
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.
I think we'll need to discuss our next move first and then clean this up based on the decision. Keenan struggled for quite a long time and it turns out the IPC support for mempools is not enabled on Windows at all. There is a number of doc and sample bugs we'll create later (the memory team created one).
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.
I've created 2 bugs to address the documentation issues.
yeah the review is in limbo right now. I'm not sure if we should push the change for IPC mempools and have it only support linux for now, or if we should shelve it and add a cuMem and VMM API IPC memory_resource in the meantime.
All of the Windows specific changes should be treated as draft. That optional dependency is from when I was debugging windows errors and operating under the assumption that I was improperly creating the windows security descriptor for the mempool handle. In hindsight it was a (temporary) lack of suport in driver layer as Leo said.
/ok to test |
I am tasked with adding the IPC mempool support for windows at the driver level (5151668), so I think we should roll with this implementation and have it pick up windows once that change is integrated. Users who need IPC on windows for older CTKs can implement their own MR or use the cuMemCreate & VMM API bindings. WDYT |
This is ready for at least a first look
Add Mempool class as the first public MemoryResource implementation. It supports IPC.
Add IPC buffer which is an internal buffer implementation used to represent a buffer descriptor which is used to export and import buffers across process boundaries. It implements reduce which is expected by common multiprocessing libraries. It's use is seen in the tests added to this review.