summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-progs/gpu-hello/src/gpu-hello.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test-progs/gpu-hello/src/gpu-hello.cpp b/tests/test-progs/gpu-hello/src/gpu-hello.cpp
index b054558f5..bdff074a8 100755
--- a/tests/test-progs/gpu-hello/src/gpu-hello.cpp
+++ b/tests/test-progs/gpu-hello/src/gpu-hello.cpp
@@ -41,6 +41,12 @@
#include <fstream>
#include <string>
+#ifdef KVM_SWITCH
+#include "m5op.h"
+
+void *m5_mem = (void*)0xffffc90000000000;
+#endif
+
#define SUCCESS 0
#define FAILURE 1
@@ -247,6 +253,10 @@ runCLKernel(cl_kernel kernel)
return FAILURE;
}
+#ifdef KVM_SWITCH
+ m5_switchcpu();
+#endif
+
// 2. Launch kernel
status = clEnqueueNDRangeKernel(commandQueue, kernel, 1, NULL,
globalThreads, localThreads, 0, NULL,