Various improvements to make sure scratch buffers don't override each others memory
This commit is contained in:
1 parent
dcda4b5cba
commit
fc22c01ec8
16 files changed
+489
-565
No files matched your search
@@ -11,18 +11,13 @@ internal static class GpuStaticTableInitializer
|
||||
{
|
||||
private static readonly ConcurrentDictionary<Accelerator, byte> Initialized = new(AcceleratorReferenceComparer.Instance);
|
||||
|
||||
internal static void EnsureStaticTables(Accelerator accelerator)
|
||||
internal static void EnsureStaticTables(KernelContainer kernels, Accelerator accelerator)
|
||||
{
|
||||
if (accelerator is null)
|
||||
Initialized.GetOrAdd(accelerator, acc =>
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Initialized.GetOrAdd(accelerator, static acc =>
|
||||
{
|
||||
PrimeTester.PrimeTesterGpuContextPool.EnsureStaticTables(acc);
|
||||
GpuKernelPool.PreloadStaticTables(acc);
|
||||
PrimeOrderGpuHeuristics.PreloadStaticTables(acc);
|
||||
PrimeTester.PrimeTesterGpuContextPool.EnsureStaticTables(kernels, acc);
|
||||
GpuKernelPool.PreloadStaticTables(kernels, acc);
|
||||
PrimeOrderGpuHeuristics.PreloadStaticTables( acc);
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user