Repository navigation
WinCore-v0.7.6
WinCore v0.7.6
New Module
WinCore.power— two Windows-specific gaps for unattended AI training with no default Linux equivalent:prevent_sleep(keep_display_on=False)— context manager (also usable via.start()/.stop()) around the real Win32SetThreadExecutionStateAPI, preventing Windows from silently suspending a multi-hour training run during idle timeouts. No-op on non-Windows.check_tdr_risk()— reads the Windows GPU driver watchdog timeout (TdrDelay) and reports whether a long CUDA kernel launch risks being killed by the ~2-second OS default, which otherwise surfaces as a confusingCUDA error: unspecified launch failure.
Fixed — Correctness
WinCore.cache.DiskCache:max_bytesbudget is now enforced across every process sharing the same cache directory, not just the process that created a given instance. Previously, multi-workerDataLoader(num_workers>0)setups on Windows (spawn, notfork) could let the real cache directory grow to roughlyN × max_bytessince each worker tracked usage independently. Fixed with a dependency-free cross-process lock and real directory rescans; a newlock_timeoutconstructor parameter bounds the wait.WinCore.cpu.pin_affinity()/apply(affinity=True): both now correctly detect real performance-core (P-core) logical CPUs on Intel hybrid CPUs viaGetLogicalProcessorInformationEx, instead of assuming the first N logical CPU indices are the fast ones.apply(affinity=True)previously built its own CPU list and bypassed this detection entirely; both paths now share the same selection logic.WinCore.kernels.build(): MSVC auto-detection now finds Visual Studio installs on the Preview/Insider channel, not just stable releases — confirmed on a real Visual Studio 2026 (MSVC v145) machine where the previous query missed a genuinely installed toolchain and fell back to an unfused kernel with misleading guidance.atomic_write(): fixed a temp-filename collision between two threads in the same process (previously unique per-process but not per-thread).build(clean=True): no longer silently returns a stale, already-loaded kernel when a.pydis OS-locked from a previous load — now raises aRuntimeWarningnaming the locked file instead of pretending the clean succeeded.
Fixed — Documentation Accuracy
DiskCache's documented constructor signature was missing the newlock_timeoutparameter.CacheStats.hit_ratewas documented as a method (.hit_rate()) but is actually a@property.- The top-level re-export list was missing
atomic_torch_save/atomic_safetensors_save. - Added full documentation for
WinCore.cache's cross-process budget enforcement, including whatlock_timeoutbounds. python -m WinCore --help's module list was missingkvandpower— both now listed.
For detailed API documentation, see:
https://github.com/FWKMultiverse/WinCore/blob/main/wincore/API_REFERENCE.md
Report issues:
https://github.com/FWKMultiverse/WinCore/issues