Github user susanxhuynh commented on a diff in the pull request: https://github.com/apache/spark/pull/21033#discussion_r182283035 --- Diff: resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala --- @@ -495,9 +500,8 @@ private[spark] class MesosCoarseGrainedSchedulerBackend( launchTasks = true val taskId = newMesosTaskId() val offerCPUs = getResource(resources, "cpus").toInt - val taskGPUs = Math.min( - Math.max(0, maxGpus - totalGpusAcquired), getResource(resources, "gpus").toInt) - + val offerGPUs = getResource(resources, "gpus").toInt + var taskGPUs = executorGpus --- End diff -- Ah, good point, I missed that earlier. @yanji84 Why are we changing the default behavior when `spark.mesos.executor.gpus` is not specified? Previously, if `spark.mesos.gpus.max` was set (without setting `spark.mesos.executor.gpus`), GPUs were allocated greedily. This aligns with the CPU behavior when `spark.executor.cores` is not specified. GPUs could be handled the same way.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org