CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
81 lines
2.4 KiB
Markdown
81 lines
2.4 KiB
Markdown
# HIP compiler driver (hipcc)
|
|
|
|
## Table of Contents
|
|
|
|
<!-- toc -->
|
|
|
|
- [hipcc](#hipcc)
|
|
- [Documentation](#documentation)
|
|
- [Environment Variables](#envVar)
|
|
- [Usage](#usage)
|
|
- [Building](#building)
|
|
- [Testing](#testing)
|
|
|
|
<!-- tocstop -->
|
|
|
|
## <a name="hipcc"></a> hipcc
|
|
|
|
`hipcc` is a compiler driver utility that will call clang or nvcc, depending on target, and pass the appropriate include and library options for the target compiler and HIP infrastructure.
|
|
|
|
`hipcc` will pass-through options to the target compiler. The tools calling hipcc must ensure the compiler options are appropriate for the target compiler.
|
|
|
|
### <a name="building"></a> Building
|
|
|
|
Building on Linux:
|
|
|
|
```bash
|
|
mkdir build
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j4
|
|
```
|
|
|
|
The hipcc and hipconfig executables are created in the current build folder.
|
|
You may also create installable packages with :
|
|
```bash
|
|
make package
|
|
```
|
|
|
|
## Documentation
|
|
|
|
The published documentation is available at [HIPCC](https://rocm.docs.amd.com/projects/HIPCC/en/latest/index.html) in an organized, easy-to-read format, with search and a table of contents. The documentation source files reside in the `amd/HIPCC/docs` folder of this repository. As with all ROCm projects, the documentation is open source. For more information on contributing to the documentation, see [Contribute to ROCm documentation](https://rocm.docs.amd.com/en/latest/contribute/contributing.html).
|
|
|
|
Run the steps below to build documentation locally.
|
|
|
|
```shell
|
|
cd docs
|
|
|
|
pip3 install -r sphinx/requirements.txt
|
|
|
|
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
|
|
```
|
|
|
|
### <a name="envVar"></a> Environment Variables
|
|
|
|
The environment variable HIP_PLATFORM may be used to specify amd/nvidia:
|
|
|
|
- HIP_PLATFORM='amd' or HIP_PLATFORM='nvidia'.
|
|
- If HIP_PLATFORM is not set, then hipcc will attempt to auto-detect based on if nvcc is found.
|
|
|
|
Other environment variable controls:
|
|
|
|
- CUDA_PATH : Path to CUDA SDK (default /usr/local/cuda). Used on NVIDIA platforms only.
|
|
|
|
### <a name="usage"></a> Usage
|
|
|
|
The built executables can be used the same way as the hipcc/hipconfig perl scripts.
|
|
To use the newly built executables from the build folder use ./ in front of the executable name -
|
|
Example:
|
|
```shell
|
|
./hipconfig --help
|
|
./hipcc --help
|
|
./hipcc --version
|
|
./hipconfig --full
|
|
```
|
|
|
|
### <a name="testing"></a> hipcc: testing
|
|
|
|
Currently hipcc/hipconfig executables are tested by building and executing HIP tests: https://github.com/ROCm/hip-tests
|