Skip to content

setExecutionSpace thread safety#229

Closed
neelakausik wants to merge 3 commits intollnl:developfrom
neelakausik:thread_local
Closed

setExecutionSpace thread safety#229
neelakausik wants to merge 3 commits intollnl:developfrom
neelakausik:thread_local

Conversation

@neelakausik
Copy link
Copy Markdown
Member

Made m_current_execution_space and m_synced_since_last_kernel thread_local to address thread safety concerns.

Comment thread src/chai/ArrayManager.cpp Outdated
adayton1
adayton1 previously approved these changes Jul 13, 2023
Copy link
Copy Markdown
Member

@adayton1 adayton1 left a comment

Choose a reason for hiding this comment

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

LGTM

@neelakausik neelakausik marked this pull request as draft July 13, 2023 17:50
@neelakausik neelakausik marked this pull request as ready for review July 13, 2023 17:51
Copy link
Copy Markdown
Member

@adayton1 adayton1 left a comment

Choose a reason for hiding this comment

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

LGTM

@dtaller
Copy link
Copy Markdown
Contributor

dtaller commented Jul 13, 2023

Looks good to me.

Was there a failing test or a something like that that prompted this change, or were you just inspecting the code for possible issues?

@adayton1
Copy link
Copy Markdown
Member

Looks good to me.

Was there a failing test or a something like that that prompted this change, or were you just inspecting the code for possible issues?

@dtaller, we've been looking at launching kernels in separate GPU streams from separate CPU threads, which has led us to look into thread safety in CHAI and RAJA. This was one of the main issues that was uncovered.

@davidbeckingsale
Copy link
Copy Markdown
Member

Merged in #230

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.

4 participants