Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openblas for ios failing with libopenblas.a #571

Closed
johanvos opened this issue Jun 2, 2018 · 5 comments
Closed

openblas for ios failing with libopenblas.a #571

johanvos opened this issue Jun 2, 2018 · 5 comments
Labels

Comments

@johanvos
Copy link
Contributor

johanvos commented Jun 2, 2018

When bundling an application with the accelerate framework, Nd4j and the blas calls work fine. When bundling with libopenblas.a, there are incorrect results. For example, the resulting NDArray only contains 0 elements.
INDArray unin = Nd4j.create(1, 2);
unin.putScalar(0, 0d);
unin.putScalar(1, 1d);
INDArray unw = Nd4j.create(2,3);
unw.putScalar(0, 1d);
unw.putScalar(1, 2d);
unw.putScalar(2, 1d);
unw.putScalar(3, 3d);
unw.putScalar(4, 1d);
unw.putScalar(5, 4d);
INDArray unret = Nd4j.createUninitialized(1,3);
unin.mmuli(unw,unret);

        System.out.println("UNIN = "+unin);
        System.out.println("UNW = "+unw);
        System.out.println("UNRET = "+unret);
@saudet
Copy link
Member

saudet commented Jun 2, 2018

Does this happen with ios-arm64 or ios-x86_64, or both?

@saudet saudet added the bug label Jun 2, 2018
@johanvos
Copy link
Contributor Author

johanvos commented Jun 2, 2018

This exact test fails with ios-x86_64
The results of a complex mnist app on ios-arm64 were incorrect, but I didn't check this particular test so in theory that might be caused by something else.

@saudet
Copy link
Member

saudet commented Jun 2, 2018

It's strange that Xcode would have problems with x86 assembly. In any case, the optimized kernels for ARM64 were already disabled as the assembler just doesn't work with the optimized kernels, so that should be OK.

saudet added a commit that referenced this issue Jun 2, 2018
@saudet
Copy link
Member

saudet commented Jun 2, 2018

I've made the changes in the latest commit disabling optimizations in assembly language. Let me know if you have the chance to try it out with version 0.3.0-1.4.2-SNAPSHOT. Thanks!

@saudet
Copy link
Member

saudet commented Jul 18, 2018

The changes are included in version 1.4.2. Thanks for reporting and let me know if you still see any issues related to that!

@saudet saudet closed this as completed Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants