Visible to Intel only — GUID: GUID-F0EF252F-4DC3-4780-B42C-74BDF77384D9
Visible to Intel only — GUID: GUID-F0EF252F-4DC3-4780-B42C-74BDF77384D9
fimf-use-svml, Qimf-use-svml
Instructs the compiler to use the Short Vector Math Library (SVML) rather than the Intel® Fortran Compiler Classic and Intel® Fortran Compiler Math Library (LIBM) to implement math library functions.
Syntax
Linux: |
-fimf-use-svml=value[:funclist] |
Windows: |
/Qimf-use-svml:value[:funclist] |
Arguments
funclist |
Is an optional list of one or more math library functions to which the attribute should be applied. Do not specify the standard Fortran name of the math function; you must specify the actual math library name. If you specify more than one function, they must be separated with commas. Precision-specific variants like sin and sinf are considered different functions, so you would need to use -fimf-use-svmlt=true:sin,sinf (or /Qimf-use-svml:true:sin,sinf) to specify that both the single-precision and double-precision sine functions should use SVML. |
Default
false |
Math library functions are implemented using the Intel® Fortran Compiler Classic and Intel® Fortran Compiler Math Library, though other compiler options may give the compiler the flexibility to implement math library functions with either LIBM or SVML. |
Description
This option instructs the compiler to implement math library functions using the Short Vector Math Library (SVML).
Linux
When you specify option -fimf-use-svml=true, the specific SVML variant chosen is influenced by other compiler options such as -fimf-precision and -fp-model.
Windows
When you specify option /Qimf-use-svml:true, the specific SVML variant chosen is influenced by other compiler options such as /Qimf-precision and /fp.
This option has no effect on math library functions that are implemented in LIBM but not in SVML.
In value-safe settings of option -fp-model (Linux) or option /fp (Windows) such as precise, this option causes a slight decrease in the accuracy of math library functions, because even the high accuracy SVML functions are slightly less accurate than the corresponding functions in LIBM. Additionally, the SVML functions might not accurately raise floating-point exceptions, do not maintain errno, and are designed to work correctly only in round-to-nearest-even rounding mode.
The benefit of using -fimf-use-svml=true or /Qimf-use-svml:true with value-safe settings of -fp-model (Linux) or /fp (Windows) is that it can significantly improve performance by enabling the compiler to efficiently vectorize loops containing calls to math library functions.
If you need to use SVML for a specific math function of a certain precision, specify the function name of the precision that you need. For example, if you want double precision, you can specify :sin; if you want single precision, you can specify :sqrtf, as in -fimf-use-svml=true:sin or /Qimf-use-svml:true:sin, or -fimf-use-svml =false:sqrtf or /Qimf-use-svml:false:sqrtf.
If you do not specify any function names, then the setting applies to all functions (and to all precisions). However, as soon as you specify an individual function name, the setting applies only to the function of corresponding precision. So, for example, sinf applies only to the single-precision sine function, sin applies only to the double-precision sine function, sinl applies only to the extended-precision sine function, etc.
Since SVML functions may raise unexpected floating-point exceptions, be cautious about using features that enable trapping on floating-point exceptions.
The standard Fortran names for the various math intrinsic functions do not match the math library names of the math intrinsic functions. You must find the actual math library name that is generated for the relevant Fortran math intrinsic.
One way to do this is to generate assembly code by using one of the following options:
Linux
-S
Windows
/Fa or /S
The assembly code will show the actual math library name.
For example, if you create a program that contains a call to SIN(x) where x is declared as REAL(KIND=4) and then use option S to produce assembly code for the program, the assembly code will show a call to sinf.
To request the use of SVML for the single-precision sine function, you should specify:
Linux
-fimf-use-svml=true:sinf
Windows
/Qimf-use-svml:true:sinf
This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.
Product and Performance Information |
---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex. Notice revision #20201201 |
IDE Equivalent
Alternate Options
None