Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Enforce formatting standards for C++ and CUDA code #4721

Open
mgoin opened this issue May 9, 2024 · 1 comment
Open

[Feature]: Enforce formatting standards for C++ and CUDA code #4721

mgoin opened this issue May 9, 2024 · 1 comment

Comments

@mgoin
Copy link
Collaborator

mgoin commented May 9, 2024

馃殌 The feature, motivation and pitch

Motivation:
We have made great strides in enforcing code quality and consistency within our Python codebase, particularly with the recent MyPy integration. To maintain a high standard of code quality throughout the project, we should apply similar formatting and style guidelines to our C++ and CUDA code.

Proposal:
Integrate clang-format into our format.sh code quality workflow to automatically enforce consistent formatting for C++ and CUDA files. This will ensure that all code adheres to the Google C++ style guide, making the codebase more readable and maintainable.

Benefits:

  • Consistent formatting across the entire codebase, including C++ and CUDA files.
  • Improved code readability and maintainability.
  • Reduced cognitive overhead for developers working with multiple languages within the project.

Alternatives

No response

Additional context

No response

@simon-mo
Copy link
Collaborator

simon-mo commented May 9, 2024

Yes! I believe @LiuXiaoxuanPKU also mentioned something like this before. The only concern/corner case this needs to address is some "vendor" files need to skip formatting like exllama or awq kernels. (to minimize the diff)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants