Skip to content

Commit a7bab2c

Browse files
committed
fix: add missing GPUModel parameter to GPU allocation test case
1 parent a4c4b4f commit a7bab2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/controller/tensorfusionworkload_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func (r *TensorFusionWorkloadReconciler) scaleUpWorkers(ctx context.Context, wor
347347
// Create worker pods
348348
for range count {
349349
// Schedule GPU for the worker
350-
gpus, err := r.Allocator.Alloc(ctx, workload.Spec.PoolName, workload.Spec.Resources.Requests, workload.Spec.GPUCount, workload.Spec.GPUModel)
350+
gpus, err := r.Allocator.Alloc(ctx, workload.Spec.PoolName, workload.Spec.Resources.Requests, workload.Spec.GPUCount, workload.Spec.GPUModel)
351351
if err != nil {
352352
r.Recorder.Eventf(workload, corev1.EventTypeWarning, "ScheduleGPUFailed", "Failed to schedule GPU: %v", err)
353353
return ctrl.Result{RequeueAfter: constants.PendingRequeueDuration}, nil

internal/gpuallocator/gpuallocator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ var _ = Describe("GPU Allocator", func() {
180180
}
181181

182182
// Allocate 2 GPUs
183-
allocatedGPUs, err := allocator.Alloc(ctx, "test-pool", request, 2)
183+
allocatedGPUs, err := allocator.Alloc(ctx, "test-pool", request, 2, "")
184184
Expect(err).NotTo(HaveOccurred())
185185
Expect(allocatedGPUs).To(HaveLen(2))
186186

0 commit comments

Comments
 (0)