Skip to content

WinCore-Foundation

Latest

Choose a tag to compare

@FWKTechnologies FWKTechnologies released this 19 Aug 12:30
· 1 commit to main since this release

WinCore v0.8.2

New Features

  • WinCore.bootstrap.optimize() — one-call optimization setup that applies CPU configuration before CUDA/PyTorch performance settings, returning a combined optimization plan and warnings.
  • WinCore.precision.cuda_perf_defaults() — configures common CUDA/PyTorch performance settings including TF32, cuDNN benchmarking, and SDPA backends, with GPU capability checks and dry-run support.
  • WinCore.precision.quantize_fp8(..., axis=...) — adds optional per-axis FP8 scaling for tensors whose rows/channels have different value ranges.
  • WinCore.precision.quantize_fp4() / dequantize_fp4() — experimental 4-bit symmetric storage quantization with packed 4-bit values. Intended for storage/experimentation, not native FP4 compute or a replacement for NF4/GPTQ/AWQ.
  • WinCore.precision.safe_cast() — detects float16/FP8 overflow during dtype conversion and can warn, raise, or clip instead of silently producing inf.
  • WinCore.cpu.cpu_vendor() — best-effort Intel/AMD CPU detection.
  • WinCore.cpu.numa_node_count() / numa_node_cpus() — Windows NUMA topology detection with NUMA-aware CPU affinity selection and safe fallback when topology information is unavailable.
  • WinCore.memory.PinnedBufferPool — reuses CUDA pinned CPU buffers by shape/dtype with bounded LRU eviction, reducing repeated allocation and pinning overhead.
  • WinCore.cache.DiskCache.warm() — concurrently pre-populates multiple cache entries with worker threads, skips existing entries, reports per-key failures, and performs eviction once after the warm-up pass.
  • WinCore.accumulate.GradientAccumulator — correct loss scaling for gradient accumulation plus DDP no_sync() support to avoid unnecessary gradient all-reduces on non-boundary micro-steps.
  • TrainingMonitor.record_step_time() — tracks warmup/steady-state/stalled training steps and provides steady-state ETA estimation without allowing stalled steps to corrupt ETA calculations.
  • WinCore.io.fast_torch_load() — Windows-friendly fast checkpoint loading using torch.load(..., mmap=True) when supported, with automatic fallback.
  • WinCore.io.fast_safetensors_load() — convenient safetensors checkpoint loading with device selection.
  • WinCore.io.load_checkpoint() — automatically selects the appropriate checkpoint loader from the file extension.

Fixed — Correctness

  • WinCore.kernels.fused_bias_gelu: fixed an import-order bug where the public function could be replaced by its internal submodule, causing TypeError: 'module' object is not callable. The internal kernel module was renamed to _fused_bias_gelu_kernel.py so its name can no longer collide with the public API.
  • WinCore.kernels lazy exports: hardened public-name resolution so related exports are correctly bound together and are not left vulnerable to future import-order corruption.
  • WinCore.precision.quantize_fp8(): fixed FP8 e4m3 scaling aliases incorrectly using the e5m2 range, which could produce a scale roughly 128× wrong.
  • WinCore.diagnostics.TrainingMonitor: loss regression/divergence is now reported separately instead of being incorrectly classified as a plateau.
  • WinCore.cache.DiskCache: fixed eviction behavior where Windows file deletion failures could cause a valid cache entry to disappear from the in-memory index even though the file still existed on disk.
  • WinCore.cache.DiskCache.warm(): fixed repeated full directory scans and cross-process lock acquisitions for every key. Warm-up now performs a single eviction pass after the complete batch.
  • WinCore.precision.quantize_fp8() / quantize_fp4(): empty tensors now raise a clear ValueError instead of an obscure NumPy reduction error.
  • WinCore.precision.quantize_fp8(): invalid axes are now rejected with ValueError; valid negative axes continue to work normally.
  • WinCore.accumulate.GradientAccumulator: non-integer and boolean accumulation_steps values are now rejected instead of silently producing inconsistent accumulation windows.
  • FP8 regression tests: corrected unrealistic lossless-round-trip assertions so tests account for the expected lossy rounding of real FP8 hardware.

Fixed — Windows / CUDA / Build Reliability

  • WinCore.kernels.build(): Visual Studio Preview/Insider installations are now detected correctly, including Visual Studio 2026 / MSVC v145.
  • WinCore.kernels.build(): the resolved MSVC cl.exe path is now explicitly passed to nvcc through -ccbin, fixing CUDA 13.x builds with newer Visual Studio toolsets such as VS2026 where nvcc's automatic MSVC detection can fail.
  • build(clean=True): no longer silently reuses a stale already-loaded .pyd when Windows prevents the native extension from being deleted. A RuntimeWarning now identifies the locked file and explains the limitation.
  • WinCore.cpu.pin_affinity() / apply(affinity=True): both now use the same real P-core detection logic on Intel hybrid CPUs instead of assuming the first N logical CPU IDs are performance cores.
  • NUMA-aware affinity: CPU selection can now prefer CPUs from a single NUMA node before applying P-core selection, reducing unnecessary cross-node memory traffic.
  • atomic_write(): temporary filenames now include the thread ID, preventing collisions between concurrent threads in the same process.

Testing / Validation

  • Expanded the test suite with coverage for FP8 per-axis scaling, experimental FP4, safe casting, CUDA performance configuration, NUMA detection, pinned-buffer pooling, cache warming, fast checkpoint loading, gradient accumulation, training step timing, kernel dispatch, and MSVC detection.
  • Completed multiple audit passes covering concurrency, empty tensors, invalid parameters, type validation, import-order behavior, and real hardware behavior.
  • Verified the latest Windows + CUDA + MSVC fixes on real Windows hardware, including Visual Studio 2026 / MSVC v145 and CUDA 13.x.
  • 261 tests passed with no regressions after the final audit fixes.

Compatibility

  • Version remains 0.8.2. The fixes above are same-version fixes/audits and do not represent a new version number.
  • The public WinCore Python import and documented APIs remain unchanged.
  • The internal fused-kernel filename change does not change WinCore.kernels.fused_bias_gelu.
  • Experimental FP4 support is opt-in and should not be treated as native hardware FP4 acceleration or a replacement for dedicated production quantization libraries.

For detailed API documentation, see:
https://github.com/FWKMultiverse/WinCore/blob/main/wincore/API_REFERENCE.md

Report issues:
https://github.com/FWKMultiverse/WinCore/issues