[GH-ISSUE #159] Incorrect checking of AVX2 feature in CPU: #85

Closed
opened 2026-11-04 01:39:44 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @uvhat on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/159

=== Step 1: checking your PC ===
  [ok] GPU: NVIDIA GeForce RTX 4080, 32.0 GB VRAM, compute capability 8.9, driver 581.57
  [ok] RAM: 128 GB
  [ok] CPU: AMD Ryzen 9 3950X 16-Core Processor (no AVX2)

  [X]  this CPU has no AVX2; Strata needs at least AVX2

Setup stopped. Fix the item above and run it again - everything already done is kept and skipped.

Checking processor features by IsProcessorFeaturePresent is incorrect because host system could masking this features if Hyper-V enabled

if WIN:
        pf = ctypes.windll.kernel32.IsProcessorFeaturePresent
        avx2 = bool(pf(40))

if i force avx2 = True here - everything working fine on my setup

Checking should be changed to direct call of CPUID and parsing register flags

Originally created by @uvhat on GitHub (Sep 29, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/159 ``` === Step 1: checking your PC === [ok] GPU: NVIDIA GeForce RTX 4080, 32.0 GB VRAM, compute capability 8.9, driver 581.57 [ok] RAM: 128 GB [ok] CPU: AMD Ryzen 9 3950X 16-Core Processor (no AVX2) [X] this CPU has no AVX2; Strata needs at least AVX2 Setup stopped. Fix the item above and run it again - everything already done is kept and skipped. ``` Checking processor features by IsProcessorFeaturePresent is incorrect because host system could masking this features if Hyper-V enabled ``` if WIN: pf = ctypes.windll.kernel32.IsProcessorFeaturePresent avx2 = bool(pf(40)) ``` if i force avx2 = True here - everything working fine on my setup Checking should be changed to direct call of CPUID and parsing register flags
Author
Owner

@Niko1221 commented on GitHub (Sep 29, 2026):

Thanks @uvhat, confirmed: setup only asks Windows (IsProcessorFeaturePresent), and Windows can report no AVX2 on CPUs that have it. We'll fall back to CPUID (the way setup already checks AVX-512) when Windows says no. Fix in the next release.

<!-- gh-comment-id:5898201756 --> @Niko1221 commented on GitHub (Sep 29, 2026): Thanks @uvhat, confirmed: setup only asks Windows (`IsProcessorFeaturePresent`), and Windows can report no AVX2 on CPUs that have it. We'll fall back to CPUID (the way setup already checks AVX-512) when Windows says no. Fix in the next release.
Author
Owner

@Niko1221 commented on GitHub (Sep 29, 2026):

Fixed in 0.1.27: when Windows says there is no AVX2, setup now asks the CPU itself (CPUID leaf 7, plus the OS check that the YMM registers are saved), so a Ryzen 9 3950X passes. Thanks @uvhat! Please reopen if setup still refuses.

<!-- gh-comment-id:5900217488 --> @Niko1221 commented on GitHub (Sep 29, 2026): Fixed in [0.1.27](https://github.com/Niko1221/Strata/releases/tag/v0.1.27): when Windows says there is no AVX2, setup now asks the CPU itself (CPUID leaf 7, plus the OS check that the YMM registers are saved), so a Ryzen 9 3950X passes. Thanks @uvhat! Please reopen if setup still refuses.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#85
No description provided.