cuda 100隐藏的runtime api和driver api有哪些列出api原型
以下是 CUDA 10.0 隐藏的 runtime API 和 driver API,以及它们的原型:
- runtime API:
- cudaGetSymbolAddress(void **devPtr, const void *symbol)
- cudaGetSymbolSize(size_t *size, const void *symbol)
- cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func)
- cudaFuncSetAttribute(const void *func, enum cudaFuncAttribute attr, int value)
- cudaSetDeviceFlags(unsigned int flags)
- driver API:
- cuModuleGetFunction(CUfunction *hfunc, CUmodule hmod, const char *name)
- cuModuleGetGlobal(CUdeviceptr *dptr, size_t *bytes, CUmodule hmod, const char *name)
- cuModuleGetTexRef(CUtexref *pTexRef, CUmodule hmod, const char *name)
- cuModuleLoad(CUmodule *module, const char *fname)
- cuModuleUnload(CUmodule hmod)
注:以上 API 都需要在使用前进行初始化和错误处理。详细的使用方法和参数说明可以参考 CUDA 10.0 API 文档
原文地址: https://www.cveoy.top/t/topic/fhLB 著作权归作者所有。请勿转载和采集!