use recommended granularity instead of minimum

This commit is contained in:
slaren 2023-12-24 18:36:43 +01:00
parent 2c3fbf980c
commit a76cadad48

View file

@ -6840,7 +6840,7 @@ void ggml_init_cublas() {
alloc_prop.type = CU_MEM_ALLOCATION_TYPE_PINNED; alloc_prop.type = CU_MEM_ALLOCATION_TYPE_PINNED;
alloc_prop.location.type = CU_MEM_LOCATION_TYPE_DEVICE; alloc_prop.location.type = CU_MEM_LOCATION_TYPE_DEVICE;
alloc_prop.location.id = id; alloc_prop.location.id = id;
CU_CHECK(cuMemGetAllocationGranularity(&g_device_caps[id].vmm_granularity, &alloc_prop, CU_MEM_ALLOC_GRANULARITY_MINIMUM)); CU_CHECK(cuMemGetAllocationGranularity(&g_device_caps[id].vmm_granularity, &alloc_prop, CU_MEM_ALLOC_GRANULARITY_RECOMMENDED));
} }
#endif // !defined(GGML_USE_HIPBLAS) #endif // !defined(GGML_USE_HIPBLAS)
g_device_caps[id].vmm = !!device_vmm; g_device_caps[id].vmm = !!device_vmm;