Pulse

MatMul Kernel in C++

  • 0 Raised
  • 341 Views
  • 0 Judges

Tags

  • Hard Hack

Categories

  • Hard Hack: RISC-V Edition

Gallery

Description

Hardhack Solver (Pulse) is a comprehensive high-performance engine and utility suite designed to tackle the Amadeus Hard Hack challenge efficiently on standard Linux environments with Docker support. Built with performance, correctness, and portability in mind, this submission delivers a complete solver ecosystem capable of exact and high-throughput computation across multiple tracks of the challenge.

🚀 What This Project Is

At its core, Hardhack Solver is a production-ready implementation of high-performance mining and proof generation logic tailored to the Hard Hack competition protocol. It combines optimized C++ and Python tooling to deliver both:

  • Exact integer math engines for valid submissions and verification.

  • Performance-oriented computation paths for benchmarking and throughput reporting.

The feat/standard-linux-docker branch ensures reproducibility and ease of use by containerizing all components into a standard Linux Docker build — significantly lowering the barrier for others to reproduce and benchmark results in a consistent environment.

🧩 Key Features

🛠️ 1. Multi-Track Solver Engines

The repository implements:

  • A production C++ miner (hardhack_miner) that performs exact 32-bit integer matrix multiplication and proof generation, suitable for competition submissions that must satisfy correctness gates.

  • A Python OpenBLAS miner (miner_openblas.py) with both exact CPU and approximate GPU paths, allowing performance exploration across different compute backends.

  • A full Merkle proof system (Challenge B) with scripts and CLI tooling that generates and verifies inclusion proofs locally.

🐳 2. Standardized Linux + Docker Support

With a first-class Docker setup and straightforward build instructions:

  • The entire solver environment can be built and run identically across Linux hosts, minimizing environment configuration drift.

  • Benchmarks, utilities, and miner tools are prepackaged inside the container to ease on-ramp for judges, collaborators, or benchmarking pipelines.

📊 3. Built-In Benchmark & Reporting

Tools in this suite measure:

  • Execution throughput (mining rate / computational performance),

  • Correctness verification via exact math checks,

  • JSON performance reporting for automated result collection and leaderboard submissions.

Scripts like mine.sh, merkle_prove.sh, and performance reporters allow reproducible benchmarking across runs.

📐 4. Protocol-Correct Implementation

The solver implements the challenge’s seed format, matrix generation logic, and verification protocol as specified by the Hard Hack API — ensuring interoperability with the challenge server and correct validation logic.

The miner includes:

  • Seed formatting per protocol specification,

  • Matrix generation with BLAKE3 XOF,

  • Exact A × B = C verification via Freivalds’ algorithm,

  • Difficulty and segment hash validation.

⚡ 5. Flexible Workflows & Test Coverage

The repository includes multiple helper scripts and test suites covering:

  • Chunked matrix multiplication tests,

  • Integer and quantized kernels,

  • Local seed mining and template workflows.


Attachments