{"id":18711278,"url":"https://github.com/rocm/clr","last_synced_at":"2026-04-02T11:46:47.562Z","repository":{"id":155820162,"uuid":"607945289","full_name":"ROCm/clr","owner":"ROCm","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-01T16:52:04.000Z","size":47358,"stargazers_count":162,"open_issues_count":15,"forks_count":83,"subscribers_count":15,"default_branch":"develop","last_synced_at":"2026-04-02T01:55:16.054Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ROCm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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":"2023-03-01T01:45:59.000Z","updated_at":"2026-04-01T16:52:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"f06e9e14-94df-465a-9627-c68212d9a41e","html_url":"https://github.com/ROCm/clr","commit_stats":null,"previous_names":["rocm/clr"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/ROCm/clr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fclr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fclr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fclr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fclr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ROCm","download_url":"https://codeload.github.com/ROCm/clr/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fclr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: 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":[],"created_at":"2024-11-07T12:38:22.175Z","updated_at":"2026-04-02T11:46:47.556Z","avatar_url":"https://github.com/ROCm.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AMD CLR - Compute Language Runtimes\n\nAMD CLR (Compute Language Runtime) is a component of the HIP runtime that contains the source code for AMD’s compute‑language runtimes `HIP` and `OpenCL™`.\n\n## Disclaimer\n\nThe information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions, and typographical errors. The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard version changes, new model and/or product releases, product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. Any computer system has risks of security vulnerabilities that cannot be completely prevented or mitigated.\n\nAMD assumes no obligation to update or otherwise correct or revise this information. However, AMD reserves the right to revise this information and to make changes from time to time to the content hereof without obligation of AMD to notify any person of such revisions or changes.\n\nTHIS INFORMATION IS PROVIDED \"AS IS.\" AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF AND ASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS, OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION. AMD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AMD BE LIABLE TO ANY PERSON FOR ANY RELIANCE, DIRECT, INDIRECT, SPECIAL, OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nAMD, the AMD Arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.\n\n© 2025 Advanced Micro Devices, Inc. All Rights Reserved.\n\nOpenCL™ is a registered trademark of Apple Inc.\n\n## Project Organization\n\n- `hipamd` - contains implementation of `HIP` language on AMD platform. It is hosted at [hipamd](./hipamd)\n- `opencl` - contains implementation of [OpenCL™](https://www.khronos.org/opencl/) on AMD platform. Now it is hosted at [opencl](./opencl)\n- `rocclr` - contains compute runtime used in `HIP` and `OpenCL™`. This is hosted at [rocclr](./rocclr)\n\n## How to build/install\n\n### Prerequisites\n\nPlease refer to Quick Start Guide in [ROCm Docs](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html).\n\nBuilding CLR requires the ROCm stack to be installed on the system. In addition, the following dependencies must be present as prerequisites:\n\n```bash\nsudo apt install rocm-llvm-dev\npip3 install CppHeaderParser\n```\n\nFor OpenCL, you need to install the ICD loader package provided by the distribution:\n\n```bash\nsudo apt-get install ocl-icd-opencl-dev\n```\n\n### Linux\n\n1. Clone the repository:\n   ```bash\n   git clone git@github.com:ROCm/rocm-systems.git\n   ```\n\n2. Build **HIP**:\n   ```bash\n   export CLR_DIR=\"$(readlink -f rocm-systems/projects/clr)\"\n   export HIP_DIR=\"$(readlink -f rocm-systems/projects/hip)\"\n\n   cd \"$CLR_DIR\"\n   mkdir -p build; cd build\n   cmake -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH=\"/opt/rocm/\" -DCMAKE_INSTALL_PREFIX=$PWD/install -DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=OFF -DHIP_PLATFORM=amd ..\n   make -j$(nproc)\n   make install\n   ```\n\n3. Build **OpenCL™**:\n   ```bash\n   cd \"$CLR_DIR\"\n   mkdir -p build; cd build\n   cmake -DCMAKE_PREFIX_PATH=\"/opt/rocm/\" -DCLR_BUILD_HIP=OFF -DCLR_BUILD_OCL=ON ..\n   make -j$(nproc)\n   ```\n\n   \u003e **Note:** Build both `OCL` and `HIP` together by passing `-DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=ON` to the configure command.\n\nFor detailed instructions, please refer to [How to build HIP](https://rocm.docs.amd.com/projects/HIP/en/latest/install/build.html).\n\n### Windows\n\n1. Install the prerequisites:\n   - **Visual Studio C++ 2022/2026** — [Download](https://visualstudio.microsoft.com/downloads/)\n   - **Python 3.12** — `winget install -e --id Python.Python.3.12`\n   - **CMake** — `winget install -e --id Kitware.CMake`\n   - **DVC** — `winget install -e --id Iterative.DVC`\n   - **TheRock package** — Download the tarball archive and extract to `c:/opt`.\n     See [TheRock Releases](https://github.com/ROCm/TheRock/blob/main/RELEASES.md#installing-from-tarballs).\n\n2. Set up environment variables:\n   ```cmd\n   set HIP_COMMON_DIR=c:/github/rocm-systems/projects/hip\n   set HIPCC_BIN_DIR=c:\\opt\\rocm\\bin\n   ```\n   - `HIP_COMMON_DIR` — path to [HIP](https://github.com/ROCm/rocm-systems/tree/develop/projects/hip).\n   - `HIPCC_BIN_DIR` — path to the hipcc directory. If you have TheRock installed you can point it to `\u003cInstallation_of_therock\u003e/rocm/bin`.\n\n   For parallel builds, also set:\n   ```cmd\n   set CMAKE_BUILD_PARALLEL_LEVEL=\u003cnum_parallel_builds\u003e\n   ```\n   This controls the number of parallel compilations for a single project using MSVC.\n\n3. Create a build directory:\n   ```cmd\n   mkdir hipamd\n   cd hipamd\n   ```\n\n4. Configure and build.\n\n   **Public release build (ROCR + PAL static lib):**\n   ```cmd\n   cmake ../rocm-systems/projects/clr -DCMAKE_BUILD_TYPE=Release -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=%HIP_COMMON_DIR% -DHIPCC_BIN_DIR=%HIPCC_BIN_DIR% -DCMAKE_INSTALL_PREFIX=..\\install -D__HIP_ENABLE_PCH=OFF -DROCCLR_ENABLE_HSA=ON -DROCCLR_ENABLE_PAL=ON -D__HIP_ENABLE_RTC=ON -DUSE_PROF_API=OFF -DROCR_DLL_LOAD=OFF -DAMD_COMPUTE_WIN=../../../shared/amdgpu-windows-interop/\n   cmake --build . --config Release -j 6 --target install\n   ```\n\n   **Release build (ROCR backend only):**\n   ```cmd\n   cmake ../rocm-systems/projects/clr -DCMAKE_BUILD_TYPE=Release -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=%HIP_COMMON_DIR% -DHIPCC_BIN_DIR=%HIPCC_BIN_DIR% -DCMAKE_INSTALL_PREFIX=..\\install -D__HIP_ENABLE_PCH=OFF -DROCCLR_ENABLE_HSA=ON -DROCCLR_ENABLE_PAL=OFF -D__HIP_ENABLE_RTC=ON -DUSE_PROF_API=OFF -DROCR_DLL_LOAD=OFF -DAMD_COMPUTE_WIN=../../../shared/amdgpu-windows-interop/\n   cmake --build . --config Release -j 6 --target install\n   ```\n\n## Tests\n\n### HIP\n\n`hip-tests` is a separate project hosted at [hip-tests](https://github.com/ROCm/rocm-systems/tree/develop/projects/hip-tests).\nRefer to that repository for build and run instructions.\n\n### OpenCL™\n\nUsers can use `ocltst` to test with, which can be generated via the command line:\n```bash\ncmake -DCMAKE_PREFIX_PATH=\"$PWD/opencl/amdocl;/opt/rocm/\" -DCLR_BUILD_HIP=OFF -DCLR_BUILD_OCL=ON -DBUILD_TESTS=ON ..\n```\n\nThe `ocltst` binaries are built under the folder `$CLR_DIR/build/tests/ocltst`.\n\nAdditionally, [OpenCL-CTS](https://github.com/rocm/opencl-cts) can be used to validate OpenCL functionality.\n\n## Release Notes\n\nRelease notes are published in the [CLR change log](./CHANGELOG.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Fclr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocm%2Fclr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Fclr/lists"}