diff --git a/profile/device/aie_trace/aie_trace_offload.cpp b/profile/device/aie_trace/aie_trace_offload.cpp index 789e5a71..3124c256 100644 --- a/profile/device/aie_trace/aie_trace_offload.cpp +++ b/profile/device/aie_trace/aie_trace_offload.cpp @@ -487,7 +487,8 @@ void AIETraceOffload::startOffload() void AIETraceOffload::continuousOffload() { - if (!bufferInitialized && !initReadTrace()) { + if (!bufferInitialized) { + // initReadTrace failed to allocate the buffer, cannot offload offloadFinished(); return; } diff --git a/profile/device/hal_device/xdp_hal_device.cpp b/profile/device/hal_device/xdp_hal_device.cpp index 4113002a..27c969b4 100644 --- a/profile/device/hal_device/xdp_hal_device.cpp +++ b/profile/device/hal_device/xdp_hal_device.cpp @@ -208,7 +208,9 @@ size_t HalDevice::alloc(size_t size, uint64_t memoryIndex) void HalDevice::free(size_t) { - return; + if(!id) return; + size_t boIndex = id - 1; + xrt_bos[boIndex] = xrt::bo(); } void* HalDevice::map(size_t id)