test(device): restore release branch coverage

This commit is contained in:
Joseph Magly
2026-08-23 11:46:39 -04:00
parent 0108da17be
commit 6b6a0fe3d8
4 changed files with 17 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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"
+14
View File
@@ -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
Generated
+1 -1
View File
@@ -2598,7 +2598,7 @@ wheels = [
[[package]]
name = "obliteratus"
version = "0.1.2"
version = "0.1.3"
source = { editable = "." }
dependencies = [
{ name = "accelerate" },