- GrantParticipantFebruary 13, 2018 at 6:27 pmPost count: 6
I’m losing track of what’s been covered in the talks, but the pipelining talk covers loop-carried values (LCV) quite heavily, and I don’t recall it really being mentioned alongside vectorisation.
If writing a vectorised loop for B[i] = A[i] + A[i+2], do we need to shuffle and pick with constant metadata (tuned to the member) to construct a suitably-offset vector for the addition, or is there a better way? And how do we generate those member-tuned metadata values?
- Ivan GodardKeymasterFebruary 13, 2018 at 6:40 pmPost count: 656
I lose track too 🙂
Automatic vectorization doesn’t work yet; the specializer and LLVM are having a hissy fit. For your particular example, the best code is probably just to load twice, with no shuffle involved. The size of the vector loaded is member-dependent, of course.
- GrantParticipantFebruary 14, 2018 at 3:54 amPost count: 6
I’m sorry that LLVM is frustrating your team so much. I’d be happy to try to help with that, on my own time, but the logistics are probably too messy. (I’ve got language designitis, too, with a few languages under my belt.)
I was actually thinking of manual vectorisation in this case, and wondering about the situation in which we can’t afford a load or the loop-carried values are calculated. Though I’m thinking the answer might be the NYF streamers.
Many of my queries seem to boil down to wanting to rearrange vector elements. In this case (and in many others, I think), a shuffle that can use two element sources would do the trick, though two shuffles and a pick can do the same, if they can all run at the same cycle edge.
You must be logged in to reply to this topic.