This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numba.cuda as cuda | |
import numba as nb | |
import numpy as np | |
from numba.core import sigutils | |
from numba.cuda.compiler import _Kernel | |
from numba.cuda.codegen import CUDACodeLibrary | |
from numba.cuda.compiler import Dispatcher | |
import pickle | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@cuda.jit(device=True, debug=True) | |
def expensive(x): | |
return math.pow(x, 1.001) | |
@cuda.jit(device=True, debug=True) | |
def cheap(x): | |
return math.sqrt(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import numba | |
from numba import cuda | |
import math | |
@cuda.jit(argtypes=[numba.int32[:]], debug=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import numba | |
from numba import cuda | |
import math | |
@cuda.jit(device=True) | |
def expensive(x): | |
return math.pow(x, 1.001) |