mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-08-29 22:20:36 +02:00
test(device): restore release branch coverage
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Obliteratus — Master Ablation Suite for HuggingFace transformers."""
|
||||
|
||||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.3"
|
||||
|
||||
# Lazy imports for the main pipeline classes
|
||||
__all__ = [
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "obliteratus"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
description = "Master Ablation Suite for HuggingFace transformers"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
@@ -248,3 +248,17 @@ def test_configure_cuda_can_disable_cudnn(monkeypatch):
|
||||
|
||||
disable.assert_called_once_with(False)
|
||||
assert device.torch.backends.cudnn.enabled is False
|
||||
|
||||
|
||||
def test_configure_cuda_disables_cudnn_without_sdp_toggle(monkeypatch):
|
||||
"""Older Torch builds may not expose the cuDNN SDP backend toggle."""
|
||||
monkeypatch.setattr(device, "is_cuda", lambda: True)
|
||||
monkeypatch.delattr(
|
||||
device.torch.backends.cuda, "enable_cudnn_sdp", raising=False
|
||||
)
|
||||
monkeypatch.setenv("OBLITERATUS_DISABLE_CUDNN", "1")
|
||||
monkeypatch.setattr(device.torch.backends.cudnn, "enabled", True)
|
||||
|
||||
device.configure_cuda_alloc()
|
||||
|
||||
assert device.torch.backends.cudnn.enabled is False
|
||||
|
||||
Reference in New Issue
Block a user