{"id":23428284,"url":"https://github.com/jeronimosg/gpgpu-rs","last_synced_at":"2026-02-14T13:00:58.194Z","repository":{"id":43463383,"uuid":"395391878","full_name":"jeronimosg/gpgpu-rs","owner":"jeronimosg","description":"Simple experimental async GPGPU framework for Rust","archived":false,"fork":false,"pushed_at":"2024-03-21T12:42:53.000Z","size":1656,"stargazers_count":147,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2026-01-13T09:57:39.472Z","etag":null,"topics":["gpgpu","gpgpu-computing","gpu","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeronimosg.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}},"created_at":"2021-08-12T17:11:08.000Z","updated_at":"2025-12-16T19:01:13.000Z","dependencies_parsed_at":"2024-03-21T13:47:57.098Z","dependency_job_id":"46d1fe0d-26be-40c6-ae86-890657d42881","html_url":"https://github.com/jeronimosg/gpgpu-rs","commit_stats":{"total_commits":100,"total_committers":3,"mean_commits":"33.333333333333336","dds":"0.20999999999999996","last_synced_commit":"c33cd9eb54322949805c0753bb6a0166be1b2672"},"previous_names":["jeronimosg/gpgpu-rs","upsettingboy/gpgpu-rs"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jeronimosg/gpgpu-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimosg%2Fgpgpu-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimosg%2Fgpgpu-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimosg%2Fgpgpu-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimosg%2Fgpgpu-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeronimosg","download_url":"https://codeload.github.com/jeronimosg/gpgpu-rs/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeronimosg%2Fgpgpu-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29444018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T12:43:28.304Z","status":"ssl_error","status_checked_at":"2026-02-14T12:43:14.160Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["gpgpu","gpgpu-computing","gpu","rust"],"created_at":"2024-12-23T07:06:21.826Z","updated_at":"2026-02-14T13:00:58.139Z","avatar_url":"https://github.com/jeronimosg.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpgpu\n![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/UpsettingBoy/gpgpu-rs/ci.yml?branch=dev\u0026label=Actions\u0026style=flat-square)\n![Crates.io](https://img.shields.io/crates/l/gpgpu?style=flat-square)\n![Crates.io](https://img.shields.io/crates/v/gpgpu?style=flat-square)\n[![docs.rs](https://img.shields.io/static/v1?label=docs.rs\u0026message=read\u0026color=brightgreen\u0026style=flat-square)](https://docs.rs/gpgpu)\n\n\u003c!-- cargo-sync-readme start --\u003e\n\nAn experimental async GPU compute library based on [`wgpu`](https://github.com/gfx-rs/wgpu).\nIt is meant to be used alongside `wgpu` if desired.\n\nTo start using `gpgpu`, just create a [`Framework`](https://docs.rs/gpgpu/latest/gpgpu/struct.Framework.html) instance\nand follow the [examples](https://github.com/UpsettingBoy/gpgpu-rs/tree/dev/examples) in the main repository.\n\n# Example\nSmall program that multiplies 2 vectors A and B; and stores the\nresult in another vector C.\n## Rust program\n```rust\n    use gpgpu::*;\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Framework initialization\n    let fw = Framework::default();\n\n    // Original CPU data\n    let cpu_data = (0..10000).into_iter().collect::\u003cVec\u003cu32\u003e\u003e();\n\n    // GPU buffer creation\n    let buf_a = GpuBuffer::from_slice(\u0026fw, \u0026cpu_data);       // Input\n    let buf_b = GpuBuffer::from_slice(\u0026fw, \u0026cpu_data);       // Input\n    let buf_c = GpuBuffer::\u003cu32\u003e::with_capacity(\u0026fw, cpu_data.len() as u64);  // Output\n\n    // Shader load from SPIR-V binary file\n    let shader = Shader::from_spirv_file(\u0026fw, \"\u003cSPIR-V shader path\u003e\")?;\n    //  or from a WGSL source file\n    let shader = Shader::from_wgsl_file(\u0026fw, \"\u003cWGSL shader path\u003e\")?;    \n\n    // Descriptor set and program creation\n    let desc = DescriptorSet::default()\n        .bind_buffer(\u0026buf_a, GpuBufferUsage::ReadOnly)\n        .bind_buffer(\u0026buf_b, GpuBufferUsage::ReadOnly)\n        .bind_buffer(\u0026buf_c, GpuBufferUsage::ReadWrite);\n    let program = Program::new(\u0026shader, \"main\").add_descriptor_set(desc); // Entry point\n\n    // Kernel creation and enqueuing\n    Kernel::new(\u0026fw, program).enqueue(cpu_data.len() as u32, 1, 1); // Enqueuing, not very optimus 😅\n\n    let output = buf_c.read_vec_blocking()?;                        // Read back C from GPU\n    for (a, b) in cpu_data.into_iter().zip(output) {\n        assert_eq!(a.pow(2), b);\n    }\n\n    Ok(())\n}\n```\n\n## Shader program\nThe shader is written in [WGSL](https://gpuweb.github.io/gpuweb/wgsl/)\n```rust\n// Vector type definition. Used for both input and output\nstruct Vector {\n    data: array\u003cu32\u003e,\n}\n\n// A, B and C vectors\n@group(0) @binding(0) var\u003cstorage, read\u003e  a: Vector;\n@group(0) @binding(1) var\u003cstorage, read\u003e  b: Vector;\n@group(0) @binding(2) var\u003cstorage, read_write\u003e c: Vector;\n\n@compute @workgroup_size(1)\nfn main(@builtin(global_invocation_id) global_id: vec3\u003cu32\u003e) {\n    c.data[global_id.x] = a.data[global_id.x] * b.data[global_id.x];\n}\n```\n\n\n\u003c!-- cargo-sync-readme end --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeronimosg%2Fgpgpu-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeronimosg%2Fgpgpu-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeronimosg%2Fgpgpu-rs/lists"}