numba/numba

Function of len() is invalid to dynamic share array

Open

#5,206 opened on Feb 6, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Python (1,132 forks)batch import
CUDATaskgood first issue

Repository metrics

Stars
 (9,177 stars)
PR merge metrics
 (Avg merge 14d 16h) (30 merged PRs in 30d)

Description

Hi~ I found the function of len() is invalid to dynamic share array. Here is my code snippet:

@cuda.jit
def kern_fun()
    dynamic_share_array = cuda.shared.array(0, numba.float32)
    fill_value(dynamic_share_array)
    print(len(dynamic_share_array))

main():
    kern_fun[1, 10, 0, 100]()

the output of print is '0'. Any ideas?

Contributor guide