We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65050cb commit 01ac099Copy full SHA for 01ac099
1 file changed
Tests/Benchmarks/ModelLoadingBenchmarks.swift
@@ -1,5 +1,6 @@
1
import Foundation
2
import Hub
3
+import MLX
4
import MLXLLM
5
import MLXLMCommon
6
import MLXVLM
@@ -38,6 +39,9 @@ struct ModelLoadingBenchmarks {
38
39
print("LLM load run \(i): \(String(format: "%.0f", elapsed))ms")
40
41
_ = modelContext // silence unused warning
42
+
43
+ // Clear GPU cache to ensure independent measurements
44
+ GPU.clearCache()
45
}
46
47
let avg = times.reduce(0, +) / Double(times.count)
@@ -72,6 +76,9 @@ struct ModelLoadingBenchmarks {
72
76
print("VLM load run \(i): \(String(format: "%.0f", elapsed))ms")
73
77
74
78
79
80
81
75
82
83
84
0 commit comments