HIP icon indicating copy to clipboard operation
HIP copied to clipboard

hipCtxGetApiVersion expects int* instead of unsigned int* as second argument

Open HannoSpreeuw opened this issue 1 year ago • 1 comments

Problem Description

Problem similar to ROCm/#2977. (Perhaps I should have submitted that issue also in this repo)

Calling hipCtxGetApiVersion with the same types of arguments as a succesful call to cuCtxGetApiVersion gives

error: invalid conversion from 'unsigned int*' to 'int*' [-fpermissive]
.........................(hipCtxGetApiVersion(_obj, &version);
                                                    ^~~~~~~~
                                                    |
                                                    unsigned int*

So the problem is with the second argument.

Operating System

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

CPU

AMD Ryzen Threadripper 3970X 32-Core Processor

GPU

AMD Radeon Pro W6800

ROCm Version

ROCm 6.0.0

ROCm Component

HIP

Steps to Reproduce

Call hipCtxGetApiVersion with an unsigned int pointer as a second argument, while not using -fpermissive.

This works for CuCtxGetApiVersion, but not for hipCtxGetApiVersion .

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

Sorry, "permission denied".

Additional Information

This is actually on a W6600 (not listed in the dropdown options), using ROCm 6.0.2 (also not listed).

HannoSpreeuw avatar Apr 10 '24 12:04 HannoSpreeuw

Discussing with the team internally.

kjayapra-amd avatar Apr 22 '24 11:04 kjayapra-amd