java.lang.Object
com.scivicslab.turingworkflow.plugins.report.sections.basic.GpuSummarySection
All Implemented Interfaces:
SectionBuilder

public class GpuSummarySection extends Object implements SectionBuilder
POJO section builder that summarizes GPU information from logs.

Pure business logic - no CallableByActionName. Use GpuSummarySectionActor to expose as an actor.

Parses GPU information from workflow execution logs, supporting both NVIDIA (nvidia-smi) and AMD (ROCm) GPU data formats.

Since:
2.16.0
Author:
devteam@scivicslab.com
  • Constructor Details

    • GpuSummarySection

      public GpuSummarySection()
  • Method Details

    • setConnection

      public void setConnection(Connection connection)
      Sets the database connection for log queries.
      Parameters:
      connection - the JDBC connection to the H2 log database
    • setSessionId

      public void setSessionId(long sessionId)
      Sets the session ID to query logs from.
      Parameters:
      sessionId - the session ID
    • generate

      public String generate()
      Generates the section content.

      Generates a [GPU Summary] block by querying the log database for GPU-related messages. Supports both NVIDIA (nvidia-smi CSV format) and AMD (ROCm key-value format) GPU data. Each node's GPU name, VRAM, driver version, toolkit, and architecture are listed in CSV format, followed by a summary count of NVIDIA, AMD, and other GPU types.

      Specified by:
      generate in interface SectionBuilder
      Returns:
      the formatted GPU summary content, or empty string if no GPU info found
    • getTitle

      public String getTitle()
      Returns the section title.

      If null or empty, the section content is output without a title line.

      Always returns null because the title is embedded within the generated content.

      Specified by:
      getTitle in interface SectionBuilder
      Returns:
      the section title, or null for no title