ogrisel/pygbm

Parallel splitting fails in nopython mode

stephanegaiffas opened this issue · 0 comments

When running the tests and benchmarks I get the following error :

File "pygbm/splitting.py", line 253:

def split_indices(context, split_info, sample_indices):
    <source elided>
        sizes[:n_samples % n_threads] += 1
    offset_in_buffers = np.zeros(n_threads, dtype=np.int32)
    ^

but it can be solved by using parallel=False in the split_indices decorator

@njit(parallel=False,
      locals={'sample_idx': uint32,
              'left_count': uint32,
              'right_count': uint32})
def split_indices(context, split_info, sample_indices):

but it's certainly shameful to remove parallelization here :(

I'm using numba 0.51.2. Any ideas on how to solve it ?