GpuKernelLease removed

This commit is contained in:
mlemanczyk committed 2025-11-07 15:36:45 +01:00
1 parent 0410fd2c91
commit 8e779c5c9e
12 files changed
+60 -107

No files matched your search

+2 -2
View File
@@ -267,7 +267,7 @@ public sealed class DivisorCycleCache
private void ComputeCyclesGpuCore(ReadOnlySpan<ulong> divisors, Span<ulong> destination)
{
int length = divisors.Length;
var gpuLease = GpuKernelPool.Rent();
GpuPrimeWorkLimiter.Acquire();
Accelerator accelerator = SharedGpuContext.Accelerator;
var stream = accelerator.CreateStream();
@@ -349,7 +349,7 @@ public sealed class DivisorCycleCache
ThreadStaticPools.BytePool.Return(rentedStatus!, clearArray: false);
}
gpuLease.Dispose();
GpuPrimeWorkLimiter.Release();
}
private static Action<AcceleratorStream, Index1D, int, ArrayView1D<ulong, Stride1D.Dense>, ArrayView1D<ulong, Stride1D.Dense>, ArrayView1D<ulong, Stride1D.Dense>, ArrayView1D<ulong, Stride1D.Dense>, ArrayView1D<byte, Stride1D.Dense>> LoadKernel(Accelerator accelerator)