{"id":19768286,"url":"https://github.com/matiasvlevi/cuno","last_synced_at":"2026-04-15T11:34:43.741Z","repository":{"id":63093973,"uuid":"552721641","full_name":"matiasvlevi/Cuno","owner":"matiasvlevi","description":"Provides cuda bindings, kernel maps and device memory managment for Dannjs computations. [Experimental and not complete]","archived":false,"fork":false,"pushed_at":"2023-05-12T05:14:51.000Z","size":1565,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T00:31:08.105Z","etag":null,"topics":["addon","cuda","dann","dannjs","machine-learning","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matiasvlevi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-17T06:01:38.000Z","updated_at":"2022-11-26T05:30:39.000Z","dependencies_parsed_at":"2025-01-11T00:31:07.313Z","dependency_job_id":"6104258d-899f-4ae4-9c22-397235d64ff4","html_url":"https://github.com/matiasvlevi/Cuno","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matiasvlevi%2FCuno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matiasvlevi%2FCuno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matiasvlevi%2FCuno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matiasvlevi%2FCuno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matiasvlevi","download_url":"https://codeload.github.com/matiasvlevi/Cuno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241100496,"owners_count":19909731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["addon","cuda","dann","dannjs","machine-learning","nodejs"],"created_at":"2024-11-12T04:36:55.408Z","updated_at":"2026-04-15T11:34:38.714Z","avatar_url":"https://github.com/matiasvlevi.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cuno | Dannjs Cuda Addon\n\nA node addon for [Dannjs](https://dannjs.org). \n\nProvides cuda bindings, kernel maps and device memory managment for [Dannjs](https://dannjs.org) computations.\n\nThe goal is to speed up `Dann.prototype.backpropagate` by implementing a batch system (Instead of training case by case, we would train a whole dataset batch at once). The current alias `Dann.prototype.train` would also take in a different set of arguments, for batch/gpu training  \n\nA Cuda kernel map would compute all model changes throughout the batch. This is to reduce Memcpy's in the device's memory, thus help reduce training times along with the cuda parallelisation.\n\n\u003cbr/\u003e\n\n### Install\n\n```\ngit clone https://github.com/matiasvlevi/Cuno.git\n\ncd Cuno\ngit checkout dev\n\nnpm run init\n```\n\n\u003cbr/\u003e\n\n### Build\n\nThe build configuration may not be supported on your system, please submit `binding.gyp` changes to allow for a broader range of systems \n\nBuild CUDA source with node-gyp (nvcc)\n\n```\nnpm run build\n```\n\nBuild the Dannjs Source\n\n```\ncd Dann\nnpm run build:fix\n```\n\n(optional) run Dannjs unit tests\n\n```\ncd Dann\nnpm run test\n```\n\n\u003cbr/\u003e\n\n\n### Run/Test\n\nRun Javascript tests\n\n`benchmark` will create a `benchmark.csv` file containing performance results.\n\n```\nnpm run benchmark\nnpm run test\n```\n\n\u003cbr/\u003e\n\n### Performance\n\nHere is a logarithmic graph comparing matrix dot products with the Cuno Addon and with native JS \n\n![Image](https://i.ibb.co/gPfKKHn/Cuno-Log-Graph.png)\n\n\n\u003cbr/\u003e\n\n---\n\n# Current APIs\n\nThese are the current stable bindings, not the final target bindings \n\n## Nodejs API\n\n```js\nconst Cuno = require('cuno');\n\nconst a = [\n  [1, 3, 1],\n  [2, 4, 6],\n  [4, 1, 2],\n  [3, 2, 4]\n];\n\nconst b = [\n  [3, 2, 1, 3],\n  [5, 1, 1, 4],\n  [4, 9, 1, 2]\n];\n\nlet c = Cuno.dot(a, b);\nconsole.log(c);\n```\n\n## CPP API\n\nAllocate \u0026 Initialize a neural network\n\n```cpp\nconst int LENGTH = 5\nconst int ARCH[LENGTH] = { \n  32 * 32 * 3,\n  32 * 32,\n  24 * 24,\n  16 * 16,\n  10\n};\n\n// Allocate Model\nCuno::DeviceDann\u003cdouble\u003e *nn = new Cuno::DeviceDann(ARCH, LENGTH);\n\n// Memory transfer\nnn-\u003etoDevice(\n  // * weights, biases, layers, errors, gradients  * //\n);\n\n// Feed Forward \ndouble inputs[ARCH[0]] = {};\nCuno::Wrappers::ffw(nn, inputs);\n\n\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatiasvlevi%2Fcuno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatiasvlevi%2Fcuno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatiasvlevi%2Fcuno/lists"}