Currently, when building oidn against ROCm 6, the following error occurs:
<dir>/oidn/devices/hip/hip_device.cpp:202:20: error: no member named 'memoryType' in 'hipPointerAttribute_t'
switch (attrib.memoryType)
~~~~~~ ^
<dir>/oidn/devices/hip/hip_device.cpp:202:20: error: no member named 'memoryType' in 'hipPointerAttribute_t'
switch (attrib.memoryType)
~~~~~~ ^
<dir>/oidn/devices/hip/hip_device.cpp:202:20: error: no member named 'memoryType' in 'hipPointerAttribute_t'
switch (attrib.memoryType)
~~~~~~ ^
<dir>/oidn/devices/hip/hip_device.cpp:202:20: error: no member named 'memoryType' in 'hipPointerAttribute_t'
switch (attrib.memoryType)
~~~~~~ ^
This is because of a breaking API change documented here. The field is now attr.type. This PR aims to allow building oidn against both ROCm 5 and 6 by conditionally switching between attr.memoryType and attr.type at compile time based on HIP's major version reported by CMake.
Ran all HIP tests locally on gfx1032 (emulated as gfx1030) and passed.
Currently, when building
oidn
against ROCm 6, the following error occurs:This is because of a breaking API change documented here. The field is now
attr.type
. This PR aims to allow buildingoidn
against both ROCm 5 and 6 by conditionally switching betweenattr.memoryType
andattr.type
at compile time based on HIP's major version reported by CMake.Ran all HIP tests locally on
gfx1032
(emulated asgfx1030
) and passed.