Finite fields (Galois fields) on the GPU using Numba

Hi there. We’re currently investigating ways to offload code to the GPU that involves final fields, using Python. We came across a NumPy extension that extends NumPy arrays to operate over finite fields (GitHub - mhostetter/galois: A performant NumPy extension for Galois fields and their applications), but as far as we know, Numba does not support the use of libraries that are not explicitly supported. Is this true? Is there another way for us to use finite fields in Numba?

This is true, Numba doesn’t generally support libraries that haven’t already been modified to work with Numba - a Numba extension is needed to enable Numba to support them - the API for adding these extensions is documented (to some extent) in Extending Numba — Numba 0.56.2+0.gd6731f6d2.dirty-py3.7-linux-x86_64.egg documentation

It looks like Galois already uses Numba for some of its implementation - e.g.: galois/_function.py at master · mhostetter/galois · GitHub

It also looks like there have been thoughts about GPU support for Galois, extending the use of Numba, and using Numba’s parallel target: