Justin Zhang
03/18/2026, 2:50 AMnextflow.config file:
process {
withName: 'IMPUTE' {
container = "${params.container_registry}xgboost:v1"
cpus = { check_max(16 * task.attempt, 'cpus') }
memory = { check_max(144.GB * task.attempt, 'memory') }
accelerator = 1
}
}
shall I set accelerator = 4 or accelerator = 0.25 to achieve this? Or is there any other way to do this in Nextflow? Thank you!Arthur
03/18/2026, 3:00 AMaccelerator only works for the AWS Batch, GCP Batch, HyperQueue, and Kubernetes executor.
For anything else GPU allocation has to be handled more manually (i.e. via clusterOptions for SLURM).
Furthermore accelerator can only take an integer, which means you cannot use it to request fractional GPUs.
AWS does have some fractional GPU machines (g6f family) so in theory you can use those instances, but I think you might have to control it using a queue/compute env rather than accelerator as - due to the above integer constraint - you wouldn’t be able to request an instance with 0.25 GPU shares.
I cannot speak for whether the other platforms which support accelerator have any fractional GPU instance capabilities, but the same issue with provision would exist.
For e.g. SLURM due to the more manual system, if your setup allows requesting fractional GPUs via e.g. sharding then it is possible to request and run on fractional GPU shares.Justin Zhang
03/18/2026, 3:17 AMmaxForks 4 in the process definition can allow this. However I need to deal with the conflict among instances myself.Arthur
03/18/2026, 3:21 AM