From 3d80de0276ec8f320bf0418e5fcb6a61b4abd011 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/hip commit: 1b054948e38b8b7e919c5ee1c0b655bfafb2cc9b]
---
projects/hip/api/hip/hip_platform.cpp | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/projects/hip/api/hip/hip_platform.cpp b/projects/hip/api/hip/hip_platform.cpp
index 3eddb7824d..6a02bbaff4 100644
--- a/projects/hip/api/hip/hip_platform.cpp
+++ b/projects/hip/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();
}