Unverified Commit 9568735b authored by Aarni Koskela's avatar Aarni Koskela Committed by GitHub
Browse files

Update CI tools & fix typos (#1386)

* Update pre-commit tools

* Fix typos
parent c8f2769b
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2 rev: v0.6.9
hooks: hooks:
- id: ruff - id: ruff
args: args:
- --fix - --fix
- id: ruff-format - id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v5.0.0
hooks: hooks:
- id: check-merge-conflict - id: check-merge-conflict
- id: check-yaml - id: check-yaml
...@@ -18,6 +18,6 @@ repos: ...@@ -18,6 +18,6 @@ repos:
args: args:
- --fix=lf - --fix=lf
- repo: https://github.com/crate-ci/typos - repo: https://github.com/crate-ci/typos
rev: v1.18.2 rev: v1.26.0
hooks: hooks:
- id: typos - id: typos
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
extend-ignore-re = [ extend-ignore-re = [
"@Ther-nul", # valid Github user "@Ther-nul", # valid Github user
] ]
extend-ignore-identifiers-re = [
[default.extend-identifiers] ".*arange.*",
".*ARANGE.*",
]
[type.py.extend-words] [type.py.extend-words]
"BA" = "BA" # used as a commented-out variable in tests "BA" = "BA" # used as a commented-out variable in tests
......
...@@ -1864,7 +1864,7 @@ def percentile_clipping(grad: Tensor, gnorm_vec: Tensor, step: int, percentile: ...@@ -1864,7 +1864,7 @@ def percentile_clipping(grad: Tensor, gnorm_vec: Tensor, step: int, percentile:
gnorm_vec: torch.Tensor gnorm_vec: torch.Tensor
Vector of gradient norms. 100 elements expected. Vector of gradient norms. 100 elements expected.
step: int step: int
The current optimiation steps (number of past gradient norms). The current optimization steps (number of past gradient norms).
""" """
prev_device = pre_call(grad.device) prev_device = pre_call(grad.device)
......
...@@ -2661,7 +2661,7 @@ template <int THREADS, int ITEMS_PER_THREAD, int TILE_ROWS, int TILE_COLS, int T ...@@ -2661,7 +2661,7 @@ template <int THREADS, int ITEMS_PER_THREAD, int TILE_ROWS, int TILE_COLS, int T
//const int global_col = base_row; // block offset for col //const int global_col = base_row; // block offset for col
if((base_col + subrow_loop_row + jrow + warp_id < outRows) && (base_row+warp_lane < rows)) if((base_col + subrow_loop_row + jrow + warp_id < outRows) && (base_row+warp_lane < rows))
{ {
// each row hae 32 columns and is offset by 1 to prevent bank conflict during storage into smem // each row has 32 columns and is offset by 1 to prevent bank conflict during storage into smem
char data = smem_data[(subrow_loop_row + jrow + warp_id)*33 + warp_lane]; char data = smem_data[(subrow_loop_row + jrow + warp_id)*33 + warp_lane];
// each 32 columns we have new tile // each 32 columns we have new tile
...@@ -2700,7 +2700,7 @@ template <int THREADS, int ITEMS_PER_THREAD, int TILE_ROWS, int TILE_COLS, int T ...@@ -2700,7 +2700,7 @@ template <int THREADS, int ITEMS_PER_THREAD, int TILE_ROWS, int TILE_COLS, int T
//const int global_col = base_row; // block offset for col //const int global_col = base_row; // block offset for col
if((base_col + subrow_loop_row + jrow + warp_id < outRows) && (base_row+warp_lane < rows)) if((base_col + subrow_loop_row + jrow + warp_id < outRows) && (base_row+warp_lane < rows))
{ {
// each row hae 32 columns and is offset by 1 to prevent bank conflict during storage into smem // each row has 32 columns and is offset by 1 to prevent bank conflict during storage into smem
char data = smem_data[(subrow_loop_row + jrow + warp_id)*33 + warp_lane]; char data = smem_data[(subrow_loop_row + jrow + warp_id)*33 + warp_lane];
// each 32 columns we have new tile // each 32 columns we have new tile
...@@ -2777,7 +2777,7 @@ template <int THREADS, int ITEMS_PER_THREAD, int TILE_ROWS, int TILE_COLS, int T ...@@ -2777,7 +2777,7 @@ template <int THREADS, int ITEMS_PER_THREAD, int TILE_ROWS, int TILE_COLS, int T
//const int global_col = base_row; // block offset for col //const int global_col = base_row; // block offset for col
if((base_col + subrow_loop_row + jrow + warp_id < outRows) && (base_row+warp_lane < rows)) if((base_col + subrow_loop_row + jrow + warp_id < outRows) && (base_row+warp_lane < rows))
{ {
// each row hae 32 columns and is offset by 1 to prevent bank conflict during storage into smem // each row has 32 columns and is offset by 1 to prevent bank conflict during storage into smem
char data = smem_data[(subrow_loop_row + jrow + warp_id)*33 + warp_lane]; char data = smem_data[(subrow_loop_row + jrow + warp_id)*33 + warp_lane];
// each 32 columns we have new tile // each 32 columns we have new tile
......
...@@ -31,7 +31,6 @@ ignore = [ ...@@ -31,7 +31,6 @@ ignore = [
"F841", # Local assigned but not used (TODO: enable, these are likely bugs) "F841", # Local assigned but not used (TODO: enable, these are likely bugs)
"RUF012", # Mutable class attribute annotations "RUF012", # Mutable class attribute annotations
] ]
ignore-init-module-imports = true # allow to expose in __init__.py via imports
[tool.ruff.lint.extend-per-file-ignores] [tool.ruff.lint.extend-per-file-ignores]
"**/__init__.py" = ["F401"] # allow unused imports in __init__.py "**/__init__.py" = ["F401"] # allow unused imports in __init__.py
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment