diff --git a/samples/ComputeSharp.Benchmark/FullyConnectedLayerBenchmark.cs b/samples/ComputeSharp.Benchmark/FullyConnectedLayerBenchmark.cs index 3f1488a3..3fe025d8 100644 --- a/samples/ComputeSharp.Benchmark/FullyConnectedLayerBenchmark.cs +++ b/samples/ComputeSharp.Benchmark/FullyConnectedLayerBenchmark.cs @@ -17,17 +17,17 @@ namespace ComputeSharp.Benchmark /// /// The nummber of rows in the matrix /// - private const int N = 128; + private const int N = 512; /// /// The number of columns in the matrix (same as the number of rows in the matrix) /// - private const int M = 128; + private const int M = 512; /// /// The number of columns in the matrix /// - private const int P = 128; + private const int P = 256; /// /// The input tensor diff --git a/samples/ComputeSharp.Benchmark/Program.cs b/samples/ComputeSharp.Benchmark/Program.cs index d7d613f9..8f033fac 100644 --- a/samples/ComputeSharp.Benchmark/Program.cs +++ b/samples/ComputeSharp.Benchmark/Program.cs @@ -5,13 +5,12 @@ namespace ComputeSharp.Benchmark { class Program { - static void Main(string[] args) + static void Main() { var benchmark = new FullyConnectedLayerBenchmark(); benchmark.Gpu(); // Warmup - return; - Stopwatch timer = new Stopwatch(); + Stopwatch timer = Stopwatch.StartNew(); TimeSpan cpuTime = TimeSpan.Zero, gpuTime = TimeSpan.Zero; for (int i = 0; i < 10; i++) @@ -27,10 +26,8 @@ namespace ComputeSharp.Benchmark } Console.WriteLine("======== AVERAGE ========"); - Console.WriteLine($"CPU: {cpuTime:g}"); - Console.WriteLine($"GPU: {gpuTime:g}"); - - Console.ReadKey(); + Console.WriteLine($"CPU: {cpuTime / 10:g}"); + Console.WriteLine($"GPU: {gpuTime / 10:g}"); } } }