search for: fp16

Displaying 20 results from an estimated 69 matches for "fp16".

Did you mean: f16
2011 Mar 21
2
[LLVMdev] [PATCH] OpenCL half support
On Mar 21, 2011, at 3:44 AM, Anton Lokhmotov wrote: >> Adding half float to LLVM IR is *only* reasonable if you have hardware >> that supports half float, or if you want to add softfloat operations >> for these. > Yes, our graphics hardware natively supports some fp16 arithmetic > operations. Ok. >> Just like C compilers need to know sizeof(long), sizeof(void*) and >> many many other target specific details, an OpenCL compiler would need >> to know whether to generate fp16 or not. > Yes, it's just another example of LLVM-IR non-po...
2011 Mar 22
1
[LLVMdev] [PATCH] OpenCL half support
On Mar 21, 2011, at 1:59 PM, Zhang, Chihong wrote: > Hi Chris, > > It is important for embedded/mobile computation to have efficient fp16 support, otherwise those users will suffer from the merging problem with their local LLVM with native fp16 type they add (locally). So we should either add full fp16 support as a basic floating point type or enhance the LLVM infrastructure to make floating point type as scalable as int type. As I&...
2011 Mar 21
0
[LLVMdev] [PATCH] OpenCL half support
Hi Chris, It is important for embedded/mobile computation to have efficient fp16 support, otherwise those users will suffer from the merging problem with their local LLVM with native fp16 type they add (locally). So we should either add full fp16 support as a basic floating point type or enhance the LLVM infrastructure to make floating point type as scalable as int type. -Chi...
2014 Jun 19
2
[LLVMdev] __fp16 suport in llvm back-end
Hi, all: I am trying to test half float point support in llvm, I found clang can generate bitcode for __fp16, while llc can't generate code for it, the error message is like this LLVM ERROR: Cannot select: 0x26a68e0: i16 = fp32_to_fp16 0x26a67d8 [ORD=2] [ID=4] 0x26a67d8: f32,ch = CopyFromReg 0x2693060, 0x26a66d0 [ORD=2] [ID=3] 0x26a66d0: f32 = Register %vreg1 [ID=1] In function: test Anyone kn...
2019 Sep 05
2
ARM vectorized fp16 support
Hi, I'm trying to compile half precision program for ARM, while it seems LLVM fails to automatically generate fused-multiply-add instructions for c += a * b. I'm wondering whether I did something wrong, if not, is it a missing feature that will be supported later? (I know there're fp16 FMLA intrinsics though) Test programs and outputs, $ clang -O3 -march=armv8.2-a+fp16fml -ffast-math -S -o- vfp32.c test_vfma_lane_f16: // @test_vfma_lane_f16 fmla v2.4s, v1.4s, v0.4s // fp32 is GOOD mov v0.16b, v2.16b...
2013 Jan 22
2
[LLVMdev] Half Float fp16 Native Support
...r f32 "add.s" and use the "add.h" what ever i tried llvm moved everything to the float registers and did add.s and not the half add.h is there any trick to do that? i tried a lot but with no luck -- View this message in context: http://llvm.1065342.n5.nabble.com/Half-Float-fp16-Native-Support-tp50665p54029.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2012 Nov 02
2
[LLVMdev] Half Float fp16 Native Support
hi all, i am trying to implement native support for fp16 in llvm-3.1 i have already used the opencl patch for clang so the IR that is generated is correct. i tried to add some code so the the fp16 type is handled correctly but no luck. We have a target that has native fp16 units and tried to run a simple program int main () { __fp16 a,b,c,d;...
2019 Sep 05
2
ARM vectorized fp16 support
..., Sep 4, 2019 at 11:19 PM Sjoerd Meijer <Sjoerd.Meijer at arm.com> wrote: > > Hi, > Which version of Clang are you using? I do get a "vfma.f16" with a recent trunk build. I haven't looked at older versions and when this landed, but we had an effort to plug the remaining fp16 holes not that long ago, so again hopefully a newer version will just work for you. > > Cheers, > Sjoerd. > ________________________________ > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Yizhi Liu via llvm-dev <llvm-dev at lists.llvm.org> > Sent: 0...
2013 Jan 22
2
[LLVMdev] Half Float fp16 Native Support
after a long time i managed to make a progress with this problem. i can store and load fp16 as i16 in to some registers and do an add instruction. the problem now is that this messes up the real i16 (short, unsigned short). i have def FADD_H : NemaCorePseudo< (outs HGR16:$fd), (ins HGR16:$fs, HGR16:$ft), "add.h\t$fd, $fs, $ft", [(set (i16 HGR16:$fd),(i16 (f32_to_f16 (f32 (...
2013 Jan 23
0
[LLVMdev] Half Float fp16 Native Support
...to use the fadd > for f32 "add.s" and use the "add.h" what ever i tried llvm moved everything > to the float registers and did add.s and not the half add.h It seems you do not understand the issue. Half floating poing operations can be done in two ways: 1. Storage-only (fp16 is used to store value, all the operations are performed on floats). For such f32 <-> f16 conversion the special intrinsic is used (which is lowered to native instruction on ARM NEON for example) 2. Native fp16. Note that for both mode *frontend* is involved, because in case of 1. it should...
2011 Mar 18
3
[LLVMdev] [PATCH] OpenCL half support
...at operations into full float operations. Doing this would cause all sorts of problems with constant folding being inconsistent etc. Adding half float to LLVM IR is *only* reasonable if you have hardware that supports half float, or if you want to add softfloat operations for these. If we have a fp16 datatype in the IR, code generation *must* codegen these to something that implements the correct fp16 semantics. C is not a portable language, and trying to make LLVM IR magically fix this is a bad approach. Just like C compilers need to know sizeof(long), sizeof(void*) and many many other targe...
2014 Jul 14
5
[LLVMdev] RFC: Do we still need @llvm.convert.to.fp16 and the reverse?
Hi all, What do people think of doing away with the @llvm.convert.to.fp16 and @llvm.convert.from.fp16 intrinsics, in favour of using "half" and fpext/fptrunc? [1] It looks like those intrinsics originally date from before "half" actually existed in LLVM, and of course the backends have grown up assuming that's what Clang will produce, so we'd...
2011 Mar 18
5
[LLVMdev] [PATCH] OpenCL half support
...at operations into full float operations. Doing this would cause all sorts of problems with constant folding being inconsistent etc. Adding half float to LLVM IR is *only* reasonable if you have hardware that supports half float, or if you want to add softfloat operations for these. If we have a fp16 datatype in the IR, code generation *must* codegen these to something that implements the correct fp16 semantics. C is not a portable language, and trying to make LLVM IR magically fix this is a bad approach. Just like C compilers need to know sizeof(long), sizeof(void*) and many many other targe...
2011 Apr 04
0
[LLVMdev] [PATCH] OpenCL half support
Chihong, I notice that IEEE-754-2008 does in fact define a 16-bit floating point standard now, does your processor conform to that standard, if so there should be no objection to adding fp16 to LLVM and you should have no problem using it, at least that's what I think Chris is trying to say (?). IEEE-754-2008 fp16: 1-bit sign, 5-bit exponent, 10-bit fraction largest ~~ 2^16 (65504), smallest ~~ 2^-14 (0.000,061). uses the same exponent interpretation as oth...
2012 Nov 02
0
[LLVMdev] Half Float fp16 Native Support
...failed. If you cross-reference this with the table in build/lib/Target/XXX/XXXGenDAGISel.inc you should be able to work out where things are going wrong. (There are comments giving what each original pattern was *below* the check that'll fail in each case). > As we are working on half float fp16 support in LLVM are there any plans to > support it on the main trunk ? As I sort of implied, it's mostly down to the targets implementing support now. The generic LLVM code doesn't need to do much with it. I suppose there could be parts of the DAG combiner that assume float/double or c...
2013 Jan 22
0
[LLVMdev] Half Float fp16 Native Support
...>; > > so i can have a half floating point add two half point variables and seems > to work fine. This does not look right. Note that you're matching f16_to_f32 intrinsics and friends. They are used for storage-only half FP stuff and you're trying to match them instead of native fp16. So, in short - you need to generate IR with proper fp16 arithmetics, not via storage-only wrappers. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
2017 Dec 04
2
[RFC] Half-Precision Support in the Arm Backends
Hi, I am working on C/C++ language support for the Armv8.2-A half-precision instructions. I've added support for _Float16 as a new source language type to Clang. _Float16 is a C11 extension type for which arithmetic is well defined, as opposed to e.g. __fp16 which is a storage-only type. I then fixed up the AArch64 backend, which was mostly straightforward: this involved making operations on f16 legal when FullFP16 is supported, thus avoiding promotions to f32. This enables generation of AArch64 FP16 instruction from C/C++. For AArch64, this work is fi...
2019 Sep 24
0
[PATCH AUTOSEL 5.3 54/87] drm/nouveau/kms/tu102-: disable input lut when input is already FP16
From: Ben Skeggs <bskeggs at redhat.com> [ Upstream commit 1e339ab2ac3c769c1b06b9fb7d532f8495ebc56d ] On Turing, an input LUT is required to transform inputs in fixed-point formats to FP16 for the internal display pipe. We provide an identity mapping whenever a window is enabled for this reason. HW has error checks to ensure when the input is already FP16, that the input LUT is also disabled. Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin <sa...
2019 Sep 24
0
[PATCH AUTOSEL 5.2 42/70] drm/nouveau/kms/tu102-: disable input lut when input is already FP16
From: Ben Skeggs <bskeggs at redhat.com> [ Upstream commit 1e339ab2ac3c769c1b06b9fb7d532f8495ebc56d ] On Turing, an input LUT is required to transform inputs in fixed-point formats to FP16 for the internal display pipe. We provide an identity mapping whenever a window is enabled for this reason. HW has error checks to ensure when the input is already FP16, that the input LUT is also disabled. Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin <sa...
2016 Mar 05
2
Adding 'v16f16' to tablegen
I have been able to adapt the main LLVM sources to work with vectors of 16 x FP16 values and I have introduced the 'v16f16' data type to CLang and LLVM, but I am stumped on how to get TableGen to recognise this type. At the moment I am trying to optimise the calling convention code, and whenever I refer to 'v16f16' I get a crash in TableGen (unrecognised type)....