Skip to content

Commit

Permalink
Merge pull request #1843 from e10harvey/docs_compiler_profiling
Browse files Browse the repository at this point in the history
docs: Add profiling for compile times
  • Loading branch information
e10harvey authored Jun 5, 2023
2 parents b43d475 + c5302a1 commit fa2bdef
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/developer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ Developer Manual
Source Code Documentation <apidocs.rst>
Building the Documentation <build_doc.rst>
Code Style Guide <style.rst>
Contributing <contrib.rst>
Contributing <contrib.rst>
Profiling <profiling.rst>

24 changes: 24 additions & 0 deletions docs/developer/profiling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Profiling
=========

Compile Times
-------------
1. Select a clang compiler
2. Configure and include `-ftime-trace` in your CXX FLAGS (this works with clang+cuda).
3. Clone and build https://github.com/aras-p/ClangBuildAnalyzer. Put the binary directory in your `PATH`.
4. Compile Kokkos and KokkosKernels
5. Create a directory called `ftime-trace-artifacts` in your build directory
6. Copy the json files you care about in this directory, for example:

.. code-block::
cp ./{sparse,blas}/unit_test/CMakeFiles/*.dir/backends/*.json ftime-trace-artifacts/
7. Run `ClangBuildAnalyzer:

.. code-block::

ClangBuildAnalyzer --all ftime-trace-artifacts/ profile.txt
ClangBuildAnalyzer --analyze profile.txt > analyze.txt

8. Open `analyze.txt`

0 comments on commit fa2bdef

Please sign in to comment.