Add validated native Goldilocks/G64 4-step NTT benchmark#6
Open
uulong950 wants to merge 1 commit into
Open
Conversation
Author
|
I also verified the pushed PR branch from a fresh clone of my fork. Environment: Fresh-clone validation: I also ran a short large-size smoke test from the fresh clone: This confirms that the pushed PR branch does not depend on local untracked files or build artifacts. |
Author
|
I also tried extending this validated G64 benchmark to logn = 25..27. Current observation: logn = 24 works and validates correctly. logn >= 25 currently prints This ring size is not supported!, so the current paper_version 4-step path does not seem to produce valid G64 benchmark data for 2^25..2^27 yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a standalone validated native Goldilocks/G64 benchmark for the
paper_version4-step NTT path.The existing generic benchmark is useful as a timing microbenchmark, but it does not attempt to validate native Goldilocks semantics. In particular, it uses randomly generated modulus/root/W tables and does not copy GPU output back for comparison against a CPU reference.
This benchmark uses a stricter native Goldilocks contract:
p = 2^64 - 2^32 + 10xffffffff000000017NTTParameters4Step-compatible GPU root-table bit-reversal ordertranspose -> GPU_4STEP_NTT -> transposewrapperOne important detail is that direct calls to
GPU_4STEP_NTToperate on the internal 4-step layout. The validated benchmark therefore uses the same transpose wrapper as the example code and reconstructs natural-order output for CPU-reference validation.Local validation on RTX 4090:
Timing on RTX 4090:
Core-only timing mode is also included for separating the inner 4-step kernel cost from the wrapper cost:
The CPU reference is a simple independent natural-order Goldilocks NTT implementation used only for correctness validation. It is not a performance benchmark and is not included in the CUDA event timing region.
The goal of this PR is not to change the existing generic benchmark semantics, but to add a separate reproducible benchmark for native Goldilocks/G64 comparisons.