jblas-project / jblas

Linear Algebra for Java
http://jblas.org
BSD 3-Clause "New" or "Revised" License
590 stars 149 forks source link

mat-mul error on an M3 #138

Open guillaumeguy opened 7 months ago

guillaumeguy commented 7 months ago

Thanks for all of your great work!

I was exploring the library and I got some functions working but mat mul seems to fail on Mac;

Versions:

package org.example

import org.jblas.FloatMatrix

fun main() {
    println("Hello World!")
    var N = 100;
    var rotation = FloatMatrix.rand(N,N);
    var vector = FloatMatrix.rand(N,N);

    var g = rotation.mmul(vector);

}

Error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void org.jblas.NativeBlas.sgemm(char, char, int, int, int, float, float[], int, int, float[], int, int, float, float[], int, int)'
    at org.jblas.NativeBlas.sgemm(Native Method)
    at org.jblas.SimpleBlas.gemm(SimpleBlas.java:675)
    at org.jblas.FloatMatrix.mmuli(FloatMatrix.java:1781)
    at org.jblas.FloatMatrix.mmul(FloatMatrix.java:3138)
    at org.example.MainKt.main(Main.kt:12)
    at org.example.MainKt.main(Main.kt)
-- org.jblas INFO Deleting /var/folders/04/y960qb597k12fz20tcfxwmz40000gn/T/jblas15656002949808389317
mikiobraun commented 6 months ago

Hey Guillaume,

how did you use jblas? Did you download it as a dependency or were your building it yourself?