1
- # gputools
1
+ # gputools - OpenCL accelerated volume processing in Python
2
2
3
- OpenCL accelerated volume processing in Python
3
+ This package aims to provide GPU accelerated implementations of common volume processing algorithms to the python ecosystem.
4
+
5
+ * convolutions
6
+ * denoising
7
+ * deconvolution
8
+ * synthetic noise
9
+ * ffts
10
+ * transforms
4
11
5
12
### Requirements
6
13
7
- - python 2 (yet)
14
+ - python 2.7 / 3.5+
8
15
- a working OpenCL environment (check with clinfo).
9
16
10
17
### Installation
11
18
12
19
```
13
- pip install --user git+https://github.com/maweigert/ gputools
20
+ pip install gputools
14
21
```
15
22
check if basic stuff is working:
16
23
@@ -26,7 +33,10 @@ Most of the methods work on both numpy arrays or GPU memory objects (gputools.OC
26
33
27
34
####Convolutions
28
35
29
- 1D-3D convolutions/seperable convolutions/fft based convolution
36
+ * 2D-3D convolutions
37
+ * separable convolutions
38
+ * fft based convolution
39
+ * spatially varying convolutions
30
40
31
41
``` python
32
42
@@ -87,7 +97,7 @@ gputools.transforms.translate(d,10,20,30)
87
97
```
88
98
89
99
####fft
90
- wraps around pyfft
100
+ wraps around reikna
91
101
92
102
``` python
93
103
gputools.fft(d)
@@ -104,4 +114,39 @@ id_platform = 0
104
114
id_device = 1
105
115
```
106
116
117
+ ### Troubleshooting
118
+
119
+ #### pyopencl: _ cffi.so ImportError
120
+ If you see a
121
+ ```
122
+ ImportError: _cffi.so: undefined symbol: clSVMFree
123
+ ```
124
+ after importing gputools, this is most likely a problem of pyopencl being installed with an incorrent OpenCL version.
125
+ Check the OpenCL version for your GPU with clinfo (e.g. 1.2):
126
+
127
+ ```
128
+ clinfo | grep Version
129
+ ```
130
+
131
+ and install pyopencl manually while enforcing your opencl version:
132
+
133
+ ```
134
+ # uninstall pyopencl
135
+ pip uninstall pyopencl cffi
136
+
137
+ # get pyopencl source
138
+ git clone https://github.com/pyopencl/pyopencl.git
139
+ cd pyopencl
140
+ python configure.py
141
+
142
+ # add in siteconf.py the line
143
+ # CL_PRETEND_VERSION = "1.2"
144
+ echo 'CL_PRETEND_VERSION = "1.2"' >> siteconf.py
145
+
146
+ pip install .
147
+ ```
148
+ where e.g. "1.2" is your version of OpenCL.
149
+
150
+
151
+
107
152
0 commit comments