From 13338a6873caeee4b83f492e29aea2c5fe2489dd Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 24 Jul 2018 17:14:35 -0400
Subject: [PATCH] P4 to Git Change 1584863 by yaxunl@yaxunl-lc10 on 2018/07/24
17:00:42
SWDEV-145570 - [HIP] - Update prototype of __hipRegisterVar
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#13 edit
[ROCm/clr commit: 5ac4970a6856749c0a710fcd639be48bc340c5a5]
---
projects/clr/hipamd/api/hip/hip_platform.cpp | 21 ++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/projects/clr/hipamd/api/hip/hip_platform.cpp b/projects/clr/hipamd/api/hip/hip_platform.cpp
index 3eddb7824d..6a02bbaff4 100644
--- a/projects/clr/hipamd/api/hip/hip_platform.cpp
+++ b/projects/clr/hipamd/api/hip/hip_platform.cpp
@@ -128,15 +128,20 @@ extern "C" void __hipRegisterFunction(
g_functions.insert(std::make_pair(hostFunction, reinterpret_cast(as_cl(kernel))));
}
+// Registers a device-side global variable.
+// For each global variable in device code, there is a corresponding shadow
+// global variable in host code. The shadow host variable is used to keep
+// track of the value of the device side global variable between kernel
+// executions.
extern "C" void __hipRegisterVar(
- hipModule_t module,
- char* hostVar,
- char* deviceVar,
- const char* deviceName,
- int ext,
- int size,
- int constant,
- int global)
+ hipModule_t modules, // The device modules containing code object
+ char* var, // The shadow variable in host code
+ char* hostVar, // Variable name in host code
+ char* deviceVar, // Variable name in device code
+ int ext, // Whether this variable is external
+ int size, // Size of the variable
+ int constant, // Whether this variable is constant
+ int global) // Unknown, always 0
{
HIP_INIT();
}