Twiddle Factor Generation for NTT Computations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing methods for fully homomorphic encryption (FHE) workloads require substantial on-die memory capacity and bandwidth for storing twiddle factors used in number-theoretic transform (NTT) and inverse-NTT operations, which can be inefficient in terms of memory usage and computational resources.
Innovation Solution
Generating twiddle factors just-in-time based on metadata stored on the chip, rather than streaming all constants, reduces the memory required for NTT/iNTT operations by using a reduced set of powers of the root of unity, allowing real-time generation and usage within the parallel processing device.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all twiddle factor constants are stored in on-die memory for NTT/iNTT operations, then the operations can be executed with complete data availability, but the memory capacity and bandwidth requirements become substantial and inefficient
Solution Approach 1:
The patent pre-calculates and stores only the essential powers of the root of unity (specifically powers that are powers of 2) in on-die memory before the NTT operation begins. During the operation, all other required twiddle factors are generated in real-time by multiplying these pre-stored values with appropriate powers of the root of unity, eliminating the need to store all possible twiddle factor constants.
Solution Approach 2:
The patent extracts and stores only the critical subset of twiddle factor constants (powers of 2 of the root of unity) in on-die memory, while generating the remaining twiddle factors dynamically during computation. This extraction of essential elements reduces memory requirements while maintaining operational completeness.
2Quantity of substance
If a reduced set of twiddle factor powers is stored in on-die memory, then memory usage is optimized, but the system must generate remaining twiddle factors in real-time which requires additional computational logic
Solution Approach 1:
The patent implements a self-service mechanism where the NTT computation system generates its own required twiddle factors during execution by using the pre-stored powers of the root of unity and the computational relationship ω^(a+b) = ω^a × ω^b. The system serves its own data generation needs without requiring external memory storage for all constants.
Solution Approach 2:
The patent transitions from a static approach (storing all twiddle factors) to a dynamic approach where twiddle factors are generated on-demand during computation. The system adaptively computes the required twiddle factors based on the current stage and butterfly operations being performed, optimizing memory usage while maintaining computational flexibility.
3Loss of energy
If twiddle factors are generated just-in-time using pre-stored powers of root of unity, then memory bandwidth is reduced, but the generation process requires additional computational steps during NTT execution
Solution Approach 1:
The patent ensures continuous useful action by integrating the twiddle factor generation process directly into the NTT computation flow. As the NTT algorithm progresses through its stages, the required twiddle factors are generated and applied without interruption to the computational sequence, maintaining the continuous data flow and processing pipeline.
Data Source
AI summary
Examples include techniques for twiddle factor generation for number-theoretic-transform (NTT) or inverse-NTT (iNTT) computations by a compute element. The compute element can be included in a parallel processing device. Examples include receiving information to generate a twiddle factor for use by the compute element to execute an NTT or an iNTT computation for an N-degree polynomial, obtain data for a power of 2 of a root of unity from a memory resident on a same chip or die as the compute element and generate the twiddle factor using the obtained data based, at least in part, on the received information.


