From 514b24227590d0b0aa05894045a319dd0329def1 Mon Sep 17 00:00:00 2001 From: Payam Date: Wed, 13 May 2020 17:17:48 -0400 Subject: [PATCH] adding support to disable lazy loading, HIP_ENABLE_LAZY_KERNEL_LOADING Change-Id: Iafe0f396570ee2bccf642b537cbf9aad967e1370 [ROCm/hip commit: 56509b0ffd135c1af437c18b9d0de06f09d278d5] --- projects/hip/rocclr/hip_platform.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/hip/rocclr/hip_platform.cpp b/projects/hip/rocclr/hip_platform.cpp index e23b136cc0..8759ef47f1 100755 --- a/projects/hip/rocclr/hip_platform.cpp +++ b/projects/hip/rocclr/hip_platform.cpp @@ -191,6 +191,13 @@ void PlatformState::init() for (auto& it : vars_) { it.second.rvars.resize(g_devices.size()); } + if (!HIP_ENABLE_LAZY_KERNEL_LOADING) { + for (size_t i = 0; i < g_devices.size(); ++i) { + for (auto& it: functions_) { + getFunc(it.first, i); + } + } + } } bool PlatformState::unregisterFunc(hipModule_t hmod) {