RASCIL can use GPU-based version of nifty-gridder called WAGG for the gridding-degridding operations:


There are two function counterparts to predict_ng and invert_ng called predict_wg and invert_wg,

WAGG needs to be installed from its repository after the RASCIL installation. WAGG uses numpy to build the installation wheel, and it will download the recent one if numpy is absent in a system. The numpy version mismatch can cause the WAGG crash. By installing WAGG after RASCIL, we make sure it uses the numpy version that RASCIL requires for the build.

Installing WAGG module

To install WAGG it is required to clone the repository, switch to the python wrapper branch, change to python folder and run pip install . , i.e.:

git clone https://gitlab.com/ska-telescope/sdp/ska-gridder-nifty-cuda.git
cd ska-gridder-nifty-cuda
git checkout --track origin/sim-874-python-wrapper
cd python
pip install .

Alternatively, WAGG can be installed directly with pip:

pip install git+http://gitlab.com/ska-telescope/sdp/ska-gridder-nifty-cuda.git@sim-874-python-wrapper#subdirectory=python

Using WAGG GPU-based predict and invert functions

WAGG module makes a use of Nvidia runtime system, called NVRTC. It is a runtime compilation library for CUDA C++. It accepts CUDA C++ source code in the form of a string, and outputs GPU-specific PTX (Parallel Thread Execution) instructions. The PTX code generated by NVRTC can be loaded and linked with other modules of the CUDA Driver API. More information on NVRTC can be found on CUDA website, https://docs.nvidia.com/cuda/nvrtc/index.html .

When the runtime support is installed, the functions predict_wg and invert_wg can be used as the CPU-based predict_ng and invert_ng since the parameters are the same. One can find an example on how to use the functions predict_ng and invert_ng in the Imaging and deconvolution demonstration Jupyter notebook in Examples section.