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
d848d4db
Commit
d848d4db
authored
Sep 15, 2025
by
Matthew Douglas
Browse files
Lint fix
parent
6a07ffe0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
tests/test_functional.py
tests/test_functional.py
+5
-1
tests/test_optim.py
tests/test_optim.py
+0
-2
No files found.
tests/test_functional.py
View file @
d848d4db
...
@@ -1418,7 +1418,11 @@ class TestQuantize4BitFunctional:
...
@@ -1418,7 +1418,11 @@ class TestQuantize4BitFunctional:
if
device
==
"hpu"
and
not
is_supported_on_hpu
(
storage_type
,
dtype
):
if
device
==
"hpu"
and
not
is_supported_on_hpu
(
storage_type
,
dtype
):
pytest
.
skip
(
"This configuration is not supported on HPU."
)
pytest
.
skip
(
"This configuration is not supported on HPU."
)
if
device
==
"cpu"
and
platform
.
system
()
==
"Windows"
and
version
.
parse
(
torch
.
__version__
).
release
==
(
2
,
8
,
0
):
if
(
device
==
"cpu"
and
platform
.
system
()
==
"Windows"
and
version
.
parse
(
torch
.
__version__
).
release
==
(
2
,
8
,
0
)
):
pytest
.
skip
(
"Regression: CPU crash on Windows with torch 2.8.0"
)
pytest
.
skip
(
"Regression: CPU crash on Windows with torch 2.8.0"
)
dims
=
4
dims
=
4
...
...
tests/test_optim.py
View file @
d848d4db
...
@@ -172,7 +172,6 @@ optimizer_names_32bit = [
...
@@ -172,7 +172,6 @@ optimizer_names_32bit = [
@
pytest
.
mark
.
parametrize
(
"device"
,
get_available_devices
(
no_cpu
=
True
),
ids
=
id_formatter
(
"device"
))
@
pytest
.
mark
.
parametrize
(
"device"
,
get_available_devices
(
no_cpu
=
True
),
ids
=
id_formatter
(
"device"
))
@
pytest
.
mark
.
skipif
(
not
get_available_devices
(
no_cpu
=
True
),
reason
=
"No device"
)
@
pytest
.
mark
.
skipif
(
not
get_available_devices
(
no_cpu
=
True
),
reason
=
"No device"
)
def
test_optimizer32bit
(
dim1
,
dim2
,
gtype
,
optim_name
,
device
):
def
test_optimizer32bit
(
dim1
,
dim2
,
gtype
,
optim_name
,
device
):
if
device
not
in
[
"cuda"
,
"xpu"
]:
if
device
not
in
[
"cuda"
,
"xpu"
]:
pytest
.
skip
(
"Optimizers are only supported on CUDA and XPU"
)
pytest
.
skip
(
"Optimizers are only supported on CUDA and XPU"
)
...
@@ -317,7 +316,6 @@ optimizer_names_8bit = [
...
@@ -317,7 +316,6 @@ optimizer_names_8bit = [
@
pytest
.
mark
.
parametrize
(
"device"
,
get_available_devices
(
no_cpu
=
True
))
@
pytest
.
mark
.
parametrize
(
"device"
,
get_available_devices
(
no_cpu
=
True
))
@
pytest
.
mark
.
skipif
(
not
get_available_devices
(
no_cpu
=
True
),
reason
=
"No device"
)
@
pytest
.
mark
.
skipif
(
not
get_available_devices
(
no_cpu
=
True
),
reason
=
"No device"
)
def
test_optimizer8bit
(
dim1
,
dim2
,
gtype
,
optim_name
,
device
):
def
test_optimizer8bit
(
dim1
,
dim2
,
gtype
,
optim_name
,
device
):
if
device
not
in
[
"cuda"
,
"xpu"
]:
if
device
not
in
[
"cuda"
,
"xpu"
]:
pytest
.
skip
(
"8-bit optimizers are only supported on CUDA and XPU"
)
pytest
.
skip
(
"8-bit optimizers are only supported on CUDA and XPU"
)
...
...
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