janetsc commented on PR #12957:
URL: https://github.com/apache/tvm/pull/12957#issuecomment-1265594905
> The degradation started a while back, but we didn't notice, because the
tests were passing without timing out. The main contributor to the degradation
is the exception being thrown, but I only narrowed it down after creating this
PR (I used it locally to unblock our tests---that was an urgent thing to do).
>
> I can revert it, and only remove the actual assertion in
free-after-release. That situation shouldn't be happening---there is something
weird going on there.
I tested this locally, which I prefer to removing the assert. This will
catch the error if we are operating on the static buffer manager:
```
void HexagonDeviceAPI::FreeDataSpace(Device dev, void* ptr) {
CHECK(ptr) << "buffer pointer is null";
CHECK(IsValidDevice(dev)) << "dev.device_type: " << dev.device_type;
if (mgr == &hexbuffs) {
// Free can throw if it is called after ReleaseResources
try {
mgr->FreeHexagonBuffer(ptr);
} catch (int e) {
LOG(INFO) << "FreeDataSpace called for static manager. An exception
occurred " << e;
}
} else {
mgr->FreeHexagonBuffer(ptr);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]