Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the race! #1158

Merged
merged 2 commits into from
Apr 7, 2022
Merged

Fix the race! #1158

merged 2 commits into from
Apr 7, 2022

Conversation

ProfFan
Copy link
Collaborator

@ProfFan ProfFan commented Apr 5, 2022

This fixes the TBB race by adding proper locks.

@ProfFan
Copy link
Collaborator Author

ProfFan commented Apr 5, 2022

This fixes #1092. @DanMcGann @acxz @cdb0y511 @matlabbe could you all take a look and see if this fixed your problem?

@ProfFan ProfFan requested review from dellaert and varunagrawal April 5, 2022 14:59
@varunagrawal
Copy link
Collaborator

Can we get some performance numbers please?
Want to make sure the mutexes aren't preventing full parallelization.

@ProfFan
Copy link
Collaborator Author

ProfFan commented Apr 5, 2022

I did tracing locally, the lock is only hit about 5 times per optimization and the performance impact is neglectable. @varunagrawal

@ProfFan ProfFan linked an issue Apr 5, 2022 that may be closed by this pull request
@varunagrawal
Copy link
Collaborator

Having full performance metrics would still be great. Think about when something changes in the future and someone else comes and looks at this PR.

@ProfFan
Copy link
Collaborator Author

ProfFan commented Apr 6, 2022

Before: 1.33s per optimization
After: 1.35s per optimization for the benchmark testTBBFail posted in fix/tbb_regression (experiment branch)

@ProfFan
Copy link
Collaborator Author

ProfFan commented Apr 6, 2022

@dellaert It would be great if this can be merged before 4.2a6, since this is very important for TBB to be actually used in practice.

Copy link
Collaborator

@varunagrawal varunagrawal 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 stuff Fan.

@ProfFan
Copy link
Collaborator Author

ProfFan commented Apr 7, 2022

Thanks Varun!

@ProfFan ProfFan merged commit a0a8010 into borglab:develop Apr 7, 2022
@ProfFan ProfFan deleted the fix/tbb branch April 7, 2022 17:29
@dellaert
Copy link
Member

dellaert commented Apr 8, 2022

Please note 4.2a6 is already set in stone: Linux wheels have been out. We can't have 2 different 4.2a6 versions!
Waiting for Fan to create mac wheels and upload them to pypi.

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.

std::out_of_range with map::at exception with gtsam 4.1.1 (rtabmap)
3 participants