-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Labels
Description
GPU offload of RandomForestRegressor fails at a relativly low sample and dimensional level
Error
RuntimeError: Provided range is out of integer limits. Pass `-fno-sycl-id-queries-fit-in-int' to disable range check.
Minimum working example:
from sklearnex import patch_sklearn, config_context
patch_sklearn()
from sklearn.ensemble import RandomForestRegressor
import numpy as np
def rastrigin(x):
x = np.atleast_2d(x).astype(float)
return np.squeeze(np.sum(x * x - 10 * np.cos(2 * np.pi * x), axis=1) + 10 * np.size(x, axis=1))
def main():
nd = 50
nsamp = 5000
X = np.random.uniform(-5.12, 5.12, size=(nsamp, nd))
X = X.astype(np.float32)
y = rastrigin(X)
rforrest = RandomForestRegressor(n_jobs=-1, n_estimators=100, random_state=42)
rforrest.fit(X, y)
if __name__ == '__main__':
main() # without gpu offload runs fine
with config_context(target_offload="gpu"):
main() # fails: RuntimeError: Provided range is out of integer limits. Pass `-fno-sycl-id-queries-fit-in-int' to disable range check.
System specs
- AMD Ryzen 5 7600X
- Intel Arc A750
- Ubuntu 24.04.3 LTS
Conda environment (yml)
name: sklex
channels:
- https://software.repos.intel.com/python/conda
- conda-forge
- defaults
dependencies:
- _openmp_mutex=4.5=6_kmp_llvm
- bzip2=1.0.8=hda65f42_8
- ca-certificates=2025.11.12=hbd8a1cb_0
- dal=2025.9.0=h9289deb_52
- dpcpp-cpp-rt=2025.3.1=intel_760
- dpcpp_cpp_rt=2025.3.1=intel_760
- icu=75.1=he02047a_0
- impi_rt=2021.16.0=h4715778_443
- intel-cmplr-lib-rt=2025.3.1=intel_760
- intel-cmplr-lib-ur=2025.3.1=intel_760
- intel-cmplr-lic-rt=2025.3.1=intel_760
- intel-gpu-ocl-icd-system=1.0.0=h6b64f20_2
- intel-opencl-rt=2025.3.1=intel_760
- intel-openmp=2025.3.1=intel_760
- intel-sycl-rt=2025.3.1=intel_760
- joblib=1.5.2=pyhd8ed1ab_0
- ld_impl_linux-64=2.45=bootstrap_ha15bf96_3
- libblas=3.11.0=2_h4a7cf45_openblas
- libcblas=3.11.0=2_h0358290_openblas
- libexpat=2.7.3=hecca717_0
- libffi=3.5.2=h9ec8514_0
- libgcc=15.2.0=h767d61c_7
- libgcc-ng=15.2.0=h69a702a_7
- libgfortran=15.2.0=h69a702a_7
- libgfortran5=15.2.0=hcd61629_7
- libhwloc=2.12.1=default_h7f8ec31_1002
- libiconv=1.18=h3b78370_2
- liblapack=3.11.0=2_h47877c9_openblas
- liblzma=5.8.1=hb9d3cd8_2
- libmpdec=4.0.0=hb9d3cd8_0
- libopenblas=0.3.30=pthreads_h94d23a6_4
- libsqlite=3.51.0=hee844dc_0
- libstdcxx=15.2.0=h8f9b012_7
- libstdcxx-ng=15.2.0=h4852527_7
- libuuid=2.41.2=he9a06e4_0
- libxml2=2.15.1=h26afc86_0
- libxml2-16=2.15.1=ha9997c6_0
- libzlib=1.3.1=hb9d3cd8_2
- llvm-openmp=20.1.8=hc2b8361_0
- mpi=1.0=impi
- ncurses=6.5=h2d0b736_3
- numpy=2.3.5=py313hf6604e3_0
- openssl=3.6.0=h26f9b46_0
- pip=25.3=pyh145f28c_0
- python=3.13.9=hc97d973_101_cp313
- python_abi=3.13=8_cp313
- readline=8.2=h8c095d6_2
- scikit-learn=1.7.2=py313h06d4379_0
- scikit-learn-intelex=2025.9.0=py313hfd9b6fe_0
- scipy=1.16.3=py313h11c21cd_1
- setuptools=80.9.0=pyhff2d567_0
- tbb=2022.3.0=h8d10470_1
- tcm=1.4.1=intel_445
- threadpoolctl=3.6.0=pyhecae5ae_0
- tk=8.6.13=noxft_ha0e22de_103
- tzdata=2025b=h78e105d_0
- umf=1.0.2=intel_81