P4 to Git Change 1548476 by cpaquot@cpaquot-ocl-lc-lnx on 2018/05/01 15:50:51

SWDEV-145570 - [HIP]
	Added support for null stream avoiding creating/destroying dummy streams.
	Added basic event class for hipEvent* support.
	Refactored some common functionality: No more direct access to g_context.
	Support hipStreamSynchronize(0).

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.hpp#1 add
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#8 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#7 edit
This commit is contained in:
foreman
2018-05-01 18:10:09 -04:00
parent dc1497535d
commit 61378a359c
10 changed files with 177 additions and 126 deletions
+2 -2
View File
@@ -383,7 +383,7 @@ hipError_t hipGetDevice ( int* deviceId ) {
if (deviceId != nullptr) {
for (unsigned int i = 0; i < g_devices.size(); i++) {
if (g_devices[i] == g_context) {
if (g_devices[i] == hip::getCurrentContext()) {
*deviceId = i;
return hipSuccess;
}
@@ -425,7 +425,7 @@ hipError_t hipSetDevice ( int device ) {
HIP_INIT_API(device);
if (static_cast<unsigned int>(device) < g_devices.size()) {
g_context = g_devices[device];
hip::setCurrentContext(device);
return hipSuccess;
}