module internal.gpu¶
Source: stdlib/internal/gpu.codon
CUDA_SUCCESS: Literal[int] = 0¶
CUDA_ERROR_NOT_FOUND: Literal[int] = 500¶
CUresult = i32¶
CUdevice = i32¶
CUdeviceptr = u64¶
CUmodule = cobj¶
CUcontext = cobj¶
CUfunction = cobj¶
modules: List[CUmodule] = []¶
cuCtxCreate = Function[([Ptr[cobj], u32, CUdevice], CUresult)](cobj())¶
cuMemAlloc = Function[([Ptr[CUdeviceptr], i64], CUresult)](cobj())¶
cuMemcpyDtoH = Function[([cobj, CUdeviceptr, u64], CUresult)](cobj())¶
cuMemcpyHtoD = Function[([CUdeviceptr, cobj, u64], CUresult)](cobj())¶
cuMemFree = Function[([CUdeviceptr], CUresult)](cobj())¶
cuDeviceComputeCapability = Function[([Ptr[i32], Ptr[i32], CUdevice], CUresult)](cobj())¶
cuDeviceGet = Function[([Ptr[CUdevice], i32], CUresult)](cobj())¶
cuDeviceGetCount = Function[([Ptr[i32]], CUresult)](cobj())¶
cuDeviceGetName = Function[([Ptr[byte], i32, CUdevice], CUresult)](cobj())¶
cuGetErrorName = Function[([CUresult, Ptr[cobj]], CUresult)](cobj())¶
cuGetErrorString = Function[([CUresult, Ptr[cobj]], CUresult)](cobj())¶
cuInit = Function[([u32], CUresult)](cobj())¶
cuLaunchKernel = Function[([CUfunction, u32, u32, u32, u32, u32, u32, u32, cobj, cobj, cobj], CUresult)](cobj())¶
cuModuleGetFunction = Function[([Ptr[CUfunction], CUmodule, cobj], CUresult)](cobj())¶
cuModuleLoadData = Function[([Ptr[CUmodule], cobj], CUresult)](cobj())¶
CUDAError¶
Fields¶
result: int¶
Magic methods¶
__init__(self, result: int, message: str = "")¶
Device @tuple Class is named tuple (cannot write fields) ¶
Properties¶
compute_capability @property Method is a class property ¶
Magic methods¶
__new__(idx: int)¶
__str__(self)¶
__index__(self)¶
__bool__(self)¶
Methods¶
count() @staticmethod Method is static (does not take 'self' argument) ¶
cuda_init_handles(cuda_handle: cobj)¶
cuda_check(err)¶
nvptx_init()¶
nvptx_load_module()¶
cuda_init(debug: bool = False)¶
Memory[T] @tuple Class is named tuple (cannot write fields) ¶
Fields¶
T: type¶
Properties¶
ptr @property Method is a class property ¶
Magic methods¶
__new__(ptr: cobj)¶
Methods¶
to_ptr(p: CUdeviceptr) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR ¶
%0 = inttoptr i64 %p to ptr
ret ptr %0
syncthreads() @llvm Function is implemented with inline LLVM IR ¶
declare void @llvm.nvvm.barrier0()
call void @llvm.nvvm.barrier0()
ret {} {}