{"id":18009043,"url":"https://github.com/neoblizz/hip_template","last_synced_at":"2025-03-26T13:31:45.771Z","repository":{"id":89252416,"uuid":"596643395","full_name":"neoblizz/HIP_template","owner":"neoblizz","description":"🖤 Template for starting HIP/C++ project using CMake with Github Action for CI.","archived":false,"fork":false,"pushed_at":"2023-02-03T02:14:33.000Z","size":27,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T22:22:01.628Z","etag":null,"topics":["cpp","cuda","cuda-programming","gpgpu","gpu","hip","rocm","template-project","template-repository"],"latest_commit_sha":null,"homepage":"","language":"CMake","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/neoblizz.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}},"created_at":"2023-02-02T16:22:30.000Z","updated_at":"2025-01-28T11:05:33.000Z","dependencies_parsed_at":"2024-01-16T18:58:45.746Z","dependency_job_id":"7ea0f00f-d087-4ba1-a39f-43f425c39172","html_url":"https://github.com/neoblizz/HIP_template","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoblizz%2FHIP_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoblizz%2FHIP_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoblizz%2FHIP_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoblizz%2FHIP_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoblizz","download_url":"https://codeload.github.com/neoblizz/HIP_template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245662930,"owners_count":20652100,"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":["cpp","cuda","cuda-programming","gpgpu","gpu","hip","rocm","template-project","template-repository"],"created_at":"2024-10-30T02:08:36.043Z","updated_at":"2025-03-26T13:31:45.168Z","avatar_url":"https://github.com/neoblizz.png","language":"CMake","readme":"# HIP Template [![ubuntu-focal](https://github.com/neoblizz/HIP_template/actions/workflows/ubuntu-focal.yml/badge.svg)](https://github.com/neoblizz/HIP_template/actions/workflows/ubuntu-focal.yml) [![ubuntu-jammy](https://github.com/neoblizz/HIP_template/actions/workflows/ubuntu-jammy.yml/badge.svg)](https://github.com/neoblizz/HIP_template/actions/workflows/ubuntu-jammy.yml)\n\nA template inspired by [@Ahdhn](https://github.com/Ahdhn)'s [CUDATemplate](https://github.com/Ahdhn/CUDATemplate) to start a new HIP project using CMake on Linux. Note when HIP/ROCm is publicly made available on Windows and Windows Subsystem for Linux (WSL), I will update this template to reflect the support for that as well. This template provides a simple, easy-to-modify CMake file, with GitHub Actions pre-configured to build check-ins and test if the compilation succeeds.\n\n## Installing Requirements\n- `cmake` required minimum version 2.24.x:\n```bash\npython3 -m pip install 'cmake==3.24.0'\n```\n- ROCm/HIP recommended version 5.4.x or above. Installation instructions vary, please refer to the [How to Install ROCm](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.2/page/How_to_Install_ROCm.html). The following is an example of how to install ROCm 5.4.x, HIP and some useful libraries on an Ubuntu 22.04 system using `apt-get`:\n```bash\nsudo apt-get update\ncurl -fsSL https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm-keyring.gpg\necho 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rocm-keyring.gpg] https://repo.radeon.com/rocm/apt/5.4 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list\necho -e 'Package: *\\nPin: release o=repo.radeon.com\\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600\n```\n\n```\nsudo apt-get update\nsudo apt-get install -y rocm-dev hip-dev rocm-libs\n```\n\n## Configure Environment\n- Export `$PATH` for ROCm and HIP libraries by adding the following to the end of your `~\\.bashrc` or `~\\.bash_profile` file in your home directory, and then perform `source ~\\.bashrc`. This is also illustrated in the installation of ROCm/HIP guide.\n```bash\n# Export ROCM/HIP Paths\nexport ROCM_PATH=/opt/rocm\nexport HIP_PATH=/opt/rocm/hip\nexport PATH=$HOME/.local/bin:${ROCM_PATH}/bin:${HIP_PATH}/bin:$PATH\nexport LD_LIBRARY_PATH=${ROCM_PATH}:${ROCM_PATH}/lib:${HIP_PATH}/lib:$LD_LIBRARY_PATH\n```\n\n## Getting Started\n\nAssuming you have the requirements installed and configured, simply fetch the project and build using CMake to get started!\n\n```bash\ngit clone https://github.com/neoblizz/HIP_template.git\ncd HIP_template\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake -j$(nproc)\n```\n\nThis will generate the example executable in `bin` directory under `build`, which can be executed like so:\n```\n./bin/hello\n```\n\n## Directory Structure\nThis template follows a standard C++ library's directory structure. Important directories are `library/src` for source files, `library/include` for library includes, `examples` for a simple \"hello world\" example that uses the library, and `unittests` for GoogleTests based testing framework.\n```\n.\n├── CMakeLists.txt\n├── README.md\n├── cmake\n├── examples\n├── externals\n├── library\n│   ├── include\n│   └── src\n├── scripts\n│   └── format.sh\n└── unittests\n```\n\n## License \u0026 Maintainer\n- This work is **Unlicensed**. A license with no conditions whatsoever which dedicates works to the public domain. Unlicensed works, modifications, and larger works may be distributed under different terms and without source code.\n- Maintained by [Muhammad Osama](https://github.com/neoblizz) \\\u003cmuhammad.osama@amd.com\\\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoblizz%2Fhip_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoblizz%2Fhip_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoblizz%2Fhip_template/lists"}