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

Apply Damien's comments #28

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
16 changes: 6 additions & 10 deletions install.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,15 @@ TODO finish this part
| `-DKokkos_ENABLE_OPENMP=ON` | OpenMP |
| `-DKokkos_ENABLE_THREADS=ON` | Threads |

<img title="Warning" alt="Warning" src="./images/warning_txt.svg" height="25"> The serial backend is enabled by default.
<img title="Warning" alt="Warning" src="./images/warning_txt.svg" height="25"> The serial backend is enabled by default if no other host backend is enabled.

### Device backends

| Option | Backend | Notes |
|-----------------------------------|---------------|--------------|
| `-DKokkos_ENABLE_CUDA=ON` | CUDA | |
| `-DKokkos_ENABLE_HIP=ON` | HIP | |
| `-DKokkos_ENABLE_SYCL=ON` | SYCL | Experimental |
| `-DKokkos_ENABLE_OPENMPTARGET=ON` | OpenMP target | Experimental |
| Option | Backend | Device |
|---------------------------|---------|--------|
| `-DKokkos_ENABLE_CUDA=ON` | CUDA | NVIDIA |
| `-DKokkos_ENABLE_HIP=ON` | HIP | AMD |
| `-DKokkos_ENABLE_SYCL=ON` | SYCL | Intel |

<img title="Warning" alt="Warning" src="./images/warning_txt.svg" height="25"> You can only select the serial backend, plus another host backend and one device backend at a time.

Expand All @@ -180,12 +179,9 @@ See [architecture-specific options](#architecture-specific-options).

| Option | Description |
|-----------------------------------------|-----------------------------------------------------------|
| `-DKokkos_ENABLE_BENCHMARKS=ON` | Build benchmarks |
| `-DKokkos_ENABLE_COMPILER_WARNINGS=ON` | Print all compiler warnings |
| `-DKokkos_ENABLE_DEBUG=ON` | Activate extra debug features, may increase compile times |
| `-DKokkos_ENABLE_DEBUG_BOUNDS_CHECK=ON` | Use bounds checking, will increase runtime |
| `-DKokkos_ENABLE_EXAMPLES=ON` | Build examples |
| `-DKokkos_ENABLE_TESTS=ON` | Build tests |
| `-DKokkos_ENABLE_TUNING=ON` | Create bindings for tuning tools |

<!--#ifndef PRINT-->
Expand Down
38 changes: 20 additions & 18 deletions utilization.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ int main(int argc, char* argv[]) {

#### Specific memory spaces

| Memory space | Description |
|------------------------------|-----------------------------------------------------------------------|
| `Kokkos::HostSpace` | Accessible by the host but not directly by the device |
| `Kokkos::SharedSpace` | Accessible by the host and the device; copy managed by the driver |
| `Kokkos::ScratchMemorySpace` | Accessible by the team or the thread that created it and nothing else |
| Memory space | Description |
|---------------------------------|--------------------------------------------------------------------------------|
| `Kokkos::HostSpace` | Accessible from the host but may not be accessible directly from the device |
| `Kokkos::SharedSpace` | Accessible from the host and from the device; copy managed by the driver |
| `Kokkos::SharedHostPinnedSpace` | Accessible from the host and from the device; zero copy access in small chunks |

<!--#ifndef PRINT-->
<details>
Expand Down Expand Up @@ -191,6 +191,8 @@ Kokkos::View<DataType, LayoutType, MemorySpace, MemoryTraits> view("label", numb
| `MemorySpace` | See [memory spaces](#memory-spaces) |
| `MemoryTraits` | See [memory traits](#memory-traits) |

<img title="Warning" alt="Warning" src="./images/warning_txt.svg" height="25"> Template arguments are optional, but their order matters.

<!--#ifndef PRINT-->
<img title="Doc" alt="Doc" src="./images/doc_txt.svg" height="25"> https://kokkos.org/kokkos-core-wiki/API/core/view/view.html#constructors

Expand Down Expand Up @@ -557,7 +559,7 @@ The reducer class can be omitted for `Kokkos::Sum`.
#### Global fence

```cpp
Kokkos::fence();
Kokkos::fence("label");
```

<!--#ifndef PRINT-->
Expand All @@ -567,7 +569,7 @@ Kokkos::fence();
#### Execution space fence

```cpp
ExecutionSpace().fence();
ExecutionSpace().fence("label");
```

#### Team barrier
Expand Down Expand Up @@ -789,17 +791,17 @@ Kokkos::parallel_for(

### Atomic operations

| Operation | Replaces |
|----------------------------|--------------------------------------|
| `Kokkos::atomic_add` | `+=` |
| `Kokkos::atomic_and` | `&=` |
| `Kokkos::atomic_assign` | `=` |
| `Kokkos::atomic_decrement` | `--` |
| `Kokkos::atomic_increment` | `++` |
| `Kokkos::atomic_max` | `std::max` on previous and new value |
| `Kokkos::atomic_min` | `std::min` on previous and new value |
| `Kokkos::atomic_or` | `\|=` |
| `Kokkos::atomic_sub` | `-=` |
| Operation | Replaces |
|--------------------------------|----------------------|
| `Kokkos::atomic_add(&x, y)` | `x += y` |
| `Kokkos::atomic_and(&x, y)` | `x &= y` |
| `Kokkos::atomic_assign(&x, y)` | `x = y` |
| `Kokkos::atomic_decrement(&x)` | `x--` |
| `Kokkos::atomic_increment(&x)` | `y++` |
| `Kokkos::atomic_max(&x, y)` | `x = std::max(x, y)` |
| `Kokkos::atomic_min(&x, y)` | `x = std::min(x, y)` |
| `Kokkos::atomic_or(&x, y)` | `x \|= y` |
| `Kokkos::atomic_sub(&x, y)` | `x -= y` |

<!--#ifndef PRINT-->
<details>
Expand Down