SWDEV-491257 - Create stream capture tests with Event APIs
Change-Id: I9803a78c3513845f7bf91333a0db0d43bed5b346
This commit is contained in:
committed by
Rakesh Roy
parent
a35f7bbad6
commit
fd92c47fea
@@ -347,10 +347,42 @@ TEST_CASE("Unit_hipEventCreateWithFlags_DefaultFlg_CohHstMem") {
|
||||
eMemoryToTest::eCoherentHostMemory, hipEventDefault);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - Test event creation with hipEventCreateWithFlags while stream is capturing
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - catch\unit\event\hipEventCreateWithFlags.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_hipEventCreateWithFlags_Verify_Capture") {
|
||||
hipStream_t stream;
|
||||
HIP_CHECK(hipStreamCreate(&stream));
|
||||
|
||||
hipStreamCaptureMode mode = GENERATE(hipStreamCaptureModeGlobal, hipStreamCaptureModeThreadLocal,
|
||||
hipStreamCaptureModeRelaxed);
|
||||
HIP_CHECK(hipStreamBeginCapture(stream, mode));
|
||||
|
||||
const unsigned int flags = GENERATE(hipEventDefault, hipEventBlockingSync, hipEventDisableTiming,
|
||||
hipEventInterprocess | hipEventDisableTiming);
|
||||
hipEvent_t event;
|
||||
HIP_CHECK(hipEventCreateWithFlags(&event, flags));
|
||||
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 hipEventCreateWithFlags.
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user