Displaying 20 results from an estimated 9022 matches for "half".
2019 Dec 10
2
TypePromoteFloat loses intermediate rounding operations
For the following C code
__fp16 x, y, z, w;
void foo() {
x = y + z;
x = x + w;
}
clang produces IR that extends each operand to float and then truncates to
half before assigning to x. Like this
define dso_local void @foo() #0 !dbg !18 {
%1 = load half, half* @y, align 2, !dbg !21
%2 = fpext half %1 to float, !dbg !21
%3 = load half, half* @z, align 2, !dbg !22
%4 = fpext half %3 to float, !dbg !22
%5 = fadd float %2, %4, !dbg !23
%6 = fptrunc float %5 to...
2019 Dec 10
2
TypePromoteFloat loses intermediate rounding operations
...uivalent to “(_Float16)((float)a+(float)b)”. Not sure if this works for
> all f16 operations, and not sure how much we care if it doesn’t.
>
> There aren’t any calling convention implications here for ARM targets; not
> sure about other targets. On 32-bit ARM, clang explicitly coerces half
> values to a legal type. And half is always legal on AArch64 (unless you
> force soft-float, but at that point we don’t care).
>
>
>
> -Eli
>
>
>
> *From:* Craig Topper <craig.topper at gmail.com>
> *Sent:* Tuesday, December 10, 2019 12:18 PM
> *To:* llvm...
2005 Oct 10
0
compile problem on solaris10 x86
...dvapi32
-L../../dlls/kernel32 -lole32 -luser32 -lgdi32 -ladvapi32
-lkernel32 -L../../libs/wine -lwine -ldxguid -luuid -lSM
-lICE -lXext -lX11 -lsocket -lnsl -L../../libs/port
-lwine_port -lresolv -lsocket -lnsl
ddraw.ZNYvlZ.s: Assembler messages:
ddraw.ZNYvlZ.s:16: Error: unknown pseudo-op: `.half'
ddraw.ZNYvlZ.s:17: Error: unknown pseudo-op: `.half'
ddraw.ZNYvlZ.s:21: Error: unknown pseudo-op: `.half'
ddraw.ZNYvlZ.s:22: Error: unknown pseudo-op: `.half'
ddraw.ZNYvlZ.s:23: Error: unknown pseudo-op: `.half'
ddraw.ZNYvlZ.s:35: Error: unknown pseudo-op: `.half'
ddraw.ZNY...
2011 Feb 24
2
[LLVMdev] [PATCH] OpenCL half support
On Feb 23, 2011, at 10:01 AM, Anton Lokhmotov wrote:
> Please find attached Clang/LLVM patches for supporting 'half' - the
> half-precision floating-point type, which in particular is used in OpenCL C.
> Please review.
>
> Background and motivation. Whilst the half type is defined by IEEE 754-2008
> as storage only (i.e. no arithmetic is supposed to be performed on values of
> this type),...
2019 Jan 22
4
_Float16 support
I'd like to start a discussion about how clang supports _Float16 for target architectures that don't have direct support for 16-bit floating point arithmetic.
The current clang language extensions documentation says, "If half-precision instructions are unavailable, values will be promoted to single-precision, similar to the semantics of __fp16 except that the results will be stored in single-precision." This is somewhat vague (to me) as to what is meant by promotion of values, and the part about results being store...
2011 Apr 27
3
median and data frames
Here are some data frames:
df3.2 <- data.frame(1:3, 7:9)
df4.2 <- data.frame(1:4, 7:10)
df3.3 <- data.frame(1:3, 7:9, 10:12)
df4.3 <- data.frame(1:4, 7:10, 10:13)
df3.4 <- data.frame(1:3, 7:9, 10:12, 15:17)
df4.4 <- data.frame(1:4, 7:10, 10:13, 15:18)
Now here are some commands and their answers:
> median(df3.2)
[1] 2 8
> median(df4.2)
[1] 2.5 8.5
> median(df3.3)
2006 Feb 07
1
creating a certain type of matrix
...trix's dimension 10 by 2. If there are 50 variables the
dimension of the resulting matrix will be 50 by 6.
The arrangement of elements of this matrix is important to me and I can't
figure out how to arrange elements.
If I have 20 variables. The resulting matrix will be 20 by 3
The first half of first column of the matrix will be 1s. The all elements on
the second half of the first column of the matrix will be random numbers
coming from rnorm(1,0,1). The first half of the second column of the matrix
will be zeros. The first five elements of the second half of the second
column of th...
2015 Jun 10
2
[PATCH 4/5] gr/gf100: wait on bottom half of FE's pipeline
...On Mon, Jun 8, 2015 at 8:04 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> A naive question from someone who knows nothing of icmd or bundles... Would
>> it be better to wait for both bits to become 0 (I.e. 0x6)?
>
> My understanding is that a method reaching the bottom half implies it
> has passed to upper half (whatever these halfs are, I need to dig into
> the doc to completely figure it out), and thus that while waiting for
> both bits would do no harm, it would not do any good either.
>
> Waiting on the bottom half is what downstream does, so I thin...
2020 Feb 07
3
Why does FPBinOp(X, undef) -> NaN?
I came across this comment in SelectionDAG.cpp:
case ISD::FADD:
case ISD::FSUB:
case ISD::FMUL:
case ISD::FDIV:
case ISD::FREM:
// If both operands are undef, the result is undef. If 1 operand is undef,
// the result is NaN. This should match the behavior of the IR optimizer.
That isn't intuitive to me. I would have expected a binary FP
operation with one undef operand to
2011 Mar 18
5
[LLVMdev] [PATCH] OpenCL half support
...(to avoid breaking compatibility
> later).
Hi Anton, I'm sorry I don't have the patch anymore. Please resend. It is too late for new features in 2.9 though.
>> The last paragraph in section 9.6 says: "NOTE: Implementations may
>> perform floating-point operations on half scalar or vector data types
>> by converting the half values to single precision floating-point values
>> and performing the operation in single precision floating-point. In
>> this case, the implementation will use the half scalar or vector data
>> type as a storage only fo...
2011 Mar 08
1
problem in plot after calculating the derivative
Here is a test code to calculate the derivative of a curve in sliding
windows. I generated a linear example, and it should plot the derivative in
a straight line. But, it does not?!
--------------
x = seq(0,10,by=0.1)
y = x * 0.5 + 0.1
window=15;
half = floor( window/2)
x2 = half: (length(x)-half) ;
slope = half: (length(x)-half) ;
count = 1;
for( i in half: (length(x)-half) ) {
pos = (i-half):(i+half)
m = lm( y[pos] ~ x[pos])
x2[count] = x[i]
slope[count] = m$coeff[2];
count = count + 1;
}
plot( slope ~ x2, type='l' )...
2019 Jan 24
2
[cfe-dev] _Float16 support
...several issues here:
1. Should the front end be concerned with whether or not the IR that it is emitting can be translated into a well-defined IR?
2. How should the selection DAG handle data types whose representation isn't defined by the ABI we're targeting?
3. What should the ABI do with half-precision floats?
Working backward...
The third question here is obviously target specific. I've talked to HJ Lu about this, and he's working on an update to the x86 psABI. I believe that his eventual proposal will follow the lines of what you (Ahmed) suggested below, but I'm not comp...
2014 Jul 10
2
[LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!
...0To: Matt ArsenaultCC: yalong at multicorewareinc.com; Kevin Qin; llvmdevSubject: Re: [LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!Not sure if this can help, but
if you really really want to have minimal half float support on Mips,
then one thing you could try to do is to hack MipsISelLowering.cpp
adding rules to expand float-half conversion SDNodes into library
calls.
+ setOperationAction(ISD::FP16_TO_FP32, MVT::f32, Expand);
+ setOperationAction(ISD::FP32_TO_FP16, MVT::i32, Expand);
(The MVT::i3...
2007 Aug 10
0
half-logit and glm (again)
...omial( p_{ij}, N_{ij} )
I've generated data using this model, and I'd like to fit it. My data is
a data frame with 3 columns, "response" (0/1), "subject" (a factor), and
"condition" (another factor).
Here is my link definition:
#############################
halflogit=function(){
half.logit=function(mu) qlogis(2*mu-1)
half.logit.inv=function(eta) .5*plogis(eta)+.5
half.logit.deriv=function(eta) .5*(exp(eta/2)+exp(-eta/2))^-2
half.logit.inv.indicator=function(eta) TRUE
half.logit.indicator=function(mu) mu>.5 & mu<1
link <- "half.logit"...
2015 Jun 08
2
[PATCH 4/5] gr/gf100: wait on bottom half of FE's pipeline
A naive question from someone who knows nothing of icmd or bundles... Would
it be better to wait for both bits to become 0 (I.e. 0x6)?
On Jun 8, 2015 11:54 AM, "Alexandre Courbot" <acourbot at nvidia.com> wrote:
> When emitting the ICMD bundle, wait on the bottom half (bit 3 of the
> GR_STATUS register) instead of upper half (bit 2) to make sure methods
> are effectively emitted.
>
> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
> ---
> drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion...
2019 Jan 24
4
[cfe-dev] _Float16 support
...x86. Ahmed is right:
> AArch64 is fine, only a few ACLE intrinsics are missing. ARM has rough
> edges: scalar codegen should be mostly fine, vector codegen needs some
> more work.
>
> Implementation for AArch64 was mostly straightforward (it only has
> hard float ABI, and has half register/type support), but for ARM it
> was a huge pain to plumb f16 support because of different ABIs
> (hard/soft), different architecture extensions of FP and FP16 support,
> and the existence of another half-precision type with different
> semantics. Sounds like you're doin...
2012 Mar 28
5
plot points using circles filled half in red and half in blue.
I want to plot many points and want to use circles. The filling color
depends on variable a. if a=1, then not fill
if a=2 then fill with red, if a=3 then fill with blue, if a=4, fill
half with red and half with blue. Can anyone tell me how to plot the
case "a=4"? Thanks a lot
2014 Jul 09
4
[LLVMdev] Help!!!!Help!!!! " LLVM ERROR: Cannot select: 0x9fc9680: i32 = fp32_to_fp16 0x9fc0750 [ID=16] " problem!!!!!!!!!!!!!!!!!!
...Matt Arsenault wrote:
> On 07/09/2014 03:30 PM, yalong at multicorewareinc.com wrote:
>> Thank you Kevin!!!
>> If I use fptrunc and bitcast realise NEON vcvtt ( I can sure,
>> "fptrunc double %tmp to float" is right, but "fptrunc float %tmp to
>> half" is wrong). My target platform is MIPS. The command as following:
>>
>> NEON:
>> vcvtt.f16.f32 s2, s0
>>
>> llvm Code:
>>
>> %Vt_2 = load float* %VFP_s0, align 4
>> %Vt3_1 = fptrunc float %Vt_2 to half
>> %Vt4_1 = bitcast half %Vt3_1 to i1...
2006 Feb 07
1
(second round) creating a certain type of matrix
...l). I modified
Petr Pikal's code to a little
to meet my purpose.
I created a function to generate a matrix
generate.matrix<-function(n.variable)
{
mat<-matrix(0,n.variable,(n.variable/2)/5+1) #matrix of zeroes
dd<-dim(mat) # actual dimensions
mat[1:(dd[1]/2),1]<-1 #put 1 in first half of first column
mat[((dd[1]/2)+1):dd[1],1]<-rnorm(dd[1]/2,0,1) #put random numbers in
following part of the matrix column 1
mat[((dd[1]/2)+1):((dd[1]/2)+5),2]<-rnorm(5,0,1) #put random numbers in
column2
for (i in 3:(dd[2]))
{
length.of.rand.numbers <- 5
my.rand.num&l...
2009 Feb 18
2
how to randomly eliminate half the entries in a vector?
(sorry if this is a duplicate-problems with posting at my end)
----
Hello all,
I need some help with a nice R-idiomatic and efficient solution to a
small problem.
Essentially, I am trying to eliminate randomly half of the entries in
a vector that contains index values into some other vectors.
More details:
I am working with two strings/vectors of 0s and 1s. These will contain
about 200 elements (always the same number for both)
I want to:
1. determines the locations of where the two strings differ
--...