Skip to main content

Python and Cython bindings for HIP

Project description

HIP Python

This repository provides low-level Python and Cython bindings for HIP. Currently, only bindings for the AMD GPU backend of HIP are provided.

Known Issues

The hiprand Cython Module Causes Compiler Error

With all ROCm™ versions before and including version 5.6.0, compiling/using HIP Python's hiprand Cython module results in a compiler error.

The error is caused by the following statement in the C compilation path of <path_to_rocm>/hiprand/hiprand_hcc.h, which is not legal in C for aliasing a struct type:

typedef rocrand_generator_base_type hiprandGenerator_st;

Workaround (Requires Access to Header File): Edit Header File

For this fix, you need write access to the ROCm™ header files. Then, modify file <path_to_rocm>/hiprand/hiprand_hcc.h such that

typedef rocrand_generator_base_type hiprandGenerator_st;

becomes

typedef struct rocrand_generator_base_type hiprandGenerator_st;

ROCm™ 5.5.0 and ROCm™ 5.5.1

On systems with ROCm™ HIP SDK 5.5.0 or 5.5.1, the examples

  • hip-python/examples/0_Basic_Usage/hiprtc_launch_kernel_args.py
  • hip-python/examples/0_Basic_Usage/hiprtc_launch_kernel_no_args.py

abort with errors.

An upgrade to version HIP SDK 5.6 or later (or a downgrade to version 5.4) is advised if the showcased functionality is needed.

Unspecific

On certain Ubuntu 20 systems, we encountered issues when running the examples:

  • hip-python/examples/0_Basic_Usage/hiprtc_launch_kernel_args.py
  • hip-python/examples/0_Basic_Usage/rccl_comminitall_bcast.py

We could not identify the cause yet.

Documentation

For examples, guides and API reference, please take a look at the official HIP Python documentation pages:

https://rocm.docs.amd.com/projects/hip-python/en/latest/index.html

LICENSE

MIT License

Copyright (c) 2023-2024 Advanced Micro Devices, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hip_python-6.3.0.500.16-cp313-cp313-manylinux_2_17_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

hip_python-6.3.0.500.16-cp312-cp312-manylinux_2_17_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

hip_python-6.3.0.500.16-cp311-cp311-manylinux_2_17_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

hip_python-6.3.0.500.16-cp310-cp310-manylinux_2_17_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

hip_python-6.3.0.500.16-cp39-cp39-manylinux_2_17_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

hip_python-6.3.0.500.16-cp38-cp38-manylinux_2_17_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file hip_python-6.3.0.500.16-cp313-cp313-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.0.500.16-cp313-cp313-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 30d4e35642a7e12cc83a3076418de91be565b1d36bdfeabbb2ae977272ef5cbd
MD5 429a0bed42d83afe6a6590af3fb8dbb4
BLAKE2b-256 308603f00f190ac0314eff9a4d6db83791423d68c0fa53874693e10257b87e20

See more details on using hashes here.

File details

Details for the file hip_python-6.3.0.500.16-cp312-cp312-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.0.500.16-cp312-cp312-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ca1bd96ba435f90dafa6c87744c9dd65bf5efab8667384d806766fa9fc695eff
MD5 4ae194f1f34c40a91597deeed3a8c119
BLAKE2b-256 7cae748823264fdf7dda2b850672babb121be3072d2dffb92b9d13cce2fd85fa

See more details on using hashes here.

File details

Details for the file hip_python-6.3.0.500.16-cp311-cp311-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.0.500.16-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 16dea06fbe125a6eaec300649096865cdba55ae3e58cc43f2cb9593d89143d0b
MD5 3e1b5089e93bed0d9e2228be6729f3ab
BLAKE2b-256 c722da2c597b8ff19118516d2726811bb93b75ab1253365db6b2a9662c20403e

See more details on using hashes here.

File details

Details for the file hip_python-6.3.0.500.16-cp310-cp310-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.0.500.16-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d9feaf76b8197f35fcd50a3af9acacadc1e6e5d51225eb142e1fca3ec2e27c4b
MD5 44f817244d1ad3745fc34babf9836d52
BLAKE2b-256 1fa7a3e1ac869f0156e3faa851b4e9240fbf6bde4300b24b02987ceaa5761519

See more details on using hashes here.

File details

Details for the file hip_python-6.3.0.500.16-cp39-cp39-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.0.500.16-cp39-cp39-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 acddef90b03d4232d6d40d22c30506860bc7fe486c9328e4c5bc8a73460a3722
MD5 63e5f5cbbd61b52dde0dae7b5193100e
BLAKE2b-256 89f913113b22b82d3001d7ebfd3f70a4fa2242172ddf432f9c2a4c351f2b353e

See more details on using hashes here.

File details

Details for the file hip_python-6.3.0.500.16-cp38-cp38-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.0.500.16-cp38-cp38-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b5698e489df408620e104bc17ccc909a3bf8348ccde44321c99caff603d834d8
MD5 490b25268385b7a1c66f529a5305b892
BLAKE2b-256 29f4d37949e4132e76b2da9930531e78be2c521ec9217f3d6cb4840f9f9254dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page