@@ -39,28 +39,28 @@ func (r *GPUPoolReconciler) reconcilePoolCapacityWithProvisioner(ctx context.Con
3939		if  err  :=  r .Get (ctx , client.ObjectKey {Name : claimName }, & gpuNodeClaim ); err  !=  nil  {
4040			return  nil , err 
4141		}
42- 		pendingTflops ,  _   :=  gpuNodeClaim .Spec .TFlopsOffered .AsInt64 ()
43- 		pendingVRAM ,  _   :=  gpuNodeClaim .Spec .VRAMOffered .AsInt64 ()
42+ 		pendingTflops   :=  gpuNodeClaim .Spec .TFlopsOffered .Value ()
43+ 		pendingVRAM   :=  gpuNodeClaim .Spec .VRAMOffered .Value ()
4444		assumedTflops  +=  pendingTflops 
4545		assumedVRAM  +=  pendingVRAM 
4646	}
4747
48- 	totalTFlops ,  _   :=  pool .Status .TotalTFlops .AsInt64 ()
49- 	totalVRAM ,  _   :=  pool .Status .TotalVRAM .AsInt64 ()
48+ 	totalTFlops   :=  pool .Status .TotalTFlops .Value ()
49+ 	totalVRAM   :=  pool .Status .TotalVRAM .Value ()
5050	totalTFlops  +=  assumedTflops 
5151	totalVRAM  +=  assumedVRAM 
5252
5353	// default warmUp is zero, only scale up when available < 0 
5454	warmUpTFlops  :=  int64 (0 )
5555	warmUpVRAM  :=  int64 (0 )
5656	if  pool .Spec .CapacityConfig .WarmResources  !=  nil  {
57- 		warmUpTFlops ,  _   =  pool .Spec .CapacityConfig .WarmResources .TFlops .AsInt64 ()
58- 		warmUpVRAM ,  _   =  pool .Spec .CapacityConfig .WarmResources .VRAM .AsInt64 ()
57+ 		warmUpTFlops   =  pool .Spec .CapacityConfig .WarmResources .TFlops .Value ()
58+ 		warmUpVRAM   =  pool .Spec .CapacityConfig .WarmResources .VRAM .Value ()
5959	}
6060
6161	if  pool .Spec .CapacityConfig .MinResources  !=  nil  {
62- 		minTFlops ,  _   :=  pool .Spec .CapacityConfig .MinResources .TFlops .AsInt64 ()
63- 		minVRAM ,  _   :=  pool .Spec .CapacityConfig .MinResources .VRAM .AsInt64 ()
62+ 		minTFlops   :=  pool .Spec .CapacityConfig .MinResources .TFlops .Value ()
63+ 		minVRAM   :=  pool .Spec .CapacityConfig .MinResources .VRAM .Value ()
6464
6565		tflopsGap  =  minTFlops  -  totalTFlops 
6666		vramGap  =  minVRAM  -  totalVRAM 
@@ -73,8 +73,8 @@ func (r *GPUPoolReconciler) reconcilePoolCapacityWithProvisioner(ctx context.Con
7373
7474	// Only check warm-up when everything is ready, otherwise it will cause duplicated resource creation 
7575	if  ! shouldScaleUp  &&  pool .Status .Phase  ==  tfv1 .TensorFusionPoolPhaseRunning  {
76- 		availableTFlops ,  _   :=  pool .Status .AvailableTFlops .AsInt64 ()
77- 		availableVRAM ,  _   :=  pool .Status .AvailableVRAM .AsInt64 ()
76+ 		availableTFlops   :=  pool .Status .AvailableTFlops .Value ()
77+ 		availableVRAM   :=  pool .Status .AvailableVRAM .Value ()
7878		availableTFlops  +=  assumedTflops 
7979		availableVRAM  +=  assumedVRAM 
8080
@@ -88,8 +88,8 @@ func (r *GPUPoolReconciler) reconcilePoolCapacityWithProvisioner(ctx context.Con
8888	}
8989
9090	if  shouldScaleUp  &&  pool .Spec .CapacityConfig .MaxResources  !=  nil  {
91- 		maxTFlops ,  _   :=  pool .Spec .CapacityConfig .MaxResources .TFlops .AsInt64 ()
92- 		maxVRAM ,  _   :=  pool .Spec .CapacityConfig .MaxResources .VRAM .AsInt64 ()
91+ 		maxTFlops   :=  pool .Spec .CapacityConfig .MaxResources .TFlops .Value ()
92+ 		maxVRAM   :=  pool .Spec .CapacityConfig .MaxResources .VRAM .Value ()
9393
9494		if  totalTFlops  >=  maxTFlops  ||  totalVRAM  >=  maxVRAM  {
9595			shouldScaleUp  =  false 
0 commit comments