eyalroz / cuda-api-wrappers

Thin, unified, C++-flavored wrappers for the CUDA APIs
BSD 3-Clause "New" or "Revised" License
799 stars 80 forks source link

Add support for libnvfatbin APIs #681

Open eyalroz opened 2 months ago

eyalroz commented 2 months ago

With CUDA 12.4, NVIDIA introduced a new library for writing fatbin files. We need to figure out how to support this (functions on other classes, separate-mostly library etc.) and then implement.

APIs function:

const char * nvFatbinGetErrorString(nvFatbinResult result);
nvFatbinResult nvFatbinAddCubin(nvFatbinHandle handle, const void *code, size_t size, const char *arch, const char *identifier);
nvFatbinResult nvFatbinAddIndex(nvFatbinHandle handle, const void *code, size_t size, const char *identifier);
nvFatbinResult nvFatbinAddLTOIR(nvFatbinHandle handle, const void *code, size_t size, const char *arch, const char *identifier, const char *optionsCmdLine);
nvFatbinResult nvFatbinAddPTX(nvFatbinHandle handle, const char *code, size_t size, const char *arch, const char *identifier, const char *optionsCmdLine);
nvFatbinResult nvFatbinAddReloc(nvFatbinHandle handle, const void *code, size_t size);
nvFatbinResult nvFatbinCreate(nvFatbinHandle *handle_indirect, const char **options, size_t optionsCount);
nvFatbinResult nvFatbinDestroy(nvFatbinHandle *handle_indirect);
nvFatbinResult nvFatbinGet(nvFatbinHandle handle, void *buffer);
nvFatbinResult nvFatbinSize(nvFatbinHandle handle, size_t *size);
nvFatbinResult nvFatbinVersion(unsigned int *major, unsigned int *minor);
eyalroz commented 2 months ago

Done.