Skip to content
Snippets Groups Projects
Commit c7b564be authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Fix CUDARuntimeError import

parent ad292c2b
Branches
Tags
1 merge request!438Reduction Support
...@@ -2,7 +2,6 @@ import pytest ...@@ -2,7 +2,6 @@ import pytest
import numpy as np import numpy as np
import pystencils as ps import pystencils as ps
from cupy_backends.cuda.api.runtime import CUDARuntimeError
from pystencils.sympyextensions import reduction_assignment_from_str from pystencils.sympyextensions import reduction_assignment_from_str
INIT_W = 5 INIT_W = 5
...@@ -51,6 +50,7 @@ def test_reduction_cpu(instruction_set, dtype, op): ...@@ -51,6 +50,7 @@ def test_reduction_cpu(instruction_set, dtype, op):
def test_reduction_gpu(dtype, op): def test_reduction_gpu(dtype, op):
try: try:
import cupy as cp import cupy as cp
from cupy_backends.cuda.api.runtime import CUDARuntimeError
device_count = range(cp.cuda.runtime.getDeviceCount()) device_count = range(cp.cuda.runtime.getDeviceCount())
print(f"Found {device_count} GPUs") print(f"Found {device_count} GPUs")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment