Skip to content

Conversation

@janetsc
Copy link
Contributor

@janetsc janetsc commented Sep 16, 2022

Each thread has its own thread local storage for workspace and pool objects. But those perform allocations from a global HexagonBufferManager. We found a case where the map was not getting updated during AllocWorkspace, which then later caused FreeWorkspace to fail.

Added a mutex to protect all access to the map.

cc: @nverke @JosephTheOctonaut @adstraw @supersat

cc @areusch @mehrdadh

@janetsc janetsc changed the title Protect access to global buffer manager map [Hexagon] [runtime] Protect access to global buffer manager map Sep 16, 2022
@janetsc janetsc changed the title [Hexagon] [runtime] Protect access to global buffer manager map [Hexagon] [runtime] Protect access to global HexagonBufferManager map Sep 16, 2022
@janetsc janetsc marked this pull request as ready for review September 16, 2022 00:24
Copy link
Contributor

@adstraw adstraw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; great work debugging by the team.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @adstraw , LGTM

@tmoreau89 tmoreau89 merged commit 7c96e25 into apache:main Sep 16, 2022
@tmoreau89
Copy link
Contributor

Thank you @janetsc and @adstraw the PR was merged

@janetsc janetsc deleted the thread_safe_map branch September 27, 2022 17:39
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants