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. #9581

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

rakhmets
Copy link
Collaborator

@rakhmets rakhmets commented Jan 4, 2024

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.

@rakhmets rakhmets added the WIP-DNM Work in progress / Do not review label Jan 4, 2024
@rakhmets rakhmets removed the WIP-DNM Work in progress / Do not review label Jan 4, 2024
@rakhmets rakhmets changed the title BINDINGS/GO: Removed goroutine from perftest. BINDINGS/GO: Locked OS thread before setting CUDA device. Jan 4, 2024
Copy link
Contributor

@ivankochin ivankochin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yosefe yosefe enabled auto-merge January 7, 2024 09:54
@yosefe yosefe merged commit ad5ca70 into openucx:master Jan 7, 2024
118 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