Backend
Multiword matrix multiplication over large finite fields in floating-point arithmetic
arXiv cs.NA0 views
arXiv:2601.07508v3 Announce Type: replace Abstract: This article is concerned with the efficient computation of modular matrix multiplication C=AB mod p, a key kernel in computer algebra. We focus on floating-point arithmetic, which allows for using efficient matrix multiplication libraries. However, the existing approach is limited to primes p with bitsize at most half the mantissa size (e.g., 26 bits with double precision arithmetic), and becomes quite inefficient when p approaches this limit. We present a new approach that overcomes this limitation and can efficiently handle primes with larger bitsizes. The key idea is to use multiword decompositions, which represent A and B as scaled sums of u and v matrices (words) with smaller coefficients. We provide a rigorous analysis that proves the correctness of this approach for suitably chosen scaling parameters. Our analysis determines the maximum bitsize of p that can be handled for a given number of words; in particular, we show that decomposing in two words each input suffices to handle bitsizes almost equal to the full mantissa size (e.g., the 26 bits limit is raised to 52 bits in double precision arithmetic). Moreover, we show that (1,v) decompositions with v>1 are also of interest to handle intermediate bitsizes. We perform an extensive experimental analysis for various matrix shapes and prime bitsizes. Our performance benchmarks on both CPU and GPU architectures confirm the efficiency of the proposed approach, which can outperform the existing single word approach for bitsizes as low as 23, and can handle bitsizes as high as 52 while retaining high performance.
Source:https://arxiv.org/abs/2601.07508PreviousPosterior error bounds for prior-driven balancing in linear Gaussian inverse problemsNextAsymptotic Analysis of Shallow Water Moment Equations
Related posts
Vara Is Live: A Weak-Signal Scanner Your AI Can Call
0dev.to

How Does a Fancy Text Generator Work Under the Hood?
0dev.to
Large Image Uploads in Node.js: Multipart, Sharp, and S3-Compatible Private Storage
0dev.to
Why Scheduled Social Media Posts Fail to Publish (and How to Retry Safely)
0dev.to
Switch between GPT and Claude in n8n without rebuilding your workflow
0dev.to
Nvidia hits pause on chip shipments to Southeast Asia
0TechCrunch