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

docs: Add profiling for compile times #1843

Merged
merged 1 commit into from
Jun 5, 2023
Merged
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
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`