BNB_CUDA_VERSION overrides path selection.
(monkeypatch, cuda120_spec, caplog)
| 106 | |
| 107 | |
| 108 | def test_override(monkeypatch, cuda120_spec, caplog): |
| 109 | """BNB_CUDA_VERSION overrides path selection.""" |
| 110 | monkeypatch.setenv("BNB_CUDA_VERSION", "110") |
| 111 | with patch("bitsandbytes.cextension._find_cuda_libs", return_value={}): |
| 112 | with caplog.at_level("WARNING"): |
| 113 | result = get_cuda_bnb_library_path(cuda120_spec) |
| 114 | assert result.stem == "libbitsandbytes_cuda110" |
| 115 | assert "BNB_CUDA_VERSION" in caplog.text |
| 116 | |
| 117 | |
| 118 | def test_rocm_override(monkeypatch, rocm70_spec, caplog): |
nothing calls this directly
no test coverage detected