Skip to content

Commit ce4d7bb

Browse files
committed
Refine logging messages for TornadoVM processes.
1 parent a8c2c50 commit ce4d7bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/example/loader/weights/ModelLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static Weights loadWeights(Map<String, GGMLTensorEntry> tensorEntries, Co
8989
GGMLTensorEntry outputWeight = tensorEntries.getOrDefault("output.weight", tokenEmbeddings);
9090

9191
if (LlamaApp.USE_TORNADOVM) {
92-
System.out.println("Loading weights in TornadoVM format");
92+
System.out.println("Loading model weights in TornadoVM format (converting " + outputWeight.ggmlType() + " -> " + GGMLType.F16 + ")");
9393
return createTornadoVMWeights(tensorEntries, config, ropeFreqs, tokenEmbeddings, outputWeight);
9494
} else {
9595
return createStandardWeights(tensorEntries, config, ropeFreqs, tokenEmbeddings, outputWeight);

src/main/java/com/example/tornadovm/TornadoVMMasterPlan.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static TornadoVMMasterPlan initializeTornadoVMPlan(State state, Llama mod
6767
// Record time after warmup
6868
if (ENABLE_TORNADOVM_INIT_TIME) {
6969
warmupTime = System.nanoTime();
70-
System.err.printf("JIT warmup completed: %.2f ms\n", (warmupTime - planCreationTime) / 1_000_000.0);
70+
System.err.printf("Java to GPU JIT compiler warmup: %.2f ms\n", (warmupTime - planCreationTime) / 1_000_000.0);
7171
}
7272

7373
// 3. Perform copy-in of read-only weights and objects
@@ -76,8 +76,8 @@ public static TornadoVMMasterPlan initializeTornadoVMPlan(State state, Llama mod
7676
// Record final timing information
7777
if (ENABLE_TORNADOVM_INIT_TIME) {
7878
long copyTime = System.nanoTime();
79-
System.err.printf("Read-only weight transfer to GPU: %.2f ms\n", (copyTime - warmupTime) / 1_000_000.0);
80-
System.err.printf("Total TornadoVM initialization: %.2f ms\n\n", (copyTime - startTime) / 1_000_000.0);
79+
System.err.printf("Transfer read-only weights to GPU: %.2f ms\n", (copyTime - warmupTime) / 1_000_000.0);
80+
System.err.printf("Finished TornadoVM initialization...\n \n");
8181
}
8282

8383
return tornadoVMPlan;

0 commit comments

Comments
 (0)