MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / current_device_id

Function current_device_id

server/src/common/backend_precision.cpp:71–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71int current_device_id() {
72#if defined(DFLASH27B_BACKEND_CUDA) || defined(DFLASH27B_BACKEND_HIP) || defined(GGML_USE_HIP)
73 int device = -1;
74 if (cudaGetDevice(&device) != cudaSuccess || device < 0) {
75 return -1;
76 }
77 return device;
78#else
79 return -1;
80#endif
81}
82
83int device_props_for(int device,
84 std::string * device_name,

Callers 1

fill_policy_device_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected