2015-11-17 11:30:40 -08:00
|
|
|
/*************************************************************************
|
|
|
|
|
* Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
|
*
|
2016-09-22 11:57:56 -07:00
|
|
|
* See LICENSE.txt for license information
|
2015-11-17 11:30:40 -08:00
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Dynamically handle dependencies on external libraries (other than cudart).
|
|
|
|
|
|
|
|
|
|
#ifndef SRC_LIBWRAP_H_
|
|
|
|
|
#define SRC_LIBWRAP_H_
|
|
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
|
|
|
|
|
typedef struct nvmlDevice_st* nvmlDevice_t;
|
|
|
|
|
|
2016-09-22 11:57:56 -07:00
|
|
|
/**
|
|
|
|
|
* Generic enable/disable enum.
|
|
|
|
|
*/
|
|
|
|
|
typedef enum nvmlEnableState_enum
|
|
|
|
|
{
|
|
|
|
|
NVML_FEATURE_DISABLED = 0, //!< Feature disabled
|
|
|
|
|
NVML_FEATURE_ENABLED = 1 //!< Feature enabled
|
|
|
|
|
} nvmlEnableState_t;
|
|
|
|
|
|
2015-11-17 11:30:40 -08:00
|
|
|
ncclResult_t wrapSymbols(void);
|
|
|
|
|
|
|
|
|
|
ncclResult_t wrapNvmlInit(void);
|
|
|
|
|
ncclResult_t wrapNvmlShutdown(void);
|
|
|
|
|
ncclResult_t wrapNvmlDeviceGetHandleByPciBusId(const char* pciBusId, nvmlDevice_t* device);
|
|
|
|
|
ncclResult_t wrapNvmlDeviceGetIndex(nvmlDevice_t device, unsigned* index);
|
|
|
|
|
ncclResult_t wrapNvmlDeviceSetCpuAffinity(nvmlDevice_t device);
|
|
|
|
|
ncclResult_t wrapNvmlDeviceClearCpuAffinity(nvmlDevice_t device);
|
2016-09-22 11:57:56 -07:00
|
|
|
ncclResult_t wrapNvmlDeviceGetHandleByIndex(unsigned int index, nvmlDevice_t *device);
|
2015-11-17 11:30:40 -08:00
|
|
|
|
|
|
|
|
#endif // End include guard
|
|
|
|
|
|