Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
bitsandbytes
Commits
9568735b
Unverified
Commit
9568735b
authored
Oct 23, 2024
by
Aarni Koskela
Committed by
GitHub
Oct 23, 2024
Browse files
Update CI tools & fix typos (#1386)
* Update pre-commit tools * Fix typos
parent
c8f2769b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
.pre-commit-config.yaml
.pre-commit-config.yaml
+3
-3
_typos.toml
_typos.toml
+4
-2
bitsandbytes/functional.py
bitsandbytes/functional.py
+1
-1
csrc/kernels.cu
csrc/kernels.cu
+3
-3
pyproject.toml
pyproject.toml
+0
-1
No files found.
.pre-commit-config.yaml
View file @
9568735b
repos
:
-
repo
:
https://github.com/astral-sh/ruff-pre-commit
rev
:
v0.
3.2
rev
:
v0.
6.9
hooks
:
-
id
:
ruff
args
:
-
--fix
-
id
:
ruff-format
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v
4.
5.0
rev
:
v5.0
.0
hooks
:
-
id
:
check-merge-conflict
-
id
:
check-yaml
...
...
@@ -18,6 +18,6 @@ repos:
args
:
-
--fix=lf
-
repo
:
https://github.com/crate-ci/typos
rev
:
v1.
18.2
rev
:
v1.
26.0
hooks
:
-
id
:
typos
_typos.toml
View file @
9568735b
...
...
@@ -4,8 +4,10 @@
extend-ignore-re
=
[
"@Ther-nul"
,
# valid Github user
]
[default.extend-identifiers]
extend-ignore-identifiers-re
=
[
".*arange.*"
,
".*ARANGE.*"
,
]
[type.py.extend-words]
"BA"
=
"BA"
# used as a commented-out variable in tests
...
...
bitsandbytes/functional.py
View file @
9568735b
...
...
@@ -1864,7 +1864,7 @@ def percentile_clipping(grad: Tensor, gnorm_vec: Tensor, step: int, percentile:
gnorm_vec: torch.Tensor
Vector of gradient norms. 100 elements expected.
step: int
The current optimiation steps (number of past gradient norms).
The current optimi
z
ation steps (number of past gradient norms).
"""
prev_device
=
pre_call
(
grad
.
device
)
...
...
csrc/kernels.cu
View file @
9568735b
...
...
@@ -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
if
((
base_col
+
subrow_loop_row
+
jrow
+
warp_id
<
outRows
)
&&
(
base_row
+
warp_lane
<
rows
))
{
// each row ha
e
32 columns and is offset by 1 to prevent bank conflict during storage into smem
// each row ha
s
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
];
// 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
//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
))
{
// each row ha
e
32 columns and is offset by 1 to prevent bank conflict during storage into smem
// each row ha
s
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
];
// 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
//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
))
{
// each row ha
e
32 columns and is offset by 1 to prevent bank conflict during storage into smem
// each row ha
s
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
];
// each 32 columns we have new tile
...
...
pyproject.toml
View file @
9568735b
...
...
@@ -31,7 +31,6 @@ ignore = [
"F841"
,
# Local assigned but not used (TODO: enable, these are likely bugs)
"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]
"**/__init__.py"
=
["F401"]
# allow unused imports in __init__.py
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment