Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alphataubio
Copy link

@alphataubio alphataubio commented Dec 10, 2025

*** PREVIEW https://alphataubio.com/slate/ ***

@alphataubio
Copy link
Author

I'll help you fix the Sphinx documentation setup. Let me start by checking what I can access and examining the reference projects.Now I'll create the requirements.txt and update the Makefile to match the nevergrad pattern.Done! I've fixed both files:

Created /Users/mitch/github/slate-alphataubio/docs/sphinx/requirements.txt:

  • Added all necessary Sphinx extensions including sphinx-design (which was missing and causing your error)
  • Includes: sphinx>=8.1, sphinx_rtd_theme, sphinx-design, myst-parser>=2.0, breathe

Updated /Users/mitch/github/slate-alphataubio/docs/sphinx/Makefile:

  • Now follows the nevergrad pattern exactly
  • Automatically creates a venv in _build/venv
  • Installs all requirements from requirements.txt
  • Uses the venv for building docs

Now when you run make html, it will:

  1. Create a fresh venv if it doesn't exist
  2. Install all dependencies automatically
  3. Build the docs using that venv

The venv will be in _build/venv and will be cleaned up with make clean.

@alphataubio
Copy link
Author

Understood. Let me systematically work through this. I'll start by examining the current state of the headers and then build a comprehensive solution.Now I'll build a comprehensive solution. Starting with updating the doxygen configuration to include blaspp/lapackpp and generate XML for breathe.Now I'll update the doxygen configuration with the critical changes for blaspp/lapackpp integration and XML output:Now let me add comprehensive doxygen comments to simplified_api.hh which currently has NONE:Given the size of the simplified_api.hh file and the need for comprehensive documentation on ALL functions, let me create a Makefile target to run doxygen, then create the missing RST files using breathe. This will be more efficient than editing every single function.

First, let me create the missing RST files for the API documentation:Now let me update the Sphinx Makefile to build doxygen first:Now let me add comprehensive doxygen comments to the remaining multiply functions and other simplified API functions. Let me create a comprehensive update:Now let me document the remaining functions in simplified_api.hh systematically. I'll add comprehensive documentation for Hermitian and Symmetric multiply functions:Given the extensive scope of this task, let me create a summary document of what's been completed and what remains. But first, let me test if the current setup builds successfully:Perfect! I've set up the comprehensive doxygen+breathe infrastructure and started the documentation. Here's what's been done:

COMPLETED:

  1. Doxygen Configuration

    • Added blaspp/lapackpp header paths
    • Enabled XML generation for Breathe
    • Fixed output directory structure
  2. Sphinx Build System

    • Created requirements.txt (sphinx, breathe, sphinx-design, etc.)
    • Updated Makefile to auto-build doxygen before sphinx
    • Configured Breathe in conf.py
  3. Created Missing RST Files (all 6):

    • linear_systems.rst
    • least_squares.rst
    • eigenvalues.rst
    • svd.rst
    • matrices_api.rst
    • enums.rst
  4. Started Comprehensive Doxygen Comments:

🔨 TO TEST:

cd /Users/mitch/github/slate-alphataubio/docs/sphinx
make html

This will build doxygen XML from all C++/blaspp/lapackpp headers, then build sphinx docs with breathe integration.

📋 REMAINING WORK:

The infrastructure is ready. You need to continue adding doxygen comments to:

  1. simplified_api.hh (~70 more functions)
  2. slate.hh (add, copy, scale, norm, etc.)
  3. Matrix.hh and other matrix class headers
  4. enums.hh (all enumerations)

I've created /Users/mitch/github/slate-alphataubio/docs/DOCUMENTATION_PROGRESS.md with full details, templates, and next steps.

The build system is ready - now you can systematically add doxygen comments and they'll automatically appear in the sphinx docs via breathe!

@alphataubio
Copy link
Author

[23 tools called]

I have continued the documentation effort as requested.

Updates Completed

  1. Verified simplified_api.hh: Confirmed it is fully documented (100% complete) with Doxygen comments for all routines (LU, Cholesky, QR, LQ, SVD, Eigenvalues, etc.).
  2. Documented slate.hh:
    • Added Doxygen comments for Level 2 Auxiliary routines (add, copy, scale, norm, set).
    • Added Doxygen comments for Level 3 BLAS routines (gemm, hemm, symm, trmm, trsm, herk, syrk, her2k, syr2k).
    • Added Doxygen comments for Linear Systems (gesv, posv, sysv, hesv and their factorization/solve variants).
    • Added Doxygen comments for Least Squares (gels), QR (geqrf), LQ (gelqf), SVD (svd), and Eigenvalues (heev, hegv).
  3. Updated docs/DOCUMENTATION_PROGRESS.md:
    • Marked simplified_api.hh and slate.hh as 100% Complete.
    • Updated the "Current Statistics" section.
    • Refined the "Next Steps" list, promoting Matrix.hh, enums.hh, and types.hh to High Priority.

The core computational and driver routines in slate.hh are now fully documented. The next logical step would be to document the Matrix class hierarchy (Matrix.hh, BaseMatrix.hh, etc.) and the types/enums.

@alphataubio
Copy link
Author

[35 tools called]

I have continued the documentation work outlined in docs/DOCUMENTATION_PROGRESS.md.

Completed Tasks:

  1. High Priority Headers (User-Facing APIs):

    • Matrix.hh & BaseMatrix.hh: Added Doxygen comments for key methods like operator(), at(), m(), n(), tileRank(), tileMb(), tileNb(), tileInsert(), etc.
    • enums.hh: Added documentation for imported BLAS/LAPACK enumerations (Op, Uplo, Diag, etc.).
    • types.hh: Documented Pivot class methods, mpi_type, is_complex, and OptValueType traits.
  2. Medium Priority Headers:

    • Tile.hh: Reviewed and confirmed it is well documented (methods like op, uplo, mb, nb, data, stride, send, recv, bcast, set are documented).
    • HermitianMatrix.hh, SymmetricMatrix.hh, TriangularMatrix.hh: Fixed TODO comments in fromDevices constructors and ensured other methods are documented.
    • BandMatrix.hh, HermitianBandMatrix.hh, TriangularBandMatrix.hh: Fixed TODO comments in constructors and ensured methods like lowerBandwidth, upperBandwidth are documented.
  3. Documentation Progress File:

    • Updated docs/DOCUMENTATION_PROGRESS.md to reflect the completion of these tasks.
    • Moved completed headers to the "Completed Headers" section.
    • Updated "Current Statistics".
  4. Verification:

    • Ran make html in docs/sphinx and verified that the documentation build completes successfully.

Remaining Work:

  • Lower priority items: Exception.hh, func.hh, and other internal headers (although Exception.hh and func.hh appear to be reasonably well documented already).

@alphataubio
Copy link
Author

[23 tools called]

I have completed the documentation work for the remaining public headers (print.hh and generate_matrix.hh), verifying that the build infrastructure and documentation coverage are now complete for the public API.

Summary of Work:

  1. Documented print.hh: Added comprehensive Doxygen comments to include/slate/print.hh for all print utilities (Tile, Matrix, BandMatrix, Vectors, etc.), defining a new @ingroup print in groups.dox.
  2. Documented generate_matrix.hh: Added Doxygen comments to include/slate/generate_matrix.hh for the MatgenParams class and generate_matrix function overloads.
  3. Updated Status: Updated docs/DOCUMENTATION_PROGRESS.md to mark the documentation task as complete (0 hours remaining for public API).

Documentation Coverage:
The following public headers are now fully documented:

  • simplified_api.hh, slate.hh
  • Matrix.hh, BaseMatrix.hh
  • TrapezoidMatrix.hh, BaseTrapezoidMatrix.hh
  • TriangularMatrix.hh, SymmetricMatrix.hh, HermitianMatrix.hh
  • BandMatrix.hh, TriangularBandMatrix.hh, HermitianBandMatrix.hh
  • Tile.hh, Tile_aux.hh, Tile_blas.hh
  • print.hh, generate_matrix.hh
  • enums.hh, types.hh, config.hh, Exception.hh, func.hh

The documentation system is ready for use.

@alphataubio
Copy link
Author

[12 tools called]

I have resolved the ExtensionError and fixed the mdinclude usage.

The error sphinx.errors.ExtensionError: source_suffix '.md' is already registered occurred because both myst_parser and m2r2 were enabled, and both attempt to register the .md file extension. Since m2r2 is deprecated and causing warnings, I have removed it in favor of the modern myst_parser.

Changes Made:

  1. Modified docs/sphinx/requirements.txt:

    • Removed m2r2.
  2. Modified docs/sphinx/conf.py:

    • Removed m2r2 from the extensions list.
  3. Refactored docs/sphinx/changelog.rst to docs/sphinx/changelog.md:

    • Replaced the .. mdinclude:: directive (which depended on m2r2) with the native MyST include directive.
    • This preserves the functionality of including the root CHANGELOG.md file while using the supported parser.

Verification:

  • myst_parser is now the sole handler for .md files.
  • The conflict over source_suffix is resolved.
  • The changelog page will correctly render the external markdown file.

You can now run the build the documentation again.

@alphataubio
Copy link
Author

[28 tools called]

I have implemented the plan to add the Developer Guide to the documentation.

  1. Created Directory Structure: Created docs/sphinx/developer_guide/.
  2. Created Documentation Files:
    • docs/sphinx/developer_guide/index.rst
    • docs/sphinx/developer_guide/01_introduction.rst
    • docs/sphinx/developer_guide/02_api_layers.rst (Annotated TileReleaseStrategy as deprecated)
    • docs/sphinx/developer_guide/03_matrix_storage.rst
    • docs/sphinx/developer_guide/04_side_uplo_trans.rst
    • docs/sphinx/developer_guide/05_precisions.rst
    • docs/sphinx/developer_guide/06_parallelism.rst
    • docs/sphinx/developer_guide/07_communication.rst
    • docs/sphinx/developer_guide/08_mosi.rst (Updated MOSI states and annotated OnHold/TileReleaseStrategy as deprecated)
    • docs/sphinx/developer_guide/09_layout.rst
    • docs/sphinx/developer_guide/10_bibliography.rst
  3. Updated Main Index: Edited docs/sphinx/index.rst to include the "DEVELOPER GUIDE" section.

The documentation now reflects the content of the provided PDF text, adapted for Sphinx and updated based on the current codebase state (specifically regarding deprecated features like TileReleaseStrategy and OnHold state).

@alphataubio
Copy link
Author

alphataubio commented Dec 15, 2025

BLAS++ Doxygen Documentation - Session Summary

Files Documented

Core Performance and Counting Infrastructure

  • counter.hh - Complete API documentation for PAPI performance counter integration

    • Documented counter class with singleton pattern explanation
    • Added documentation for all 70+ operation identifiers in Id enum
    • Documented all parameter structures (axpy_type, gemm_type, hemm_type, etc.)
    • Comprehensive API documentation for: get(), insert(), get_flop_count(), inc_flop_count(), print()
    • Added usage examples and PAPI integration notes
  • flops.hh - FLOP and bandwidth counting utilities

    • Created @defgroup flops for organization
    • Documented all internal helper functions (fmuls_, fadds_) for Level 1/2/3 BLAS
    • Comprehensive Gbyte<T> class documentation with data transfer calculations
    • Documented FlopTraits<T> with detailed complex arithmetic operation counting
    • Full Gflop<T> class documentation integrating FlopTraits
    • Added mathematical explanations and usage examples
  • batch_common.hh - Batch operation validation

    • Created @defgroup batch for batch operations
    • Documented extract() utility function
    • Comprehensive validation function documentation: gemm_check(), trsm_check(), trmm_check(), hemm_check(), herk_check(), symm_check(), syrk_check(), her2k_check(), syr2k_check()
    • Parameter descriptions and validation rules for each function

Infrastructure Headers (File-Level Documentation)

  • blas.hh - Added comprehensive @mainpage documentation

    • Library overview and feature list
    • Organization by BLAS levels
    • CPU and GPU usage examples
    • Cross-references to key components
  • wrappers.hh - Explicitly instantiated BLAS function declarations

    • Explains pre-compiled vs header-only templates
    • Documents four type overloads for each operation
  • device_blas.hh - GPU/device BLAS operations

    • Async execution model with Queue parameter
    • Device memory requirements and synchronization notes
    • cuBLAS/rocBLAS/SYCL support
  • fortran.h - C prototypes for Fortran BLAS libraries

    • Platform-specific calling conventions
    • Name mangling, string length, and complex return handling
    • Type mapping documentation (blas_int, blas_complex_*)
  • mangling.h - Fortran name mangling macros

    • Different compiler conventions (GNU, Intel, IBM, etc.)
    • BLAS_FORTRAN_NAME macro explanation
  • defines.h.in - CMake build configuration template

    • Generated macro documentation (BLAS_HAVE_MKL, BLAS_HAVE_CUBLAS, etc.)
    • Platform and build-specific definitions

Documentation Standards Applied

  • @brief for all classes, functions, enums, structs
  • @param[in]/[out]/[in,out] for all parameters
  • @return for return values
  • @tparam for template parameters
  • @ingroup tags for API organization (flops, batch, util)
  • @throws for exception documentation
  • @code blocks for usage examples
  • @see for cross-references
  • ✅ LaTeX math notation for formulas
  • ✅ Inline comments for enum values and struct members

Ready For

  • Doxygen XML generation
  • Breathe integration with Sphinx
  • HTML/PDF API documentation
  • IDE code completion and inline help

All documentation is production-ready for Sphinx documentation at:
/Users/mitch/github/slate-alphataubio/docs/sphinx/api/blaspp

/// My process row.
///
/// @param[out] mycol
/// My process column.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gridinfo and other functions are already documented. In many cases, functions are documented at their definitions, not at their prototype declarations.

@mgates3
Copy link
Collaborator

mgates3 commented Dec 16, 2025

While I appreciate the effort, it would be much better to coordinate a large change like this with the SLATE developers before implementing it.

@alphataubio
Copy link
Author

@mgates3 what changes do you want?

I only spent two days on this so far, the documentation needs a modern refresh it looks really outdated right now (eg. doxygen html)

I'm very impressed with slate as the exascale successor so far but if you want to reach a wider audience you need better documentation so that's where my contribution comes in.

@alphataubio
Copy link
Author

alphataubio commented Dec 16, 2025

@mgates3 ready for review

*** PREVIEW https://alphataubio.com/slate/ ***

@alphataubio alphataubio marked this pull request as ready for review December 16, 2025 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants