Skip to content

Commit

Permalink
Update gpu_lecture.md
Browse files Browse the repository at this point in the history
  • Loading branch information
csccva authored Aug 30, 2024
1 parent bdcb943 commit 1369150
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions B3/L9/docs/gpu_lecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -1019,15 +1019,17 @@ end do

# Interoperability with libraries (BONUS)

<small>

- Often it may be useful to integrate the accelerated OpenACC code with
other accelerated libraries
- MPI, CUBLAS, CUFFT, MAGMA, CULA...
- to mix OpenACC and CUDA:
- Use OpenACC for memory management
- Introduce OpenACC in existing GPU code
- Use CUDA for tightest kernels, otherwise OpenACC
```

```Fortran
allocate(x(n), y(n))
istat = curandCreateGenerator(g, CURAND_RNG_PSEUDO_DEFAULT) ! initialize the rng
Expand All @@ -1036,8 +1038,9 @@ istat = curandCreateGenerator(g, CURAND_RNG_PSEUDO_DEFAULT) ! initialize the rn
istat = curandGenerateUniform(g, x, n)
istat = curandGenerateUniform(g, y, n)
!$acc end host_data
```
</small>
```


# OpenACC - OpenMP

Expand Down

0 comments on commit 1369150

Please sign in to comment.