Skip to content

Commit 056ed0d

Browse files
committed
test_bitsandbytes_plugin
1 parent 89c13f3 commit 056ed0d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/tests_fabric/plugins/precision/test_bitsandbytes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License
14+
import platform
1415
import sys
1516
from unittest.mock import Mock
1617

@@ -28,7 +29,7 @@
2829

2930

3031
@pytest.mark.skipif(_BITSANDBYTES_AVAILABLE, reason="bitsandbytes needs to be unavailable")
31-
@RunIf(mps=False) # skip on MPS as Bitsandbytes is only supported on CUDA GPUs
32+
@pytest.mark.skipif(platform.system() == "Darwin") # skip on Mac as Bitsandbytes is only supported on CUDA GPUs
3233
def test_bitsandbytes_plugin(monkeypatch):
3334
module = lightning.fabric.plugins.precision.bitsandbytes
3435
monkeypatch.setattr(module, "_BITSANDBYTES_AVAILABLE", lambda: True)

tests/tests_pytorch/plugins/precision/test_bitsandbytes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License
14+
import platform
1415
import sys
1516
from unittest.mock import Mock
1617

@@ -22,11 +23,10 @@
2223
from lightning.fabric.plugins.precision.bitsandbytes import _BITSANDBYTES_AVAILABLE
2324
from lightning.pytorch import LightningModule, Trainer
2425
from lightning.pytorch.plugins.precision.bitsandbytes import BitsandbytesPrecision
25-
from tests_pytorch.helpers.runif import RunIf
2626

2727

2828
@pytest.mark.skipif(_BITSANDBYTES_AVAILABLE, reason="bitsandbytes needs to be unavailable")
29-
@RunIf(mps=False) # skip on MPS as Bitsandbytes is only supported on CUDA GPUs
29+
@pytest.mark.skipif(platform.system() == "Darwin") # skip on Mac as Bitsandbytes is only supported on CUDA GPUs
3030
def test_bitsandbytes_plugin(monkeypatch):
3131
module = lightning.fabric.plugins.precision.bitsandbytes
3232
monkeypatch.setattr(module, "_BITSANDBYTES_AVAILABLE", lambda: True)

0 commit comments

Comments
 (0)