[ROCm/hip-tests commit: 2796df1b26]
Этот коммит содержится в:
Rahul Garg
2019-03-15 04:08:03 +05:30
родитель 74bd2f9fec
Коммит 2d3d049e98
2 изменённых файлов: 5 добавлений и 3 удалений
+4 -2
Просмотреть файл
@@ -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
+1 -1
Просмотреть файл
@@ -24,7 +24,7 @@ THE SOFTWARE.
#define ARRAY_SIZE (16)
extern float myDeviceGlobal;
__device__ float myDeviceGlobal;
extern float myDeviceGlobalArray[16];
;