{"id":22819601,"url":"https://github.com/martenjostmann/opencl-matrix-multiplication","last_synced_at":"2025-03-30T23:14:07.678Z","repository":{"id":169976660,"uuid":"627937282","full_name":"martenjostmann/opencl-matrix-multiplication","owner":"martenjostmann","description":"Matrix Multiplication Optimizations using the OpenCL library","archived":false,"fork":false,"pushed_at":"2023-06-02T08:26:07.000Z","size":309,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-06T04:41:27.666Z","etag":null,"topics":["gpu","matrix-multiplication","opencl","parallel-programming"],"latest_commit_sha":null,"homepage":"","language":"C++","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/martenjostmann.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":"2023-04-14T14:27:16.000Z","updated_at":"2023-06-02T08:43:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"54044681-b376-49fc-bc53-57a1d97e87da","html_url":"https://github.com/martenjostmann/opencl-matrix-multiplication","commit_stats":null,"previous_names":["martenjostmann/opencl-matrix-multiplication"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenjostmann%2Fopencl-matrix-multiplication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenjostmann%2Fopencl-matrix-multiplication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenjostmann%2Fopencl-matrix-multiplication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenjostmann%2Fopencl-matrix-multiplication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martenjostmann","download_url":"https://codeload.github.com/martenjostmann/opencl-matrix-multiplication/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390872,"owners_count":20769478,"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":["gpu","matrix-multiplication","opencl","parallel-programming"],"created_at":"2024-12-12T15:13:15.753Z","updated_at":"2025-03-30T23:14:07.672Z","avatar_url":"https://github.com/martenjostmann.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matrix Multiplication using OpenCL\n\n## Execution instruction\n\nEvery optimization resides in a separate folder. In each folder there is Makefile that can be used to compile the specific optimization. If the library and include path cannot be found on the PATH the location can be specified with `INCLUDE_PATH` and `LIBRARY_PATH` as arguments in the Makefile:\n\n```\nmake INCLUDE_PATH=\u003cpath/to/include\u003e LIBRARY_PATH=\u003cpath/to/lib\u003e\n```\n\n## Arguments\n\nEvery matrix multiplication algorithm can be started with various command line arguments:\n\n```\n-x -\u003e Number of rows of Matrix A (default 1024)\n-y -\u003e Number of columns of Matrix A / rows of Matrix B (default 1024)\n-z -\u003e Number of columns of Matrix C (default 1024)\n```\n\nFor the matrix multiplication with the OpenCL interface additional argument can be defined:\n\n```\n-p -\u003e OpenCL platform id (default 0)\n-d -\u003e OpenCL device type CL_DEVICE_TYPE_GPU or CL_DEVICE_TYPE_CPU (default CL_DEVICE_TYPE_GPU)\n-k -\u003e Path to the kernel file (default kernel.cl)\n```\n\nIn some optimization folders a `properties.h` file is available to control specific parameters beyond the command line arguments\n\n## Results\n\n![](Results/seq_baseline.png)\n\n![](Results/all_gpu.png)\n\n## Project Structure\n\n```\n│ README.md\n│ run-seq.sh\n| run.sh\n│ Dockerfile\n│\n└───Parallel                -\u003e Code for parallel matrix multiplication\n|   |\n|   └───1. Baseline         -\u003e OpenCL Baseline implementation\n|   |   |   kernel.cl\n|   |   |   main.cpp\n|   |   |   Makefile\n|   |\n|   └───2. Shared Memory    -\u003e Shared Memory Optimization\n|   |   |   kernel.cl\n|   |   |   main.cpp\n|   |   |   Makefile\n|   |   |   properties.h\n|   |\n|   └───3. Enhanced Work    -\u003e Enhanced Work Optimization\n|   |   |   kernel.cl\n|   |   |   main.cpp\n|   |   |   Makefile\n|   |   |   properties.h\n|   |\n|   └───4. Vector           -\u003e Vector Optimization\n|   |   |   kernel.cl\n|   |   |   main.cpp\n|   |   |   Makefile\n|   |   |   properties.h\n|\n|\n└───Results\n|   |   analysis.ipynb      -\u003e Generation of graphics\n|   |   output_pdf          -\u003e graphics\n|\n└───Sequential              -\u003e Code for sequential matrix multiplication\n│   │   main.cpp            -\u003e General functions\n│   │   Makefile\n|\n|\n└───Utils                   -\u003e General functions for all implementations\n│   │   general.cpp         -\u003e General functions\n│   │   general.h\n|   |   matrix_init.cpp     -\u003e Initialize matrixes\n|   |   matrix_init.h\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenjostmann%2Fopencl-matrix-multiplication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartenjostmann%2Fopencl-matrix-multiplication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenjostmann%2Fopencl-matrix-multiplication/lists"}