-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
feature requestNew feature or requestNew feature or request
Description
We currently lack the ability to freeze a list in as constant memory:
from numba import cuda
import numpy as np
lst = [1,2,3]
@cuda.jit
def kernel():
result = np.percentile(lst, 50)
print(result)
kernel[1,1]() raise errors.NumbaNotImplementedError(f"{self}, {sig}")
numba.cuda.core.errors.NumbaNotImplementedError: Failed in cuda mode pipeline (step: cuda native lowering)
<numba.cuda.core.base.OverloadSelector object at 0x7ff724f9ecf0>, (List(int64, True),)
During: lowering "$34load_global.3 = global(lst: [1, 2, 3])" at /home/nfs/brmiller/repro.py (8)
During: Pass cuda_native_lowering
This should work like it does for numpy arrays with the list frozen into the kernel. In the future it may need to be transformed into an persistent 1D device array once we stop moving global arrays of arbitrary length into constant memory, xref numba/numba#9084
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request