{"id":23886477,"url":"https://github.com/vantaa89/cuda-matmul","last_synced_at":"2026-06-15T02:33:09.729Z","repository":{"id":270179364,"uuid":"909539723","full_name":"vantaa89/cuda-matmul","owner":"vantaa89","description":"Cuda Matrix Multiplication Optimization","archived":false,"fork":false,"pushed_at":"2026-04-28T17:51:19.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-28T19:35:09.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/vantaa89.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-29T02:32:28.000Z","updated_at":"2026-04-28T17:51:23.000Z","dependencies_parsed_at":"2024-12-29T05:33:51.095Z","dependency_job_id":null,"html_url":"https://github.com/vantaa89/cuda-matmul","commit_stats":null,"previous_names":["vantaa89/cuda-matmul"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vantaa89/cuda-matmul","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantaa89%2Fcuda-matmul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantaa89%2Fcuda-matmul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantaa89%2Fcuda-matmul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantaa89%2Fcuda-matmul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vantaa89","download_url":"https://codeload.github.com/vantaa89/cuda-matmul/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vantaa89%2Fcuda-matmul/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34345577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-01-04T06:34:27.204Z","updated_at":"2026-06-15T02:33:09.723Z","avatar_url":"https://github.com/vantaa89.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUDA Matrix Multiplication Optimization\n\nThis repository implements six matrix multiplication kernels, with incremental optimizations applied to each. A detailed explanation of each kernel is available [here](https://seojune.org/post/cuda-matmul).\n\n*\tKernel 0: A naive implementation.\n*\tKernel 1: Adds block tiling and shared memory.\n*\tKernel 2: Introduces thread tiling, increasing the workload per thread.\n*\tKernel 3: Implements 2D thread tiling.\n*\tKernel 4: Leverages **tensor cores** for computation.\n*\tKernel 5: Combines tensor cores with warp tiling for further optimization.\n\nThe code was tested on NVIDIA GeForce RTX 3060 (CUDA Capability 8.6) with CUDA Driver 12.6\n\n## Usage\n1. Clone the repository to your local machine.\n   ```\n   git clone --depth=1 https://github.com/vantaa89/cuda-matmul/\n   ```\n1. Build the code using `make`.\n1. Run the program with `./main [-k kernel_num] M N K`. For example, `./main -k 5 4096 4096 4096` performs the matrix multiplication using kernel 5(tensor core + warp tiling) with matrix size $M=N=K=4096$.\n\n\n## Performance Results\n\nBelow is the throughput measured for $M=N=K=4096$ on an **NVIDIA GeForce RTX 3060**:\n\n![image](https://github.com/user-attachments/assets/c74671f7-7168-4941-92eb-87284df1ca62)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvantaa89%2Fcuda-matmul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvantaa89%2Fcuda-matmul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvantaa89%2Fcuda-matmul/lists"}