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>
Bu işleme şunda yer alıyor:
Flora Cui committed 2025-12-24 13:30:50 +08:00
1 ebeveyn 91df8f84da
işleme c33dcd2d07
1 file changed
+3 -2
+3 -2
Dosyayı Görüntüle
@@ -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;