Skip to content

Conversation

@zuje123
Copy link
Contributor

@zuje123 zuje123 commented Oct 25, 2025

build for deepep a2 package

bash build.sh -a deepep2

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @zuje123, 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 significantly enhances the DeepEP framework by integrating prefill support and optimizing for the Ascend910B (A2) architecture. It introduces a modular kernel build system, dynamically configures compilation based on the target platform, and implements advanced inter-node communication mechanisms for distributed MoE operations. These changes aim to improve the efficiency and specialized handling of data dispatch and combination in a distributed AI computing environment, leveraging the unique capabilities of the A2 platform.

Highlights

  • New Kernel Build System: A new kernel build process has been introduced via the build_deepep_kernels2 function in build.sh, replacing the older build_deepep_kernels. This update also includes a cleanup step before installing custom operations.
  • Platform-Specific CMake Configuration: The csrc/deepep/CMakeLists.txt now dynamically determines the DEEPEP_ARCH (x86_64 or aarch64) and includes platform-specific headers and links against the opapi library, indicating tailored compilation for different hardware.
  • Inter-Node Communication Primitives: New internode_dispatch and internode_combine methods have been added to csrc/deepep/deep_ep.cpp and declared in deep_ep.hpp. These methods are crucial for handling distributed Mixture-of-Experts (MoE) operations, including data padding, type/shape validation, and calls to new NPU commands like aclnnNotifyDispatchA2 and aclnnMoeDistributeCombineA2.
  • Ascend910B (A2) Architecture Support: Extensive changes have been made to adapt the DeepEP framework for the Ascend910B (A2) architecture. This includes new constants, modified Buffer initialization logic, and the introduction of a dedicated csrc/deepep/ops2/ directory containing A2-specific custom operations, build scripts, and low-level NPU libraries (Catlass).
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.

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 adds support for the 'a2' architecture, primarily by introducing a new set of operations in csrc/deepep/ops2 and updating the build scripts and C++ source files to handle this new architecture. While the changes are extensive and seem to correctly add the new functionality, there are several areas for improvement regarding code duplication, readability, and potential bugs that should be addressed.

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