From: Andreas Beckmann Date: Mon, 29 Nov 2021 19:21:02 +0000 (+0100) Subject: [PATCH 78/90] add POCL_EXPORT to additional symbols needed by the hsa device X-Git-Tag: archive/raspbian/1.8-3+rpi1^2~59 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ffa4062d33ad5274aa31adbd5949e2012c0e09cd;p=pocl.git [PATCH 78/90] add POCL_EXPORT to additional symbols needed by the hsa device Gbp-Pq: Name 0078-add-POCL_EXPORT-to-additional-symbols-needed-by-the-.patch --- diff --git a/include/pocl_file_util.h b/include/pocl_file_util.h index 68fe72c..2030f1f 100644 --- a/include/pocl_file_util.h +++ b/include/pocl_file_util.h @@ -60,6 +60,7 @@ int pocl_write_tempfile (char *output_path, const char *prefix, /* Allocates memory and places file contents in it. * Returns negative errno on error, zero otherwise. */ +POCL_EXPORT int pocl_read_file(const char* path, char** content, uint64_t *filesize); int pocl_write_module(void *module, const char* path, int dont_rewrite); diff --git a/lib/CL/devices/basic/basic.c b/lib/CL/devices/basic/basic.c index bab231b..939282d 100644 --- a/lib/CL/devices/basic/basic.c +++ b/lib/CL/devices/basic/basic.c @@ -245,6 +245,7 @@ pocl_basic_init (unsigned j, cl_device_id device, const char* parameters) } +POCL_EXPORT cl_int pocl_basic_alloc_mem_obj (cl_device_id device, cl_mem mem, void* host_ptr) { @@ -274,6 +275,7 @@ pocl_basic_alloc_mem_obj (cl_device_id device, cl_mem mem, void* host_ptr) } +POCL_EXPORT void pocl_basic_free (cl_device_id device, cl_mem mem) { @@ -831,6 +833,7 @@ pocl_basic_svm_copy (cl_device_id dev, void *__restrict__ dst, memcpy (dst, src, size); } +POCL_EXPORT void pocl_basic_svm_fill (cl_device_id dev, void *__restrict__ svm_ptr, size_t size, void *__restrict__ pattern, size_t pattern_size) diff --git a/lib/CL/devices/common.h b/lib/CL/devices/common.h index 05c1845..b3cf0fa 100644 --- a/lib/CL/devices/common.h +++ b/lib/CL/devices/common.h @@ -82,6 +82,7 @@ void pocl_init_dlhandle_cache (); POCL_EXPORT char *pocl_check_kernel_disk_cache (_cl_command_node *cmd, int specialized); +POCL_EXPORT size_t pocl_cmd_max_grid_dim_width (_cl_command_run *cmd); POCL_EXPORT @@ -92,8 +93,10 @@ void pocl_check_kernel_dlhandle_cache (_cl_command_node *command, POCL_EXPORT void pocl_release_dlhandle_cache (_cl_command_node *cmd); +POCL_EXPORT void pocl_setup_device_for_system_memory(cl_device_id device); +POCL_EXPORT void pocl_reinit_system_memory(); POCL_EXPORT diff --git a/lib/CL/devices/pocl_local_size.h b/lib/CL/devices/pocl_local_size.h index 359a195..deaaef4 100644 --- a/lib/CL/devices/pocl_local_size.h +++ b/lib/CL/devices/pocl_local_size.h @@ -39,6 +39,7 @@ void pocl_default_local_size_optimizer (cl_device_id dev, size_t global_x, * results as a side effect from the small work-groups. Performs an exhaustive * search, thus should not be used with devices with a large work-group * support. */ +POCL_EXPORT void pocl_wg_utilization_maximizer (cl_device_id dev, size_t global_x, size_t global_y, size_t global_z, size_t *local_x, size_t *local_y, diff --git a/lib/CL/pocl_debug.h b/lib/CL/pocl_debug.h index 0b90c1c..63b3b13 100644 --- a/lib/CL/pocl_debug.h +++ b/lib/CL/pocl_debug.h @@ -133,6 +133,7 @@ POCL_EXPORT const char* msg, const char *func, unsigned line); +POCL_EXPORT extern void pocl_debug_print_duration (const char* func, unsigned line, const char* msg, uint64_t nanosecs); #define POCL_MEASURE_START(SUFFIX) \ diff --git a/lib/CL/pocl_intfn.h b/lib/CL/pocl_intfn.h index f2ae7d0..d19a2b8 100644 --- a/lib/CL/pocl_intfn.h +++ b/lib/CL/pocl_intfn.h @@ -98,6 +98,7 @@ POdeclsym(clGetSupportedImageFormats) POdeclsymICD(clIcdGetPlatformIDsKHR) POdeclsym(clReleaseCommandQueue) POdeclsym(clReleaseContext) +POCL_EXPORT POdeclsym(clReleaseDevice) POCL_EXPORT POdeclsym(clReleaseEvent) diff --git a/lib/CL/pocl_util.h b/lib/CL/pocl_util.h index 35527ff..60930ad 100644 --- a/lib/CL/pocl_util.h +++ b/lib/CL/pocl_util.h @@ -195,6 +195,7 @@ void pocl_update_event_queued (cl_event event); POCL_EXPORT void pocl_update_event_submitted (cl_event event); +POCL_EXPORT void pocl_update_event_running_unlocked (cl_event event); POCL_EXPORT @@ -220,6 +221,7 @@ POCL_EXPORT const char * pocl_command_to_str (cl_command_type cmd); +POCL_EXPORT int pocl_run_command(char * const *args);