Class GpuSummarySection
java.lang.Object
com.scivicslab.turingworkflow.plugins.report.sections.basic.GpuSummarySection
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerate()Generates the section content.getTitle()Returns the section title.voidsetConnection(Connection connection) Sets the database connection for log queries.voidsetSessionId(long sessionId) Sets the session ID to query logs from.
-
Constructor Details
-
GpuSummarySection
public GpuSummarySection()
-
-
Method Details
-
setConnection
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
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:
generatein interfaceSectionBuilder- Returns:
- the formatted GPU summary content, or empty string if no GPU info found
-
getTitle
Returns the section title.If null or empty, the section content is output without a title line.
Always returns
nullbecause the title is embedded within the generated content.- Specified by:
getTitlein interfaceSectionBuilder- Returns:
- the section title, or null for no title
-