mhostetter / galois

A performant NumPy extension for Galois fields and their applications
https://mhostetter.github.io/galois/
MIT License
295 stars 27 forks source link

JIT alternative #540

Closed na3na3na closed 2 weeks ago

na3na3na commented 4 months ago

Hello,

Galois package has been very useful but I am having issues with the JIT compiled code using numba. Is there a way to turn the JIT compiling off using numba easily? Also, could you point me to where you are using numba for calculating rref and rank in _linalg?

Im aware i will be sacrificing speed but im mainly interested in the fields arithmetic only.

Thanks!

mhostetter commented 4 months ago

What issues are you having with the JIT code? Do you wish to remove the numba dependency completely? Or simply not use numba for the arithmetic?

See the Compilation Modes article. You can pass compile="python-calculate" to galois.GF() to only use Python ufuncs.

na3na3na commented 4 months ago

Yes, ideally i wish to remove numba dependency completely.

Im trying to use galois with nuika which does not play well with numba as the JIT compile requires bytecode which nuitka does not provide. I tried passing compile="python-calculate" but instead get an error of mode must be in jit-calculate for GF(2). Is there a way around this from galois end?

mhostetter commented 2 weeks ago

@na3na3na this feature was just released in v0.3.10. Let me know if it works for you.