cuda : fix UMA detection on discrete GPUs. (#17537)
This commit is contained in:
parent
cd8370b408
commit
909072abcf
|
|
@ -3837,7 +3837,7 @@ static void ggml_backend_cuda_device_get_memory(ggml_backend_dev_t dev, size_t *
|
||||||
|
|
||||||
// Check if UMA is explicitly enabled via environment variable
|
// Check if UMA is explicitly enabled via environment variable
|
||||||
bool uma_env = getenv("GGML_CUDA_ENABLE_UNIFIED_MEMORY") != nullptr;
|
bool uma_env = getenv("GGML_CUDA_ENABLE_UNIFIED_MEMORY") != nullptr;
|
||||||
bool is_uma = prop.unifiedAddressing > 0 || uma_env;
|
bool is_uma = prop.integrated > 0 || uma_env;
|
||||||
|
|
||||||
if (is_uma) {
|
if (is_uma) {
|
||||||
// For UMA systems (like DGX Spark), use system memory info
|
// For UMA systems (like DGX Spark), use system memory info
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue