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

Fix a bug in AsyncAllocator memory pools access setting. #67373

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

buptzyb
Copy link
Contributor

@buptzyb buptzyb commented May 11, 2024

The original code uses the wrong parameter i for cuDeviceCanAccessPeer(), which can cause undefined behavior when (*all_ids_)[i] != platform_device_id, for example, virtual devices are used. Should use (*all_ids_)[i].value() to represent the previous pool id.

Also, add a judgment to skip the pool initialization process if it's already initialized previously.

@google-ml-butler google-ml-butler bot added the size:S CL Change Size: Small label May 11, 2024
@gbaned gbaned added the comp:xla XLA label May 14, 2024
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation May 14, 2024
@gbaned gbaned requested a review from cheshire May 14, 2024 05:40
@google-ml-butler google-ml-butler bot added the awaiting review Pull request awaiting review label May 14, 2024
@changhuilin changhuilin self-requested a review May 23, 2024 22:14
@changhuilin changhuilin moved this from Assigned Reviewer to Approved by Reviewer in PR Queue May 24, 2024
@changhuilin changhuilin added awaiting PR merge awaiting PR merge and removed awaiting review Pull request awaiting review labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting PR merge awaiting PR merge comp:xla XLA size:S CL Change Size: Small
Projects
PR Queue
  
Approved by Reviewer
Development

Successfully merging this pull request may close these issues.

None yet

3 participants