HPCToolkit
make-cuda-wrappers Namespace Reference

Functions

def WritecuDriverFunctionPointerTable (file, funcNames)
 
def WritecuRuntimeFunctionPointerTable (file, funcNames)
 
def FuncNameToCapitalizedEnum (name)
 
def FuncNameToEnum (name)
 
def WriteDriverFunctionPointerHeader (file, funcSig)
 
def WriteRuntimeFunctionPointerHeader (file, funcSig)
 
def WriteDriverFunctionWrapper (file, funcSig)
 
def WriteRuntimeFunctionWrapper (file, funcSig)
 endif ''') More...
 

Variables

list driverSkipList
 
list runtimeSkipList
 
string cuPattern = '\s*(CUresult[\s\n]+)(cu[a-zA-Z0-9_]*[\s\n]*)\(([^;]*)\)[\s\n]*;'
 
string cudaPattern = '\s*extern[\s\n]+(cudaError_t[\s\n]+)(cuda[a-zA-Z0-9_]*[\s\n]*)\(([^;]*)\)[\s\n]*;'
 
 inFile = open(sys.argv[2]).read()
 
 generatedHeaderFile = sys.argv[3]
 
 generatedTableFile = sys.argv[4]
 
 generatedWrapperFile = sys.argv[5]
 
 lines = re.finditer(cuPattern,inFile, re.MULTILINE)
 
 defaultValue = re.compile('__dv\s*\(.*\)')
 
list signatures = []
 
 funcName = line.group(2)
 
 funcPrefix = line.group(1)
 
 funcArgs = line.group(3)
 
 noDefaultArgs = defaultValue.sub('',funcArgs)
 
 args = noDefaultArgs.split(',')
 
 last = argTypeName.split()[-1]
 

Function Documentation

◆ FuncNameToCapitalizedEnum()

def make-cuda-wrappers.FuncNameToCapitalizedEnum (   name)

Definition at line 133 of file make-cuda-wrappers.py.

◆ FuncNameToEnum()

def make-cuda-wrappers.FuncNameToEnum (   name)

Definition at line 143 of file make-cuda-wrappers.py.

Here is the caller graph for this function:

◆ WritecuDriverFunctionPointerTable()

def make-cuda-wrappers.WritecuDriverFunctionPointerTable (   file,
  funcNames 
)

Definition at line 93 of file make-cuda-wrappers.py.

◆ WritecuRuntimeFunctionPointerTable()

def make-cuda-wrappers.WritecuRuntimeFunctionPointerTable (   file,
  funcNames 
)

Definition at line 113 of file make-cuda-wrappers.py.

◆ WriteDriverFunctionPointerHeader()

def make-cuda-wrappers.WriteDriverFunctionPointerHeader (   file,
  funcSig 
)

Definition at line 148 of file make-cuda-wrappers.py.

Here is the call graph for this function:

◆ WriteDriverFunctionWrapper()

def make-cuda-wrappers.WriteDriverFunctionWrapper (   file,
  funcSig 
)

Definition at line 265 of file make-cuda-wrappers.py.

Here is the call graph for this function:

◆ WriteRuntimeFunctionPointerHeader()

def make-cuda-wrappers.WriteRuntimeFunctionPointerHeader (   file,
  funcSig 
)

Definition at line 208 of file make-cuda-wrappers.py.

Here is the call graph for this function:

◆ WriteRuntimeFunctionWrapper()

def make-cuda-wrappers.WriteRuntimeFunctionWrapper (   file,
  funcSig 
)

endif ''')

Definition at line 329 of file make-cuda-wrappers.py.

Here is the call graph for this function:

Variable Documentation

◆ args

make-cuda-wrappers.args = noDefaultArgs.split(',')

Definition at line 431 of file make-cuda-wrappers.py.

◆ cudaPattern

string make-cuda-wrappers.cudaPattern = '\s*extern[\s\n]+(cudaError_t[\s\n]+)(cuda[a-zA-Z0-9_]*[\s\n]*)\(([^;]*)\)[\s\n]*;'

Definition at line 401 of file make-cuda-wrappers.py.

◆ cuPattern

string make-cuda-wrappers.cuPattern = '\s*(CUresult[\s\n]+)(cu[a-zA-Z0-9_]*[\s\n]*)\(([^;]*)\)[\s\n]*;'

Definition at line 400 of file make-cuda-wrappers.py.

◆ defaultValue

make-cuda-wrappers.defaultValue = re.compile('__dv\s*\(.*\)')

Definition at line 422 of file make-cuda-wrappers.py.

◆ driverSkipList

list make-cuda-wrappers.driverSkipList
Initial value:
1 = [
2 'cuCtxCreate_v2',
3 'cuCtxDestroy_v2',
4 'cuMemcpyHtoD_v2',
5 'cuMemcpyDtoH_v2',
6 'cuMemcpyHtoDAsync_v2',
7 'cuMemcpyDtoHAsync_v2',
8 'cuStreamCreate',
9 'cuStreamSynchronize',
10 'cuStreamDestroy_v2',
11 'cuEventSynchronize',
12 'cuLaunchGridAsync',
13 'cuLaunchKernel']

Definition at line 28 of file make-cuda-wrappers.py.

◆ funcArgs

make-cuda-wrappers.funcArgs = line.group(3)

Definition at line 428 of file make-cuda-wrappers.py.

◆ funcName

make-cuda-wrappers.funcName = line.group(2)

Definition at line 426 of file make-cuda-wrappers.py.

◆ funcPrefix

make-cuda-wrappers.funcPrefix = line.group(1)

Definition at line 427 of file make-cuda-wrappers.py.

◆ generatedHeaderFile

make-cuda-wrappers.generatedHeaderFile = sys.argv[3]

Definition at line 408 of file make-cuda-wrappers.py.

◆ generatedTableFile

make-cuda-wrappers.generatedTableFile = sys.argv[4]

Definition at line 409 of file make-cuda-wrappers.py.

◆ generatedWrapperFile

make-cuda-wrappers.generatedWrapperFile = sys.argv[5]

Definition at line 410 of file make-cuda-wrappers.py.

◆ inFile

make-cuda-wrappers.inFile = open(sys.argv[2]).read()

Definition at line 406 of file make-cuda-wrappers.py.

◆ last

make-cuda-wrappers.last = argTypeName.split()[-1]

Definition at line 434 of file make-cuda-wrappers.py.

◆ lines

make-cuda-wrappers.lines = re.finditer(cuPattern,inFile, re.MULTILINE)

Definition at line 414 of file make-cuda-wrappers.py.

◆ noDefaultArgs

make-cuda-wrappers.noDefaultArgs = defaultValue.sub('',funcArgs)

Definition at line 429 of file make-cuda-wrappers.py.

◆ runtimeSkipList

list make-cuda-wrappers.runtimeSkipList

Definition at line 43 of file make-cuda-wrappers.py.

◆ signatures

list make-cuda-wrappers.signatures = []

Definition at line 424 of file make-cuda-wrappers.py.