Skip to content

Commit 1fdb668

Browse files
authored
Update checkstyle and fix the format issue (#1071)
Summary ---------- 1. I found that the benchmark_fused_add_rms_norm.py format issue led to the collective failure of CI. fix it first. 2. The checkstyle script has been updated to enable it to display the modified logs. Test ``` >> make checkstyle ruff check --output-format=concise .; ruff_check_status=$?; \ ruff format --check --diff .; ruff_format_status=$?; \ ruff check . --fix; \ ruff format .; \ if [ $ruff_check_status -ne 0 ] || [ $ruff_format_status -ne 0 ]; then \ exit 1; \ fi All checks passed! --- benchmark/scripts/benchmark_fused_add_rms_norm.py +++ benchmark/scripts/benchmark_fused_add_rms_norm.py @@ -103,7 +103,7 @@ elif mode == "backward": y, s = y_fwd() ms_50, ms_20, ms_80 = triton.testing.do_bench( - lambda: (torch.autograd.backward((y, s), (dy, ds), retain_graph=True)), + lambda: torch.autograd.backward((y, s), (dy, ds), retain_graph=True), grad_to_none=[x, r], rep=500, quantiles=QUANTILES, 1 file would be reformatted, 226 files already formatted All checks passed! 1 file reformatted, 226 files left unchanged make: *** [checkstyle] Error 1 ```
1 parent 83cdcf8 commit 1fdb668

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ coverage:
1717

1818
# Command to run ruff for linting and formatting code
1919
checkstyle:
20-
ruff check .; ruff_check_status=$$?; \
21-
ruff format --check .; ruff_format_status=$$?; \
20+
ruff check --output-format=concise .; ruff_check_status=$$?; \
21+
ruff format --check --diff .; ruff_format_status=$$?; \
2222
ruff check . --fix; \
2323
ruff format .; \
2424
if [ $$ruff_check_status -ne 0 ] || [ $$ruff_format_status -ne 0 ]; then \
@@ -71,4 +71,3 @@ build:
7171
# Clean the output directory
7272
clean:
7373
rm -rf $(SITE_DIR)/
74-

benchmark/scripts/benchmark_fused_add_rms_norm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def y_fwd():
103103
elif mode == "backward":
104104
y, s = y_fwd()
105105
ms_50, ms_20, ms_80 = triton.testing.do_bench(
106-
lambda: (torch.autograd.backward((y, s), (dy, ds), retain_graph=True)),
106+
lambda: torch.autograd.backward((y, s), (dy, ds), retain_graph=True),
107107
grad_to_none=[x, r],
108108
rep=500,
109109
quantiles=QUANTILES,

0 commit comments

Comments
 (0)