sycl: Use oneMath on non-WIN32#13503
sycl: Use oneMath on non-WIN32#13503jounjj wants to merge 2 commits intoggml-org:masterfrom jounjj:use-onemath
Conversation
Rbiessy
left a comment
There was a problem hiding this comment.
Note that with the PR #12972 we should be able to use oneDNN and avoid using oneMKL/oneMath altogether. I don't think we'll remove the oneMKL/oneMath dependency as part of that PR but could be something we do soon if all goes well. Would that also work for you? I think that would be a preferable solution.
| find_package(oneMath) | ||
| if (WIN32 AND NOT oneMath_FOUND AND GGML_SYCL_TARGET STREQUAL "INTEL") |
There was a problem hiding this comment.
The intention of the original PR #12192 was to use find_package if oneMath is installed and FetchContent otherwise. With these changes oneMath with Intel devices is only going to be used if users install oneMath (and on Linux).
You should be able to allow using FetchContent with:
| find_package(oneMath) | |
| if (WIN32 AND NOT oneMath_FOUND AND GGML_SYCL_TARGET STREQUAL "INTEL") | |
| if (WIN32 AND GGML_SYCL_TARGET STREQUAL "INTEL") |
| if (GGML_SYCL_TARGET STREQUAL "INTEL") | ||
| # Intel devices use Intel oneMKL directly instead of oneMath to avoid the limitation of linking Intel oneMKL statically | ||
| find_package(oneMath) | ||
| if (WIN32 AND NOT oneMath_FOUND AND GGML_SYCL_TARGET STREQUAL "INTEL") |
There was a problem hiding this comment.
This will fallback to using the runtime dispatcher for Intel devices which can affect performance. You can see how the compile time dispatcher used to be enabled in 995aea3#diff-123d14cf628b04694c9022d4210d80c14a29409095635150b944f8dfd1c70b37L120.
|
Yes, sorry I didn't notice that pr. That would feel like a good solution to me as well. I'll close this then. |
The MKL static linking issue (this one uxlfoundation/oneMath#654) is only a problem to WIN32. I would also assume that it is fine to use the oneMath package on WIN32 if it is found.