-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change to make bswap(::Vec{<:Any, <:Union{UInt8, Int8}})
a pass-through
#122
Comments
TestImages.jl also suffers from this, so I'd say this is something important to fix. |
I have a potential fix but I cannot reproduce the problem. Can you give details? Which Julia/LLVM versions are you using etc.? Which CPU architecture is this? What is the error you see? |
See #137 |
I reproduced it on x86_64 (zen3) with: import TiffImages, Downloads
_wrap(name) = "https://github.com/tlnagy/exampletiffs/blob/master/$name?raw=true"
using Downloads
get_example(x) = Downloads.download(_wrap(x))
filepath = get_example("capitol.tif")
img = TiffImages.load(filepath) Requires an assertions builds, of course. On latest master:
|
I did not manage to get an error message, but I did see CI failures when I added a test. #137 is ready for review. |
Fixed in SIMD 3.7.1. |
Currently,
bswap(::Vec)
callsIntrinsics.bswap
, but LLVM does not support odd-bytebswap
.https://github.com/llvm/llvm-project/blob/6009708b4367171ccdbf4b5905cb6a803753fe18/llvm/lib/IR/Verifier.cpp#L5790-L5795
Normally, 1-byte (i.e.,
UInt8
andInt8
)bswap
s are eliminated somewhere in the code generation path, but they might remain for some reason. (cf. tlnagy/TiffImages.jl#166)Perhaps this is an issue that should be addressed in LLVM or Julia compiler, but a workaround in SIMD.jl might not be a bad idea.
The text was updated successfully, but these errors were encountered: