Enable SymSgdNative on arm64 via system BLAS#7609
Open
anicka-net wants to merge 1 commit intodotnet:mainfrom
Open
Enable SymSgdNative on arm64 via system BLAS#7609anicka-net wants to merge 1 commit intodotnet:mainfrom
anicka-net wants to merge 1 commit intodotnet:mainfrom
Conversation
Provide an ARM-native libMklImports.so backed by the system BLAS (via CMake find_package(BLAS)), with portable implementations of the two MKL-specific sparse BLAS extensions (cblas_saxpyi, cblas_sdoti) and stubs for DFTI (FFT) functions referenced by the managed initializer but unused by SymSGD. Fixes dotnet#5798 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
@dotnet-policy-service agree company="Microsoft" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7609 +/- ##
=======================================
Coverage 69.59% 69.59%
=======================================
Files 1484 1484
Lines 273606 273606
Branches 27949 27949
=======================================
+ Hits 190408 190425 +17
+ Misses 75836 75817 -19
- Partials 7362 7364 +2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves the TODO in
src/Native/CMakeLists.txtand provides the four MKL method substitutes requested in #5798, enablingSymbolicSgdLogisticRegressionon ARM platforms.MklImportsArmtarget — builds alibMklImports.sobacked by the system BLAS (viafind_package(BLAS)) for ARM, replacing the Intel MKL redistribution which is x86-onlycblas_saxpyiandcblas_sdoti(MKL extensions not in standard CBLAS/OpenBLAS) as straightforward C loopsMicrosoft.ML.Mkl.Componentsinitializer but unused by SymSGD; stubs return error codes so any actual FFT call fails cleanly__cdeclfix — guards the Windows-only calling convention inSparseBLAS.hbehind#ifdef _WIN32Changes
src/Native/CMakeLists.txtMklImportsArm+SymSgdNativeon ARM (instead of skipping both)src/Native/MklImportsArm/CMakeLists.txtlibMklImports.sofrom system BLASsrc/Native/MklImportsArm/MklImportsArm.csrc/Native/SymSgdNative/CMakeLists.txtMklImportstarget instead offind_librarysrc/Native/SymSgdNative/SparseBLAS.h__cdeclfor Windows onlyTest plan
SymbolicSgdLogisticRegressiontrains and predicts correctly on arm64CreatePredictionEngineworks end-to-end[NativeDependencyFact("MklImports")]tests inSymSgdClassificationTests.cspass on arm64Tested on NVIDIA DGX Spark (Grace ARM CPU, Ubuntu 24.04, .NET 10.0.107).
Related issues