Warm GPU resources before thread startup
This commit is contained in:
1 parent
2281d9535e
commit
ab6a416de2
9 files changed
+822
-403
No files matched your search
@@ -55,12 +55,15 @@ internal static class Program
|
||||
ulong remainder = currentP % 6UL;
|
||||
bool startPrimeProvided = _cliArguments.StartPrimeProvided;
|
||||
int threadCount = Math.Max(1, _cliArguments.ThreadCount);
|
||||
int gpuPrimeBatch = Math.Max(1, _cliArguments.GpuPrimeBatch);
|
||||
UnboundedTaskScheduler.ConfigureThreadCount(threadCount);
|
||||
PrimeTester.GpuBatchSize = gpuPrimeBatch;
|
||||
GpuContextPool.WarmUpPool(threadCount);
|
||||
PrimeTester.WarmUpGpuKernels(threadCount);
|
||||
Console.WriteLine("Starting up threads...");
|
||||
_ = UnboundedTaskScheduler.Instance;
|
||||
int blockSize = Math.Max(1, _cliArguments.BlockSize);
|
||||
int gpuPrimeThreads = Math.Max(1, _cliArguments.GpuPrimeThreads);
|
||||
int gpuPrimeBatch = Math.Max(1, _cliArguments.GpuPrimeBatch);
|
||||
GpuKernelType kernelType = _cliArguments.KernelType;
|
||||
bool useBitTransform = _cliArguments.UseBitTransform;
|
||||
bool useOrder = _cliArguments.UseOrder;
|
||||
@@ -114,7 +117,7 @@ internal static class Program
|
||||
|
||||
// Apply GPU prime sieve runtime configuration
|
||||
GpuPrimeWorkLimiter.SetLimit(gpuPrimeThreads);
|
||||
PrimeTester.GpuBatchSize = Math.Max(1, gpuPrimeBatch);
|
||||
PrimeTester.GpuBatchSize = gpuPrimeBatch;
|
||||
|
||||
MersenneDivisorCycles mersenneDivisorCycles = new();
|
||||
if (!File.Exists(cyclesPath) || continueCyclesGeneration)
|
||||
|
||||
Reference in new issue
Block a user