search for: canvector

Displaying 20 results from an estimated 22 matches for "canvector".

Did you mean: ac_vector
2018 Jan 19
1
Does OpenMP hints bypass the vectorisation legality check in llvm
...t ---- due to historical reasons ---- and I'm trying to resolve them one small step at a time. See http://lists.llvm.org/pipermail/llvm-dev/2018-January/120164.html. For example, load/store masking is part of "legality" we have to enforce even for OpenMP SIMD code. Whether we run LVL.canVectorize() or not, we still have to record such information so that correct vector code will be generated. Also, unless programmer specifies all "cost model decisions", we still have to run cost model to fill the gap. There are many OpenMP SIMD loops w/o SIMDLEN clause ---- vectorizer needs to...
2018 Jan 19
2
Does OpenMP hints bypass the vectorisation legality check in llvm
...even the compiler think it might not be safe to do so? So my assumption is that such force-vectorization hints should bypass both the vectorization legality and cost model check. However, in LoopVectorize.cpp, I can't see how this is done. All loops will be sent to a legality check of LVL.canVectorize() and, if this condition does not fit, it return to false directly without actually reaching the vectorization stage. Is there anything wrong with my assumption made on the use of force-vectorization hints? Thanks in advance, T -------------- next part -------------- An HTML attachment wa...
2013 Oct 31
2
[LLVMdev] loop vectorizer misses opportunity, exploit
...e. How can the SCEV AA pass be extended to handle this type of arithmetic? > > I'm not an SCEV expert, so it might be possible that it does understand, but the loop vectorizer is not understanding the evolution info, or whatever. What I recommend is to step through the loop vectorizer (canVectorize) and see what the SCEV returns to the vectorizer. If the info is there, but not accounted for, it's a vectorizer bug. If the SCEV gets lost, than you need to add it into the SCEV logic. cheers, --renato -------------- next part -------------- An HTML attachment was scrubbed... URL: <http...
2013 Oct 31
0
[LLVMdev] loop vectorizer misses opportunity, exploit
...torizers recognize such arithmetic operations. Do you think this can be done relatively quickly or does this involve a huge effort? What does 'stepping through' the loop vectorizer mean? Using the debugger and step through the program? Probably not. Is the way to go, to alter the 'canVectorize' function print debug output to see what's going on? Hal, you seem to know the loop vectorizer. Is this the place to look at or is the SLP vectorizer the more promising place? Frank On 31/10/13 12:50, Nadav Rotem wrote: > Hi Frank, > > This loop should be vectorized by the...
2013 Oct 31
3
[LLVMdev] loop vectorizer misses opportunity, exploit
Hi Frank, This loop should be vectorized by the SLP-vectorizer. It has several scalars (C[0], C[1] … ) that can be merged into a vector. The SLP vectorizer can’t figure out that the stores are consecutive because SCEV can’t analyze the OR in the index calculation: %2 = and i64 %i.04, 3 %3 = lshr i64 %i.04, 2 %4 = shl i64 %3, 3 %5 = or i64 %4, %2 %11 = getelementptr inbounds float*
2013 Oct 31
3
[LLVMdev] loop vectorizer misses opportunity, exploit
...tic operations. > > Do you think this can be done relatively quickly or does this involve > a huge effort? > > What does 'stepping through' the loop vectorizer mean? Using the > debugger and step through the program? Probably not. Is the way to > go, to alter the 'canVectorize' function print debug output to see > what's going on? > > Hal, you seem to know the loop vectorizer. Heh ;) Nadav wrote it. I've CC'd Andy, who is our SCEV expert; hopefully he can comment on how difficult it would be to make SCEV understand the indexing calculations...
2013 Oct 21
5
[LLVMdev] First attempt at recognizing pointer reduction
Hi Nadav, Arnold, I managed to find some time to work on the pointer reduction, and I got a patch that can make "canVectorize()" pass. Basically what I do is to teach AddReductionVar() about pointers, saying they don't really have an exit instructions, and that (maybe) the final store is a good candidate (is it?). This makes it recognize the writes and reads, but then "canVectorizeMemory()" bails b...
2013 Oct 31
0
[LLVMdev] loop vectorizer misses opportunity, exploit
...gt;> Do you think this can be done relatively quickly or does this involve >> a huge effort? >> >> What does 'stepping through' the loop vectorizer mean? Using the >> debugger and step through the program? Probably not. Is the way to >> go, to alter the 'canVectorize' function print debug output to see >> what's going on? >> >> Hal, you seem to know the loop vectorizer. > Heh ;) Nadav wrote it. I know. But you said that it doesn't use the SCEV AA information but uses its interal SCEV. Being able to say this requires knowledg...
2013 Oct 23
2
[LLVMdev] First attempt at recognizing pointer reduction
...op for strided accesses and deal > with them appropriately during analysis and transformation > 2.) be able to handle loops with non-unit stride integer induction > variables - this only makes sense if we have support for 1.) > So, despite all this, we still have to pass validation, so canVectorize() must return true. As it stands, all my examples can't vectorize because of the extra memory PHI, and your example below can't vectorize because it can't find the array bounds. I'm assuming that, as soon as I teach the validation to accept your loop (given additional checks), a...
2013 Oct 31
0
[LLVMdev] loop vectorizer misses opportunity, exploit
...ory dependence checking class. -Hal > > > I'm not an SCEV expert, so it might be possible that it does > understand, but the loop vectorizer is not understanding the > evolution info, or whatever. > > > What I recommend is to step through the loop vectorizer > (canVectorize) and see what the SCEV returns to the vectorizer. If > the info is there, but not accounted for, it's a vectorizer bug. If > the SCEV gets lost, than you need to add it into the SCEV logic. > > > cheers, > --renato -- Hal Finkel Assistant Computational Scientist Leaders...
2018 Jan 20
1
Polly loop offloading to Accelerator
Hello, i have been working with an accelerator backend. the accelerator has large vector/simd units. i want streaming loops (non-temporal) vectorized present in code to be offloaded to accelerator simd units. i find polly really suitable for this. i am thinking if the generated IR is passed to polly and then it analyzes loop to know it posses no reuse, if such loop is identified accelerator
2018 Jan 19
0
: Does OpenMP hints bypass the vectorisation legality check in llvm
...n the compiler think it might not be safe to do so? So my assumption is that such force-vectorization hints should bypass both the vectorization legality and cost model check. However, in LoopVectorize.cpp, I can't see how this is done. All loops will be sent to a legality check of LVL.canVectorize() and, if this condition does not fit, it return to false directly without actually reaching the vectorization stage. Is there anything wrong with my assumption made on the use of force-vectorization hints? Thanks in advance, T -------------- next part ------------...
2013 Oct 21
0
[LLVMdev] First attempt at recognizing pointer reduction
...e LLVM test suite to check if it finds new loops to vectorize ? Thanks, Nadav On Oct 21, 2013, at 8:23 AM, Renato Golin <renato.golin at linaro.org> wrote: > Hi Nadav, Arnold, > > I managed to find some time to work on the pointer reduction, and I got a patch that can make "canVectorize()" pass. > > Basically what I do is to teach AddReductionVar() about pointers, saying they don't really have an exit instructions, and that (maybe) the final store is a good candidate (is it?). > > This makes it recognize the writes and reads, but then "canVectorizeMe...
2018 Jan 29
1
Polly loop offloading to Accelerator
...ou could use Polly to generate an AstInfo. With the option > -polly-ast-detect-parallel it will mark loops in the generated Ast as > "coincident", i.e. parallel and without reuse. > > If you know the vector width of your accelerator, you can use > LoopVectorizationLegality::canVectorize to determine whether you can > vectorize it. If your accelerators computational model assumes no > loop-carried dependencies, maybe LoopVectorizationLegality can be > modified to accept 'infinite' vector width. > > polly-dev at googlegroups.com would be the mailing list fo...
2013 Oct 23
0
[LLVMdev] First attempt at recognizing pointer reduction
On Oct 23, 2013, at 9:41 AM, Renato Golin <renato.golin at linaro.org> wrote: > On 21 October 2013 17:29, Arnold Schwaighofer <aschwaighofer at apple.com> wrote: > I don’t think that recognizing this as a reduction is going to get you far. A reduction is beneficial if the value reduced is only truly needed outside of a loop. > This is not the case here (we are storing/loading
2013 Oct 31
0
[LLVMdev] loop vectorizer misses opportunity, exploit
A quite small but yet complete example function which all vectorization passes fail to optimize: #include <cstdint> #include <iostream> void bar(std::uint64_t start, std::uint64_t end, float * __restrict__ c, float * __restrict__ a, float * __restrict__ b) { for ( std::uint64_t i = start ; i < end ; i += 4 ) { { const std::uint64_t ir0 = (i+0)%4 + 8*((i+0)/4);
2013 Oct 23
0
[LLVMdev] [PATCH] Loop Rerolling Pass
...patch will deal with the most basic strided access, so that we can focus on the more complex patterns. >> >> There is one slight issue with all this (APIs, and re-tries), and it's that there are already too much analysis going on in the vectorizer, and you don't want to run the canVectorize() too many times, so calling re-roll on failure and trying again, then calling stride-transform and trying again on loops that would never benefit from those treatments might not be a good idea. > > What I am proposing for interleaved data vectorization would not transform the loop before...
2013 Oct 23
0
[LLVMdev] First attempt at recognizing pointer reduction
...he loop for strided accesses and deal with them appropriately during analysis and transformation > 2.) be able to handle loops with non-unit stride integer induction variables - this only makes sense if we have support for 1.) > > So, despite all this, we still have to pass validation, so canVectorize() must return true. As it stands, all my examples can't vectorize because of the extra memory PHI, and your example below can't vectorize because it can't find the array bounds. Yes because we have to teach the vectorizer about pointer induction variables that stride for your exampl...
2013 Oct 21
0
[LLVMdev] First attempt at recognizing pointer reduction
...ptr[2*i] = ptr[2*i+1] = to us when we are vectorizing this. Thanks, Arnold On Oct 21, 2013, at 10:23 AM, Renato Golin <renato.golin at linaro.org> wrote: > Hi Nadav, Arnold, > > I managed to find some time to work on the pointer reduction, and I got a patch that can make "canVectorize()" pass. > > Basically what I do is to teach AddReductionVar() about pointers, saying they don't really have an exit instructions, and that (maybe) the final store is a good candidate (is it?). > > This makes it recognize the writes and reads, but then "canVectorizeMe...
2013 Oct 23
2
[LLVMdev] First attempt at recognizing pointer reduction
On 21 October 2013 17:29, Arnold Schwaighofer <aschwaighofer at apple.com>wrote: > I don’t think that recognizing this as a reduction is going to get you > far. A reduction is beneficial if the value reduced is only truly needed > outside of a loop. > This is not the case here (we are storing/loading from the pointer). > Hi Arnold, Nadav, Let me resurrect this discussion a