Hi,
I am currently playing around with some vectorization attempts and am a little bit stuck at vector type conversion.
My goal is to be able to convert a vector<8xf64>
to a vector<8xf32>
. The vector<8xf64>
is obtained through a vector.load
of f64 memrefs, but the rest of the program uses f32 so I need f32 in the long run. I was hoping for something similar to _mm256_cvtpd_ps or a vector version of std.fptrunc, but can’t seem to find anything like that in the dialects.
I know that I could just read scalar values from the memrefs, apply std.fptrunc
and then put them into a vector, but this seems inefficient to me compared to a single vector.load
.
So my question is, what is the best way to convert a vector<8xf64>
to a vector<8xf32>
? Is there maybe even some simple type casting I missed scanning the docs?
Thank you in advance!