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

Function EnableGPUEvaluation

catboost/libs/model_interface/c_api.cpp:319–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319CATBOOST_API bool EnableGPUEvaluation(ModelCalcerHandle* modelHandle, int deviceId) {
320 try {
321 //TODO(kirillovs): fix this after adding set evaluator props interface
322 CB_ENSURE(deviceId == 0, "FIXME: Only device 0 is supported for now");
323 FULL_MODEL_PTR(modelHandle)->SetEvaluatorType(EFormulaEvaluatorType::GPU);
324 } catch (...) {
325 ErrorMessageHolder.Get().Message = CurrentExceptionMessage();
326 return false;
327 }
328 return true;
329}
330
331CATBOOST_API bool GetSupportedEvaluatorTypes(
332 ModelCalcerHandle* modelHandle,

Callers 3

EvaluateOnGPUMethod · 0.85
enable_gpu_evaluationMethod · 0.85
EnableGPUEvaluationMethod · 0.85

Calls 3

CurrentExceptionMessageFunction · 0.85
SetEvaluatorTypeMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected