SWDEV-441237 - Move hipMemcpyHtoD out of the initialization loop in module_api_global
Change-Id: If68b2aadb16fece429fcab2da0a92ce995c437f6
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user