initialize.py 546 Bytes
Newer Older
dugupeiwen's avatar
dugupeiwen committed
1
2
3
4
5
6
7
8
9
10
11
12
13
def initialize_all():
    # Import models to register them with the data model manager
    import numba.cuda.models  # noqa: F401

    from numba.cuda.decorators import jit
    from numba.cuda.dispatcher import CUDADispatcher
    from numba.core.target_extension import (target_registry,
                                             dispatcher_registry,
                                             jit_registry)

    cuda_target = target_registry["cuda"]
    jit_registry[cuda_target] = jit
    dispatcher_registry[cuda_target] = CUDADispatcher