From eadcf7db139458b425175f264c6c0570a84c6b71 Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Thu, 12 Sep 2024 15:27:21 +0100 Subject: [PATCH] SWDEV-441237 - Move hipMemcpyHtoD out of the initialization loop in module_api_global Change-Id: If68b2aadb16fece429fcab2da0a92ce995c437f6 [ROCm/hip-tests commit: 958d0e4d73b174d1a2acf4ca25a45d4ce6690f55] --- .../hip-tests/samples/0_Intro/module_api_global/runKernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip-tests/samples/0_Intro/module_api_global/runKernel.cpp b/projects/hip-tests/samples/0_Intro/module_api_global/runKernel.cpp index 40711dd4b2..9eea3fa7dc 100644 --- a/projects/hip-tests/samples/0_Intro/module_api_global/runKernel.cpp +++ b/projects/hip-tests/samples/0_Intro/module_api_global/runKernel.cpp @@ -80,8 +80,8 @@ int main() { checkHipErrors(hipModuleGetGlobal((void**)&myDeviceGlobalArray, &myDeviceGlobalArraySize, Module, "myDeviceGlobalArray")); for (int i = 0; i < ARRAY_SIZE; i++) { myDeviceGlobalArray_h[i] = i * 1000.0f; - checkHipErrors(hipMemcpyHtoD(hipDeviceptr_t(myDeviceGlobalArray), &myDeviceGlobalArray_h, myDeviceGlobalArraySize)); } + checkHipErrors(hipMemcpyHtoD(hipDeviceptr_t(myDeviceGlobalArray), &myDeviceGlobalArray_h, myDeviceGlobalArraySize)); struct { void* _Ad;