{"id":13472842,"url":"https://github.com/ROCm/ROCm","last_synced_at":"2025-03-26T17:31:25.764Z","repository":{"id":37677671,"uuid":"54160369","full_name":"ROCm/ROCm","owner":"ROCm","description":"AMD ROCm™ Software - GitHub Home","archived":false,"fork":false,"pushed_at":"2024-10-29T15:02:00.000Z","size":129314,"stargazers_count":4590,"open_issues_count":127,"forks_count":379,"subscribers_count":215,"default_branch":"develop","last_synced_at":"2024-10-29T15:09:11.674Z","etag":null,"topics":["documentation"],"latest_commit_sha":null,"homepage":"https://rocm.docs.amd.com","language":"Shell","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":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-18T00:24:29.000Z","updated_at":"2024-10-29T15:01:59.000Z","dependencies_parsed_at":"2023-11-13T04:27:09.115Z","dependency_job_id":"82b858b9-573c-457d-9fcb-270f1f7a8a48","html_url":"https://github.com/ROCm/ROCm","commit_stats":null,"previous_names":["rocm/rocm","radeonopencompute/rocm"],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FROCm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FROCm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FROCm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FROCm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ROCm","download_url":"https://codeload.github.com/ROCm/ROCm/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245343997,"owners_count":20599867,"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":["documentation"],"created_at":"2024-07-31T16:00:58.414Z","updated_at":"2025-03-26T17:31:25.748Z","avatar_url":"https://github.com/ROCm.png","language":"Shell","funding_links":[],"categories":["Shell",":steam_locomotive: Runtime Environment"],"sub_categories":["Web Development"],"readme":"# AMD ROCm Software\n\nROCm is an open-source stack, composed primarily of open-source software, designed for graphics\nprocessing unit (GPU) computation. ROCm consists of a collection of drivers, development tools, and\nAPIs that enable GPU programming from low-level kernel to end-user applications.\n\nWith ROCm, you can customize your GPU software to meet your specific needs. You can develop,\ncollaborate, test, and deploy your applications in a free, open source, integrated, and secure software\necosystem. ROCm is particularly well-suited to GPU-accelerated high-performance computing (HPC),\nartificial intelligence (AI), scientific computing, and computer aided design (CAD).\n\nROCm is powered by AMD’s\n[Heterogeneous-computing Interface for Portability (HIP)](https://github.com/ROCm/HIP),\nan open-source software C++ GPU programming environment and its corresponding runtime. HIP\nallows ROCm developers to create portable applications on different platforms by deploying code on a\nrange of platforms, from dedicated gaming GPUs to exascale HPC clusters.\n\nROCm supports programming models, such as OpenMP and OpenCL, and includes all necessary open\nsource software compilers, debuggers, and libraries. ROCm is fully integrated into machine learning\n(ML) frameworks, such as PyTorch and TensorFlow.\n\n## Getting the ROCm Source Code\n\nAMD ROCm is built from open source software. It is, therefore, possible to modify the various components of ROCm by downloading the source code and rebuilding the components. The source code for ROCm components can be cloned from each of the GitHub repositories using git.  For easy access to download the correct versions of each of these tools, the ROCm repository contains a repo manifest file called [default.xml](./default.xml). You can use this manifest file to download the source code for ROCm software.\n\n### Installing the repo tool\n\nThe repo tool from Google allows you to manage multiple git repositories simultaneously. Run the following commands to install the repo tool:\n\n```bash\nmkdir -p ~/bin/\ncurl https://storage.googleapis.com/git-repo-downloads/repo \u003e ~/bin/repo\nchmod a+x ~/bin/repo\n```\n\n**Note:** The ```~/bin/``` folder is used as an example. You can specify a different folder to install the repo tool into if you desire.\n\n### Installing git-lfs\n\nSome ROCm projects use the Git Large File Storage (LFS) format that may require you to install git-lfs. Refer to [Git Large File Storage](https://github.com/git-lfs/git-lfs/blob/main/INSTALLING.md) for more information. For example, to install git-lfs for Ubuntu, use the following command:\n\n```bash\nsudo apt-get install git-lfs\n```\n\n### Downloading the ROCm source code\n\nThe following example shows how to use the repo tool to download the ROCm source code. If you choose a directory other than ~/bin/ to install the repo tool, you must use that chosen directory in the code as shown below:\n\n```bash\nmkdir -p ~/ROCm/\ncd ~/ROCm/\nexport ROCM_VERSION=6.3.3\n~/bin/repo init -u http://github.com/ROCm/ROCm.git -b roc-6.3.x -m tools/rocm-build/rocm-${ROCM_VERSION}.xml\n~/bin/repo sync\n```\n\n**Note:** Using this sample code will cause the repo tool to download the open source code associated with the specified ROCm release. Ensure that you have ssh-keys configured on your machine for your GitHub ID prior to the download as explained at [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh).\n\n## Building the ROCm source code\n\nEach ROCm component repository contains directions for building that component, such as the rocSPARSE documentation [Installation and Building for Linux](https://rocm.docs.amd.com/projects/rocSPARSE/en/latest/install/Linux_Install_Guide.html). Refer to the specific component documentation for instructions on building the repository.\n\nEach release of the ROCm software supports specific hardware and software configurations. Refer to [System requirements (Linux)](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html) for the current supported hardware and OS.\n\n## Build ROCm from source\n\nThe Build will use as many processors as it can find to build in parallel. Some of the compiles can consume as much as 10GB of RAM, so make sure you have plenty of Swap Space !\n\nBy default the ROCm build will compile for all supported GPU architectures and will take approximately 500 CPU hours.\nThe Build time will reduce significantly if we limit the GPU Architecture/s against which we need to build by using the environment variable GPU_ARCHS as mentioned below.\n\n```bash\n# --------------------------------------\n# Step1: clone source code\n# --------------------------------------\n\nmkdir -p ~/WORKSPACE/      # Or any folder name other than WORKSPACE\ncd ~/WORKSPACE/\nexport ROCM_VERSION=6.3.3\n~/bin/repo init -u http://github.com/ROCm/ROCm.git -b roc-6.3.x -m tools/rocm-build/rocm-${ROCM_VERSION}.xml\n~/bin/repo sync\n\n# --------------------------------------\n# Step 2: Prepare build environment\n# --------------------------------------\n\n# Option 1: Start a docker container\n# Pulling required base docker images:\n# Ubuntu20.04 built from ROCm/tools/rocm-build/docker/ubuntu20/Dockerfile\ndocker pull rocm/rocm-build-ubuntu-20.04:6.3\n# Ubuntu22.04 built from ROCm/tools/rocm-build/docker/ubuntu22/Dockerfile\ndocker pull rocm/rocm-build-ubuntu-22.04:6.3\n# Ubuntu24.04 built from ROCm/tools/rocm-build/docker/ubuntu24/Dockerfile\ndocker pull rocm/rocm-build-ubuntu-24.04:6.3\n\n# Start docker container and mount the source code folder:\ndocker run -ti \\\n    -e ROCM_VERSION=${ROCM_VERSION} \\\n    -e CCACHE_DIR=$HOME/.ccache \\\n    -e CCACHE_ENABLED=true \\\n    -e DOCK_WORK_FOLD=/src \\\n    -w /src \\\n    -v $PWD:/src \\\n    -v /etc/passwd:/etc/passwd \\\n    -v /etc/shadow:/etc/shadow \\\n    -v ${HOME}/.ccache:${HOME}/.ccache \\\n    -u $(id -u):$(id -g) \\\n    \u003creplace_with_required_ubuntu_base_docker_image\u003e bash\n\n# Option 2: Install required packages into the host machine\n# For ubuntu20.04 system\ncd ROCm/tools/rocm-build/docker/ubuntu20\ncp * /tmp \u0026\u0026 cd /tmp\nbash install-prerequisites.sh\n# For ubuntu22.04 system\ncd ROCm/tools/rocm-build/docker/ubuntu22\ncp * /tmp \u0026\u0026 cd /tmp\nbash install-prerequisites.sh\n# For ubuntu24.04 system\ncd ROCm/tools/rocm-build/docker/ubuntu24\ncp * /tmp \u0026\u0026 cd /tmp\nbash install-prerequisites.sh\n\n# --------------------------------------\n# Step 3: Run build command line\n# --------------------------------------\n\n# Select GPU targets before building:\n# When GPU_ARCHS is not set, default GPU targets supported by ROCm6.1 will be used.\n# To build against a subset of GFX architectures you can use the below env variable.\n# Support MI300 (gfx940, gfx941, gfx942).\nexport GPU_ARCHS=\"gfx942\"               # Example\nexport GPU_ARCHS=\"gfx940;gfx941;gfx942\" # Example\n\n# Pick and run build commands in the docker container:\n# Build rocm-dev packages\nmake -f ROCm/tools/rocm-build/ROCm.mk -j ${NPROC:-$(nproc)} rocm-dev\n# Build all ROCm packages\nmake -f ROCm/tools/rocm-build/ROCm.mk -j ${NPROC:-$(nproc)} all\n# list all ROCm components to find required components\nmake -f ROCm/tools/rocm-build/ROCm.mk list_components\n# Build a single ROCm packages\nmake -f ROCm/tools/rocm-build/ROCm.mk T_rocblas\n\n# Find built packages in ubuntu20.04:\nout/ubuntu-20.04/20.04/deb/\n# Find built packages in ubuntu22.04:\nout/ubuntu-22.04/22.04/deb/\n# Find built packages in ubuntu24.04:\nout/ubuntu-24.04/24.04/deb/\n\n# Find built logs in ubuntu20.04:\nout/ubuntu-20.04/20.04/logs/\n# Find built logs in ubuntu22.04:\nout/ubuntu-22.04/22.04/logs/\n# Find built logs in ubuntu24.04:\nout/ubuntu-24.04/24.04/logs/\n# All logs pertaining to failed components, end with .errrors extension.\nout/ubuntu-22.04/22.04/logs/rocblas.errors      # Example\n# All logs pertaining to building components, end with .inprogress extension.\nout/ubuntu-22.04/22.04/logs/rocblas.inprogress  # Example\n# All logs pertaining to passed components, use the component names.\nout/ubuntu-22.04/22.04/logs/rocblas             # Example\n```\n\nNote: [Overview for ROCm.mk](tools/rocm-build/README.md)\n\n## ROCm documentation\n\nThis repository contains the [manifest file](https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md)\nfor ROCm releases, changelogs, and release information.\n\nThe `default.xml` file contains information for all repositories and the associated commit used to build\nthe current ROCm release; `default.xml` uses the [Manifest Format repository](https://gerrit.googlesource.com/git-repo/).\n\nSource code for our documentation is located in the `/docs` folder of most ROCm repositories. The\n`develop` branch of our repositories contains content for the next ROCm release.\n\nThe ROCm documentation homepage is [rocm.docs.amd.com](https://rocm.docs.amd.com).\n\nFor information on how to contribute to the ROCm documentation, see [Contributing to the ROCm documentation](https://rocm.docs.amd.com/en/latest/contribute/contributing.html).\n\n## Older ROCm releases\n\nFor release information for older ROCm releases, refer to the\n[ROCm release history](https://rocm.docs.amd.com/en/latest/release/versions.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FROCm%2FROCm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FROCm%2FROCm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FROCm%2FROCm/lists"}