https://github.com/generic-matrix/node-js-cuda
Cuda Node JS binding using nan API with working example.
https://github.com/generic-matrix/node-js-cuda
binding cuda cuda-node node-js node-js-cuda nodejs nodejs-gpu nodejs-modules
Last synced: 5 months ago
JSON representation
Cuda Node JS binding using nan API with working example.
- Host: GitHub
- URL: https://github.com/generic-matrix/node-js-cuda
- Owner: generic-matrix
- License: mit
- Created: 2019-11-26T04:30:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-27T14:18:52.000Z (about 6 years ago)
- Last Synced: 2025-04-02T18:51:04.627Z (9 months ago)
- Topics: binding, cuda, cuda-node, node-js, node-js-cuda, nodejs, nodejs-gpu, nodejs-modules
- Language: Cuda
- Homepage:
- Size: 50.8 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node JS Cuda binding
cuda-node-js
## Prerequisites :
* **nvcc** must be installed. Check it using **nvcc —version**
* g++/cc to be installed.
* npm and node version 8.x +
* **nan v8** is needed which can be installed by npm.
## Working Example :
Here is the google Colab link
The test.cu you can get it this GitHub repo. in real time you can use your own **.cu** program .
**Google colab link:**
https://colab.research.google.com/drive/1ZQr696mvpMnHyImohrwwefxpgiNCAC-w
## Compile from the source and test:
```
git clone https://github.com/generic-matrix/node-js-cuda.git
cd node-js-cuda && npm install --unsafe-perm -g
cd node-js-cuda && node index.js
```
## Make sure to make it run we need to update the following directory as it may be machine specific :
```"sources": [ "main.cpp",'/content/node-js-cuda/test.o'],```
## And
```'library_dirs': [ '/usr/local/cuda/lib64']```
in the **binding.gyp**
## What’s next ?
**We will need to implement shared memory** between nan and **.cu** so the GPUs access will become more faster