Skip to content

HIP Backend Improvements#218

Open
A669015 wants to merge 3 commits into
laekov:masterfrom
AI4SIM:fix-hipifing
Open

HIP Backend Improvements#218
A669015 wants to merge 3 commits into
laekov:masterfrom
AI4SIM:fix-hipifing

Conversation

@A669015

@A669015 A669015 commented May 13, 2026

Copy link
Copy Markdown

Description

This PR enhances HIP support by addressing compatibility issues with modern ROCm versions and adding BF16 data type support.

Changes

  • Updated file extensions for CUDA source files to support automatic hipify code detection
  • Simplified cublas_wrapper.h by removing redundant HIP branches for FP16 operations where ROCm behavior now matches CUDA
  • Implemented BF16 support for HIP through hipblasGemmEx
  • Reduced code duplication in CUDA utility headers

Testing

The compilation and install has been tested on:

  • ROCM 7.1.1 environment with PyTorch 2.10.0+rocm7.1 on MI250 and MI300X GPUs
  • CUDA 12.8 environment with PyTorch 2.10.0+cu128 on H100 GPUs

All pytest tests pass successfully. Note: test_faster_shadow exhibits intermittent failures on certain parameter sets due to grad_weight absolute error occasionally exceeding 1e-3. This issue was already present on the master branch in the CUDA 12.8 environment and does not appear to be related to these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant