Coder Social home page Coder Social logo

Comments (8)

kortschak avatar kortschak commented on September 24, 2024

So it seems the beta of 0.0 in cblas gives 0.0 while in goblas (correctly according to IEEE-754) it gives NaN. What do we want to do here?

from matrix.

btracey avatar btracey commented on September 24, 2024

It seems like the reasonable thing is to do what the function says it
does. We should vet goblas though, as I had not considered this case
On Dec 31, 2014 11:10 PM, "Dan Kortschak" [email protected] wrote:

So it seems the beta of 0.0 in cblas gives 0.0 while in goblas (correctly
according to IEEE-754) it gives NaN. What do we want to do here?


Reply to this email directly or view it on GitHub
#64 (comment).

from matrix.

kortschak avatar kortschak commented on September 24, 2024

do what the function says it does

But what is this? IEEE-754 or intuitive. I think IEEE-754, but that makes it at odds with the cblas implementation.

from matrix.

jonlawlor avatar jonlawlor commented on September 24, 2024

This is actually quite disconcerting. Is it the same with all blas implementations? I've only tested it on Accelerate. If it is consistent in the cblas implementations, then we should probably adopt their convention, even if it seems wrong, to keep things consistent.

from matrix.

kortschak avatar kortschak commented on September 24, 2024

I'd like to understand more fully before we make a decision, though that does not block this PR.

from matrix.

btracey avatar btracey commented on September 24, 2024

The intuitive behavior (existing implementations aside) is to follow IEEE-754.

If cblas behavior a mistake, it's easy to see how it's made. Assignment is more efficient that multiplication, so just set it to zero rather than multiply by zero. This is present in the reference implementation. If it's a feature, then I could plausibly see it as a zeroing mechanism (having beta be zero is like the matrix doesn't exist). I guess that's fine, but it's unclear what the consequences are for the rest of the functions. Why would that be the case for beta and not alpha (which does preserve NaN). What about a function like Dtrmm where there is one constant that multiplies matrices on both sides? Does that act like a zero-ing zero or like a floating point zero? The consequences for following IEEE are much clearer, though I agree some broader discussion is needed before we decide what is best.

from matrix.

kortschak avatar kortschak commented on September 24, 2024

After discussion with mtj and gri the decision seems to be to have a quiet NaN, i.e. following the blas behaviour.

from matrix.

kortschak avatar kortschak commented on September 24, 2024

This was fixed in blas and with 9f4a22d here.

from matrix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.