Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
haijianyang committed Nov 24, 2023
1 parent 06f69fe commit 895e6b2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions api/v1beta1/elfmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ type ElfMachineSpec struct {
// +optional
DiskGiB int32 `json:"diskGiB,omitempty"`

// GPUDevices is the list of GPUs used by the virtual machine.
// GPUDevices is the list of physical GPUs used by the virtual machine.
// +optional
GPUDevices []GPUPassthroughDeviceSpec `json:"gpuDevices,omitempty"`

// VGPUDevices is the list of vGPUs used by the virtual machine.
// VGPUDevices is the list of virtual GPUs used by the virtual machine.
// +optional
VGPUDevices []VGPUDeviceSpec `json:"vgpuDevices,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ spec:
of the ElfDeploymentZone.
type: string
gpuDevices:
description: GPUDevices is the list of GPUs used by the virtual machine.
description: GPUDevices is the list of physical GPUs used by the virtual
machine.
items:
description: GPUPassthroughDeviceSpec defines virtual machine's
GPU configuration
Expand Down Expand Up @@ -202,7 +203,7 @@ spec:
new machines.
type: string
vgpuDevices:
description: VGPUDevices is the list of vGPUs used by the virtual
description: VGPUDevices is the list of virtual GPUs used by the virtual
machine.
items:
description: VGPUDeviceSpec defines virtual machine's VGPU configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ spec:
to the name of the ElfDeploymentZone.
type: string
gpuDevices:
description: GPUDevices is the list of GPUs used by the virtual
machine.
description: GPUDevices is the list of physical GPUs used
by the virtual machine.
items:
description: GPUPassthroughDeviceSpec defines virtual machine's
GPU configuration
Expand Down Expand Up @@ -186,8 +186,8 @@ spec:
to clone new machines.
type: string
vgpuDevices:
description: VGPUDevices is the list of vGPUs used by the
virtual machine.
description: VGPUDevices is the list of virtual GPUs used
by the virtual machine.
items:
description: VGPUDeviceSpec defines virtual machine's VGPU
configuration
Expand Down
2 changes: 1 addition & 1 deletion controllers/elfmachine_controller_gpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (r *ElfMachineReconciler) selectHostAndGPUsForVM(ctx *context.MachineContex

availableHosts := hosts.FilterAvailableHostsWithEnoughMemory(*service.TowerMemory(ctx.ElfMachine.Spec.MemoryMiB))
if len(availableHosts) == 0 {
ctx.Logger.V(2).Info("No available hosts for selecting GPUs")
ctx.Logger.V(2).Info("Waiting for enough available hosts")
return nil, nil, nil
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/service/collections.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ func (s Hosts) IDs() []string {
return res
}

// GPUVMInfos is a set of GPUVMInfos.
// GPUVMInfos is a set of GpuVMInfos.
// Key is the ID of GPU device.
// Value is the GpuVMInfo type with VMs and allocation details.
type GPUVMInfos map[string]*models.GpuVMInfo

// NewGPUVMInfos creates a GPUVMInfos. from a list of values.
Expand Down

0 comments on commit 895e6b2

Please sign in to comment.