Displaying 20 results from an estimated 1354 matches for "constrained".

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...

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-p...

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 is...

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 e...

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
&...

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
> rounde...

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 !"rou...

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)...

2003 Oct 31

1

constrained nonlinear optimisation in R?

Hello. I have searched the archives but have not found anything. I
need to solve a constrained optimisation problem for a nonlinear
function (“maximum entropy formalism”). Specifically,
Optimise: -1*SUM(p_ilog(p_i)) for a vector p_i of probabilities,
conditional on a series of constraints of the form:
SUM(T_i*p_i)=k_i for given values of T_i and k_i (these are
constraints on expectat...

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 the...

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)....

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 addin...

2019 Feb 21

2

[RFC] Vector Predication

...upport 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
Accordi...

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,
Spyros

2020 Sep 04

2

using experimental intrinsics failed

Hi Craig:
I tried that, now the function is like this:
; Function Attrs: norecurse nounwind readnone ssp uwtable
define { double, double } @add(double, double, double, double) local_unnamed_addr #0 {
%5 = call double @llvm.experimental.constrained.fadd(double %0, double %2, metadata !"round.downward", metadata !"fpexcept.ignore")
%6 = fadd double %1, %3
%7 = insertvalue { double, double } undef, double %5, 0
%8 = insertvalue { double, double } %7, double %6, 1
ret { double, double } %8
}
declare double @llvm.expe...

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 operations that access FP environment. Non-constrained intrinsics
are considered as working solely in default FP environment.
This a...

2019 Nov 14

7

RFC: token arguments and operand bundles

Hello everyone,
I've just uploaded a patch (https://reviews.llvm.org/D70261) to introduce a could of new token types to be used with constrained floating point intrinsics and, optionally, vector predicated intrinsics. These intrinsics may not be of interest to many of you, but I have a more general question.
I would like some general feedback on the way I am proposing to use token arguments and operand bundles. I have an incomplete underst...

2019 Oct 01

7

[RFC] Using basic block attributes to implement non-default floating point environment

...odification
of global state by writing into some register. It presents a difficulty for
implementation as a floating point instruction must not be move to code
which executes with different floating point state. To prevent from such
moves, the current solution represents FP operations with special
(constrained) instructions, which do not participate in optimizations (
http://lists.llvm.org/pipermail/cfe-dev/2017-August/055325.html). It is
important that the constrained FP operations must be used everywhere in
entire function including inlined calls, if they are used in some part o...

2018 Sep 11

2

[FPEnv] FNEG instruction

Which exactly was the plan?
Add a new, regular instruction?
Add a new constrained math intrinsic?
Both?
Andrew Kaylor made a good point here:
* As I said, all LLVM IR FP instructions are //assumed// to have no side effects. I'm not sure we want an instruction that goes beyond this to be //defined// as having no side effects. It adds a c...

2006 Jun 05

1

Constrained regression

Hi,
I would like to run a constrained OLS, with the following constraints:
1. sum of coefficients must be 1
2. all the coefficients have to be positive.
Is there an eas way to specify that in R
Thank you,
Daniel Bogod
dbogod@gmail.com
[[alternative HTML version deleted]]