Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/aks-preview/azext_aks_preview/agentpool_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1826,16 +1826,10 @@ def update_managed_gpu(self, agentpool: AgentPool) -> AgentPool:
agentpool.gpu_profile = self.models.GPUProfile() # pylint: disable=no-member
if agentpool.gpu_profile.nvidia is None:
agentpool.gpu_profile.nvidia = self.models.NvidiaGPUProfile() # pylint: disable=no-member
# Check if already set to the desired value to avoid API error
if agentpool.gpu_profile.nvidia.management_mode == CONST_GPU_MANAGEMENT_MODE_MANAGED:
return agentpool
agentpool.gpu_profile.nvidia.management_mode = CONST_GPU_MANAGEMENT_MODE_MANAGED
agentpool.gpu_profile.driver = CONST_GPU_DRIVER_INSTALL
else:
if agentpool.gpu_profile and agentpool.gpu_profile.nvidia:
# Check if already set to the desired value to avoid API error
if agentpool.gpu_profile.nvidia.management_mode == CONST_GPU_MANAGEMENT_MODE_UNMANAGED:
return agentpool
agentpool.gpu_profile.nvidia.management_mode = CONST_GPU_MANAGEMENT_MODE_UNMANAGED
Comment thread
runzhen marked this conversation as resolved.

return agentpool
Expand Down
Loading