OpenCL Kernels: Use the kernel local buffer size as additional reference in order to limit the thread-count

This commit is contained in:
Jens Steube
2018-02-11 10:56:08 +01:00
parent a7a15df911
commit d656e9c3a4
9 changed files with 130 additions and 17 deletions
+3
View File
@@ -61,4 +61,7 @@ bool hc_same_files (char *file1, char *file2);
u32 hc_strtoul (const char *nptr, char **endptr, int base);
u64 hc_strtoull (const char *nptr, char **endptr, int base);
u32 power_of_two_ceil_32 (const u32 v);
u32 power_of_two_floor_32 (const u32 v);
#endif // _SHARED_H
+11 -5
View File
@@ -138,14 +138,19 @@ typedef enum amplifier_count
KERNEL_BFS = 1024,
KERNEL_COMBS = 1024,
KERNEL_RULES = 256,
KERNEL_THREADS_MAX_CPU = 1,
KERNEL_THREADS_MAX_GPU = 8, // ex: intel integrated
KERNEL_THREADS_MAX_GPU_NV = 32, // optimized NV size: warps
KERNEL_THREADS_MAX_GPU_AMD = 64, // optimized AMD size: wavefronts
KERNEL_THREADS_MAX_OTHER = 8, // ex: intel MIC
} amplifier_count_t;
typedef enum native_threads
{
KERNEL_THREADS_NATIVE_CPU = 1,
KERNEL_THREADS_NATIVE_GPU = 8, // ex: intel integrated
KERNEL_THREADS_NATIVE_GPU_NV = 32, // optimized NV size: warps
KERNEL_THREADS_NATIVE_GPU_AMD = 64, // optimized AMD size: wavefronts
KERNEL_THREADS_NATIVE_OTHER = 8, // ex: intel MIC
} native_threads_t;
typedef enum vendor_id
{
VENDOR_ID_AMD = (1 << 0),
@@ -923,6 +928,7 @@ typedef struct hc_device_param
u64 device_global_mem;
u32 device_maxclock_frequency;
size_t device_maxworkgroup_size;
u64 device_local_mem_size;
u32 vector_width;