Skip to content

Commit

Permalink
Merge pull request #22 from yut23/hip-inline-note
Browse files Browse the repository at this point in the history
Add note about inlining on Frontier
  • Loading branch information
zingale authored Feb 20, 2024
2 parents 11c6ff4 + c43238e commit d4ebc5e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion sphinx_docs/source/olcf-compilers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,23 @@ build via:

.. prompt:: bash

make COMP=gnu USE_HIP=TRUE
make USE_HIP=TRUE


HIP Function Inlining
^^^^^^^^^^^^^^^^^^^^^

By default, the ROCm compiler inlines all function calls in device code
(for better compatibility with codes that use file- or function-scoped
``__shared__`` variables). This greatly increases the time it takes to
compile and link, and may be detrimental for the templated Microphysics
networks with lots of compile-time loop unrolling.

This can be disabled by passing flags to ``hipcc`` to allow non-inlined
function calls:

.. prompt:: bash

make USE_HIP=TRUE EXTRACXXFLAGS='-mllvm -amdgpu-function-calls=true'

See also https://rocm.docs.amd.com/en/docs-5.3.3/reference/rocmcc/rocmcc.html#rocm-compiler-interfaces

0 comments on commit d4ebc5e

Please sign in to comment.