{"id":13711518,"url":"https://github.com/gwenzek/cudaz","last_synced_at":"2026-01-24T03:25:04.178Z","repository":{"id":80062749,"uuid":"409890981","full_name":"gwenzek/cudaz","owner":"gwenzek","description":"Toy Cuda wrapper for Zig","archived":false,"fork":false,"pushed_at":"2024-07-04T10:03:38.000Z","size":2983,"stargazers_count":57,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-03T00:09:17.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gwenzek.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-09-24T08:32:54.000Z","updated_at":"2025-03-06T08:13:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"3be2c710-6691-4157-ae82-49c708bedbfa","html_url":"https://github.com/gwenzek/cudaz","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/gwenzek%2Fcudaz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwenzek%2Fcudaz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwenzek%2Fcudaz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwenzek%2Fcudaz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gwenzek","download_url":"https://codeload.github.com/gwenzek/cudaz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252765067,"owners_count":21800791,"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":[],"created_at":"2024-08-02T23:01:09.028Z","updated_at":"2026-01-24T03:25:04.172Z","avatar_url":"https://github.com/gwenzek.png","language":"C","funding_links":[],"categories":["Multimedia \u0026 Graphics"],"sub_categories":["GPU Computing"],"readme":"# Cudaz\n\n## Overview\n\nThe main motivation for this project \nwas to complete the assignment of [Intro to Parallel Programming](https://classroom.udacity.com/courses/cs344)\nusing as little C++ as possible.\n\nThe project started in 2021 with Zig 0.7.0 and was in limbo\nuntil 2025 where I upgraded it to Zig 0.15.2 leveraging all the improvement the compiler and toolchain got int the meantime.\n\nCuda is a superset of C++ with custom annotation to distinguish between\ndevice (GPU) functions and host (CPU) functions.\nThey also have special variables for GPU thread IDs \nand special syntax to schedule a GPU function.\n\nYou're supposed to compile this Cuda code using `nvcc` NVidia proprietary compiler,\nto Nvidia PTX \"assembly\" format.\nNVCC creates complicated object containing the ptx and automotically load it\nwhen the executable/library is loaded.\n\nBut Zig has a LLVM backend that can also output `ptx`.\nWith `build.zig` we can control the full build magic done by `nvcc`\nand expose it in a more modular way to the user.\n\n## Project structure\n\nThis repo is divided in several parts:\n* `cuda.zig`: a wrapper around `cuda.h` the CPU part of Cuda.\n* `nvptx.zig`: PTX intrinsics that help write device code in Zig.\n* `build.zig`: contains code to compile the kernel into ptx, and expose it to CPU code.\n\n* `CS344` contains code for all the lesson and homework. **Not ported yet**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwenzek%2Fcudaz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgwenzek%2Fcudaz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwenzek%2Fcudaz/lists"}