Understanding Code of Conduct
ATB is part of the CANN open project. Before contributing, please familiarize yourself with the CANN Code of Conduct. Your subsequent activities in the ATB project (including but not limited to commenting, submitting issues, and editing Wikis) must comply with this Code of Conduct.
Signing CLA
You must sign a Contributor License Agreement (CLA) before you can contribute to the community.
Please choose the appropriate CLA based on your participation status: Corporate, Corporate Contributor, Individual, or Enterprise Admin. Click here to sign.
- Corporate CLA: For contributions made on behalf of a corporate. A representative of the corporate should sign this CLA, typically an administrator.
- Corporate Contributor CLA: If you are an employee of a corporate that has already signed a Corporate CLA, apply to sign this Corporate Contributor CLA. Select your corporate on the application page. The application will be reviewed and approved by the enterprise administrator, after which you can participate in contributions.
- Individual CLA: For contributions made as an individual who is not a corporate employee.
- Enterprise Administrator CLA: If you are an enterprise administrator, sign this CLA. Enterprise administrators have the authority to review and approve applications for signing the Corporate Contributor CLA and manage personnel.
Contributing
After signing the CLA, you can begin your contribution journey. Your contribution can be in many ways and will be highly valued.
All discovered issues or new ideas you wish to contribute can be discussed and tracked through Issues, and can be closed after you contribute code via pull requests.
📝 Note
- For details about the GitCode workflow, see Gitcode Workflow Description.
- If you encounter any problems when submitting a PR, refer to FAQ.
Contribution Categories
-
Operator Bug Fixes
If you discover a bug in an operator within this repository and wish to fix it, create a new issue in the repository for feedback and tracking.
You can follow the instructions in Submitting and Handling Issues to create a
Bug-Reporttype issue describing the bug. Enter/assignor/assign @yourselfin the comment box to assign the issue to you for processing. -
Operator Optimizations
If you have ideas for improving generalization or performance of existing operators in this repository and want to implement these optimizations, you are welcome to contribute.
You can follow the instructions in Submitting and Handling Issues to create a
Requirementtype issue describing your idea. Then enter/assignor/assign @yourselfin the comment box to assign the issue to yourself for handling. -
Contributing New Operators
If you have an entirely new operator that you want to design and implement on Ascend chips, propose your ideas and design in an issue, and discuss them with the Ascend team.
You can follow the instructions in Submitting and Handling Issues to create a
Requirementtype issue to provide your new operator description and design solution. The Ascend team will communicate with you for confirmation and assign an appropriatecontribdirectory for your operator. You can then contribute your new operator to that directory.In addition, you need to comment
/assignor/assign @yourselfin the submitted issue to claim the issue and complete the new operator submission. -
Documentation Corrections
If you discover errors in operator documentation within the repository, create a new issue in the repository for feedback and correction.
You can follow the instructions in Submitting and Handling Issues to create a
Documentationtype issue to point out the errors. Enter/assignor/assign @yourselfin the comment box to assign the issue to you for correcting the documentation. -
Resolving Others' Issues
If you have solutions to problems encountered by others in the community, feel free to comment on the issues to help solve their problems, jointly improving ease of use.
If the issue requires code modification, you can enter
/assignor/assign @yourselfin the comment box to assign the issue to yourself for assisted handling.
Submitting and Handling Issues
-
Finding the Issue List
In the ATB project homepage on GitCode, click
Issuesto find the issue list. -
Submitting an Issue
If you want to report a bug, submit a requirement, or send your feedback to the community, please submit an issue.
For details, see Issue Submission Guide.
-
Participating in Issue Discussions
Each issue is open for developers to communicate and discuss. If you are interested, you can share your thoughts in comments.
-
Finding an Issue to Work On
If you want to handle one of the issues, you can assign it to yourself. You only need to enter
/assignor/assign @yourselfin the comment area. The bot will assign the issue to you and your name will be displayed in the assignee list.
Contributing Code
-
CANN Development Environment Setup
If you want to contribute code, you need to set up the CANN development environment. For details, see Environment Setup.
-
ATB Development Precautions
(1) For details about the environment and tool requirements for code contribution, see Tool Version Requirements and Installation.
(2) The ATB software code complies with the CANN Open Software License Agreement Version 2.0. For details about the agreement, see LICENSE. If you contribute code to the ATB source code repository, comply with this agreement.
Add the following statement to the header of the new source code files such as
.cpp,.cc, and.h:/** * Copyright (c) [Name of the copyright owner]. 2025. All rights reserved. * This program is free software, you can redistribute it and/or modify it under the terms and conditions of * CANN Open Software License Agreement Version 2.0 (the "License"). * Please refer to the License for details. You may not use this file except in compliance with the License. * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. * See LICENSE in the root of the software repository for the full text of the License. */Add the following statement to the header of the new files such as
.pyand.sh:# Copyright (c) [Name of the copyright owner]. 2025. All rights reserved. # This program is free software, you can redistribute it and/or modify it under the terms and conditions of # CANN Open Software License Agreement Version 2.0 (the "License"). # Please refer to the License for details. You may not use this file except in compliance with the License. # THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. # See LICENSE in the root of the software repository for the full text of the License. # ================================================================================================================-
If you are contributing as an individual and you own the copyright to the contributed content, replace [Name of the copyright owner] in the first line with your name.
-
If you are contributing on behalf of your employer, or if your employer owns the copyright to your contributed content, replace [Name of the copyright owner] in the first line with your employer's name.
If you have any doubts about the copyright ownership of your contribution, please consult your legal advisor or your employer's legal team.
-
The year
2025in the first line is the year you created or modified the file. Modify it according to the actual year.
-
-
Code Download and Contribution
(1) Before developing code, fork the ATB repository to your own repository and then download the repository to your local machine. Then, modify the code in the local branch.
(2) Develop, build, and verify the ATB operator locally by referring to Starting with a Simple Operator or Development Guide.
(3) After the code meets the contribution requirements, submit a pull request to contribute the code to the ATB. You can find the submitted pull request in the PR List.
(4) In the comment area of a submitted pull request, comment compile to trigger the build.
(5) Monitor the CI test result. If the test fails, modify the local code as prompted. If the test is passed, the PR will be assigned to a committer for review. Pay attention to the committer's review comments.
(6) If your PR is approved, the code will be merged into the ATB source code repository.