Skip to content

Fix several bugs and update v0.5 release notes - #264

Merged
MC952-arch merged 4 commits into
flagos-ai:mainfrom
MC952-arch:v0.5-release
Sep 30, 2025
Merged

Fix several bugs and update v0.5 release notes#264
MC952-arch merged 4 commits into
flagos-ai:mainfrom
MC952-arch:v0.5-release

Conversation

@MC952-arch

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @MC952-arch, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on updating the project's documentation to reflect the latest v0.5 release features, including new hardware support and performance enhancements. It also addresses several minor bugs related to network resource management and standardizes code formatting and argument parsing within the testing framework. The changes aim to improve clarity, maintainability, and correctness across the codebase.

Highlights

  • Release Notes Update: The README.md has been updated to include the release notes for v0.5, detailing new features such as AMD support, a unified network backend (flagcxNetAdaptor), zero-copy RDMA, automatic tuning via flagcxTuner, and integrated PyTorch API tests.
  • AMD Support Documentation: Documentation for building the library has been expanded to explicitly include USE_AMD=1 as a valid option for platform-specific compilation.
  • Network Resource Deallocation Logic: The memory deallocation logic in flagcxSendProxyFree and flagcxRecvProxyFree within flagcx/core/net.cc has been refined to conditionally free memory based on the network adaptor type (SOCKET or IBRC), ensuring correct resource management for different backends. Additionally, FLAGCXCHECK calls were removed for non-critical deallocation steps.
  • Code Style and Formatting Improvements: Numerous minor code style and formatting adjustments have been applied across flagcx_tuner.cc and flagcx_tuner.h, including consistent pointer declaration spacing, static_assert formatting, and improved readability for comments and log messages.
  • Test Tool Argument Renaming: The split_mask argument in the performance test tool (test/perf/tools.cc) has been updated, changing its short option from -m to -s for clarity and consistency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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

Copy link
Copy Markdown

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 introduces several bug fixes and updates the release notes for v0.5. The changes include adding AMD support, unifying network backends, and enabling zero-copy RDMA in the release notes. The build and test documentation has been updated accordingly.

My review focuses on the correctness and potential issues in the code. I've found a couple of minor issues in the README.md file, such as a placeholder date and a typo. More importantly, I've identified a potential risk in flagcx/core/net.cc where error checks have been removed, which could lead to silent failures. I've provided suggestions to restore these checks.

Other changes in flagcx/core/flagcx_tuner.cc, flagcx/core/flagcx_tuner.h, flagcx/flagcx.cc, and test/perf/tools.cc are mostly related to code formatting and bug fixes that seem correct and improve the codebase.

Comment thread flagcx/core/net.cc
Comment on lines +346 to +348
resources->netAdaptor->deregMr(resources->netSendComm,
resources->mhandles[0]);
resources->netAdaptor->closeSend(resources->netSendComm);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The error checks (FLAGCXCHECK) for deregMr and closeSend have been removed. If these functions can fail, their return values should be checked to avoid silent failures and potential resource leaks or other issues. Please consider restoring the error checks.

  FLAGCXCHECK(resources->netAdaptor->deregMr(resources->netSendComm,
                                             resources->mhandles[0]));
  FLAGCXCHECK(resources->netAdaptor->closeSend(resources->netSendComm));

Comment thread flagcx/core/net.cc
Comment on lines +362 to +365
resources->netAdaptor->deregMr(resources->netRecvComm,
resources->mhandles[0]);
resources->netAdaptor->closeRecv(resources->netRecvComm);
resources->netAdaptor->closeListen(resources->netListenComm);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The error checks (FLAGCXCHECK) for deregMr, closeRecv, and closeListen have been removed. If these functions can fail, their return values should be checked to avoid silent failures and potential resource leaks or other issues. Please consider restoring the error checks.

  FLAGCXCHECK(resources->netAdaptor->deregMr(resources->netRecvComm,
                                             resources->mhandles[0]));
  FLAGCXCHECK(resources->netAdaptor->closeRecv(resources->netRecvComm));
  FLAGCXCHECK(resources->netAdaptor->closeListen(resources->netListenComm));

Comment thread README.md
[<img src="docs/images/flagopen.png">](https://flagopen.baai.ac.cn/)

## Latest News
- **[2025/09]** Released [v0.5](https://github.com/FlagOpen/FlagCX/tree/release/v0.5):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The month in the release date for v0.5 is 00, which appears to be a placeholder. Please update it to the correct month.

Suggested change
- **[2025/09]** Released [v0.5](https://github.com/FlagOpen/FlagCX/tree/release/v0.5):
- **[2025/01]** Released [v0.5](https://github.com/FlagOpen/FlagCX/tree/release/v0.5):

Comment thread README.md
## Latest News
- **[2025/09]** Released [v0.5](https://github.com/FlagOpen/FlagCX/tree/release/v0.5):
- Adds AMD support (hipAdaptor and rcclAdaptor).
- Introduces flagcxNetAdaptor to unify network backends, currently supporting SOCKET, IBRC, UCX and IBUC (experimently).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There is a typo in "experimently". It should be "experimentally".

Suggested change
- Introduces flagcxNetAdaptor to unify network backends, currently supporting SOCKET, IBRC, UCX and IBUC (experimently).
- Introduces flagcxNetAdaptor to unify network backends, currently supporting SOCKET, IBRC, UCX and IBUC (experimentally).

@mikethegoblin mikethegoblin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@yzhang35 yzhang35 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@chencjcj chencjcj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@MC952-arch
MC952-arch merged commit 6db7a25 into flagos-ai:main Sep 30, 2025
3 checks passed
liuhe-spec pushed a commit to liuhe-spec/FlagCX that referenced this pull request Nov 28, 2025
@MC952-arch
MC952-arch deleted the v0.5-release branch March 13, 2026 05:50
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.

4 participants