Skip to content

Commit

Permalink
fix: device-metric out-of-range
Browse files Browse the repository at this point in the history
Signed-off-by: thxCode <[email protected]>
  • Loading branch information
thxCode committed Oct 14, 2024
1 parent f588e36 commit 026e6d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions file_estimate.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func (gf *GGUFFile) EstimateLLaMACppRun(opts ...LLaMACppRunEstimateOption) (e LL
for i, j := 0, len(o.DeviceMetrics)-1; i < len(o.TensorSplitFraction)-j; i++ {
o.DeviceMetrics = append(o.DeviceMetrics, o.DeviceMetrics[j])
}
o.DeviceMetrics = o.DeviceMetrics[:len(o.TensorSplitFraction)+1]
}

// Devices.
Expand Down

0 comments on commit 026e6d5

Please sign in to comment.