JuliaMath / IntelVectorMath.jl

Julia bindings for the Intel Vector Math Library
Other
73 stars 18 forks source link

Setting mode during precompilation time doesn't make sense #40

Closed KristofferC closed 4 years ago

KristofferC commented 4 years ago

Calling __init__ here: https://github.com/JuliaMath/IntelVectorMath.jl/blob/master/src/setup.jl#L11

and then setting the mode here: https://github.com/JuliaMath/IntelVectorMath.jl/blob/master/src/setup.jl#L32

doesn't look like it will work properly. The mode is a property of the MKL library and will not be kept when the package is reloaded. If it needs to be set when the package is started, it should be set in __init__ itself.

Crown421 commented 4 years ago

The call to the init function is now no longer necessary with #39, as no Libdl.dlopen is necessary anymore/ covered by importing MKL_jll. For reasons I don't remember I was necessary to call the dlopens also in the module definitions, quite possibly because of the mode setting you mentioned as well.

Regarding the other point I believe you are correct, it seems redundant. I am not even sure what the command is trying to accomplish, especially given that a more convenient function using integer input is defined just above it.

KristofferC commented 4 years ago

Yeah, my point is mostly about the call to set the mode during compilation time. It doesn't do anything.

Crown421 commented 4 years ago

I will remove it, and have quick look as to whether there might need to be call on __init__

Crown421 commented 4 years ago

This is part of #39 now.