[cfe-dev] [RFC] Introduce HIP language mode
Tom Stellard via cfe-dev
cfe-dev at lists.llvm.org
Mon Apr 2 09:25:44 PDT 2018
On 03/28/2018 12:29 PM, Liu, Yaxun (Sam) via cfe-dev wrote:
> HIP is a language similar to CUDA (https://github.com/ROCm-Developer-Tools/HIP/blob/master/docs/markdown/hip_kernel_language.md ).
> The language syntax is very similar, which allows a hip program to be compiled as a CUDA program by Clang. The main difference
> is the host API. HIP has a set of vendor neutral host API which can be implemented on different platforms. Currently there is open source
> implementation of HIP runtime on amdgpu target (https://github.com/ROCm-Developer-Tools/HIP ).
>
What's the relationship between the HIP language mode and hcc? Is the
HIP language mode intended to replace the current hip + hcc stack?
-Tom
> We have a working implementation of HIP compiler based on clang thanks to Greg Rodgers' work and we would like to upstream it. As an initial step, we created a Phabricator
> Review https://reviews.llvm.org/D44984 for adding support of file type hip and language option HIP.
>
> When hip file is compiled, both LangOpts.CUDA and LangOpts.HIP is turned on. This allows compilation of hip program as CUDA
> in most cases and only special handling of hip program is needed LangOpts.HIP is checked.
>
> This patch also adds support of kernel launching of HIP program using HIP host API.
>
> The next patch will be the toolchain changes to support HIP. Basically HIP has its own open source header files and device libraries which may be ported to different targets/platforms.
>
> We plan to continue upstreaming our support of HIP until it becomes mature enough to support major machine learning applications ported to HIP, e.g. TensorFlow https://github.com/ROCmSoftwarePlatform/tensorflow .
> Any comments are welcome.
>
> Thanks.
>
> Yaxun (Sam) Liu
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
More information about the cfe-dev
mailing list