From 344a88301df26f567bb199097738aaf6d91cb8fc Mon Sep 17 00:00:00 2001 From: Ahmed Hesham <117350656+ahesham-arm@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:44:56 +0000 Subject: [PATCH] Limit individual allocation size using the global memory size (#1835) Signed-off-by: Ahmed Hesham --- test_conformance/allocations/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test_conformance/allocations/main.cpp b/test_conformance/allocations/main.cpp index 827072fc..6ef83c68 100644 --- a/test_conformance/allocations/main.cpp +++ b/test_conformance/allocations/main.cpp @@ -93,6 +93,11 @@ test_status init_cl( cl_device_id device ) { // queue, kernel code on GPU. g_global_mem_size *= 0.60; } + /* Cap the allocation size as the global size was deduced */ + if (g_max_individual_allocation_size > g_global_mem_size) + { + g_max_individual_allocation_size = g_global_mem_size; + } if( gReSeed ) {