Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ if(WIN32)
string(CONCAT PRECISION_FLAGS
"/fp:fast=2 "
"/Qimf-precision=high "
"/Qprec-sqrt "
"/Qprotect-parens "
)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox ${WARNING_FLAGS} ${SDL_FLAGS} ${PRECISION_FLAGS}")
Expand Down Expand Up @@ -82,7 +81,6 @@ elseif(UNIX)
"${SDL_FLAGS}"
)
string(CONCAT PRECISION_FLAGS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were used previously with icc compiler. And they were kept during migration to icx since otherwise some tests are failing due to the precision issue.
But from the description of imf-precision=high option it sounds like it covers prec-sqrt and so it should be fine to remove that one rather than finding the replacement alternative.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know the tests which would fail? We can verify that this change won't reintroduce the failures

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be some scope in the internal CI. Hope @ekomarova can provide more insights on that.

"-prec-sqrt "
"-fprotect-parens "
"-fimf-precision=high "
"-fp-model fast=2 "
Expand Down
29 changes: 16 additions & 13 deletions mkl_umath/src/mkl_umath_loops.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@
type *in1p = (type *) (in1); \
type *op1p = (type *) (op1); \
while (_n_ > _chunk_size) { \
vml_func((MKL_INT) _chunk_size, in1p, op1p); \
_n_ -= _chunk_size; \
in1p += _chunk_size; \
op1p += _chunk_size; \
npy_intp _current_chunk = (_n_ > _chunk_size) ? _chunk_size : _n_; \
vml_func((MKL_INT) _current_chunk, in1p, op1p); \
_n_ -= _current_chunk; \
in1p += _current_chunk; \
op1p += _current_chunk; \
} \
if (_n_) { \
vml_func((MKL_INT) _n_, in1p, op1p); \
Expand All @@ -92,11 +93,12 @@
type *in2p = (type *) (in2); \
type *op1p = (type *) (op1); \
while (_n_ > _chunk_size) { \
vml_func((MKL_INT) _chunk_size, in1p, in2p, op1p); \
_n_ -= _chunk_size; \
in1p += _chunk_size; \
in2p += _chunk_size; \
op1p += _chunk_size; \
npy_intp _current_chunk = (_n_ > _chunk_size) ? _chunk_size : _n_; \
vml_func((MKL_INT) _current_chunk, in1p, in2p, op1p); \
_n_ -= _current_chunk; \
in1p += _current_chunk; \
in2p += _current_chunk; \
op1p += _current_chunk; \
} \
if (_n_) { \
vml_func((MKL_INT)_n_, in1p, in2p, op1p); \
Expand All @@ -115,10 +117,11 @@
const type _scaleB = (scaleB); \
const type _shiftB = (shiftB); \
while (_n_ > _chunk_size) { \
vml_func(_chunk_size, in1p, in1p, _scaleA, _shiftA, _scaleB, _shiftB, op1p); \
_n_ -= _chunk_size; \
in1p += _chunk_size; \
op1p += _chunk_size; \
npy_intp _current_chunk = (_n_ > _chunk_size) ? _chunk_size : _n_; \
vml_func(_current_chunk, in1p, in1p, _scaleA, _shiftA, _scaleB, _shiftB, op1p); \
_n_ -= _current_chunk; \
in1p += _current_chunk; \
op1p += _current_chunk; \
} \
if (_n_) { \
vml_func((MKL_INT)_n_, in1p, in1p, _scaleA, _shiftA, _scaleB, _shiftB, op1p); \
Expand Down
Loading