Backends/SiaNet.Backend.TensorSharp/Cuda/RuntimeCompiler/KernelDiskCache.cs
/// <summary>
/// Deletes all kernels from disk if they are not currently loaded into memory. Calling this after
/// calling TSCudaContext.Precompile() will delete any cached .ptx files that are no longer needed
/// </summary>
Deletes all kernels from disk if they are not currently loaded into memory. Calling this after
calling TSCudaContext.Precompile() will delete any cached .ptx files that are no longer needed
Deletes all kernels from disk if they are not currently loaded into memory . Calling this after calling TSCudaContext . Precompile () will delete any cached . ptx files that are no longer needed
public void CleanUnused()
        {
            foreach (var file in Directory.GetFiles(cacheDir))
            {
                var key = KeyFromFilePath(file);
                if (!memoryCachedKernels.ContainsKey(key))
                {
                    File.Delete(file);
                }
            }
        }
public void CleanUnused ( ) { foreach ( var file in Directory . GetFiles ( cacheDir ) ) { var key = KeyFromFilePath ( file ) ; if ( ! memoryCachedKernels . ContainsKey ( key ) ) { File . Delete ( file ) ; } } }
Deletes all kernels from disk if they are not currently loaded into memory.
Deletes all kernels from disk if they are not currently loaded into memory .