SWDEV-331126 - Fix to Cuda return type

Change-Id: Iea8e7735ef0c58c1244c92338038d91e61d62c16


[ROCm/clr commit: 8657c40721]
このコミットが含まれているのは:
Sarbojit Sarkar authored and Sarbojit Sarkar committed 2022-04-11 23:35:04 -04:00
1 親 013225775c
コミット 85f6f2a0c7
1ファイル変更
+11 -6
+11 -6
ファイルの表示
@@ -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();