- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Does the BLAS of the Intel MKL comply with the IEEE 754 standard ? If not, can you tell how big the ulps or relative errors are ?
Thx in advance.
Does the BLAS of the Intel MKL comply with the IEEE 754 standard ? If not, can you tell how big the ulps or relative errors are ?
Thx in advance.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - sicb0161
Does the BLAS of the Intel MKL comply with the IEEE 754 standard ? If not, can you tell how big the ulps or relative errors are ?
While the BLAS is functionally the same as what you get with the netlib source code, I expect there are optimizations which batch sums, for example, usually giving more accuracy than the original. Where the netlib source skips operations on zeros, MKL may perform those operations.
Depending on the BLAS function, you may find vectorized code which was compiled with the equivalent of ifort -noprec-div -noprec-sqrt, which could produce variations of 1 ULP from IEEE 754, and those could grow, e.g. with ill-conditioned matrices.
To summarize, if this is important, you may want to run your test cases with netlib source compiled with the options you consider important for IEEE compliance, and compare with MKL results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thx for your answer,
however, when transforming Matlab code to C Code with MKL BLAS , I get different results. To be more precise, I have rebuilt the LSQR method. In the first iteration, there is almost no error (rel error ~ 10e-7). After few iteration steps, there is a noticable error.
I am just wondering if there is such a non compliance.
Quoting - tim18
however, when transforming Matlab code to C Code with MKL BLAS , I get different results. To be more precise, I have rebuilt the LSQR method. In the first iteration, there is almost no error (rel error ~ 10e-7). After few iteration steps, there is a noticable error.
I am just wondering if there is such a non compliance.
Quoting - tim18
You control in your application whether you are running with gradual underflow enabled, in case that bears on your question. The question about relative errors would make little sense to me except with respect to a specific test case.
While the BLAS is functionally the same as what you get with the netlib source code, I expect there are optimizations which batch sums, for example, usually giving more accuracy than the original. Where the netlib source skips operations on zeros, MKL may perform those operations.
Depending on the BLAS function, you may find vectorized code which was compiled with the equivalent of ifort -noprec-div -noprec-sqrt, which could produce variations of 1 ULP from IEEE 754, and those could grow, e.g. with ill-conditioned matrices.
To summarize, if this is important, you may want to run your test cases with netlib source compiled with the options you consider important for IEEE compliance, and compare with MKL results.
While the BLAS is functionally the same as what you get with the netlib source code, I expect there are optimizations which batch sums, for example, usually giving more accuracy than the original. Where the netlib source skips operations on zeros, MKL may perform those operations.
Depending on the BLAS function, you may find vectorized code which was compiled with the equivalent of ifort -noprec-div -noprec-sqrt, which could produce variations of 1 ULP from IEEE 754, and those could grow, e.g. with ill-conditioned matrices.
To summarize, if this is important, you may want to run your test cases with netlib source compiled with the options you consider important for IEEE compliance, and compare with MKL results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
matlab, of course, uses double precision BLAS. If you use float data types, IEEE754 requires that you get different results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
matlab, of course, uses double precision BLAS. If you use float data types, IEEE754 requires that you get different results.
I of course converted my data into float data types.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page