[miopen] Fix Ambiguous Header file includes (#4941)

This PR updates the include paths for the random.hpp header in the
miopen/driver source files to use relative paths. This change improves
correctness in header inclusion and resolves ambiguity caused by
multiple random.hpp files in different directories. The issue resulted
in the following compilation error when building the HIP package with
newer compilers:

`error: multiple candidates for header 'random.hpp' found; directory
'/data/rocm-libraries/projects/miopen/test/gtest/../../driver' chosen,
ignoring others including
'/data/rocm-libraries/projects/miopen/test/gtest/..'
[-Werror,-Wshadow-header]`

Header include path updates:

* Changed the include path for `random.hpp` from `"random.hpp"` to
`"../driver/random.hpp"` in both `conv_common.hpp` and `driver.hpp` to
hint the compiler the right path for the header.
[[1]](diffhunk://#diff-9ebb39bfc7a525761ac8d46bea7242c26ce62cdd4872d7ec17b55611ddea202bL37-R37)
[[2]](diffhunk://#diff-95709138acaf23ddf679a969e8bd6b58d5f5a3d933639c86764680677ee5a36eL30-R30)

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
This commit is contained in:
SreecharanGundaboluAMD
2026-03-02 08:47:39 -08:00
committed by GitHub
parent c620f0c057
commit 776ba60068

Diff Content Not Available