Compute benchmark improved
このコミットが含まれているのは:
1 親
ad1053835f
コミット
0bda834cf2
2ファイル変更
+7
-10
検索条件に一致するファイルはありません
@@ -17,17 +17,17 @@ namespace ComputeSharp.Benchmark
|
||||
/// <summary>
|
||||
/// The nummber of rows in the <see cref="X"/> matrix
|
||||
/// </summary>
|
||||
private const int N = 128;
|
||||
private const int N = 512;
|
||||
|
||||
/// <summary>
|
||||
/// The number of columns in the <see cref="X"/> matrix (same as the number of rows in the <see cref="W"/> matrix)
|
||||
/// </summary>
|
||||
private const int M = 128;
|
||||
private const int M = 512;
|
||||
|
||||
/// <summary>
|
||||
/// The number of columns in the <see cref="W"/> matrix
|
||||
/// </summary>
|
||||
private const int P = 128;
|
||||
private const int P = 256;
|
||||
|
||||
/// <summary>
|
||||
/// The input tensor
|
||||
|
||||
@@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする