Displaying 20 results from an estimated 1931 matches for "constrain".
Did you mean:
constraint
2019 Aug 20
3
Floating point operations with specific rounding and exception properties
Hi all,
During the review of https://reviews.llvm.org/D65997 an issue was revealed,
which relates to the decision of how compiler should represents constrained
floating point operations.
If a floating point operation requires rounding mode or exception behavior
different from the default, it should be represented by constrained
intrinsic (
http://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics).
An important point is that according to...
2019 Aug 21
2
Floating point operations with specific rounding and exception properties
...MFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=O_4M49EtSpZ_-BQYeigzGv0P4__noMcSu2RYEjS1vKs&m=fTfAlQ0FHnQez3xiw8VnBL1XaxmBqn_-WD5E0mh4GrY&s=muQ0CzykdJ9Nhg0UshJTnEQXPSKHdFGptZXwFvVD2l0&e=>
>> an issue was revealed, which relates to the decision of how compiler should
>> represents constrained floating point operations.
>>
>> If a floating point operation requires rounding mode or exception
>> behavior different from the default, it should be represented by
>> constrained intrinsic (
>> http://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsic...
2020 Jan 18
5
Combining fast math flags with constrained intrinsics
...there-is-a-pragma and there-is-not-a-pragma cases in some fundamental way.
>
> 2. I'm inclined to go with your choice (b) above because I think that we should treat these concepts as orthogonal
Agreed.
> (to the extent that is reasonable: by design, we don't want to reassociate constrained operations, so that flag just might have on effect on those intrinsics). This lets the later optimization passes decide how to treat the various combinations of flags and intrinsics (just as with all other intrinsics that might be present).
I think I agree, but this needs clarification. My view...
2020 Jan 18
2
Combining fast math flags with constrained intrinsics
Hi all,
A question came up in a code review (https://reviews.llvm.org/D72820) about whether or not to allow fast-math flags to be applied to constrained floating point intrinsics (http://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics). This has come up several times before, but I don't think we've ever made a decision about it.
By default, the optimizer assumes that floating point operations have no side effects and use...
2020 Mar 03
2
Should rint and nearbyint be always constrained?
...implements IEEE-754 operation
`roundToIntegralTiesToEven`. When corresponding intrinsic will be
implemented (I am working on such patch), llvm.rint and llvm.nearbyint will
identical to llvm.roundeven in default environment and both can be dropped.
We'll end up with a funny situation, there are constrained intrinsics
(experimental!) but not corresponding 'usual' intrinsics. This demonstrates
that splitting an operation into constrained and non-constrained variants
does not work in the case of `rint` and `nearbyint`.
As for the target-specific intrinsics, you are correct that we need a plan...
2007 Oct 11
1
constraining correlations
Hello,
I've searched for an answer to no avail. I am wondering if anyone
knows how to constrain certain correlations to be equal. I have family
data with 2 twins per family plus up to 2 siblings. I would like to
somehow constrain all the sibling correlations (twin-sib and sib-sib)
to be the same while allowing the twin-twin correlation to be
different. Here is some simulated code:
set.seed(5...
2020 Mar 03
5
Should rint and nearbyint be always constrained?
...tions. You can't have
> static rounding with exceptions.
>
> We're also talking about making the vector predicated floating point
> intrinsics that Simon Moll is working on support both strict and non-strict
> using operand bundles. So you're right we could probably merge constrained
> and non-constrained versions of the existing intrinsics.
>
> 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
> roun...
2020 Sep 09
3
constrained cosine rounding mode behavior
Hi:
I am trying to implement interval arithmetic through llvm. I have a problem with the rounding mode with llvm.experimental.constrained.cos
I have two pieces of codes:
; Function Attrs: norecurse nounwind readnone ssp uwtable
define double @cosine_down(double returned) local_unnamed_addr #0 {
; call the llvm intrinsic to perform downward cosine
%2 = call double @llvm.experimental.constrained.cos(double %0, metadata !"r...
2020 Mar 02
2
Should rint and nearbyint be always constrained?
...nt to continue using the current encoding which tells the processor to use the current rounding mode. For other targets (including cases where x86 is forced to use x87 instructions), it may be much easier to leave this at the discretion of the backend.
Also, we should take care to document the non-constrained forms of these intrinsics in a way that makes clear that we are “assuming” and not requiring that the operation has no side effects. For the constrained version of nearbyint, we will require that the inexact exception is not raised (to be consistent with iEEE 754-2019’s roundToIntegral operations...
2010 Jul 07
4
constrained optimization
Dear list,
The task view on optimization does not reference a package for non linear
constrained optimization problems. Stefan Theussl told me to look at the
Rsolnp package, but unfortunately it is not very clear what method is R
ported. (The authors ported the matlab code of Yinyu Ye
http://www.stanford.edu/~yyye/ <http://www.stanford.edu/%7Eyyye/>)
Currently I'm looking for an i...
2005 Jun 08
1
Bounding or constraining parameters in non-linear regressions
...empting to fit a non-linear model to some measured data. One term in
the model contains a square-root, but in the course of regression, this term
turns negative and an error occurs. I started using Micrsoft's Excel Solver,
and then I turned to NIST's Datplot statistical package. I can constrain in
Solver, but it violates those constraints. :) Dataplot does not have the
capability to constrain parameters.
Does R have the capability to constrain or bound parameters in non-linear
regressions?
Thanks,
Mark Davis
2010 Oct 31
2
Constrained Regression
Hello everyone,
I have 3 variables Y, X1 and X2. Each variables lies between 0 and 1. I want
to do a constrained regression such that a>0 and (1-a) >0
for the model:
Y = a*X1 + (1-a)*X2
I tried the help on the constrained regression in R but I concede that it
was not helpful.
Any help is greatly appreciated
--
Thanks,
Jim.
[[alternative HTML version deleted]]
2020 Mar 02
2
Should rint and nearbyint be always constrained?
...` can be used instead. We could use more general
intrinsics in all cases, as the special case of default environment is not
of practical interest.
There is another reason for special handling. Set of intrinsics includes
things like `x86_sse_cvtss2si`. It is unlikely that all of them eventually
get constrained counterpart. It looks more natural that such intrinsics are
defined as accessing FP environment and can be optimized if the latter is
default. These two intrinsics could be a good model for such cases. IIUC,
splitting entities into constrained or non-constrained is a temporary
solution, ideally t...
2007 May 10
2
Nonlinear constrains with optim
Dear All
I am dealing at the moment with optimization problems with nonlinear
constraints. Regenoud is quite apt to solve that kind of problems, but
the precision of the optimal values for the parameters is sometimes
far from what I need. Optim seems to be more precise, but it can only
accept box-constrained optimization problems. I read in the list
archives that optim can also be use...
2019 Jun 17
2
Constrained integer DIV (WAS: Re: Planned change to IR semantics: constant expressions never have undefined behavior)
This is fundamentally different than the problems we’re trying to handle with the constrained FP intrinsics. The constrained FP intrinsics were necessary because LLVM IR otherwise assumes that FP instructions do not have side effects. In the case of integer divide-by-zero, the optimizer generally recognizes this as a possibility and avoids introducing it (through speculation, for instance...
2009 May 27
1
Constrained fits: y~a+b*x-c*x^2, with a,b,c >=0
I wonder whether R has methods for constrained fitting of linear models.
I am trying fm<-lm(y~x+I(x^2), data=dat) which most of the time gives
indeed the coefficients of an inverted parabola. I know in advance that
it has to be an inverted parabola with the maximum constrained to
positive (or zero) values of x.
The help pages for lm do n...
2009 May 23
1
Constraining linear regression model
Hi All,
I have two questions:
I am computing a linear regression model with 0 as Intercept.
Well, I would like the sum of my predicted values be equal to a constant
and therefore analyze if my coefficients are significatively different
using or not this constraint.
Does anyone know how I can constrain my model in a such way?
Here is the code:
data<-read.table ("input.txt", header=T, dec=".", sep="\t"); attach(data)
lm <-lm(pop ~ ag + sav + mf -1, data=data)
pred <- predict(lm)
sum(pred)
So I want to constrain my su...
2006 Sep 27
2
Constrained OLS regression
Hello R helpers,
I am trying to do a linear OLS regression of y on two variables x1 and
x2. I want to constrain the coefficients of x1 and x2 to sum up to 1.
and therefore run a constrained OLS. Can anybody help with this? (I have
seen some answers to similar questions but it was not clear to me what I
need to do) - I have tried the lm function with offset but I must not
have used it properly.
Thanks,
Spyro...
2020 Sep 03
3
using experimental intrinsics failed
Hi:
Sorry I need to send email directly. I am new to llvm and trying to write interval arithmetic, which requires changing rounding mode during computation.
The document I found https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics, seems to be doing the trick. Here is the piece of code that I did:
%5 = call double @llvm.experimental.constrained.fadd(double %0, double %2, metadata !"round.downward", metadata !"fpexcept.ignore")
It is taking the first and third argument and add...
2019 Feb 21
2
[RFC] Vector Predication
...IR support is the most reasonable way to get correctness and
performance. How should we translate this to get predicated
instructions out?
for (int i=...) {
if( fabs(c[i]) > epsilon) {
a[i] = b[i]/c[i];
}
else {
a[i] = 0;
}
}
We can't use select even with constrained intrinsics, because the
constrained intrinsics only tell the optimizer they can't be speculated.
This is not a legal translation:
%cond = fabs(c[i]) > epsilon
%temp = select %cond,
llvm.experimental.constrained.fdiv(b[i], c[i], tonearest, maytrap),
0
store a[i], %temp
Accor...