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

Local branch for #229 #230

Merged
merged 3 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/chai/ArrayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

namespace chai
{
thread_local ExecutionSpace ArrayManager::m_current_execution_space;
thread_local bool ArrayManager::m_synced_since_last_kernel = false;

PointerRecord ArrayManager::s_null_record = PointerRecord();

Expand Down
4 changes: 2 additions & 2 deletions src/chai/ArrayManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ class ArrayManager
/*!
* Current execution space.
*/
ExecutionSpace m_current_execution_space;
static thread_local ExecutionSpace m_current_execution_space;

/**
* Default space for new allocations.
Expand Down Expand Up @@ -536,7 +536,7 @@ class ArrayManager
* Whether or not a synchronize has been performed since the launch of the last
* GPU context
*/
bool m_synced_since_last_kernel = false;
static thread_local bool m_synced_since_last_kernel;

#if defined(CHAI_ENABLE_GPU_SIMULATION_MODE)
/*!
Expand Down