SWDEV-337776 - Fix hipStreamEndCapture API

- Return hipErrorInvalidValue when pGraph is nullptr

Change-Id: I8846f4448eb15117f98421632885330f132c4fce


[ROCm/clr commit: e2874d5e22]
此提交包含在:
Rakesh Roy authored and Rakesh Roy committed 2022-06-01 00:20:23 -04:00
1 父節點 ea9847c1fd
當前提交 f80bffb4ab
1 file changed
+4 -1
+4 -1
查看文件
@@ -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)) {