SWDEV-512756 - SWDEV-510954 - Add appropriate checks during active stream capture (#375)
- hipStreamAddCallback is not permitted during stream capture for all modes - hipModuleUnload is permitted only for relaxed mode during stream capture Change-Id: I79ca5d2f6b61bd2e169fee7c13da4cd46e472a10
This commit is contained in:
committed by
GitHub
parent
5cc172c99c
commit
2c173c6da4
@@ -48,6 +48,7 @@ hipError_t hipModuleUnload(hipModule_t hmod) {
|
||||
if (hmod == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidResourceHandle);
|
||||
}
|
||||
CHECK_STREAM_CAPTURE_SUPPORTED();
|
||||
HIP_RETURN(PlatformState::instance().unloadModule(hmod));
|
||||
}
|
||||
|
||||
|
||||
@@ -559,6 +559,8 @@ hipError_t hipStreamQuery_spt(hipStream_t stream) {
|
||||
|
||||
hipError_t streamCallback_common(hipStream_t stream, StreamCallback* cbo, void* userData) {
|
||||
getStreamPerThread(stream);
|
||||
|
||||
CHECK_SUPPORTED_DURING_CAPTURE();
|
||||
hip::Stream* hip_stream = hip::getStream(stream);
|
||||
amd::Command* last_command = hip_stream->getLastQueuedCommand(true);
|
||||
amd::Command::EventWaitList eventWaitList;
|
||||
|
||||
Reference in New Issue
Block a user