From 38543af8f72bf3dfe06be9c79539031ab9fa3ea9 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sun, 25 Sep 2022 13:43:13 +0200 Subject: [PATCH] rusticl/device: fix custom device detection Signed-off-by: Karol Herbst Reviewed-by: Adam Jackson Part-of: --- src/gallium/frontends/rusticl/core/device.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index ba9d2f338f8..cea99856095 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -207,7 +207,7 @@ impl Device { // Max size of memory object allocation in bytes. The minimum value is // max(min(1024 × 1024 × 1024, 1/4th of CL_DEVICE_GLOBAL_MEM_SIZE), 32 × 1024 × 1024) // for devices that are not of type CL_DEVICE_TYPE_CUSTOM. - let mut limit = min(1024 * 1024 * 1024, self.global_mem_size()); + let mut limit = min(1024 * 1024 * 1024, self.global_mem_size() / 4); limit = max(limit, 32 * 1024 * 1024); if self.max_mem_alloc() < limit { return true;