diff --git a/tests/kfdtest/src/KFDTestUtil.cpp b/tests/kfdtest/src/KFDTestUtil.cpp index 476e0bb1ce..2eddc8857b 100644 --- a/tests/kfdtest/src/KFDTestUtil.cpp +++ b/tests/kfdtest/src/KFDTestUtil.cpp @@ -231,6 +231,12 @@ bool isTonga(const HsaNodeProperties *props) { return false; } +const uint32_t GetGfxVersion(const HsaNodeProperties *props) { + return ((props->EngineId.ui32.Major << 16) | + (props->EngineId.ui32.Minor << 8) | + (props->EngineId.ui32.Stepping)); +} + HSAuint64 GetSystemTickCountInMicroSec() { struct timeval t; gettimeofday(&t, 0); diff --git a/tests/kfdtest/src/KFDTestUtil.hpp b/tests/kfdtest/src/KFDTestUtil.hpp index 7c2f9c61ce..938ff8bf69 100644 --- a/tests/kfdtest/src/KFDTestUtil.hpp +++ b/tests/kfdtest/src/KFDTestUtil.hpp @@ -52,6 +52,7 @@ bool is_dgpu(); bool isTonga(const HsaNodeProperties *props); bool hasPciAtomicsSupport(int node); unsigned int FamilyIdFromNode(const HsaNodeProperties *props); +const uint32_t GetGfxVersion(const HsaNodeProperties *props); void GetHwQueueInfo(const HsaNodeProperties *props, unsigned int *p_num_cp_queues,