similar to: [LLVMdev] round() vs. rint()/nearbyint() with fast-math

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] round() vs. rint()/nearbyint() with fast-math"

2013 Jul 04
0
[LLVMdev] round() vs. rint()/nearbyint() with fast-math
On Fri, Jun 21, 2013 at 5:11 PM, Erik Schnetter <schnetter at cct.lsu.edu>wrote: > On Fri, Jun 21, 2013 at 7:54 AM, David Tweed <david.tweed at arm.com> wrote: > >> | LLVM does not currently have special lowering handling for round(), and >> I'll propose a patch to add that, but the larger question is this: should >> fast-math change the tie-breaking
2013 Jul 05
1
[LLVMdev] round() vs. rint()/nearbyint() with fast-math
----- Original Message ----- > > On Fri, Jun 21, 2013 at 5:11 PM, Erik Schnetter < > schnetter at cct.lsu.edu > wrote: > > > > > > > On Fri, Jun 21, 2013 at 7:54 AM, David Tweed < david.tweed at arm.com > > wrote: > > > > > > > | LLVM does not currently have special lowering handling for round(), > | and >
2013 Feb 09
0
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
The lack of an open-source vector math library (which is what you suggest here) prompted me to start a project "vecmathlib", available at < https://bitbucket.org/eschnett/vecmathlib>. This library provides almost all math functions available in libm, implemented in a vectorised manner, i.e. suitable for SSE2/AVX/MIC/PTX etc. In its current state the library has rough edges, e.g.
2013 May 23
2
[LLVMdev] LLVM Loop Vectorizer puzzle
On May 23, 2013, at 10:37 AM, Cameron McInally <cameron.mcinally at nyu.edu> wrote: > In all fairness, I do not believe that ivdep is an ICC-specific pragma. There are many compilers that support ivdep and lots of legacy (and modern) codes that benefit from it. Seems silly, to me at least, to reinvent the wheel. Hi Cameron, The history of the idvep pragma is fascinating. I did not
2013 Feb 07
5
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
Hi Justin, gentlemen, I'm afraid I have to escalate this issue at this point. Since it was discussed for the first time last summer, it was sufficient for us for a while to have lowering of math calls into intrinsics disabled at DragonEgg level, and link them against CUDA math functions at LLVM IR level. Now I can say: this is not sufficient any longer, and we need NVPTX backend to deal with
2020 Mar 02
2
Should rint and nearbyint be always constrained?
Hi everyone, According to the current design an intrinsic call that depends on current floating point environment (for example, rounding mode) or change it (for example by raising FP exceptions) is represented by constrained intrinsics. The latter have attached metadata that provide info about current FP environment and have attribute `IntrInaccessibleMemOnly` that helps keeping order of
2013 Jun 19
1
[LLVMdev] round() vs. rint()/nearbyint() with fast-math
Hello, Sometime over the last few months, I implemented in the PowerPC backend a fast-math-only optimization which lowers ISD::FRINT/FNEARBYINT in terms of the frin instruction (when supported). As one of my users has pointed out to me, frin actually implements the semantics of round() [it ties away from zero] instead of implementing nearbyint() [which ties to even]. This user has additionally
2020 Mar 02
2
Should rint and nearbyint be always constrained?
> > I'm not sure why this is an issue. Yes, these two intrinsics depend > on the current rounding mode according to the C standard, and yes, > LLVM in default mode assumes that the current rounding mode is the > default rounding mode. But the same holds true for many other > intrinsics and even the arithmetic IR operations like add. Any other intrinsic, like `floor`,
2020 Mar 02
2
Should rint and nearbyint be always constrained?
Some clarification after getting feedback from Craig Topper…. It’s probably best to say in the documentation that the llvm.nearbyint and llvm.rint functions “assume the default rounding mode, roundToNearest”. This will allow the optimizer to transform them as if they were rounding to nearest without requiring backends to use an encoding that enforces roundToNearest as the rounding mode for these
2020 Mar 03
2
Should rint and nearbyint be always constrained?
> > The only issue I see is that since we also assume FP operations have no > side effects by default there is no difference between llvm.rint and > llvm.nearbyint. I wouldn’t have a problem with dropping llvm.rint > completely. The forthcoming C standard ( http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2454.pdf, 7.12.9.8) defines new function, `roundeven`, which implements
2020 Mar 03
5
Should rint and nearbyint be always constrained?
> > One concern with replacing llvm.rint and llvm.nearbyint with > llvm.roundeven makes it difficult to turn back into a libcall if the > backend doesn't have an instruction for it. You can't just call the > roundeven library function since that wouldn't exist in older libm > implementations. So ideally you would know which function was originally > used in the
2013 Aug 07
4
[LLVMdev] Address space extension
On 08/07/2013 03:52 PM, Michele Scandale wrote: > > In the opencl specification is said that the four address spaces are > disjoint, so my conclusion of non aliasing with the others. In OpenCL 2.0, you can cast between the generic address space and global/local/private, so there's also that to consider.
2020 Mar 05
3
Should rint and nearbyint be always constrained?
+cfe-dev as the discussion is now biased toward C standard. I'm not sure what problem you see here. In default mode, i.e. > when there is no "#pragma STDC FENV_ACCESS on" in effect, > then the compiler can always assume that the default rounding > mode is in effect. Well, if #pragma STDC FENV_ACCESS on is not in effect, that means > that the user has promised that at
2013 Sep 05
1
[LLVMdev] AVX calling convention?
I am tracking down an x86-64 code generation problem that has to do with AVX instructions. The symptom is: a function is called, and the upper half of the function argument (which is short16) is zero. This happens only when I compile code with pocl, but not when I use clang and/or llc manually. I tracked this down to the following. The call site looks like vmovdqa 24064(%rsp), %ymm0 vmovdqa
2013 Aug 07
0
[LLVMdev] Address space extension
On 2013-08-07, at 18:55 , Matt Arsenault <Matthew.Arsenault at amd.com> wrote: > On 08/07/2013 03:52 PM, Michele Scandale wrote: >> >> In the opencl specification is said that the four address spaces are disjoint, so my conclusion of non aliasing with the others. > In OpenCL 2.0, you can cast between the generic address space and global/local/private, so there's also
2018 Nov 14
2
llvm.rint specification
Hello, I believe llvm.rint description in LangRef is not quite complete. Llvm seems to map math.h:rint() call to llvm.rint intrinsic, and the LangRef says that the result of llvm.rint matches the result of libm rint() call. Next, LangRef states that llvm.rint "returns the operand rounded to the nearest integer." Shouldn't the specification also say that "the actual rounding
2011 Oct 20
3
Strange R behavior for product of two sum of integers
Dear gentlemen, Can you explain me why the following happens (any OS I think, and even on 64 bits)? > sum(1000:1205)^2 [1] 51581223225 > sum(1000:1205)*sum(1000:1205) [1] NA Warning message: In sum(1000:1205) * sum(1000:1205) : NAs produced by integer overflow Best, Pierre -- Pierre Lafaye de Micheaux Adresse courrier: D?partement de Math?matiques et Statistique Universit? de
2014 Apr 11
3
[LLVMdev] Proposal: Move host CPU auto-detection out of the TargetMachine
We already decide on a default. For these three targets is “whatever the user is running on.” For all the other targets it’s something the backend selects. I’m proposing we, as you say, remove the uncertainty and have the default always be the same from one run to the next even (especially) when those runs are on different machines. For X86, there’s two options, the “generic” target that backend
2018 Nov 14
2
llvm.rint specification
Hi Cameron, Thank you for the comments, but I am confused even more now ☺ > llvm.rint won't honor the FPEnv in all cases. It falls under the default FPEnv The default FPEnv section specifies round-to-nearest rounding mode. In this case, how is it correct to map rint() user call to llvm.rint intrinsic call? If this is just a temporary inconsistency, and the long term solution is to map
2000 Aug 27
2
Problems supporting rint.
I am coding with vorbis using mingw32 (g++ for win32 without the cygwin.dll dependency). mingw32's math library does not support rint and I can't find a replacement so I have tried the following: Use Cygwin to execute ./configure. Then: (1) "make" with Cygwin - ok. Cygwin supports rint. I encode my Aerosmith's "Get A Grip" .wav from the CD to .ogg with