facebookresearch / shumai

Fast Differentiable Tensor Library in JavaScript and TypeScript with Bun + Flashlight
https://facebookresearch.github.io/shumai
MIT License
1.14k stars 26 forks source link

shumai was unable to load backing libraries #146

Open AmitPress opened 1 year ago

AmitPress commented 1 year ago

Os: PopOS

Nvidia Driver: 11.6

I have already installed the arrayfire (as suggested) but it shows the below error ,


41 |     console.log(`warning: couldn't load ${file} (${error}), falling back...`)
42 |   }
43 | }
44 | 
45 | if (!fl) {
46 |   throw new Error(`shumai was unable to load backing libraries!
            ^
error: shumai was unable to load backing libraries!
  Make sure a valid tensor backend (e.g. ArrayFire) is installed by running,
  for example:

    sudo apt install arrayfire-cuda3-cuda-11-6

  or see the ArrayFire documentation
  (https://github.com/arrayfire/arrayfire/wiki/Getting-ArrayFire)
  for installing on your OS / distribution.

  If you're still having trouble, please create an issue
  (https://github.com/facebookresearch/shumai/issues)```
jacobkahn commented 1 year ago

@AmitPress how did you install Shumai? If from source, have you run bun install / npm install with the clone?

Otherwise, can you compile the dlopen example in .circleci/dlopen.cpp (g++ -o dlopen dlopen.cpp -ldl), then call that with an absolute path to the libflashlight found in the node_modules directory after you've installed? (e.g. dlopen $HOME/shumai/node_modules/shumai/libflashlight.so) and paste the output?

AmitPress commented 1 year ago

@jacobkahn I have installed it with bun add @shumai/shumai... Do you have a community IRC or discord for quick chat?

AmitPress commented 1 year ago

@AmitPress how did you install Shumai? If from source, have you run bun install / npm install with the clone?

Otherwise, can you compile the dlopen example in .circleci/dlopen.cpp (g++ -o dlopen dlopen.cpp -ldl), then call that with an absolute path to the libflashlight found in the node_modules directory after you've installed? (e.g. dlopen $HOME/shumai/node_modules/shumai/libflashlight.so) and paste the output?

There is no node_modules/shumai but there is node_modules/@shumai. And inside that folder there are two versions for flashlight one for cpu and other just I dont no.

And this is the output?

semaphore@pop-os:~/shumai$ ./dlopen ./node_modules/@shumai/linux_x64_shumai_flashlight_cpu/libflashlight.so.0
semaphore@pop-os:~/shumai$ 

I mean no output !

jacobkahn commented 1 year ago

@AmitPress if you echo "$?", that'll print the prior command's error code and tell you if dynamic libs were loaded properly.

cryptodeal commented 1 year ago

@jacobkahn I have installed it with bun add @shumai/shumai... Do you have a community IRC or discord for quick chat?

Here's the link to our Discord if you're still experiencing issues with this: https://discord.gg/HfKGtUda