soda-inria / sklearn-numba-dpex

Experimental plugin for scikit-learn to be able to run (some estimators) on Intel GPUs via numba-dpex.
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Add workarounds for https://github.com/numba/numba/issues/9242 #121

Open Hardcode84 opened 1 year ago

Hardcode84 commented 1 year ago

See https://github.com/numba/numba/issues/9242 for technical details. Defining variable inside loop/one of the if branches and using it outside confuses Numba compiler, which can lead to invalid code being generated. Define vars outside as workaround.

Those are only such issues I immediately noticed, there may be more in such vein.