SWDEV-491257 - Create stream capture tests with Event APIs
Change-Id: I9803a78c3513845f7bf91333a0db0d43bed5b346
[ROCm/hip-tests commit: fd92c47fea]
This commit is contained in:
committed by
Rakesh Roy
orang tua
182d514c0d
melakukan
aee10912e0
@@ -52,6 +52,35 @@ TEST_CASE("Unit_hipEventCreate_Positive") {
|
||||
HIP_CHECK(hipEventDestroy(event));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - Test event creation while stream is capturing.
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - unit/event/hipEventCreate.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_hipEventCreate_Verify_Capture") {
|
||||
hipStream_t stream;
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
hipStreamCaptureMode mode = GENERATE(hipStreamCaptureModeGlobal, hipStreamCaptureModeThreadLocal,
|
||||
hipStreamCaptureModeRelaxed);
|
||||
HIP_CHECK(hipStreamBeginCapture(stream, mode));
|
||||
hipEvent_t event;
|
||||
HIP_CHECK(hipEventCreate(&event));
|
||||
REQUIRE(event != nullptr);
|
||||
hipGraph_t graph;
|
||||
HIP_CHECK(hipStreamEndCapture(stream, &graph));
|
||||
|
||||
HIP_CHECK(hipGraphDestroy(graph));
|
||||
HIP_CHECK(hipEventDestroy(event));
|
||||
HIP_CHECK(hipStreamDestroy(stream));
|
||||
}
|
||||
|
||||
/**
|
||||
* End doxygen group hipEventCreate.
|
||||
* @}
|
||||
|
||||
Reference in New Issue
Block a user