Skip to content

Commit 63696fb

Browse files
committed
fixes for cupyweapper and dependencies
1 parent 333ffe7 commit 63696fb

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

httomolibgpu/cupywrapper.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cupy_run = False
12
try:
23
import cupy as cp
34
import nvtx
@@ -6,7 +7,7 @@
67
cp.cuda.Device(0).compute_capability
78
cupy_run = True
89
except cp.cuda.runtime.CUDARuntimeError:
9-
print("CuPy library is a major dependency for HTTomolibgpu, please install")
10+
print("CuPy library is installed but GPU is not accessible")
1011
import numpy as cp
1112
except ImportError as e:
1213
print(
@@ -15,6 +16,4 @@
1516
from unittest.mock import Mock
1617
import numpy as cp
1718

18-
cupy_run = False
19-
2019
nvtx = Mock()

httomolibgpu/prep/phase.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ def paganin_filter_savu(
128128
# Note: this takes considerable time on GPU...
129129
data = cp.pad(data, ((0, 0), (pad_y, pad_y), (pad_x, pad_x)), mode=pad_method)
130130

131-
# Define array to hold result, which will not have the padding applied to it
132131
precond_kernel_float = cp.ElementwiseKernel(
133132
"T data",
134133
"T out",

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ classifiers = [
3737
requires-python = ">=3.10"
3838
dynamic = ["version"]
3939
dependencies = [
40-
"cupy",
40+
"cupy==12.3.0",
41+
"nvtx",
4142
"numpy",
4243
"scipy",
4344
"pillow",

0 commit comments

Comments
 (0)