1

My code is here:

import numpy as np
from numbapro import cuda

@cuda.autojit
def child_launch(data):
    data[cuda.threadIdx.x] = data[cuda.threadIdx.x] + 100

@cuda.autojit
def parent_launch(data):
    data[cuda.threadIdx.x] = cuda.threadIdx.x
    cuda.syncthreads()

    if cuda.threadIdx.x == 0:
        child_launch[1, 256](data)
        cuda.synchronize()

    cuda.syncthreads()

data = np.zeros(256)
print data
parent_launch[ 1, 256 ](data)
print data

The running result is as follows:

Traceback (most recent call last):
......
numba.typeinfer.TypingError: Untyped global name 'child_launch'
File "PythonOpenMPTestMain.py", line 14

I just don't know why I can't launch the child kernel. Please help me. Thank you very much.

1 Answers1

1

I just don't know why I can't launch the child kernel.

Because it is not (even in mid 2018) supported.

Quoting from the Numba 0.39 documentation

Numba does not implement all features of CUDA, yet. Some missing features are listed below:

  • dynamic parallelism
  • texture memory
talonmies
  • 70,661
  • 34
  • 192
  • 269