Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`bench_cg.py` fails with NVRTC Error

Open
#199 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
hpc

Research direction

Start by running examples/bench_cg.py with the Python and ArrayFire versions reported in the issue, then inspect the failing operation at line 144 and the NVRTC error from src/backend/cuda/jit.cpp:298. Determine why the benchmark cannot compile this operation in the reported CUDA environment; done means the benchmark completes its tests without the NVRTC compilation error.

Written by the indexing model from the issue text.

Description

Running bench_cg. py from the examples, gives me this error:

python bench_cg.py
ArrayFire v3.6.2 (CUDA, 64-bit Linux, build dc38ef1)
Platform: CUDA Toolkit 10, Driver: 410.79
[0] Tesla K80, 11442 MB, CUDA Compute 3.7
-1- Tesla K80, 11442 MB, CUDA Compute 3.7
-2- Tesla K80, 11442 MB, CUDA Compute 3.7
-3- Tesla K80, 11442 MB, CUDA Compute 3.7

Testing benchmark functions...
Traceback (most recent call last):
  File "bench_cg.py", line 197, in <module>
    test()
  File "bench_cg.py", line 144, in test
    if af.sum(af.abs(x1 - x2)/x2 > 1e-6):
  File "/home/vanderaa/miniconda3/envs/arrayfire/lib/python3.7/site-packages/arrayfire/array.py", line 894, in __truediv__
    return _binary_func(self, other, backend.get().af_div)
  File "/home/vanderaa/miniconda3/envs/arrayfire/lib/python3.7/site-packages/arrayfire/array.py", line 175, in _binary_func
    safe_call(c_func(c_pointer(out.arr), lhs.arr, other.arr, _bcast_var.get()))
  File "/home/vanderaa/miniconda3/envs/arrayfire/lib/python3.7/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:298
NVRTC Error(6): NVRTC_ERROR_COMPILATION

System: Linux K80 4.15.0-1035-azure #36~16.04.1-Ubuntu SMP Fri Nov 30 15:25:49 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
python --version:
Python 3.7.1

$pip  show arrayfire
Name: arrayfire
Version: 3.6.20181017
Summary: Python bindings for ArrayFire
Home-page: http://arrayfire.com
Author: Pavan Yalamanchili
Author-email: contact@pavanky.com
License: BSD
Location: /mnt/vanderaa/miniconda3/envs/arrayfire/lib/python3.7/site-packages
Requires:
Required-by:
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arrayfire/arrayfire-python

All issues in arrayfire/arrayfire-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.