[PR #256] [CLOSED] Add .clang-format for consistent C++/CUDA code style #319

Closed
opened 2026-10-26 21:16:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/256
Author: @yurekami
Created: 12/25/2025
Status: ❌ Closed

Base: main ← Head: add-clang-format


📝 Commits (1)

  • b5c54bd Add .clang-format for consistent C++/CUDA code style

📊 Changes

2 files changed (+81 additions, -2 deletions)

View changed files

➕ .clang-format (+78 -0)
📝 .gitignore (+3 -2)

📄 Description

Summary

Add clang-format configuration for consistent C++/CUDA code formatting.

Configuration Highlights:

  • Base: Google style with project-specific adjustments
  • Indentation: 4 spaces (matches existing code)
  • Line limit: 120 characters
  • Braces: Attached (same line as control statement)
  • Standard: C++17
  • Includes: Preserve existing order (no auto-sorting)
  • CUTLASS: Support for CUTLASS pragma macros

Also Includes:

  • Update .gitignore to specifically ignore .clangd and .clang-tidy instead of all .clang* files

Usage

# Format a single file
clang-format -i csrc/file.hpp

# Format all C++/CUDA files
find csrc -name "*.hpp" -o -name "*.cpp" -o -name "*.cu" -o -name "*.cuh" | xargs clang-format -i

Integration

Works with pre-commit hooks (PR #252) to automatically format code on commit.

Test plan

  • Configuration is valid YAML
  • Style matches existing codebase
  • Verify formatting output on sample files

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepGEMM/pull/256 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 12/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add-clang-format` --- ### 📝 Commits (1) - [`b5c54bd`](https://github.com/deepseek-ai/DeepGEMM/commit/b5c54bdd0799e36d8f9fbc5b23b16d17f56b8178) Add .clang-format for consistent C++/CUDA code style ### 📊 Changes **2 files changed** (+81 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.clang-format` (+78 -0) 📝 `.gitignore` (+3 -2) </details> ### 📄 Description ## Summary Add clang-format configuration for consistent C++/CUDA code formatting. ### Configuration Highlights: - **Base**: Google style with project-specific adjustments - **Indentation**: 4 spaces (matches existing code) - **Line limit**: 120 characters - **Braces**: Attached (same line as control statement) - **Standard**: C++17 - **Includes**: Preserve existing order (no auto-sorting) - **CUTLASS**: Support for CUTLASS pragma macros ### Also Includes: - Update `.gitignore` to specifically ignore `.clangd` and `.clang-tidy` instead of all `.clang*` files ### Usage ```bash # Format a single file clang-format -i csrc/file.hpp # Format all C++/CUDA files find csrc -name "*.hpp" -o -name "*.cpp" -o -name "*.cu" -o -name "*.cuh" | xargs clang-format -i ``` ### Integration Works with pre-commit hooks (PR #252) to automatically format code on commit. ## Test plan - [x] Configuration is valid YAML - [x] Style matches existing codebase - [ ] Verify formatting output on sample files 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 21:16:13 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#319
No description provided.