-
Notifications
You must be signed in to change notification settings - Fork 762
Add accelerator usage field in trace record #6677
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
| } | ||
| // If Fusion is enabled read parse the use of accelerator form .command.log | ||
| if( Global.session && FusionHelper.isFusionEnabled(Global.session as Session) ) | ||
| record.parseFusionAccelerator(task.workDir?.resolve(TaskRun.CMD_LOG)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't sound great parsing a log file to determine this capability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, but this is how Fusion currently provides the GPU metric. This is why I keep it as draft.
|
@jorgee can you make separate PRs for the accelerator request vs GPU metrics? I mainly wanted to get the accelerator request added because it should be trivial |
|
By accelerator request, do you mean the |
|
Yes. The request is separate from the usage |
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
|
I have created #6703 to include the accelerator request in the trace record and pass it to Platform. I have also modified this PR to set the |
This pull request introduces support for tracking and reporting the use of hardware accelerators (such as GPUs) in Fusion-enabled Nextflow tasks. The changes add a new transient
acceleratorfield to theTraceRecord, ensure this field is populated by parsing Fusion logs, and propagate this information to Tower reporting. Comprehensive tests are included to validate the new functionality.Fusion accelerator tracking and reporting:
acceleratorfield to theTraceRecordclass, along with getter, setter, and a method (parseFusionAccelerator) to parse the accelerator usage from Fusion log files. The parsing logic checks for theFUSION_GPU_USED=true|falseline in the log. ([[1]](https://github.com/nextflow-io/nextflow/pull/6677/files#diff-9c0cf79e841529211bb8765c37a7c63a11841f9b9294bd0e36982d21b10a9793R125),[[2]](https://github.com/nextflow-io/nextflow/pull/6677/files#diff-9c0cf79e841529211bb8765c37a7c63a11841f9b9294bd0e36982d21b10a9793R631-R674))TaskHandlerto invokeparseFusionAcceleratoron the.command.logfile when Fusion is enabled, ensuring theacceleratorfield is set during task record creation. ([modules/nextflow/src/main/groovy/nextflow/processor/TaskHandler.groovyR256-R258](https://github.com/nextflow-io/nextflow/pull/6677/files#diff-cc608a283b4ad19f97e1926e7b4e60347d59fa544285e1200893893d990e13a3R256-R258))TowerClientto include theacceleratorvalue when creating the task map for reporting to Tower. ([plugins/nf-tower/src/main/io/seqera/tower/plugin/TowerClient.groovyR664](https://github.com/nextflow-io/nextflow/pull/6677/files#diff-4e7968503d8e56d6d5f2eff04e734382b6b79fee49dc22668d9a3803c91113e2R664))Testing and validation:
TraceRecordTestto verify correct management, parsing, and (non-)serialization of theacceleratorfield, including various edge cases for log file content. ([modules/nextflow/src/test/groovy/nextflow/trace/TraceRecordTest.groovyR372-R445](https://github.com/nextflow-io/nextflow/pull/6677/files#diff-a0fd6cbe04bc7f51d64dfd2475161fe33dc5a65b163dcee567e29022ef27e18bR372-R445))TowerClientTestto ensure theacceleratorfield is included in the Tower task map. ([plugins/nf-tower/src/test/io/seqera/tower/plugin/TowerClientTest.groovyR563-R587](https://github.com/nextflow-io/nextflow/pull/6677/files#diff-463f0ed6e146304ec6d2d8252af59dc42ba32ef8851ae68c371708e3823157c3R563-R587))Imports and dependencies:
TaskHandler.groovy. ([modules/nextflow/src/main/groovy/nextflow/processor/TaskHandler.groovyR19-R22](https://github.com/nextflow-io/nextflow/pull/6677/files#diff-cc608a283b4ad19f97e1926e7b4e60347d59fa544285e1200893893d990e13a3R19-R22))