Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Start with a built-in style and modify it
BasedOnStyle: Google

# Overrides
ColumnLimit: 120
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6 # Or pin to your preferred clang-format version
hooks:
- id: clang-format
files: \.(c|h|cpp|hpp|proto|cu|cuh)$
exclude: ^(apex/contrib/csrc/multihead_attn/cutlass|apex/contrib/csrc/cudnn-frontend)/

# TODO: Enable Ruff
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.14.0
# hooks:
# - id: ruff-check
# args: ["--fix"]
# - id: ruff-format
# types_or: [python]
# exclude: "examples"
5,367 changes: 2,444 additions & 2,923 deletions apex/contrib/csrc/bottleneck/bottleneck.cpp

Large diffs are not rendered by default.

Loading