NVIDIA / nvbench

CUDA Kernel Benchmarking Library
Apache License 2.0
525 stars 66 forks source link

Support static builds of nvbench with nvml enabled. #148

Closed robertmaynard closed 1 year ago

robertmaynard commented 1 year ago

To do this we need to ensure that the nvml init handler is both contained in the library/executable that uses nvbench.

The original implementation fails since the singleton can be dropped since it has no usages. So instead we move to a function static which we ensure will always be used.