EgorBot / runtime-utils

MIT License
0 stars 1 forks source link

EgorBot for EgorBo in #109570 #150

Open EgorBot opened 1 week ago

EgorBot commented 1 week ago

Processing https://github.com/dotnet/runtime/pull/109570#issuecomment-2466268287 command:

Command -aws_cached_genoa ```cs using System.Runtime.InteropServices; using BenchmarkDotNet.Attributes; using System.Runtime.CompilerServices; using BenchmarkDotNet.Running; BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args); public unsafe class Bench { static byte* _srcAlign64; static byte* _srcAlign8; [GlobalSetup] public void Setup() { _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64); _srcAlign8 = _srcAlign64 + 8; } [GlobalCleanup] public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64); [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256); } ```

(EgorBot will reply in this issue)

EgorBot commented 1 week ago

Benchmark results on linux-cachedgenoa

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
AMD EPYC 9R14, 1 CPU, 16 logical and 16 physical cores
  Job-VJVYXG : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-ASBLOL : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method Toolchain Mean Error Ratio
Zero256_Align64 Main 1.027 ns 0.0011 ns 1.00
Zero256_Align64 PR 1.046 ns 0.0018 ns 1.02

BDN_Artifacts.zip

EgorBot commented 1 week ago

cc @EgorBo (logs)

EgorBo commented 1 week ago

@EgorBot -aws_cached_genoa

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}
EgorBot commented 1 week ago

Benchmark results on linux-cachedgenoa

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
AMD EPYC 9R14, 1 CPU, 16 logical and 16 physical cores
DefaultJob : .NET 9.0.0 (9.0.24.47305), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
StdDev=0.0003 ns
Method Mean Error
Zero256_Align64 1.040 ns 0.0004 ns

BDN_Artifacts.zip

EgorBot commented 1 week ago

cc @EgorBo (logs)

EgorBo commented 1 week ago

@EgorBot -commit main -aws_genoa -keep

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}
EgorBo commented 1 week ago

@EgorBot -commit main -aws_genoa -keep

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}
EgorBo commented 1 week ago

@EgorBot -commit main -aws_cached_genoa

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}
EgorBo commented 1 week ago

@EgorBot -commit main -aws_cached_genoa

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}
EgorBo commented 1 week ago

@EgorBot -commit main -aws_cached_genoa

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}
EgorBot commented 1 week ago

❌ Failed on AwsCachedGenoa: Job failed, see logs.

cc @EgorBo (logs)

EgorBo commented 1 week ago

@EgorBot -commit main -aws_cached2_genoa

using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public unsafe class Bench
{
    static byte* _srcAlign64;
    static byte* _srcAlign8;

    [GlobalSetup]
    public void Setup()
    {
        _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64);
        _srcAlign8 = _srcAlign64 + 8;
    }

    [GlobalCleanup]
    public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64);

    [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256);
}
EgorBot commented 1 week ago

Benchmark results on linux-cached2genoa

BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
AMD EPYC 9R14, 1 CPU, 32 logical and 32 physical cores
  Job-ZXNZSL : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Job=Job-ZXNZSL  Toolchain=CoreRun  StdDev=0.0003 ns
Method Mean Error
Zero256_Align64 1.025 ns 0.0004 ns

BDN_Artifacts.zip

EgorBot commented 1 week ago

cc @EgorBo (logs)