ROCm / HIP

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

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

Open HannoSpreeuw opened 2 months ago

HannoSpreeuw commented 2 months ago

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).

kjayapra-amd commented 2 months ago

Discussing with the team internally.