Commit Graph
121 Commits
Author SHA1 Message Date
mlemanczyk 5cac51479e GPU memory allocations protected with lock to prevent shared memory access issues. GPU usage limited for the best performance. 2025-11-19 16:49:01 +01:00
mlemanczyk 801b1be3e3 Cleanup 2025-11-18 04:22:39 +01:00
mlemanczyk 342eff2726 GpuKernelPool.GetOrAddKernels removed in --mersenne=bydivisor mode. PartialFactorResult.WithAdditionalPrime will now modify the current instance instead of creating new copy for better performance. SmallPrimeFactorViews renamed to SmallPrimeFactorGpuTables for consistency with other static tables. 2025-11-17 23:33:59 +01:00
mlemanczyk f630bfb598 HeuristicCombinedPrimeTesterAccelerator integrated with PrimeOrderCalculatorAccelerator. 2025-11-17 17:38:23 +01:00
mlemanczyk 183b147135 Heuristic tables split into 2 groups 2025-11-17 16:04:27 +01:00
mlemanczyk 0540411cad Accelerator index added for dictionary-less use-cases 2025-11-15 02:21:45 +01:00
mlemanczyk 0d2a88c45f GpuPrimeWorkLimiter.Acquire() / .Release() removed to save time on the hot-path with billions of calls. We'll rely on AcceleratorStreamPool limits and synchronization. 2025-11-13 17:52:13 +01:00
mlemanczyk d0b1639a5d GPU stabilization improvements to prevent calculation crashes 2025-11-09 21:52:16 +01:00
mlemanczyk 8e779c5c9e GpuKernelLease removed 2025-11-07 15:36:45 +01:00
mlemanczyk 0410fd2c91 PooledContext removal - continuation. GpuKernelLease prepared for removal. 2025-11-07 14:13:11 +01:00
mlemanczyk f4e365194d GpuContextPool removed, because we share context and accelerator between threads, using streams to separate. 2025-11-07 12:52:20 +01:00
mlemanczyk 119690086a ConcurrentDictionary removed. Kernel made dependent on the shared GPU context. 2025-11-07 10:16:33 +01:00
mlemanczyk de2a78b27b Streams added to all kernels and GPU operations to separate threads from each other. 2025-11-06 18:53:55 +01:00
mlemanczyk 64d615c402 Various optimizations to separate non-static data between threads and resolve read/write access issue. 2025-11-04 20:45:56 +01:00
mlemanczyk 07be671726 Various small optimizations 2025-11-02 11:24:18 +01:00
mlemanczyk 2281d9535e Revert "Merge pull request #251 from mlemanczyk/codex/refactor-prime-checking-on-gpu-n5t2pm"
This reverts commit 936ce239db, reversing
changes made to e14b77e504.
2025-11-02 11:22:14 +01:00
mlemanczyk 22f20bfe98 Various small optimizations 2025-11-01 03:42:36 +01:00
Marek Lemańczyk 5536dc4865 Fix GPU by-divisor hang for small primes 2025-10-29 19:21:41 +01:00
mlemanczyk 4c79c4087e Various optimizations 2025-10-29 14:00:38 +01:00
Marek Lemańczyk 6dd5cea79f Remove temporary by-divisor review documents 2025-10-28 02:01:28 +01:00
Marek Lemańczyk 94a4ed8328 Hoist prime order thresholds in CPU heuristics 2025-10-27 21:24:43 +01:00
Marek Lemańczyk 3758524450 Extract divisor validator and rename legacy CPU prime helper 2025-10-26 18:59:07 +01:00
Marek Lemańczyk c01abbd03a Restore legacy by-divisor scans for Mersenne testers 2025-10-26 16:04:09 +01:00
Marek Lemańczyk 43c7bafd5d Restore CPU PrimeTester usage and rename fallback helpers 2025-10-26 15:19:49 +01:00
Marek Lemańczyk 15c229665d Add heuristic prime sieves for cached divisor sequences 2025-10-26 03:21:29 +01:00
Marek Lemańczyk 2d103a9662 Compute initial divisor remainders inside GPU kernel 2025-10-25 05:41:05 +02:00
Marek Lemańczyk 32f9f25e9b Share GPU by-divisor batch resources across accelerators 2025-10-25 05:03:16 +02:00
Marek Lemańczyk 3735a1cf0f Gate GPU by-divisor scans to a single accelerator 2025-10-25 05:00:54 +02:00
Marek Lemańczyk 6b1c2d0665 Reuse GPU by-divisor buffers to curb host allocations 2025-10-25 03:45:46 +02:00
Marek Lemańczyk 4e9d57df4b Unify GPU divisor kernels with stepper path 2025-10-24 20:50:52 +02:00
Marek Lemańczyk 868c7a4fd2 Tighten GPU divisor heuristics and stepper usage 2025-10-24 20:50:46 +02:00
Marek Lemańczyk bbe0c02069 Use bit masks for divisor heuristics 2025-10-24 19:50:27 +02:00
Marek Lemańczyk 46a2178d65 Remove Montgomery data from GPU divisor flow 2025-10-24 18:56:28 +02:00
Marek Lemańczyk 69acd3dad9 Cache GPU divisor partial data on GPU path 2025-10-24 18:56:21 +02:00
Marek Lemańczyk 1e5a9128cb Split CPU and GPU exponent steppers 2025-10-24 08:49:53 +02:00
Marek Lemańczyk 035956cdb6 Replace GPU by-divisor kernel with standard modular exponentiation 2025-10-24 08:49:48 +02:00
Marek Lemańczyk fbd6235316 Handle zero-cycle GPU divisor sessions with heuristics 2025-10-24 06:40:33 +02:00
Marek Lemańczyk cf9d143ca2 Remove GPU by-divisor snapshot dependency 2025-10-24 05:05:21 +02:00
Marek Lemańczyk 8637ee8875 Restore GPU divisor heuristics to match cycle cache 2025-10-24 05:05:16 +02:00
Marek Lemańczyk 8a258f7536 Collapse GPU by-divisor batching to a single launch 2025-10-24 01:23:38 +02:00
Marek Lemańczyk 1075ab1ea1 Fuse GPU hit detection with divisor evaluation 2025-10-24 01:23:31 +02:00
Marek Lemańczyk 40d3b4b3ac Fuse GPU by-divisor candidate filtering into one kernel 2025-10-24 01:23:25 +02:00
Marek Lemańczyk ab1a069e57 Optimize GPU divisor heuristics pipeline 2025-10-24 00:29:26 +02:00
Marek Lemańczyk f672ff520c Avoid redundant compaction buffer clearing on GPU 2025-10-23 01:16:58 +02:00
Marek Lemańczyk ea01585892 Convert divisor session results to hits on the GPU 2025-10-23 00:34:17 +02:00
Marek Lemańczyk faab60c2cd Reduce host hit detection overhead 2025-10-22 23:51:19 +02:00
Marek Lemańczyk 4d9158e8f3 Make GPU mask compaction branchless with shared staging 2025-10-22 22:01:39 +02:00
Marek Lemańczyk 586eb8d303 Document hot-path guards in GPU mask compaction helpers 2025-10-22 18:48:03 +02:00
Marek Lemańczyk add62df697 Compact GPU divisor masks on device 2025-10-22 18:47:55 +02:00
Marek Lemańczyk bae39ad95e Capture GPU next start for divisor batches 2025-10-22 06:43:05 +02:00