From ccd80d19ba027555452f0dfdfd3479f5e87e8769 Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Tue, 8 Oct 2024 12:32:30 -0400 Subject: [PATCH] kfdtest: Fix in-tree scriptless build If you build thunk following the instructions in the thunk's README, there is no /lib folder in the build folder. Adjust the include path, and clean up the docs to reflect that. The header include is already defined in the CMake file as ../../include, so we don't use LIBHSAKMT_PATH for that linking, just the lib location Change-Id: I73435d59adb9d01f527a28b1935086260e9d3d70 Signed-off-by: Kent Russell --- libhsakmt/tests/kfdtest/CMakeLists.txt | 2 +- libhsakmt/tests/kfdtest/README.txt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libhsakmt/tests/kfdtest/CMakeLists.txt b/libhsakmt/tests/kfdtest/CMakeLists.txt index 62a50841a7..94d846eba4 100644 --- a/libhsakmt/tests/kfdtest/CMakeLists.txt +++ b/libhsakmt/tests/kfdtest/CMakeLists.txt @@ -117,7 +117,7 @@ else() endif() if( DEFINED LIBHSAKMT_PATH ) - set ( HSAKMT_LIBRARY_DIRS ${LIBHSAKMT_PATH}/lib ) + set ( HSAKMT_LIBRARY_DIRS ${LIBHSAKMT_PATH} ) set ( HSAKMT_LIBRARIES hsakmt ) endif() diff --git a/libhsakmt/tests/kfdtest/README.txt b/libhsakmt/tests/kfdtest/README.txt index b892ba5df1..27efe4f560 100644 --- a/libhsakmt/tests/kfdtest/README.txt +++ b/libhsakmt/tests/kfdtest/README.txt @@ -6,15 +6,14 @@ libdrm libdrm_amdgpu libhsakmt If libhsakmt is not installed, but the headers and libraries are present locally, you can specify its directory by -export LIBHSAKMT_PATH=/*your local libhsakmt folder*/ -With that, the headers and libraries are searched under -LIBHSAKMT_PATH/include and LIBHSAKMT_PATH/lib respectively. - +export LIBHSAKMT_PATH=/path/to/libhsakmt.a +With that, CMake/make will look for the lib at LIBHSAKMT_PATH/libhsakmt.a +Note that this assumes that you will be building kfdtest from the same thunk found in ../.. 2. How to run kfdtest Just run "./run_kfdtest.sh" under the building output folder. You may need to specify library path through: -export LD_LIBRARY_PATH=/*your library path containing libhsakmt*/ +export LD_LIBRARY_PATH=/path/to/libhsakmt.a Note: you can use "run_kfdtest.sh -h" to see more options.