Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel splitting fails in nopython mode #99

Open
stephanegaiffas opened this issue Dec 1, 2020 · 0 comments
Open

Parallel splitting fails in nopython mode #99

stephanegaiffas opened this issue Dec 1, 2020 · 0 comments

Comments

@stephanegaiffas
Copy link

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 ?

@stephanegaiffas stephanegaiffas changed the title Parallel splitting fails in nonpython mode Parallel splitting fails in nopython mode Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant