SWDEV-492768 - Match hipStreamAddCallback capture behavior with nvidia
Change-Id: I7a084d8eeffe8b5095f7eb9969a565a40e76bb4b
这个提交包含在:
1 父节点
02bbe11e56
当前提交
f6c8bbf4dc
1 个文件已更改
+12
@@ -609,6 +609,18 @@ hipError_t hipStreamAddCallback_common(hipStream_t stream, hipStreamCallback_t c
|
|||||||
if (callback == nullptr || flags != 0) {
|
if (callback == nullptr || flags != 0) {
|
||||||
return hipErrorInvalidValue;
|
return hipErrorInvalidValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stream != nullptr) {
|
||||||
|
// Not supported while stream is capturing
|
||||||
|
if (hip::Stream::StreamCaptureOngoing(stream) == true) {
|
||||||
|
HIP_RETURN(hipErrorStreamCaptureUnsupported);
|
||||||
|
}
|
||||||
|
} else if (Stream::StreamCaptureBlocking() == true) {
|
||||||
|
// If any of the blocking streams is capturing, return error for implicit capture and invalidate
|
||||||
|
// capture for all capturing streams
|
||||||
|
CHECK_STREAM_CAPTURING();
|
||||||
|
}
|
||||||
|
|
||||||
StreamCallback* cbo = new StreamAddCallback(stream, callback, userData);
|
StreamCallback* cbo = new StreamAddCallback(stream, callback, userData);
|
||||||
return streamCallback_common(stream, cbo, userData);
|
return streamCallback_common(stream, cbo, userData);
|
||||||
}
|
}
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户