Skip to content

Commit

Permalink
Apply and standardize Read the Docs documentation for HIPCC
Browse files Browse the repository at this point in the history
Relates to #12

Relates to ROCm/rocm-docs-core#330

Change-Id: Ic6a67f6edb21898c2ac8cf1dce91e94c507af4ad
  • Loading branch information
samjwu authored and yhuiYH committed May 23, 2024
1 parent c062ef5 commit 19578db
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/amd/hipcc/docs/sphinx" # Location of package manifests
open-pull-requests-limit: 10
schedule:
interval: "daily"
labels:
- "documentation"
reviewers:
- "samjwu"
18 changes: 10 additions & 8 deletions amd/hipcc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,41 @@
<!-- toc -->

- [hipcc](#hipcc)
* [Documentation](#documentation)
* [Environment Variables](#envVar)
* [Usage](#hipcc-usage)
* [Building](#building)
* [Testing](#testing)
- [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. Historically, `hipcc` was provided as a script in the HIP repo ( https://github.com/ROCm-Developer-Tools/HIP/blob/main/bin/hipcc ). The `hipcc` provided in this project provides the same functionality, but is a binary rather than a script. At some point in the future, the hipcc script will be deprecated and ultimately removed from the HIP repo.
`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. Historically, `hipcc` was provided as a script in the HIP repo [https://github.com/ROCm-Developer-Tools/HIP/blob/main/bin/hipcc](https://github.com/ROCm-Developer-Tools/HIP/blob/main/bin/hipcc). The `hipcc` provided in this project provides the same functionality, but is a binary rather than a script. At some point in the future, the hipcc script will be deprecated and ultimately removed from the HIP repo.

`hipcc` will pass-through options to the target compiler. The tools calling hipcc must ensure the compiler options are appropriate for the target compiler.

## Documentation

Run the steps below to build documentation locally.

```
```shell
cd docs

pip3 install -r .sphinx/requirements.txt
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:

- HIP_PATH : Path to HIP directory, default is one dir level above location of hipcc.
- CUDA_PATH : Path to CUDA SDK (default /usr/local/cuda). Used on NVIDIA platforms only.
- HSA_PATH : Path to HSA dir (defaults to ../../hsa relative to abs_path of hipcc). Used on AMD platforms only.
Expand Down
4 changes: 4 additions & 0 deletions amd/hipcc/docs/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License

```{include} ../LICENSE.txt
```
3 changes: 3 additions & 0 deletions amd/hipcc/docs/sphinx/_toc.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ subtrees:
- file: usage
- file: build
- file: test
- caption: About
entries:
- file: license

0 comments on commit 19578db

Please sign in to comment.