Skip to content

Conversation

Amir-19
Copy link
Contributor

@Amir-19 Amir-19 commented Sep 24, 2025

Purpose

put nccl window register/deregister behind cuda platform

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: Amir Samani <asamani@nvidia.com>
@Amir-19 Amir-19 changed the title put nccl window register/deregister behind cuda platform [bugfix]put nccl window register/deregister behind cuda platform Sep 24, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to conditionally load NCCL window register/deregister functions only on the CUDA platform. The implementation correctly separates the CUDA-specific functions but introduces a critical caching bug where the function cache is not platform-aware. This can lead to AttributeErrors if the cache is populated on a non-CUDA platform first. Additionally, there is a minor typo in a new variable name. I've provided suggestions to fix both issues.

Signed-off-by: Amir Samani <asamani@nvidia.com>
raise e

function_specs = list(NCCLLibrary.exported_functions)
if current_platform.is_cuda():
Copy link
Collaborator

Choose a reason for hiding this comment

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

These functions should exist on both platforms in NCCL >= 2.27.03.
The original issue was that on ROCm trying to import a non-existent symbol causes a crash, while on CUDA (apparently) it does not.

@Amir-19
Copy link
Contributor Author

Amir-19 commented Sep 25, 2025

closed in favor of #25605

@Amir-19 Amir-19 closed this Sep 25, 2025
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.

2 participants