wsl/libhsakmt: fix reserved local help size calc

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/114>
Tá an tiomantas seo le fáil i:
Flora Cui
2025-11-24 15:22:21 +08:00
tuismitheoir 91df8f84da
tiomantas c33dcd2d07
+3 -2
Féach ar an gComhad
@@ -150,11 +150,12 @@ bool hsakmtRuntime::ReserveLocalHeapSpace() {
* because it has small local memory
*/
if (device->IsDgpu())
total_local_size += wsl::AlignUp(device->LocalHeapSize(), align) * 4;
total_local_size = wsl::Max(device->LocalHeapSize(), total_local_size);
else
total_local_size += wsl::AlignUp(device->NonLocalHeapSize(), align) * 4;
total_local_size = wsl::Max(device->LocalHeapSize(), device->NonLocalHeapSize(), total_local_size);
}
total_local_size = wsl::AlignUp(total_local_size, align) * 4;
local_heap_space_start_ = 0;
local_heap_space_size_ = total_local_size;