-
Couldn't load subscription status.
- Fork 72
Add token pool for cuCreate API #628
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
Conversation
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.
Pull Request Overview
This pull request implements a token pool for cuCreate API to support inter-node NVL operations and reduce the footprint of cuCreate calls. The TokenPool manages allocation and deallocation of GPU memory tokens using a bitmap-based allocation strategy.
Key Changes
- Introduces a new
TokenPoolclass for efficient token allocation and management - Integrates the token pool into the
Contextclass for centralized token management - Updates semaphore creation to use tokens from the pool instead of individual allocations
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/utils_internal.cc |
Implements the core TokenPool class with bitmap-based allocation |
src/semaphore.cc |
Updates semaphore stub to use context's token pool for GPU token allocation |
src/include/utils_internal.hpp |
Adds TokenPool class declaration |
src/include/context.hpp |
Adds token pool member and getter method to Context::Impl |
src/gpu_utils.cc |
Implements getCuAllocationGranularity helper function |
src/context.cc |
Implements lazy initialization of token pool in Context |
include/mscclpp/gpu_utils.hpp |
Adds declaration for getCuAllocationGranularity function |
include/mscclpp/gpu.hpp |
Adds HIP compatibility definitions for allocation granularity |
include/mscclpp/core.hpp |
Adds friend class declaration for SemaphoreStub access |
Comments suppressed due to low confidence (3)
src/utils_internal.cc:1
- This file is missing the required MIT License header at the top. All source files should include the license header.
// Copyright (c) Microsoft Corporation.
src/include/utils_internal.hpp:1
- This file is missing the required MIT License header at the top. All source files should include the license header.
// Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved.
src/include/context.hpp:1
- This file is missing the required MIT License header at the top. All source files should include the license header.
// Copyright (c) Microsoft Corporation.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Create a tokenPool to allocate token. This feature is used to support inter node NVL and try to reduce the footprint caused by cuCreate