Skip to content

Openmp clang rules on v2312#4

Open
GiuseppeGq20 wants to merge 7 commits intoROCm:suyash/hmm_v2312from
GiuseppeGq20:suyash/hmm_v2312
Open

Openmp clang rules on v2312#4
GiuseppeGq20 wants to merge 7 commits intoROCm:suyash/hmm_v2312from
GiuseppeGq20:suyash/hmm_v2312

Conversation

@GiuseppeGq20
Copy link

  • update Clang rules to enable openmp target offloading
  • note on env variable to set in Readme.md

Suyash Tandon and others added 6 commits March 25, 2024 15:12
…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.
@GiuseppeGq20 GiuseppeGq20 changed the title Suyash/hmm v2312 Openmp clang rules on v2312 May 31, 2024
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.

1 participant