<div dir="ltr">Hi Paul.<br>Thank you for getting back to me.<br><br>Let me explain why  I need it. You may find such a demand reasonable.<br>I need it to calculate SoftMax in a two-phase fashion.<br><br>Straightforward calculation of e^x leads to the overflow on a short-range interval, so a typical trip is to normalize exponential part by finding the maximum exponent value and subtracting the maximum value from the exponent, leading to the three-phase calculation of SoftMax.<br>However, it is possible to limit the exponent of the e^x to a relatively short range using this formula.<br> <img src="cid:ii_lwrj4dpb0" alt="New Bitmap image.bmp" width="562" height="113"><br><div>That leads to the two-phase algorithm for the calculation of SoftMax.</div><div>I suppose that other ML guys will find it helpful to use round vector operation in such cases.</div><div><br></div><div>I have implemented it using sign extraction using shit and conversation operations, but I would prefer to use intrinsics instead.</div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 29, 2024 at 1:20 AM Paul Sandoz <<a href="mailto:paul.sandoz@oracle.com" target="_blank">paul.sandoz@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Andrii,<br>
<br>
You were looking in the right place, and you could not find it because it does not exist :-)<br>
<br>
So far we have not encountered any demand, but it should be possible to add such support as long as we can be compatible with the behavior of Math.round. (We could also consider including compatible unary vector operations for Math.ciel and Math.floor). <br>
<br>
Paul.<br>
<br>
> On May 25, 2024, at 11:59 PM, Andrii Lomakin <<a href="mailto:andrii0lomakin@gmail.com" target="_blank">andrii0lomakin@gmail.com</a>> wrote:<br>
> <br>
> Hi guys.<br>
> <br>
> I suppose I missed something, but I can not find roundp operation in FloatVector API.<br>
> I have searched over usage of unary() method but again can not find it, though I found neg and abs. <br>
> <br>
> Could you point me in the right direction?<br>
<br>
</blockquote></div>