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.1.524.17-cp313-cp313-manylinux_2_34_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

hip_python-6.3.1.524.17-cp312-cp312-manylinux_2_34_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

hip_python-6.3.1.524.17-cp311-cp311-manylinux_2_34_x86_64.whl (10.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

hip_python-6.3.1.524.17-cp310-cp310-manylinux_2_34_x86_64.whl (10.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

hip_python-6.3.1.524.17-cp39-cp39-manylinux_2_34_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

hip_python-6.3.1.524.17-cp38-cp38-manylinux_2_34_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

File details

Details for the file hip_python-6.3.1.524.17-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.1.524.17-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e3e18e276de2dfb7fa96c0abc7e75d09c6d68780a8c1c50d211bd18c793c8db7
MD5 73caf9c8bae6c959af218d20bfcdf713
BLAKE2b-256 2cc0c3ecb6d006c2dfbafe8f34bbe5b1d97a6c3cdd353824d4309edaffd3574a

See more details on using hashes here.

File details

Details for the file hip_python-6.3.1.524.17-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.1.524.17-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4f0551de74d5ed766ef47d73bfeac82613c2ee354b434e5679072452e06991c4
MD5 72b10d6ea366b67a453ffb30befb4902
BLAKE2b-256 5bb0700543cf5b05724b0ce2be8faa2153204a09ae2f88d60184fb4429e26320

See more details on using hashes here.

File details

Details for the file hip_python-6.3.1.524.17-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.1.524.17-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 752b4b3b244287aff2444713d98feb7bcc52174a175ce5b235d5a39017e73786
MD5 8b3a35b81d5f608c1a438c003b2f1aa0
BLAKE2b-256 17ce22665d3130519b9b30a9c811225124d9715773ccda2e28522a7c9569fedf

See more details on using hashes here.

File details

Details for the file hip_python-6.3.1.524.17-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.1.524.17-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3374fb72e6a06d1587b565a52fcf69a11990e4416139ba0ff7bce7472a39b77b
MD5 e63d5b0db2eeee094159e35911eb9b62
BLAKE2b-256 60749179eb136f8398df29f15edbc17164a3396ca8d1acba3976e8e953d6a7f4

See more details on using hashes here.

File details

Details for the file hip_python-6.3.1.524.17-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.1.524.17-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c871feab6a4d68982903d7ab9fc2503e9e267b22b72643e0f274b78be9f8fc1d
MD5 850ae008fe4d8f49285fe30ad8368f34
BLAKE2b-256 b372822df8cc2c9344b1d5683c158c5c174708fc7f1a906e5eeb534db597b71d

See more details on using hashes here.

File details

Details for the file hip_python-6.3.1.524.17-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hip_python-6.3.1.524.17-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cf9639655567f18c1fd2b14a7bdcfc1b76ab759058c5be2a64732c13c9a856d1
MD5 08ff375292fff19aa39af72786a64b9c
BLAKE2b-256 e700d80ff295b90f80e989bc9d28a45a46925617f466f8584f84bacdff38ba31

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