conflict with matplotlib.pyplot
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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 <module>
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<char> 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.
- Dominant language
- Python
- Stars
- 422
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from arrayfire/arrayfire-python
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
arrayfire/arrayfire-python#271 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
arrayfire/arrayfire-python#270 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
arrayfire/arrayfire-python#269 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
arrayfire/arrayfire-python#268 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
arrayfire/arrayfire-python#267 · 1 comment · 1 reaction ·
All issues in arrayfire/arrayfire-python
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·