[all-commits] [llvm/llvm-project] 694fd1: [HIP] Fix device malloc/free

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Tue Jan 11 11:49:59 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 694fd10659eb32399b0c4fb31f2d062040d800b4
      https://github.com/llvm/llvm-project/commit/694fd10659eb32399b0c4fb31f2d062040d800b4
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2022-01-11 (Tue, 11 Jan 2022)

  Changed paths:
    M clang/lib/Headers/__clang_hip_runtime_wrapper.h
    M clang/test/Headers/hip-header.hip

  Log Message:
  -----------
  [HIP] Fix device malloc/free

ROCm 4.5 device library introduced __ockl_dm_alloc and __ockl_dm_dealloc
for supporting device side malloc/free.

This patch redefines device malloc/free to use these functions.

It also fixes a bug in the wrapper header which incorrectly defines free
with return type void* instead of void.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D116967




More information about the All-commits mailing list