-
Notifications
You must be signed in to change notification settings - Fork 104
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
Draft: Desul ordered atomic policies + litmus tests #1616
Draft
publixsubfan
wants to merge
14
commits into
LLNL:develop
Choose a base branch
from
publixsubfan:feature/yang39/desul-memory-order
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
89e38c8
Add ordered memory atomics from desul
publixsubfan b71c42b
Add a test driver for litmus tests, and a message passing test
publixsubfan 4be5c8c
Remove stress_pattern array
publixsubfan e73d52a
Increase observability of weak memory behaviors
publixsubfan e0dea11
Add a store buffer litmus test
publixsubfan 35a7a11
Do strided index calculations within policy
publixsubfan d32bf98
Litmus tests: various modifications
publixsubfan 822d8dd
Litmus tests: changes to increase relaxed observation rates
publixsubfan 2784605
RENAME
publixsubfan 1fea7cf
Post-rename changes
publixsubfan 94d45b5
Add a load buffer litmus test
publixsubfan a90f93a
Add a store litmus test
publixsubfan a86a176
Add a read litmus test
publixsubfan 3f4dc30
Add a 2+2 write litmus test
publixsubfan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | ||
// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC | ||
// and RAJA project contributors. See the RAJA/LICENSE file for details. | ||
// | ||
// SPDX-License-Identifier: (BSD-3-Clause) | ||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | ||
|
||
#ifndef RAJA_policy_desul_HPP | ||
#define RAJA_policy_desul_HPP | ||
|
||
#include "RAJA/config.hpp" | ||
|
||
#if defined(RAJA_ENABLE_DESUL_ATOMICS) | ||
|
||
#include "desul/atomics.hpp" | ||
|
||
namespace RAJA | ||
{ | ||
|
||
// Policy to perform an atomic operation with a given memory ordering. | ||
template <typename OrderingPolicy, typename ScopePolicy> | ||
struct detail_atomic_t { | ||
}; | ||
|
||
using atomic_seq_cst = | ||
detail_atomic_t<desul::MemoryOrderSeqCst, desul::MemoryScopeDevice>; | ||
using atomic_acq_rel = | ||
detail_atomic_t<desul::MemoryOrderAcqRel, desul::MemoryScopeDevice>; | ||
using atomic_acquire = | ||
detail_atomic_t<desul::MemoryOrderAcquire, desul::MemoryScopeDevice>; | ||
using atomic_release = | ||
detail_atomic_t<desul::MemoryOrderRelease, desul::MemoryScopeDevice>; | ||
using atomic_relaxed = | ||
detail_atomic_t<desul::MemoryOrderRelaxed, desul::MemoryScopeDevice>; | ||
|
||
using atomic_seq_cst_block = | ||
detail_atomic_t<desul::MemoryOrderSeqCst, desul::MemoryScopeCore>; | ||
using atomic_acq_rel_block = | ||
detail_atomic_t<desul::MemoryOrderAcqRel, desul::MemoryScopeCore>; | ||
using atomic_acquire_block = | ||
detail_atomic_t<desul::MemoryOrderAcquire, desul::MemoryScopeCore>; | ||
using atomic_release_block = | ||
detail_atomic_t<desul::MemoryOrderRelease, desul::MemoryScopeCore>; | ||
using atomic_relaxed_block = | ||
detail_atomic_t<desul::MemoryOrderRelaxed, desul::MemoryScopeCore>; | ||
|
||
using atomic_seq_cst_sys = | ||
detail_atomic_t<desul::MemoryOrderSeqCst, desul::MemoryScopeSystem>; | ||
using atomic_acq_rel_sys = | ||
detail_atomic_t<desul::MemoryOrderAcqRel, desul::MemoryScopeSystem>; | ||
using atomic_acquire_sys = | ||
detail_atomic_t<desul::MemoryOrderAcquire, desul::MemoryScopeSystem>; | ||
using atomic_release_sys = | ||
detail_atomic_t<desul::MemoryOrderRelease, desul::MemoryScopeSystem>; | ||
using atomic_relaxed_sys = | ||
detail_atomic_t<desul::MemoryOrderRelaxed, desul::MemoryScopeSystem>; | ||
|
||
} // namespace RAJA | ||
|
||
#endif // RAJA_ENABLE_DESUL_ATOMICS | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that AtomicPolicy has to be
detail_atomic_t<...>
instead ofDesulAtomicPolicy<...>