[rocprofv3] Add check for Stream Stack Pointer before use (#465)
* Added null check for stream_stack before get_stream_id is called * Rename function and add check for stream strack before pop * Removed empty check for stream stack and adding error log for get_stream_id in stream.cpp
This commit is contained in:
@@ -109,7 +109,12 @@ auto
|
||||
get_stream_id(hipStream_t stream)
|
||||
{
|
||||
return get_stream_map()->rlock(
|
||||
[](const stream_map_t& _data, hipStream_t _stream) { return _data.at(_stream); }, stream);
|
||||
[](const stream_map_t& _data, hipStream_t _stream) {
|
||||
ROCP_ERROR_IF(_data.count(_stream) == 0)
|
||||
<< "failed to retrieve stream ID in " << __FILE__;
|
||||
return _data.at(_stream);
|
||||
},
|
||||
stream);
|
||||
}
|
||||
|
||||
// Map rocprofiler_hip_stream_operation_t to respective name
|
||||
|
||||
Reference in New Issue
Block a user