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

BINDINGS/GO: Locked OS thread before setting CUDA device - v1.16.x #9603

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

rakhmets
Copy link
Collaborator

What

Locked OS thread before setting CUDA device.

Why ?

This is an attempt to fix the following failure:

/scrap/azure/agent-08/AZP_WORKSPACE/_temp/ucx-73847/bin/goperftest -p=30800 -m=cuda
...
/scrap/azure/agent-08/AZP_WORKSPACE/_temp/ucx-73847/bin/goperftest -p=30800 -m=cuda -i=localhost
...
     cuda_ipc_md.c:212  UCX  ERROR   cuCtxGetDevice(&this_device) failed: invalid device context
        ucp_rkey.c:902  UCX  ERROR   failed to unpack remote key from remote md[5]: Input/output error
 Caught signal 11 (Segmentation fault: address not mapped to object at address 0x38)

Goroutine is an abstraction which allows to develop multi-threaded applications. There is no guarantee that goroutine will be executed on the same CPU thread for the entire time. What can result an issue, because CUDA device (aka cuContext) can be bound to the calling CPU thread.

How ?

Cherry-picked #9581

@yosefe yosefe enabled auto-merge January 15, 2024 12:53
@yosefe yosefe changed the title BINDINGS/GO: Locked OS thread before setting CUDA device. - v1.16.x BINDINGS/GO: Locked OS thread before setting CUDA device - v1.16.x Jan 15, 2024
@yosefe yosefe merged commit ae90831 into openucx:v1.16.x Jan 17, 2024
107 checks passed
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

Successfully merging this pull request may close these issues.

3 participants