scikit-learn-intelex
scikit-learn-intelex copied to clipboard
[enhancement] enable bf16 BLAS level-3 support
Description
Add gpu_blas_compute_mode kwarg to set_config and config_context. This will enable bf16 support when gpu_blas_compute_mode is set to a proper string which matches from the oneMKL compute_mode enum list.
Changes proposed in this pull request:
- Add ComputeMode enum via pybind11 from mkl_dal_sycl.hpp when dpc backend is available
- Set and/or acquire os environment variable "DAL_BLAS_COMPUTE_MODE" when dpc backend is available via set_config/config_context kwarg gpu_blas_compute_mode
tasks:
- [ ] verify float_to_bf16 operation
/azp run CI
Azure Pipelines successfully started running 1 pipeline(s).
/azp run CI
Azure Pipelines successfully started running 1 pipeline(s).
Please cover this functionality with some tests. Probably you can extend this test suit https://github.com/intel/scikit-learn-intelex/blob/master/sklearnex/tests/test_config.py
Definitely a good idea. I'll work on it
/intelci: run
@icfaust please run intel ci for GPU validation as well
/intelci: run
But with current approach with env variable we can control this without python by just setting env variable without changes for scikit. Do we need any form of python support here?
These changes looks very promising!
/intelci: run
I will be closing this PR after a set of verifications
/intelci: run
There is a worrying python dependency. <3.11 doesn't seem to support.