Test hipModuleGetGlobal

[ROCm/hip commit: 34e675d0f6]
This commit is contained in:
Rahul Garg
2019-03-15 04:08:03 +05:30
parent 2d20f354b0
commit e02104a16a
2 changed files with 5 additions and 3 deletions
@@ -31,7 +31,6 @@ THE SOFTWARE.
#define SIZE LEN * sizeof(float)
#define fileName "vcpy_kernel.code"
float myDeviceGlobal;
float myDeviceGlobalArray[16];
#define HIP_CHECK(cmd) \
{ \
@@ -69,7 +68,10 @@ int main() {
HIP_CHECK(hipModuleLoad(&Module, fileName));
float myDeviceGlobal_h = 42.0;
myDeviceGlobal = 42.0;
float* deviceGlobal;
size_t deviceGlobalSize;
HIP_CHECK(hipModuleGetGlobal((void**)&deviceGlobal, &deviceGlobalSize, Module, "myDeviceGlobal"));
*deviceGlobal = 42.0;
#define ARRAY_SIZE 16