cloudpipe / cloudpipe/cloudpickle
Serialization of dynamically defined guvectorize numba functions results in a segfault.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 1
Description
> ### Note:
> This issue is related to an issue posted to the page of joblib; see https://github.com/joblib/joblib/issues/1042.
## Problem description
I would like to pickle dynamically defined functions which use the guvectorize decorator from numba. However, this results in a segmentation fault. If it is not possible to pickle these objects then a better error message would be greatly appreciated.
## Minimal Example
### Software
- Ubuntu 19.04
- python=3.7
- numba=0.49.1
- numpy=1.18.5
- cloudpickle=1.4.1
```python
import cloudpickle
import numpy as np
from numba import guvectorize
@guvectorize(
["f8[:], f8[:]"], "(n) -> ()", nopython=True
)
def func(a, out):
out_ = a.sum()
out[0] = out_
pickled_func = cloudpickle.dumps(func)
```
### Error
```bash
13994 segmentation fault (core dumped)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.