ROCm / HIP

HIP: C++ Heterogeneous-Compute Interface for Portability
https://rocmdocs.amd.com/projects/HIP/
MIT License
3.55k stars 519 forks source link

hipMemcpyHtoDAsync wants a void pointer instead of a const void* #3444

Open HannoSpreeuw opened 2 months ago

HannoSpreeuw commented 2 months ago

Problem Description

Problem similar to #3422

A call to hipMemcpyHtoDAsync with similar types of arguments as a succesful call to cuMemcpyHtoDAsync gives

error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
      |     .............(hipMemcpyHtoDAsync(devPtr, hostPtr, size, _obj));
      |                                              ^~~~~~~
      |                                              |
      |                                              const void*

The problem is with the type of the second argument of this call to hipMemcpyHtoDAsync .

I.e. one cannot give the same types of arguments to hipMemcpyHtoDAsync as one would to cuMemcpyHtoDAsync, which means that running hipconvertinplace-perl.sh is not sufficient.

Operating System

NAME="Rocky Linux" VERSION="8.9 (Green Obsidian)"

CPU

AMD Ryzen Threadripper 3970X 32-Core Processor

GPU

AMD Radeon Pro W7900

ROCm Version

ROCm 6.0.0

ROCm Component

No response

Steps to Reproduce

Call hipMemcpyHtoDAsync with the same types of arguments as a succesful call to cuMemcpyHtoDAsync without using -fpermissive.

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

No response

Additional Information

This is actually with a W7700 (not listed) using ROCm 6.0.2.

kjayapra-amd commented 2 months ago

Discussing with the team internally. Will update.