From ed8ebc4972a51676cd5c594ae4d0091f4d56e10d Mon Sep 17 00:00:00 2001 From: Cam Date: Wed, 4 Dec 2019 15:45:55 -0800 Subject: [PATCH] rebase mistake --- agent/api/task/task.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/agent/api/task/task.go b/agent/api/task/task.go index 3fffc8f7f01..453787d7f11 100644 --- a/agent/api/task/task.go +++ b/agent/api/task/task.go @@ -342,13 +342,9 @@ func (task *Task) PostUnmarshalTask(cfg *config.Config, return err } - if cfg.GPUSupportEnabled { - err = task.addGPUResource() - if err != nil { - seelog.Errorf("Task [%s]: could not initialize GPU associations: %v", task.Arn, err) - return apierrors.NewResourceInitError(task.Arn, err) - } - task.NvidiaRuntime = cfg.NvidiaRuntime + if err := task.addGPUResource(cfg); err != nil { + seelog.Errorf("Task [%s]: could not initialize GPU associations: %v", task.Arn, err) + return apierrors.NewResourceInitError(task.Arn, err) } task.initializeCredentialsEndpoint(credentialsManager)