Skip to content

Commit 071eb37

Browse files
committed
Added GPU install procedure
1 parent f7cb090 commit 071eb37

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

docs/p/howto/multiprocessing.rst

+52
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,55 @@ to a `MPI <https://www.mpi-forum.org/docs/>`_ one or vice-versa, remove the
111111
rm -rf build
112112
pip install --config-settings mpi=1 ".[mpi]"
113113

114+
`GPU Tracking`_
115+
---------------
116+
PyAT can be installed with GPU support, either `OpenCL <https://github.com/KhronosGroup/OpenCL-Guide/tree/main>`_ or
117+
`CUDA <https://developer.nvidia.com/cuda-toolkit>`_, compatibility. GPU are especially interesting for tracking large
118+
number of particle. The performance of the tracking is mainly related to the GPU double precision arithmetic performance.
119+
120+
OpenCL Installation
121+
...................
122+
`OpenCL`_ and installable client driver (ICD) must be preliminary installed on the system either using linux packages or by
123+
building the `OpenCL SDK <https://github.com/KhronosGroup/OpenCL-SDK>`::
124+
125+
sudo apt install opencl-headers ocl-icd-opencl-dev -y
126+
127+
Then you need to set the environment variable ``OCL_PATH`` to the SDK install path if you don't use a standard install::
128+
129+
export OCL_PATH=<sdk_intall_path>
130+
or (on Windows)::
131+
132+
set OCL_PATH=C:\clpeak\build\sdk_instal
133+
134+
Note: `clpeak <https://github.com/krrishnarraj/clpeak>` is a great OpenCL benchmarking tool that can be used to check system
135+
performance (especially double precision floating point arithmetic) and to build the OpenCL SDK.
136+
137+
Install PyAT using the ``opencl`` flag::
138+
139+
cd <at>
140+
rm -rf build
141+
pip install --config-settings opencl=1 .
142+
143+
You can check the install as bellow, when no GPU support is enable, the method ``at.tracking.gpu_info()`` will return an empty list::
144+
145+
Z:\at>python
146+
Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32
147+
Type "help", "copyright", "credits" or "license" for more information.
148+
>>> import at
149+
>>> at.tracking.gpu_info()
150+
[['NVIDIA GeForce GTX 1050 Ti', '6.1', 6, 'NVIDIA CUDA OpenCL 3.0 CUDA 12.3.68'], ['Intel(R) UHD Graphics 630', '0.0', 24, 'Intel(R) OpenCL HD Graphics OpenCL 3.0 ']]
151+
152+
CUDA Installation
153+
.................
154+
155+
`NVidia CUDA`_ toolkit must be preliminary installed on the system from `NVidia <https://developer.nvidia.com/cuda-downloads>`.
156+
Set the environment variable ``CUDA_PATH``::
157+
158+
export CUDA_PATH=/cvmfs/hpc.esrf.fr/software/packages/ubuntu20.04/x86_64/cuda/12.3.1
159+
or on Windows::
160+
161+
set CUDA_PATH=CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3
162+
Install PyAT using the ``cuda`` flag::
163+
164+
pip install --config-settings cuda=1 .
165+
You can check the install using the method ``at.tracking.gpu_info()`` as described above.

0 commit comments

Comments
 (0)