Skip to content

Commit dffa490

Browse files
committed
add hip error handle
1 parent 995d6ba commit dffa490

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/io/xgmi/hip_resource_pool.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ StreamPool::StreamPool(int numStreamsPerDevice) : numStreamsPerDevice_(numStream
3737
}
3838

3939
StreamPool::~StreamPool() {
40+
hipError_t err;
4041
for (auto& deviceEntry : streams_) {
4142
for (auto stream : deviceEntry.second) {
4243
if (stream != nullptr) {
43-
hipStreamDestroy(stream);
44+
err = hipStreamDestroy(stream);
45+
if (err != hipSuccess) {
46+
MORI_IO_ERROR("StreamPool: Failed to destroy stream: {}", hipGetErrorString(err));
47+
}
4448
}
4549
}
4650
}

0 commit comments

Comments
 (0)