ROCm / HIPIFY

HIPIFY: Convert CUDA to Portable C++ Code
MIT License
440 stars 69 forks source link

[HIPIFY][Feature] Support for `math_constants.h` #1553

Open YuWei-CH opened 1 week ago

YuWei-CH commented 1 week ago

Problem Description

Hi All,

I am trying to use HIPify to convert CUDA code that includes <math_constants.h>, but it seems like this header is not being properly handled by HIPify. And I could not find any existing issues related to this.

However, I believe that hip/hip_math_constants.h is included in HIP, so I think it's possible to add the appropriate mappings to hipify-perl and HIP2CUDA.cpp.

I can submit a PR for this if you think my idea can be work.

Thank you so much!

(As a student learning about HIPify, I might have overlooked something, and there might already be a solution for this issue. If that's the case, I apologize for taking up your time. If there is a better way please point that out as well. I am very interested in this project.)

Operating System

Ubuntu 22.04

CPU

AMD

ROCm Version

ROCm 6.0.0

ROCm Component

HIPIFY

Steps to Reproduce

I try to HIPify a project which include . I use the hipify-perl script.

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

NA

Additional Information

No response