{"id":28451926,"url":"https://github.com/doxakis/cosinesimilaritydistancesongpu","last_synced_at":"2026-04-13T08:32:09.569Z","repository":{"id":91103013,"uuid":"137304237","full_name":"doxakis/CosineSimilarityDistancesOnGpu","owner":"doxakis","description":"Compute cosine similarity distances for all combinations of the dataset on the gpu with CUDA","archived":false,"fork":false,"pushed_at":"2018-06-14T04:22:01.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-10T04:34:36.538Z","etag":null,"topics":["cuda"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doxakis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2018-06-14T04:00:58.000Z","updated_at":"2018-06-14T04:27:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8d43f91-60d8-4537-866d-9ba40a948184","html_url":"https://github.com/doxakis/CosineSimilarityDistancesOnGpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/doxakis/CosineSimilarityDistancesOnGpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FCosineSimilarityDistancesOnGpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FCosineSimilarityDistancesOnGpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FCosineSimilarityDistancesOnGpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FCosineSimilarityDistancesOnGpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doxakis","download_url":"https://codeload.github.com/doxakis/CosineSimilarityDistancesOnGpu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FCosineSimilarityDistancesOnGpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cuda"],"created_at":"2025-06-06T17:09:36.612Z","updated_at":"2026-04-13T08:32:09.549Z","avatar_url":"https://github.com/doxakis.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cosine similarity distances on GPU\nCompute cosine similarity distances for all combinations of the dataset on the gpu with CUDA\n\nThis was coded in c# with the library Alea GPU. A similar logic could be reuse in any language (Python, c++, etc.)\n\nI plan to use it as a preprocessing step before running HDBSCAN (text clustering in a unsupervised way).\nCalculating distances could make the algorithm faster and can be a way to scale out. (No need to use PCA to reduce the complexity)\nThis is more like a proof of concept.\n\nPlease note that the first time the kernel function run, a JIT compilation occur. It takes about 1 sec.\nI would recommend to run it when starting your application if possible to minimize the impact on perceived performance.\n\n# Future works\n- Batch processing (if the array is too large, it does not work. We got : System.Exception: '[CUDAError] CUDA_ERROR_OUT_OF_MEMORY')\n- Find optimal parameter (determine if it's better to use CPU only)\n\n# Copyright and license\nCode released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoxakis%2Fcosinesimilaritydistancesongpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoxakis%2Fcosinesimilaritydistancesongpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoxakis%2Fcosinesimilaritydistancesongpu/lists"}