[EP] Enable Fabric Mem only if MC_USE_NVLINK_IPC is explicitly set to zero#1637
[EP] Enable Fabric Mem only if MC_USE_NVLINK_IPC is explicitly set to zero#1637
Conversation
Summary of ChangesHello, 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 addresses a bug in the Mooncake EP module where the activation of Fabric Memory was incorrectly handled based on the presence of an environment variable. The change refines the condition for enabling Fabric Memory, ensuring it is active by default and only disabled when explicitly requested, thereby improving the intended behavior of memory management within the system. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe 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
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 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
|
|
cc @he-yufeng |
There was a problem hiding this comment.
Code Review
This pull request aims to change the condition for enabling fabric memory, making it active only when MC_USE_NVLINK_IPC is explicitly set to '0'. However, the implementation in mooncake-ep/src/mooncake_ep_buffer.cpp contains a significant logic error where the newly calculated fabric_enabled flag is never used. This results in fabric memory being always enabled if hardware supports it, effectively ignoring the user's intent to disable it via the environment variable, which is a security regression as it bypasses intended access control logic for a feature that grants broad memory access across devices. Furthermore, this change creates a discrepancy with a similar check in another module, which could lead to inconsistent behavior.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@ympcMark Next time, please ensure you click "squash and merge" |
|
Oh, I will check it next time! |
|
Thanks for the fix and the cc! This makes sense — the original One thing I noticed: the Gemini review flagged that |
Yes, I agree with you. I was just mirroring the logic here: Perhaps we have to clarify the semantics of these env vars in the future. |
@ympcMark Please use squash merge to consolidate duplicate commits. |
Description
Module
mooncake-transfer-engine)mooncake-store)mooncake-ep)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-pg)mooncake-rl)Type of Change
How Has This Been Tested?
Checklist
./scripts/code_format.shbefore submitting.