machinelearning
machinelearning copied to clipboard
Perf: Optimization for FactorizationMachine
Benchmarking using VTune has found several bottlenecks in Factrization Machine training algorithm.
- Some phases training that are not parallelized. Consider adding parallel computation.
- Evaluate using AVX/AVX2 (C++ or C# instrinsics) in factorizationmachinenative.dll which currently implements C++ SSE code
- Consider optimizing the following hotspot
| Function | Module | CPU Time |
|---|---|---|
| Microsoft::ML::Internal::Utilities::DoubleParser::TryParseCore | Microsoft.ML.Core.dll | 27.390s |
| CalculateGradientAndUpdateNative | factorizationmachinenative.dll | 22.609s |
| HelperImpl::FetchNextField | Microsoft.ML.Data.dll | 13.826s |
| CalculateIntermediateVariablesNative | factorizationmachinenative.dll | 12.201s |
| Microsoft::ML::Internal::Utilities::DoubleParser::TryParse | Microsoft.ML.Core.dll | 9.666s |
Done in below PR, close the issue now: https://github.com/dotnet/machinelearning/pull/3940