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
41 lines
1.4 KiB
Markdown
41 lines
1.4 KiB
Markdown
# hipFile Python Bindings
|
|
|
|
Python bindings for the [hipFile](https://github.com/ROCm/rocm-systems/tree/develop/projects/hipfile) C library.
|
|
|
|
> [!CAUTION]
|
|
> These bindings in particular are *experimental* and the API will change.
|
|
|
|
## Building & Installing
|
|
|
|
1. Setup a Python virtual environment.
|
|
```bash
|
|
$ python3 -m venv .venv
|
|
```
|
|
2. Activate the Python virtual environment.
|
|
```bash
|
|
$ source .venv/bin/activate
|
|
```
|
|
3. Build or install the C hipFile library. See [INSTALL.md](../INSTALL.md).
|
|
4. Build the hipFile package.\
|
|
and shared library using its configured search paths, including the
|
|
source `../include` location for headers, a CMake build-directory
|
|
hint for the shared library, and the default ROCm install location.
|
|
The search path can be overridden by setting `HIPFILE_INCLUDE_DIR`,
|
|
`HIPFILE_LIBRARY`, or `HIP_INCLUDE_DIR` via the build arg
|
|
`-Ccmake.define.<KEY>=<VALUE>`.
|
|
```bash
|
|
(.venv) $ cd projects/hipfile/python
|
|
(.venv) $ python -m build --wheel
|
|
```
|
|
Or to install an editable version of the Python package:
|
|
```bash
|
|
(.venv) $ cd projects/hipfile/python
|
|
(.venv) $ pip install -e .
|
|
```
|
|
|
|
An editable Python package is a development package that allows for
|
|
live changes to the <ins>Python</ins> source code to be applied
|
|
immediately without needing to rebuild or reinstall the Python
|
|
package under development. Any changes to the <ins>Cython</ins>
|
|
source code will require a rebuild step.
|