eyalroz / cuda-api-wrappers

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

Add support for core dump enabling #646

Open eyalroz opened 4 months ago

eyalroz commented 4 months ago

Since CUDA 12.1, the driver API has a Coredump Attributes Control API:

CUresult cuCoredumpGetAttribute ( CUcoredumpSettings attrib, void* value, size_t* size )
CUresult cuCoredumpGetAttributeGlobal ( CUcoredumpSettings attrib, void* value, size_t* size )
CUresult cuCoredumpSetAttribute ( CUcoredumpSettings attrib, void* value, size_t* size )
CUresult cuCoredumpSetAttributeGlobal ( CUcoredumpSettings attrib, void* value, size_t* size )

(context-specific and app-wide getter and setters).

And the attributes are:

CU_COREDUMP_ENABLE_ON_EXCEPTION
CU_COREDUMP_TRIGGER_HOST
CU_COREDUMP_LIGHTWEIGHT
CU_COREDUMP_ENABLE_USER_TRIGGER
CU_COREDUMP_FILE
CU_COREDUMP_PIPE
CU_COREDUMP_MAX

There are also some related context flags:

Let's figure out what all of these do and move on to support them.