From cb26b3d2cd588d20e5414b24dfb31949c80f40d4 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 24 Apr 2025 15:06:05 -0700 Subject: [PATCH] Delete dispatch benchmark logging since profiling works on Nsight Systems. --- src/lib/gpu/index.ts | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/lib/gpu/index.ts b/src/lib/gpu/index.ts index 0ec6119..314783e 100644 --- a/src/lib/gpu/index.ts +++ b/src/lib/gpu/index.ts @@ -140,38 +140,6 @@ export class NanoPowGpu { NanoPowGpu.init() } - static #logAverages (times: number[]): void { - let count = times.length, truncatedCount = 0, truncated = 0, sum = 0, reciprocals = 0, logarithms = 0, min = Number.MAX_SAFE_INTEGER, max = 0, median = 0, rate = 0 - times.sort() - for (let i = 0; i < count; i++) { - sum += times[i] - reciprocals += 1 / times[i] - logarithms += Math.log(times[i]) - min = Math.min(min, times[i]) - max = Math.max(max, times[i]) - if (i === Math.ceil(count / 2)) { - median = times[i] - } - if (count < 3 || (i > (0.1 * count) && i < (0.9 * (count - 1)))) { - truncated += times[i] - truncatedCount++ - } - } - const averages = { - "Count (dispatches)": count, - "Total (ms)": sum, - "Rate (d/s)": 1000 * truncatedCount / (truncated || sum), - "Minimum (ms)": min, - "Maximum (ms)": max, - "Median (ms)": median, - "Arithmetic Mean (ms)": sum / count, - "Truncated Mean (ms)": truncated / truncatedCount, - "Harmonic Mean (ms)": count / reciprocals, - "Geometric Mean (ms)": Math.exp(logarithms / count) - } - console.table(averages) - } - /** * Validate work, if present, and blockhash. * Validate options and normalize its properties. @@ -314,7 +282,6 @@ export class NanoPowGpu { } while (this.#busy) if (this.#debug) { - this.#logAverages(times) console.log('nonce', nonce, nonce.toString(16).padStart(16, '0')) console.log('result', result, result.toString(16).padStart(16, '0')) } -- 2.34.1