arrayfire / arrayfire/arrayfire-python
conflict with matplotlib.pyplot
- 主要语言
- Python
- 星标
- 422
- 派生
- 63
- PR 合并指标
- 30 天内没有已合并 PR
描述
These codes will trigger an error in just in time compiler
```
import matplotlib; matplotlib.use('Agg')
import matplotlib.pyplot as plt
import arrayfire as af
a = af.data.range( 640, 1280, dim=0 )
b = af.data.range( 640, 1280, dim=0 ) - 1
af.data.join(0,a,b,)
```
and the error output is
```
Traceback (most recent call last):
File "test.py", line 8, in
af.data.join(0,a,b,)
File "/home/herbert/anaconda3/lib/python3.6/site-packages/arrayfire/data.py", line 320, in join
safe_call(backend.get().af_join(c_pointer(out.arr), dim, first.arr, second.arr))
File "/home/herbert/anaconda3/lib/python3.6/site-packages/arrayfire/util.py", line 79, in safe_call
raise RuntimeError(to_str(err_str))
RuntimeError: In function std::vector cuda::compileToPTX(const char*, std::string)
In file src/backend/cuda/jit.cpp:
```
However, without any major change, the following two will not,
```
# change the import order between pyplot and arrayfire
import matplotlib; matplotlib.use('Agg')
import arrayfire as af
import matplotlib.pyplot as plt
a = af.data.range( 640, 1280, dim=0 )
b = af.data.range( 640, 1280, dim=0 ) - 1
af.data.join(0,a,b,)
```
or
```
# do not perform the arithmetic operation on one of the array
import matplotlib; matplotlib.use('Agg')
import matplotlib.pyplot as plt
import arrayfire as af
a = af.data.range( 640, 1280, dim=0 )
b = af.data.range( 640, 1280, dim=0 )
af.data.join(0,a,b,)
```
Here is my python environment obtained by running `python` in a terminal.
```
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
Reproduce the provided Python 3.6 example with matplotlib.pyplot, ArrayFire, the arithmetic operation, and data.join. Inspect arrayfire/data.py at join, arrayfire/util.py at safe_call, and the reported src/backend/cuda/jit.cpp path to determine why import order changes the JIT failure; done means the reproducer no longer errors without requiring an import-order workaround.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- matplotlib, python
- 领域
- backend, hpc
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100