Skip to content

Commit 8423108

Browse files
authored
misc: add pre-commit & format (#302)
1 parent 384d4fc commit 8423108

File tree

211 files changed

+31190
-27010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+31190
-27010
lines changed

.clang-format-ignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sgl-kernel/3rdparty/tensorrt_llm/*

.dev/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ __pycache__
1616
*.ncu*
1717
*.sqlite*
1818
*.engine
19-
*.bin
19+
*.bin
2020
outupt
2121
bin
2222
*.log
2323
*.txt
2424
*.tex
25-
tmp*
25+
tmp*

.dev/update_submodules.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ git submodule update --remote # update all submodule
55
# git submodule update --remote ffpa-attn-mma # only update ffpa-attn-mma
66
git add .
77
git commit -m "misc: Automated submodule update"
8-
set +x
8+
set +x

.github/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ __pycache__
1616
*.ncu*
1717
*.sqlite*
1818
*.engine
19-
*.bin
19+
*.bin
2020
outupt
2121
bin
2222
*.log
2323
*.txt
2424
*.tex
2525
tmp*
26-
pdfs
26+
pdfs

.github/workflows/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ __pycache__
1616
*.ncu*
1717
*.sqlite*
1818
*.engine
19-
*.bin
19+
*.bin
2020
outupt
2121
bin
2222
*.log
2323
*.txt
2424
*.tex
25-
__pycache__
25+
__pycache__

.github/workflows/issue.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
2020
days-before-pr-stale: -1
2121
days-before-pr-close: -1
22-
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ __pycache__
1616
*.ncu*
1717
*.sqlite*
1818
*.engine
19-
*.bin
19+
*.bin
2020
outupt
2121
bin
2222
*.log
2323
*.txt
2424
*.tex
2525
__pycache__
2626
pdfs
27-
build*
27+
build*

.isort.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[settings]
2+
profile=black
3+
known_first_party=sglang

.pre-commit-config.yaml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
default_stages: [pre-commit, pre-push, manual]
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: check-symlinks
8+
- id: destroyed-symlinks
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
- id: check-yaml
12+
args: [--allow-multiple-documents]
13+
- id: check-toml
14+
- id: check-ast
15+
- id: check-added-large-files
16+
- id: check-merge-conflict
17+
- id: check-shebang-scripts-are-executable
18+
- id: detect-private-key
19+
- id: debug-statements
20+
- id: no-commit-to-branch
21+
- repo: https://github.com/PyCQA/isort
22+
rev: 5.13.2
23+
hooks:
24+
- id: isort
25+
- repo: https://github.com/psf/black
26+
rev: 24.10.0
27+
hooks:
28+
- id: black-jupyter
29+
- repo: https://github.com/pre-commit/mirrors-clang-format
30+
rev: v18.1.8
31+
hooks:
32+
- id: clang-format
33+
types_or: [c++, cuda]
34+
args: [--style=file, --verbose]
35+
- repo: https://github.com/kynan/nbstripout
36+
rev: 0.8.1
37+
hooks:
38+
- id: nbstripout
39+
args:
40+
- '--keep-output'
41+
- '--extra-keys=metadata.kernelspec metadata.language_info.version'

README.md

+321-321
Large diffs are not rendered by default.

docs/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ __pycache__
1616
*.ncu*
1717
*.sqlite*
1818
*.engine
19-
*.bin
19+
*.bin
2020
outupt
2121
bin
2222
*.log
2323
*.txt
2424
*.tex
2525
__pycache__
2626
pdfs
27-
build*
27+
build*

kernels/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ __pycache__
1616
*.ncu*
1717
*.sqlite*
1818
*.engine
19-
*.bin
19+
*.bin
2020
outupt
2121
bin
2222
*.log
2323
*.txt
2424
*.tex
25-
__pycache__
25+
__pycache__

kernels/cutlass/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ tmp
1717
*.nsys
1818
*.nvvp
1919
*.nsys*
20-
*.sqlite
20+
*.sqlite

0 commit comments

Comments
 (0)