MCPcopy Create free account
hub / github.com/catboost/catboost / StartCudaManager

Function StartCudaManager

catboost/cuda/cuda_lib/cuda_manager.cpp:283–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283THolder<TStopCudaManagerCallback> StartCudaManager(const NCudaLib::TDeviceRequestConfig& requestConfig,
284 const ELoggingLevel loggingLevel) {
285 TSetLogging inThisScope(loggingLevel);
286
287#if defined(USE_MPI)
288 CB_ENSURE(GetMpiManager().IsMaster(), "Error: can't run cudaManager on slave");
289#endif
290
291 auto& manager = NCudaLib::GetCudaManager();
292 manager.Start(requestConfig);
293 manager.WaitComplete();
294
295 ui32 devCount = manager.GetDeviceCount();
296 for (ui32 dev = 0; dev < devCount; ++dev) {
297 CATBOOST_INFO_LOG << "Free memory on device #" << dev << " " << manager.FreeMemoryMb(dev) << "MB" << Endl;
298 }
299 InitMemPerformanceTables(manager);
300
301 return MakeHolder<TStopCudaManagerCallback>();
302}
303
304THolder<TStopCudaManagerCallback> StartCudaManager(const ELoggingLevel loggingLevel) {
305 return StartCudaManager(NCudaLib::GetDefaultDeviceRequestConfig(), loggingLevel);

Callers 15

mode_eval_featureFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85

Calls 6

InitMemPerformanceTablesFunction · 0.85
FreeMemoryMbMethod · 0.80
IsMasterMethod · 0.45
StartMethod · 0.45
WaitCompleteMethod · 0.45
GetDeviceCountMethod · 0.45

Tested by 15

Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68
Y_UNIT_TESTFunction · 0.68