SWDEV-331126 - Fix to Cuda return type
Change-Id: Iea8e7735ef0c58c1244c92338038d91e61d62c16
[ROCm/clr commit: 8657c40721]
This commit is contained in:
committed by
Sarbojit Sarkar
parent
013225775c
commit
85f6f2a0c7
@@ -747,15 +747,20 @@ hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode)
|
||||
if (!hip::isValid(stream)) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
|
||||
// capture cannot be initiated on legacy stream
|
||||
// It can be initiated if the stream is not already in capture mode
|
||||
if (stream == nullptr ||
|
||||
mode < hipStreamCaptureModeGlobal ||
|
||||
mode > hipStreamCaptureModeRelaxed ||
|
||||
s->GetCaptureStatus() == hipStreamCaptureStatusActive) {
|
||||
if (stream == nullptr) {
|
||||
HIP_RETURN(hipErrorStreamCaptureUnsupported);
|
||||
}
|
||||
if (mode < hipStreamCaptureModeGlobal ||
|
||||
mode > hipStreamCaptureModeRelaxed) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
|
||||
// It can be initiated if the stream is not already in capture mode
|
||||
if (s->GetCaptureStatus() == hipStreamCaptureStatusActive) {
|
||||
HIP_RETURN(hipErrorIllegalState);
|
||||
}
|
||||
|
||||
s->SetCaptureGraph(new ihipGraph());
|
||||
s->SetCaptureMode(mode);
|
||||
s->SetOriginStream();
|
||||
|
||||
Reference in New Issue
Block a user