1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #29226 from omrope79:fix_mlas_x86

Fix MLAS 32-bit x86 build by integrating missing upstream assembly files #29226

### Pull Request Readiness Checklist

This resolves the 32-bit x86 build failure for MLAS. Related to: https://github.com/opencv/opencv/pull/29218

* Added the required `x86` assembly files and headers from upstream.
* Added `__x86_64__` guards around the AMX `syscall` and the FMA3/AVX512F kernel assignments to prevent 32-bit compilation crashes.

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
omrope79
2026-06-05 02:03:54 +05:30
committed by GitHub
parent d9038ad00d
commit 37c9ab1815
7 changed files with 968 additions and 24 deletions
+2 -1
View File
@@ -363,7 +363,7 @@ MLAS_PLATFORM::MLAS_PLATFORM(void)
this->KernelM1Routine = MlasSgemmKernelM1Avx;
this->KernelM1TransposeBRoutine = MlasSgemmKernelM1TransposeBAvx;
this->TransposePackB16x4Routine = MlasSgemmTransposePackB16x4Avx;
#endif
// FMA3/AVX512F kernels exist for x86_64 only; 32-bit x86 stops at AVX.
unsigned Cpuid7[4];
#if defined(_WIN32)
__cpuidex((int*)Cpuid7, 7, 0);
@@ -378,6 +378,7 @@ MLAS_PLATFORM::MLAS_PLATFORM(void)
this->GemmFloatKernel = MlasGemmFloatKernelAvx512F;
}
}
#endif // MLAS_TARGET_AMD64
}
}
#endif // MLAS_TARGET_AMD64_IX86