search for: evl

Displaying 20 results from an estimated 40 matches for "evl".

Did you mean: el
2020 Nov 06
2
Loop-vectorizer prototype for the EPI Project based on the RISC-V Vector Extension (Scalable vectors)
On 11/6/20 12:39 PM, Sjoerd Meijer wrote: Hello Simon, Thanks for your replies, very useful. And yes, thanks for the example and making the target differences clear: ; Some examples: ; RISC-V V & VE(*): ; %mask = (splat i1 1) ; %evl = min(256, %n - %i) ; MVE/SVE : ; %mask = get.active.lane.mask(%i, %n) ; %evl = call @llvm.vscale() ; AVX: ; %mask = icmp (%i + (seq <8 x i32> 0,1,2,.,)), %n, ; %evl = i32 8 Unless I miss something, the AVX example is semantically the same as get.active.lane.mask: %m[i]...
2020 Nov 06
4
Loop-vectorizer prototype for the EPI Project based on the RISC-V Vector Extension (Scalable vectors)
On 11/6/20 8:49 AM, Roger Ferrer Ibáñez wrote: Hi Sjoerd, Trying to remember how everything fits together here, but could get.active.lane.mask not create the %mask of the VP intrinsics? Or in other words, in the vectoriser, who's producing the %mask and %evl that is consumed by the VP intrinsics? I'm not sure what would be the best way here. I think about the Loop Vectorizer. I imagine at some point we can teach LV to emit VPred for the widening. VPred IR needs two additional operands, as you mentioned, %evl and %mask. One option is make %evl the...
2020 Nov 09
0
Loop-vectorizer prototype for the EPI Project based on the RISC-V Vector Extension (Scalable vectors)
; RISC-V V & VE(*): ; %mask = get.active.lane.mask(%i, %i) ; %evl = min(256, %n - %i) ; MVE/SVE/AVX : ; %mask = get.active.lane.mask(%i, %n) ; %evl = call @llvm.vscale() For VE, we want to do as much predication as possible through %evl and as little as possible with %mask. This has performance implications on VE and RISC-V - VE does not generate a mask...
2020 Nov 06
0
Loop-vectorizer prototype for the EPI Project based on the RISC-V Vector Extension (Scalable vectors)
Hello Simon, Thanks for your replies, very useful. And yes, thanks for the example and making the target differences clear: ; Some examples: ; RISC-V V & VE(*): ; %mask = (splat i1 1) ; %evl = min(256, %n - %i) ; MVE/SVE : ; %mask = get.active.lane.mask(%i, %n) ; %evl = call @llvm.vscale() ; AVX: ; %mask = icmp (%i + (seq <8 x i32> 0,1,2,.,)), %n, ; %evl = i32 8 Unless I miss something, the AVX example is semantically the same as get.active.lane.mask: %m[i]...
2020 May 18
2
LV: predication
...ed into an actual hardwareloop, in our case possibly predicated, or it is reverted. > What will you do if there are no masked intrinsics in the hwloop body? Nothing. I.e., it can become a hardware loop, but not one with implicit predication. > And i am curious why couldn't you use the %evl parameter of VP intrinsics to get the tail predication you are interested in? In D79100<https://reviews.llvm.org/D79100>, intrinsic get.active.mask makes the backedge taken count of the scalar loop explicit. I will look again, but I don't think the VP intrinsics were able to provide this...
2020 May 19
3
LV: predication
...e semantics of all other vector ops in the loop that do not have an explicit mask parameter: %v = masked.load ... %m ; explicit predication - okay %r = sdiv %x, %y ; implicit predication by %m for hwloops - unpredicated otherwise > And i am curious why couldn't you use the %evl parameter of VP intrinsics to get the tail predication you are interested in? In D79100<https://reviews.llvm.org/D79100>, intrinsic get.active.mask makes the backedge taken count of the scalar loop explicit. I will look again, but I don't think the VP intrinsics were able to provide this...
2020 May 19
2
LV: predication
...proposing a set.num.elements intrinsic. Well, I first kind of did, but again, abandoned that approach after push back. Correct me if I am wrong, but there's no difference in your example whether all instructions consume some predicate or only masked loads/stores: vector.preheader: %init.evl = i32 llvm.hwloop.set.elements(%n) vector.body: %evl = phi 32 [%init.evl, %preheader, %next.evl, vector.body] %aval = call @llvm.vp.load(Aptr, .., %evl) call @llvm.vp.store(Bptr, %aval, ..., %evl) %next.evl = call i32 @llvm.hwloop.decrement(%evl) No difference in that the problem...
2020 May 18
2
LV: predication
...o generate is a vector loop with implicit predication, which works by setting up the the number of elements processed by the loop: hwloop 10 [i:4] = b[i:4] + c[i:4] Why couldn't you use VP intrinsics and scalable types for this? %bval = <4 x vscale x double> call @vp.load(..., /* %evl */ 10) %cval = <4 x vscale x double> call @vp.load(..., /* %evl */ 10) %sum = <4 x vscale x double> fadd %bval, %cval store [..] I see three issues with the llvm.set.loop.elements approach: 1) It is conceptually broken: as others have pointed out, optimization can move the int...
2020 Nov 05
2
Loop-vectorizer prototype for the EPI Project based on the RISC-V Vector Extension (Scalable vectors)
For RISC-V V and VE being explicit about %evl is important for performance & correctness and that is what VP does. The get.active.lane.mask intrinsic is used as a hint for the MVE, SVE backends to use hardware tail-predication (the backends reverse engineer that hint by pattern matching for get.active.lane.mask in the mask parameter of &qu...
2019 Feb 01
3
[RFC] Vector Predication
...t;     vec3 normal = normals[i]; >     color.rgb *= fmax(0.0, dot(normal, light_dir)); >     colors[i] = color; > } > > I'm planning on passing already vectorized code into LLVM and using > LLVM as a backend for optimization and JIT code generation. > > Do you think the EVL proposal would support an ISA like this as it's > currently written (by pattern matching on predicate expansion and > vector-length multiplication)? > Or, do you think the EVL proposal would need modification to > effectively support this (by adding a element group size argument...
2019 Jan 31
6
[RFC] Vector Predication
...sics with an explicit mask and vector length parameter on IR level. -  First-class predicated SDNodes on ISel level. Mask and vector length are value operands. -  An incremental strategy to generalize PatternMatch/InstCombine/InstSimplify and DAGCombiner to work on both regular instructions and EVL intrinsics. -  DAGCombiner example: FMA fusion. -  InstCombine/InstSimplify example: FSub pattern re-writes. -  Early experiments on the LNT test suite (Clang static release, O3 -ffast-math) indicate that compile time on non-EVL IR is not affected by the API abstractions in PatternMatch, etc. We...
2020 Nov 06
0
Loop-vectorizer prototype for the EPI Project based on the RISC-V Vector Extension (Scalable vectors)
Hi Sjoerd, > Trying to remember how everything fits together here, but could > get.active.lane.mask not create the %mask of the VP intrinsics? Or in other > words, in the vectoriser, who's producing the %mask and %evl that is > consumed by the VP intrinsics? > > I'm not sure what would be the best way here. I think about the Loop Vectorizer. I imagine at some point we can teach LV to emit VPred for the widening. VPred IR needs two additional operands, as you mentioned, %evl and %mask. One option is...
2019 Feb 04
4
[RFC] Vector Predication
...eighton wrote: > > > On Friday, February 1, 2019, Simon Moll <moll at cs.uni-saarland.de > <mailto:moll at cs.uni-saarland.de>> wrote: > > We could untie the mask length from the data length: > >   %result = call <scalable 4 x float> > @llvm.evl.fsub.v4f32(<scalable 4 x float> %x, <scalable 4 x float> > %y, <scalable 1 x i1> %M, i32 %L) > > would then indicate the mask %M applies to groups of "4 / 1" float > elements. > > > That would provide the greatest flexibility, as a 1:1 ra...
2020 May 04
3
LV: predication
Hi Roger, That's a good example, that shows most of the moving parts involved here. In a nutshell, the difference is, and what we would like to make explicit, is the vector trip versus the scalar loop trip count. In your IR example, the loads/stores are predicated on a mask that is calculated from a splat induction variable, which is compared with the vector trip count. Illustrated with your
2019 Feb 01
2
[RFC] Vector Predication
On Thu, Jan 31, 2019 at 4:05 PM Philip Reames via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Do such architectures frequently have arithmetic operations on the mask registers? (i.e. can I reasonable compute a conservative length given a mask register value) If I can, then having a mask as the canonical form and re-deriving the length register from a mask for a sequence of
2019 Feb 08
5
[RFC] Vector Predication
On Thu, Feb 7, 2019, 09:21 Simon Moll <moll at cs.uni-saarland.de> wrote: > > On 2/7/19 6:08 PM, David Greene wrote: > > Jacob Lifshay <programmerjake at gmail.com> writes: > > > >> So it would be handy for the vector length on evl intrinsics to be in > >> units of the mask length so we don't have to pattern match a division > >> in the backend. We could have 2 variants of the vector length > >> argument, one in terms of the data vector and one in terms of the mask > >> vector. we could...
2019 Feb 07
2
[RFC] Vector Predication
Jacob Lifshay <programmerjake at gmail.com> writes: > So it would be handy for the vector length on evl intrinsics to be in > units of the mask length so we don't have to pattern match a division > in the backend. We could have 2 variants of the vector length > argument, one in terms of the data vector and one in terms of the mask > vector. we could legalize the mask vector variant fo...
2020 Feb 12
6
[RFC] Optional parameter tuples
...llvm.fadd(%a, %b) ; Constrained fp add %x = call double @llvm.fadd(%a, %b) fpenv(metadata !fpround.tonearest, metadata !fpexcept.strict) ; Constrained fp add with vector predication (https://reviews.llvm.org/D57504) %x = call <256 x double> @llvm.fadd(%a, %b) mask(<256 x i1> %mask), evl(i32 %evl), fpenv(metadata !fpround.tozero, metadata !fpexcept.strict) For constrained fp and VP, we only require a very restricted form of this. That is: - Tuples are only allowed on intrinsic function calls. - There is a builtin list of allowed tuple types (eg tablegen file). - Tuple types are...
2007 Aug 31
3
data frame row manipulation
Hello, struggling with the very basic needs... :( any help appreciated. #using the package doBY #who drinks how much beer per day and therefor cannot calculate rowise maxvals evaluation=data.frame(date=c(1,2,3,4,5,6,7,8,9), name=c("Michael","Steve","Bob", "Michael","Steve","Bob","Michael","Steve","Bob"),
2009 May 31
7
[mapstraction commit] r11 - Added functionality to automatically load scripts needed.
...aram {String} src URL to JSON file + * @param {Function} callback Callback function + */ + function loadScript(src, callback) { + var script = document.createElement(''script''); + script.type = ''text/javascript''; + script.src = src; + if (callback) { + var evl = {}; + evl.handleEvent = function(e) { + callback(); + }; + script.addEventListener(''load'' ,evl ,true); + } + document.getElementsByTagName(''head'')[0].appendChild(script); + return; + }; + + /** * Calls the API specific implementation of a par...