Openmp clang rules on v2312#4
Open
GiuseppeGq20 wants to merge 7 commits intoROCm:suyash/hmm_v2312from
Open
Conversation
GiuseppeGq20
commented
May 31, 2024
- update Clang rules to enable openmp target offloading
- note on env variable to set in Readme.md
…ons on scalars or vector
A templated class, which defines the operators: `operator+=` and `operator-=`.
The class declaration looks like:
```
template<typename T>
class AtomicAccumulator
{
// Private Data
T* val;
public:
// Constructors
//- Construct from components
AtomicAccumulator(T& ref);
// Member Operators
inline void operator+=(const T& rhs);
inline void operator-=(const T& rhs);
};
```
and the constructor and member operators are defined in AtomicAccumulatorI.H
Using the newly added AtomicAccumulator class to add more target regions
in lduMatrix assemby and operations. For example, the `sumDiag()` operation
has following offloaded region:
```
#pragma omp target teams distribute parallel for if (target:l.size()>10000)
for (label face=0; face<l.size(); face++)
{
atomicAccumulator(Diag[l[face]]) += Lower[face];
atomicAccumulator(Diag[u[face]]) += Upper[face];
}
...
```
…duAddressing` Adding target offload regions in `lduMatrix/lduAddressing` with unified shared memory and atomics.
47ce7aa to
b1a6039
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.