Improve dense SVC performance by reimplementing dense SVC rbf kernel with GEMV BLAS API #18953
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.
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Re-implement SVC rbf train/predict kernel with GEMV BLAS API instead of currently used DOT.
This new implementation can greatly improve performance for both training and predicting. We picked 120+ datasets from https://archive.ics.uci.edu/ml/datasets and kaggle.com, part of the datasets are: abalone, statlog serials, musk serials, breast-cancer serials, etc. As an overall, this new implementation provides ~1.7x (training)/~2.5x (predict) performance than the master code on a AVX512 supported server. Generally, the bigger the dataset (more samples) the bigger benefit will be. The benefit mainly comes from GEMV vs. DOT ---- GEMV as level 2 BLAS API is much more efficient than DOT which is level 1 BLAS API when the input data is not too small.
Any other comments?
Shrinking needs be disabled during runtime to make this new kernel workable, or it will fall back to current dot based kernels. User can specify shrinking to be 0 when new a SVC instance.