From: Andreas Beckmann Date: Wed, 16 Mar 2022 15:10:50 +0000 (+0100) Subject: [PATCH 1006/1017] always use runtime determined llvm_cpu to compute build_hash X-Git-Tag: archive/raspbian/3.0-6+rpi1~1^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=74c537f35e92f59b497db481fb797c6bdc98a71e;p=pocl.git [PATCH 1006/1017] always use runtime determined llvm_cpu to compute build_hash Gbp-Pq: Name 1006-always-use-runtime-determined-llvm_cpu-to-compute-bu.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a31872c..919f8ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -479,11 +479,7 @@ if(ENABLE_LLVM) if(ENABLE_HOST_CPU_DEVICES) if(NOT DEFINED HOST_DEVICE_BUILD_HASH) - if(KERNELLIB_HOST_CPU_VARIANTS STREQUAL "distro") set(HOST_DEVICE_BUILD_HASH "${LLC_TRIPLE}") - else() - set(HOST_DEVICE_BUILD_HASH "${LLC_TRIPLE}-${LLC_HOST_CPU}") - endif() endif() if(INTEL_SDE_AVX512) diff --git a/lib/CL/devices/basic/basic.c b/lib/CL/devices/basic/basic.c index 689af09..8caf074 100644 --- a/lib/CL/devices/basic/basic.c +++ b/lib/CL/devices/basic/basic.c @@ -143,13 +143,8 @@ char * pocl_basic_build_hash (cl_device_id device) { char* res = calloc(1000, sizeof(char)); -#ifdef KERNELLIB_HOST_DISTRO_VARIANTS - char *name = pocl_get_llvm_cpu_name (); - snprintf (res, 1000, "basic-%s-%s", HOST_DEVICE_BUILD_HASH, name); - POCL_MEM_FREE (name); -#else - snprintf (res, 1000, "basic-%s", HOST_DEVICE_BUILD_HASH); -#endif + snprintf (res, 1000, "basic-%s-%s", HOST_DEVICE_BUILD_HASH, + device->llvm_cpu); return res; } diff --git a/lib/CL/devices/pthread/pthread.c b/lib/CL/devices/pthread/pthread.c index 9d250c0..150c879 100644 --- a/lib/CL/devices/pthread/pthread.c +++ b/lib/CL/devices/pthread/pthread.c @@ -101,13 +101,8 @@ char * pocl_pthread_build_hash (cl_device_id device) { char* res = calloc(1000, sizeof(char)); -#ifdef KERNELLIB_HOST_DISTRO_VARIANTS - char *name = pocl_get_llvm_cpu_name (); - snprintf (res, 1000, "pthread-%s-%s", HOST_DEVICE_BUILD_HASH, name); - POCL_MEM_FREE (name); -#else - snprintf (res, 1000, "pthread-%s", HOST_DEVICE_BUILD_HASH); -#endif + snprintf (res, 1000, "pthread-%s-%s", HOST_DEVICE_BUILD_HASH, + device->llvm_cpu); return res; }