Open hjabird opened 4 months ago
My only thought is that we might follow Intel MKL with the version being a number:
+#define ONEMKL_VERSION (@PROJECT_VERSION_MAJOR@*100+@PROJECT_VERSION_MINOR@)*100+@PROJECT_VERSION_PATCH@
This is being discussed in https://github.com/uxlfoundation/oneAPI-spec/pull/561
Summary
There is currently no way to find the version of oneMKL interfaces from the headers. oneMKL interfaces should provide version macros.
This suggestion comes from a GROMACS PR - https://gitlab.com/gromacs/gromacs/-/merge_requests/4252#note_2000153975
Problem statement
The behaviour and features of oneMKL change depending on version. Whilst the version of oneMKL is discoverable from the CMake, it is not discoverable from source including oneMKL Interfaces. Consequently, it is difficult to enable or disable code according to version.
Preferred solution
@al42and suggests:
This is (helpfully) different from the macros exported by Intel oneMKL.