SWDEV-337776 - Fix hipStreamEndCapture API

- Return hipErrorInvalidValue when pGraph is nullptr

Change-Id: I8846f4448eb15117f98421632885330f132c4fce


[ROCm/clr commit: e2874d5e22]
This commit is contained in:
Rakesh Roy
2022-05-27 18:40:59 +05:30
committed by Rakesh Roy
parent ea9847c1fd
commit f80bffb4ab
+4 -1
View File
@@ -775,7 +775,10 @@ hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode)
hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t* pGraph) {
HIP_INIT_API(hipStreamEndCapture, stream, pGraph);
if (pGraph == nullptr || stream == nullptr) {
if (pGraph == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
if (stream == nullptr) {
HIP_RETURN(hipErrorIllegalState);
}
if (!hip::isValid(stream)) {