numba / numba/numba

improve cuda gufunc: multiple output arguments

Open
#2,011 0 comments 0 reactions 0 assignees View on GitHub
CUDA feature_request
Dominant language
Python
Stars
11.2k
Forks
1.3k
Avg merge
2d 9h
Merged PRs (30d)
20

Description

failing example

``` python
import numpy as np
import numba as nb

@nb.guvectorize('f8[:], f8[:], f8[:]', '()->(),()', nopython=True, target='cuda')
def foo(inp, out1, out2):
out1[0] = inp[0] * 2.3
out2[0] = inp[0] + 1

inp = np.arange(10, dtype=np.float64)
out1 = np.empty_like(inp)
out2 = inp
for _ in range(3):
foo(inp, out=(out1, out2))
print('out1', out1)
print('out2', out2)
```

Contributor guide

Open the contributing guide

Research direction

Run the failing Python example with the CUDA target and inspect the gufunc handling for multiple output arguments. Confirm that repeated calls with out=(out1, out2) produce the expected separate outputs; the issue does not name a source file or test to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.