Fixes
This commit is contained in:
@@ -77,6 +77,8 @@ set(GPUFECH_COMMON
|
||||
${COMMON_DIR}/uarch.cpp
|
||||
)
|
||||
|
||||
set(GPUFETCH_LINK_TARGETS z)
|
||||
|
||||
if(NOT(ENABLE_HSA_BACKEND AND NOT ENABLE_CUDA_BACKEND AND NOT ENABLE_INTEL_BACKEND))
|
||||
# Look for pciutils only if not building HSA only.
|
||||
#
|
||||
@@ -86,6 +88,7 @@ if(NOT(ENABLE_HSA_BACKEND AND NOT ENABLE_CUDA_BACKEND AND NOT ENABLE_INTEL_BACKE
|
||||
# get at least some feedback even if HSA is not found.
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||
list(APPEND GPUFECH_COMMON ${COMMON_DIR}/pci.cpp ${COMMON_DIR}/sort.cpp)
|
||||
list(APPEND GPUFETCH_LINK_TARGETS pci)
|
||||
set(CMAKE_ENABLE_PCIUTILS ON)
|
||||
|
||||
find_package(PCIUTILS)
|
||||
@@ -182,7 +185,7 @@ if(ENABLE_HSA_BACKEND)
|
||||
target_link_libraries(gpufetch hsa_backend)
|
||||
endif()
|
||||
|
||||
target_link_libraries(gpufetch pci z)
|
||||
target_link_libraries(gpufetch ${GPUFETCH_LINK_TARGETS})
|
||||
install(TARGETS gpufetch DESTINATION bin)
|
||||
|
||||
if(NOT WIN32)
|
||||
|
||||
@@ -127,7 +127,7 @@ enum {
|
||||
#define CHECK_UARCH_START if (false) {}
|
||||
#define CHECK_UARCH(arch, chip_, str, uarch, process) \
|
||||
else if (arch->chip == chip_) fill_uarch(arch, str, uarch, process);
|
||||
#define CHECK_UARCH_END else { if(arch->chip != CHIP_UNKNOWN_CUDA) printBug("map_chip_to_uarch_hsa: Unknown chip id: %d", arch->chip); fill_uarch(arch, STRING_UNKNOWN, UARCH_UNKNOWN, UNK); }
|
||||
#define CHECK_UARCH_END else { if(arch->chip != CHIP_UNKNOWN_HSA) printBug("map_chip_to_uarch_hsa: Unknown chip id: %d", arch->chip); fill_uarch(arch, STRING_UNKNOWN, UARCH_UNKNOWN, UNK); }
|
||||
|
||||
void fill_uarch(struct uarch* arch, char const *str, MICROARCH u, uint32_t process) {
|
||||
arch->chip_str = (char *) emalloc(sizeof(char) * (strlen(str)+1));
|
||||
|
||||
Reference in New Issue
Block a user