Skip to content

Commit 5740655

Browse files
committed
fix update_gpu_profile
1 parent 180618f commit 5740655

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/aks-preview/azext_aks_preview/agentpool_decorator.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,9 +1648,10 @@ def update_gpu_profile(self, agentpool: AgentPool) -> AgentPool:
16481648
self._ensure_agentpool(agentpool)
16491649

16501650
gpu_driver = self.context.get_gpu_driver()
1651-
if gpu_driver is not None:
1652-
if agentpool.gpu_profile is None:
1653-
agentpool.gpu_profile = self.models.GPUProfile()
1651+
driver_type = self.context.get_driver_type()
1652+
if not agentpool.gpu_profile and (gpu_driver or driver_type):
1653+
agentpool.gpu_profile = self.models.GPUProfile()
1654+
if gpu_driver:
16541655
agentpool.gpu_profile.driver = gpu_driver
16551656
return agentpool
16561657

0 commit comments

Comments
 (0)