Intel SVML downstream patches for LLVM in llvmlite

I was looking further into this and found the following discussion:

Which is the upstreaming efforts for the internal patches on enabling Intel SVML on Clang that seemed to have stalled.

Does anyone know what type of scenarios or performance wins this is providing? Also is this something that is expected to be part of auto-vectorization or more of the user still needs to manually invoke SVML intrinsics?

I’m wondering how to trial this out internally in numba and potentially other services and see if the gains are enough to help push the upstream patches forward :slight_smile:


1 Like

The use of SVML is automatic in Numba as long as the libSVML is installed. See documentation about it at Many numpy.* and math.* transcendentals are automatically upgraded to use SVML functions. This test here shows what it supported.



LLVM does have support for generating calls to SVML via -fveclib=svml:

Are there additional features enabled by the downstream patches? Reading through the LLVM-14 patch ( it seems to be more on the legality side. That sounds more like a bug than a missing feature if that’s the case.

Also side note it looks like I can’t directly post links so that’s why they’re in code blocks :confused:

Is there a short and easy way to test if Numba has the SVML feature on a given system?

Yes, run numba -s and it will print a long list of diagnostic information containing something like:

__SVML Information__
SVML State, config.USING_SVML                 : True
SVML Library Loaded                           : True
llvmlite Using SVML Patched LLVM              : True
SVML Operational                              : True

Is there a way to do the same within Python?

What we remember is that it is mainly for legality in using Intel’s SVML library which uses a different calling convention. (CC @Hardcode84)

Discourse trust levels configuration confuses me. New users should be able to post a maximum of 2 links. I added * as part of trusted domain, hopefully that helps.

Take a look at the implementation for numba -s here. It’s relying on checking if libSVML is around: