From fed25190a817ca9270c3a4ca4409d7201c618105 Mon Sep 17 00:00:00 2001 From: Hans Pabst Date: Tue, 30 Jan 2024 14:48:59 +0100 Subject: [PATCH] ocl: pointer-arithmetic for device-pointers * Implemented pointer-arithmetic for device-pointers using Intel's USM as well as fallback code. * Fallback to main-thread's stream (c_dbcsr_acc_opencl_stream_default). * Fixed c_dbcsr_acc_opencl_stream_default and reduce one level of indirection. * Reworked entire memory allocation (determining offsets). * Consolidated compile-time decisions about LIBXSMM_VERSION_NUMBER. * Removed runtime decisions accounting for pooled allocations. * Removed support for performance estimation and suitability. * Support older LIBXSMM (pooled memory allocations). * Set ACC_OPENCL_ATOMIC_KIND to sequentially consistent; set ACC_OPENCL_NLOCKS=1. * Complemented ACC_OPENCL_NLOCKS with environment variable. * Introduced ACC_OPENCL_OMPLOCKS, ACC_OPENCL_MEM_DEBUG, ACC_OPENCL_EVENT_FLUSH. * Implemented behavior of c_dbcsr_acc_opencl_stream_default already in c_dbcsr_acc_opencl_stream. * Cache active device-ID to avoid determining context/properties (c_dbcsr_acc_set_active_device). * Support event chain (dependency), improved handling errors (c_dbcsr_acc_stream_wait_event). * Support event chain (dependency), improved handling errors (c_dbcsr_acc_event_record). * Introduced lock-arguments (internal, e.g., c_dbcsr_acc_opencl_set_active_device). * Consolidated domain-locks into c_dbcsr_acc_opencl_config. * Made build-log available (c_dbcsr_acc_opencl_kernel). * Reworked stream-registry and stream-info facility. * Consolidated tuned parameters, and updated tuned parameters. * Use "int" instead of "cl_int" when taking the return-code. * Consistently use EXIT_SUCCESS instead of CL_SUCCESS. * Removed support for ACC_OPENCL_OVERMALLOC. * Removed support for per-thread device. * Removed ACC_OPENCL_EVENT_BARRIER. * Introduced ACC_OPENCL_MEM_TLS (disabled). * Simplified c_dbcsr_acc_opencl_memset. * Support ACC_OPENCL_STREAM_NULL in event facility. * Introduced assertion (dbcsr_acc_devmem.F). * Fixed using size_t as kernel argument. * Introduced UNROLL_AUTO. --- src/CMakeLists.txt | 1 + src/acc/acc_bench_smm.c | 2 +- src/acc/dbcsr_acc_devmem.F | 6 +- src/acc/opencl/Makefile | 2 +- src/acc/opencl/acc_opencl.c | 1025 ++++++++--------- src/acc/opencl/acc_opencl.h | 286 +++-- src/acc/opencl/acc_opencl_event.c | 186 ++- src/acc/opencl/acc_opencl_mem.c | 853 +++++++------- src/acc/opencl/acc_opencl_stream.c | 300 +++-- src/acc/opencl/common/opencl_common.h | 19 +- src/acc/opencl/smm/CMakeLists.txt | 30 +- src/acc/opencl/smm/kernels/multiply.cl | 17 +- src/acc/opencl/smm/opencl_libsmm.c | 458 +++----- src/acc/opencl/smm/opencl_libsmm.h | 6 +- .../smm/params/tune_multiply_A100-40GB.csv | 215 ---- ...y_A100-80GB.csv => tune_multiply_A100.csv} | 48 +- .../opencl/smm/params/tune_multiply_PVC.csv | 371 ++++-- tests/CMakeLists.txt | 4 +- tests/dbcsr_test_multiply.F | 4 +- 19 files changed, 1828 insertions(+), 2005 deletions(-) delete mode 100644 src/acc/opencl/smm/params/tune_multiply_A100-40GB.csv rename src/acc/opencl/smm/params/{tune_multiply_A100-80GB.csv => tune_multiply_A100.csv} (93%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4cdd3c494e1..3f64deea382 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -192,6 +192,7 @@ if (USE_SMM MATCHES "libxsmm") target_link_libraries(dbcsr PRIVATE PkgConfig::LIBXSMMEXT) endif () target_link_libraries(dbcsr PRIVATE PkgConfig::LIBXSMM) + target_link_libraries(dbcsr PRIVATE ${BLAS_LIBRARIES}) endif () if (BLAS_LIBRARIES MATCHES "mkl_") diff --git a/src/acc/acc_bench_smm.c b/src/acc/acc_bench_smm.c index 0527715b83d..2841b03090c 100644 --- a/src/acc/acc_bench_smm.c +++ b/src/acc/acc_bench_smm.c @@ -499,7 +499,7 @@ int main(int argc, char* argv[]) { if (maxdiff < epsilon && NULL != file) maxdiff = epsilon; if (0 < epsilon) { if (LIBXSMM_NOTNAN(diff.v_tst)) { - PRINTF(" (%g != %g)\n", diff.v_ref, diff.v_tst); + PRINTF(" (|%g-%g|=%g)\n", diff.v_ref, diff.v_tst, fabs(diff.v_ref - diff.v_tst)); } else { PRINTF(" (%g)\n", diff.v_tst); diff --git a/src/acc/dbcsr_acc_devmem.F b/src/acc/dbcsr_acc_devmem.F index 475414bfb4a..7c97019c42d 100644 --- a/src/acc/dbcsr_acc_devmem.F +++ b/src/acc/dbcsr_acc_devmem.F @@ -10,7 +10,7 @@ MODULE dbcsr_acc_devmem !! Accelerator support #if defined (__DBCSR_ACC) - USE ISO_C_BINDING, ONLY: C_INT, C_SIZE_T, C_PTR, C_LOC, C_NULL_PTR + USE ISO_C_BINDING, ONLY: C_INT, C_SIZE_T, C_PTR, C_LOC, C_NULL_PTR, C_ASSOCIATED #endif USE dbcsr_kinds, ONLY: int_4, & int_4_size, & @@ -255,6 +255,10 @@ FUNCTION acc_devmem_allocated(this) RESULT(res) LOGICAL :: res !! true if device memory is allocated, false otherwise +#if defined (__DBCSR_ACC) + DBCSR_ASSERT(C_ASSOCIATED(this%cptr) .OR. this%size_in_bytes <= 0) +#endif + res = this%size_in_bytes >= 0 END FUNCTION acc_devmem_allocated diff --git a/src/acc/opencl/Makefile b/src/acc/opencl/Makefile index db5950b5a5c..3c32cd1c4ef 100644 --- a/src/acc/opencl/Makefile +++ b/src/acc/opencl/Makefile @@ -136,7 +136,7 @@ ifneq (0,$(DBG)) CFLAGS += -O0 endif else - CFLAGS += -O2 -DNDEBUG -DNDBGDEV + CFLAGS += -O2 -DNDEBUG SYM := 0 endif ifneq (0,$(SYM)) diff --git a/src/acc/opencl/acc_opencl.c b/src/acc/opencl/acc_opencl.c index 13c19d54f4c..b4d1ca4aa2b 100644 --- a/src/acc/opencl/acc_opencl.c +++ b/src/acc/opencl/acc_opencl.c @@ -28,11 +28,17 @@ # define S_ISDIR(A) ((S_IFMT & (A)) == S_IFDIR) # endif +# if !defined(ACC_OPENCL_NLOCKS) +# define ACC_OPENCL_NLOCKS 4 +# endif # if !defined(ACC_OPENCL_TEMPDIR) && 1 # define ACC_OPENCL_TEMPDIR "/tmp" # endif -# if !defined(ACC_OPENCL_CACHEDIR) && 0 -# define ACC_OPENCL_CACHEDIR ".cl_cache" +# if !defined(ACC_OPENCL_CACHE_DID) && 1 +# define ACC_OPENCL_CACHE_DID +# endif +# if !defined(ACC_OPENCL_CACHE_DIR) && 0 +# define ACC_OPENCL_CACHE_DIR ".cl_cache" # endif # if !defined(ACC_OPENCL_CPPBIN) && 1 # define ACC_OPENCL_CPPBIN "/usr/bin/cpp" @@ -40,11 +46,12 @@ # if !defined(ACC_OPENCL_SEDBIN) && 1 # define ACC_OPENCL_SEDBIN "/usr/bin/sed" # endif -# if !defined(ACC_OPENCL_NCCS) && 1 -# define ACC_OPENCL_NCCS 4 +/* attempt to enable command aggregation */ +# if !defined(ACC_OPENCL_CMDAGR) && 1 +# define ACC_OPENCL_CMDAGR # endif -# if !defined(ACC_OPENCL_IENV) && 1 -# define ACC_OPENCL_IENV +# if !defined(ACC_OPENCL_NCCS) && 1 +# define ACC_OPENCL_NCCS 0 # endif @@ -52,9 +59,13 @@ extern "C" { # endif +char c_dbcsr_acc_opencl_locks[ACC_OPENCL_CACHELINE * ACC_OPENCL_NLOCKS]; /* global configuration discovered during initialization */ c_dbcsr_acc_opencl_config_t c_dbcsr_acc_opencl_config; +# if defined(ACC_OPENCL_CACHE_DID) +int c_dbcsr_acc_opencl_active_id; +# endif void c_dbcsr_acc_opencl_notify(const char /*errinfo*/[], const void* /*private_info*/, size_t /*cb*/, void* /*user_data*/); void c_dbcsr_acc_opencl_notify(const char errinfo[], const void* private_info, size_t cb, void* user_data) { @@ -65,47 +76,6 @@ void c_dbcsr_acc_opencl_notify(const char errinfo[], const void* private_info, s } -cl_context c_dbcsr_acc_opencl_context(int* thread_id) { - cl_context result; - const int tid = ACC_OPENCL_OMP_TID(); - assert(0 <= tid && tid < c_dbcsr_acc_opencl_config.nthreads); - assert(NULL != c_dbcsr_acc_opencl_config.device); - result = c_dbcsr_acc_opencl_config.device[tid].context; - if (NULL == result) { /* fallback */ - int i = 0; /* prefer master's context */ - for (; i < c_dbcsr_acc_opencl_config.nthreads; ++i) { - if (tid != i) { /* adopt another context */ - result = c_dbcsr_acc_opencl_config.device[i].context; - if (NULL != result && CL_SUCCESS == clRetainContext(result)) break; - else result = NULL; - } - } - } - if (NULL != thread_id) *thread_id = tid; - return result; -} - - -cl_context c_dbcsr_acc_opencl_device_context(cl_device_id device, const int* thread_id) { - const int i0 = (NULL != thread_id ? *thread_id : /*main*/ 0); - cl_context result = NULL; - int i = 0; - for (; i < c_dbcsr_acc_opencl_config.nthreads; ++i) { - const int j = i + i0, tid = (j < c_dbcsr_acc_opencl_config.nthreads ? j : (j - c_dbcsr_acc_opencl_config.nthreads)); - result = c_dbcsr_acc_opencl_config.device[tid].context; - if (NULL != result) { - cl_device_id device_id = NULL; - if (CL_SUCCESS == clGetContextInfo(result, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device_id, NULL) && device == device_id) - { - break; - } - else result = NULL; - } - } - return result; -} - - /** * Comparator used with qsort; stabilized by tail condition (a < b ? -1 : 1). * Brings GPUs with local memory in front, followed by (potentially) integrated GPUs, @@ -194,43 +164,65 @@ int c_dbcsr_acc_init(void) { c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif if (EXIT_SUCCESS == result && 0 == c_dbcsr_acc_opencl_config.ndevices) { /* avoid to initialize multiple times */ - cl_platform_id platforms[ACC_OPENCL_DEVICES_MAXCOUNT] = {NULL}; - cl_device_id devices[ACC_OPENCL_DEVICES_MAXCOUNT]; + cl_platform_id platforms[ACC_OPENCL_MAXNDEVS] = {NULL}; + cl_device_id devices[ACC_OPENCL_MAXNDEVS]; char buffer[ACC_OPENCL_BUFFERSIZE]; const char *const env_devmatch = getenv("ACC_OPENCL_DEVMATCH"), *const env_devtype = getenv("ACC_OPENCL_DEVTYPE"); const char *const env_priority = getenv("ACC_OPENCL_PRIORITY"), *const env_xhints = getenv("ACC_OPENCL_XHINTS"); - const char *const env_devcopy = getenv("ACC_OPENCL_DEVCOPY"), *const env_verbose = getenv("ACC_OPENCL_VERBOSE"); + const char *const env_verbose = getenv("ACC_OPENCL_VERBOSE"), *const env_debug = getenv("ACC_OPENCL_DEBUG"); const char *const env_device = getenv("ACC_OPENCL_DEVICE"), *const env_dump_acc = getenv("ACC_OPENCL_DUMP"); - const char *const env_async = getenv("ACC_OPENCL_ASYNC"), *const env_timer = getenv("ACC_OPENCL_TIMER"); + const char *const env_timer = getenv("ACC_OPENCL_TIMER"), *const env_nlocks = getenv("ACC_OPENCL_NLOCKS"); const char* const env_dump = (NULL != env_dump_acc ? env_dump_acc : getenv("IGC_ShaderDumpEnable")); -# if defined(ACC_OPENCL_NCCS) && (0 < ACC_OPENCL_NCCS) - const char *const env_zex = getenv("ZEX_NUMBER_OF_CCS"), *const env_nccs = getenv("ACC_OPENCL_NCCS"); - const char* const env_flt = getenv("ZE_FLAT_DEVICE_HIERARCHY"); - const int nccs = (NULL == env_nccs ? 0 : atoi(env_nccs)); +# if defined(ACC_OPENCL_NCCS) + const char* const env_nccs = getenv("ACC_OPENCL_NCCS"); + const int nccs = (NULL == env_nccs ? ACC_OPENCL_NCCS : atoi(env_nccs)); # endif -# if defined(ACC_OPENCL_IENV) - const char *const env_neo = getenv("NEOReadDebugKeys"), *const env_ienv = getenv("ACC_OPENCL_IENV"); - const int neo = (NULL == env_neo ? 1 : atoi(env_neo)), ienv = neo * (NULL == env_ienv ? 1 : atoi(env_ienv)); + const char *const env_neo = getenv("NEOReadDebugKeys"), *const env_wa = getenv("ACC_OPENCL_WA"); + const int neo = (NULL == env_neo ? 1 : atoi(env_neo)), wa = neo * (NULL == env_wa ? 1 : atoi(env_wa)); +# if defined(ACC_OPENCL_ASYNC) + const char* const env_async = (ACC_OPENCL_ASYNC); + const int async_default = 3; +# else + const char* const env_async = NULL; + const int async_default = 0; # endif char* const env_devids = getenv("ACC_OPENCL_DEVIDS"); int device_id = (NULL == env_device ? 0 : atoi(env_device)); + const int nlocks = (NULL == env_nlocks ? 1 /*default*/ : atoi(env_nlocks)); cl_uint nplatforms = 0, ndevices = 0, i; cl_device_type type = CL_DEVICE_TYPE_ALL; # if defined(_OPENMP) const int max_threads = omp_get_max_threads(), num_threads = omp_get_num_threads(); c_dbcsr_acc_opencl_config.nthreads = (num_threads < max_threads ? max_threads : num_threads); - c_dbcsr_acc_opencl_config.nstreams = (num_threads < max_threads ? (ACC_OPENCL_STREAMS_MAXCOUNT + max_threads) - : (ACC_OPENCL_STREAMS_MAXCOUNT)); + c_dbcsr_acc_opencl_config.nstreams = (num_threads < max_threads ? (ACC_OPENCL_MAXNITEMS * max_threads) + : (ACC_OPENCL_MAXNITEMS)); # else c_dbcsr_acc_opencl_config.nthreads = 1; - c_dbcsr_acc_opencl_config.nstreams = ACC_OPENCL_STREAMS_MAXCOUNT; + c_dbcsr_acc_opencl_config.nstreams = ACC_OPENCL_MAXNITEMS; # endif +# if defined(ACC_OPENCL_CACHE_DID) + assert(0 == c_dbcsr_acc_opencl_active_id); +# endif + assert(sizeof(ACC_OPENCL_LOCKTYPE) <= ACC_OPENCL_CACHELINE); + for (i = 0; i < ACC_OPENCL_NLOCKS; ++i) { + ACC_OPENCL_INIT((ACC_OPENCL_LOCKTYPE*)(c_dbcsr_acc_opencl_locks + ACC_OPENCL_CACHELINE * i)); + } + c_dbcsr_acc_opencl_config.lock_main = (ACC_OPENCL_LOCKTYPE*)c_dbcsr_acc_opencl_locks; + c_dbcsr_acc_opencl_config.lock_memory = /* 2nd lock-domain */ + (1 < LIBXSMM_MIN(nlocks, ACC_OPENCL_NLOCKS) ? ((ACC_OPENCL_LOCKTYPE*)(c_dbcsr_acc_opencl_locks + ACC_OPENCL_CACHELINE * 1)) + : c_dbcsr_acc_opencl_config.lock_main); + c_dbcsr_acc_opencl_config.lock_stream = /* 3rd lock-domain */ + (2 < LIBXSMM_MIN(nlocks, ACC_OPENCL_NLOCKS) ? ((ACC_OPENCL_LOCKTYPE*)(c_dbcsr_acc_opencl_locks + ACC_OPENCL_CACHELINE * 2)) + : c_dbcsr_acc_opencl_config.lock_main); + c_dbcsr_acc_opencl_config.lock_event = /* 4th lock-domain */ + (3 < LIBXSMM_MIN(nlocks, ACC_OPENCL_NLOCKS) ? ((ACC_OPENCL_LOCKTYPE*)(c_dbcsr_acc_opencl_locks + ACC_OPENCL_CACHELINE * 3)) + : c_dbcsr_acc_opencl_config.lock_main); c_dbcsr_acc_opencl_config.verbosity = (NULL == env_verbose ? 0 : atoi(env_verbose)); c_dbcsr_acc_opencl_config.priority = (NULL == env_priority ? /*default*/ 3 : atoi(env_priority)); - c_dbcsr_acc_opencl_config.devcopy = (NULL == env_devcopy ? /*default*/ 0 : atoi(env_devcopy)); - c_dbcsr_acc_opencl_config.xhints = (NULL == env_xhints ? /*default*/ 5 : atoi(env_xhints)); - c_dbcsr_acc_opencl_config.async = (NULL == env_async ? /*default*/ 3 : atoi(env_async)); + c_dbcsr_acc_opencl_config.xhints = (NULL == env_xhints ? /*default*/ 7 : atoi(env_xhints)); + c_dbcsr_acc_opencl_config.async = (NULL == env_async ? async_default : atoi(env_async)); c_dbcsr_acc_opencl_config.dump = (NULL == env_dump ? /*default*/ 0 : atoi(env_dump)); + c_dbcsr_acc_opencl_config.debug = (NULL == env_debug ? c_dbcsr_acc_opencl_config.dump : atoi(env_debug)); if (EXIT_SUCCESS != c_dbcsr_acc_opencl_device_uid(NULL /*device*/, env_devmatch, &c_dbcsr_acc_opencl_config.devmatch)) { c_dbcsr_acc_opencl_config.devmatch = 1; } @@ -241,57 +233,66 @@ int c_dbcsr_acc_init(void) { { c_dbcsr_acc_opencl_config.timer = c_dbcsr_acc_opencl_timer_host; } -# if defined(ACC_OPENCL_NCCS) && (0 < ACC_OPENCL_NCCS) - if ((NULL == env_zex && NULL == env_flt && 0 == (4 & c_dbcsr_acc_opencl_config.xhints)) || - (0 == LIBXSMM_PUTENV("ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE") && 0 != nccs)) - { - static char zex_number_of_ccs[ACC_OPENCL_DEVICES_MAXCOUNT * 8 + 32] = "ZEX_NUMBER_OF_CCS="; - int j = strlen(zex_number_of_ccs); - for (i = 0; i < ACC_OPENCL_DEVICES_MAXCOUNT; ++i) { - const int n = LIBXSMM_SNPRINTF( - zex_number_of_ccs + j, sizeof(zex_number_of_ccs) - j, 0 < i ? ",%u:%i" : "%u:%i", i, 0 >= nccs ? ACC_OPENCL_NCCS : nccs); + if (NULL == getenv("ZE_FLAT_DEVICE_HIERARCHY") && 0 != (1 & c_dbcsr_acc_opencl_config.xhints)) { + static char ze_flat[] = "ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE"; + /* environment is populated before touching the compute runtime */ + ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(ze_flat)); /* soft-error */ + } +# if defined(ACC_OPENCL_NCCS) + if (NULL == getenv("ZEX_NUMBER_OF_CCS") && 0 != nccs) { + static char zex_nccs[ACC_OPENCL_MAXNDEVS * 8 + 32] = "ZEX_NUMBER_OF_CCS="; + int j = strlen(zex_nccs); + for (i = 0; i < ACC_OPENCL_MAXNDEVS; ++i) { + const char* const istr = (0 < i ? ",%u:%i" : "%u:%i"); + const int n = LIBXSMM_SNPRINTF(zex_nccs + j, sizeof(zex_nccs) - j, istr, i, LIBXSMM_MAX(nccs, 1)); if (0 < n) j += n; else { j = 0; break; } } - if (0 < j) ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(zex_number_of_ccs)); /* soft-error */ + /* environment is populated before touching the compute runtime */ + if (0 < j) ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(zex_nccs)); /* soft-error */ } # endif -# if defined(ACC_OPENCL_IENV) - if (0 != ienv) { - if (NULL == getenv("NEOReadDebugKeys")) ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV("NEOReadDebugKeys=1")); - if (NULL == getenv("EnableRecoverablePageFaults")) { - ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV("EnableRecoverablePageFaults=0")); + if (0 != wa) { /* environment is populated before touching the compute runtime */ + static char* key_value[] = { + "NEOReadDebugKeys=1", "DirectSubmissionOverrideBlitterSupport=0", "EnableRecoverablePageFaults=0"}; + for (i = 0; i < sizeof(key_value) / sizeof(*key_value); ++i) { + const char* const sep = strchr(key_value[i], '='); + const size_t n = (NULL != sep ? (sep - key_value[i]) : 0); + if (0 < n && n < ACC_OPENCL_BUFFERSIZE) { + memcpy(buffer, key_value[i], n); + buffer[n] = '\0'; + ACC_OPENCL_EXPECT(NULL != getenv(buffer) || 0 == LIBXSMM_PUTENV(key_value[i])); + } } } -# endif -# if defined(ACC_OPENCL_CACHEDIR) - { +# if defined(ACC_OPENCL_CACHE_DIR) + { /* environment is populated before touching the compute runtime */ const char *const env_cache = getenv("ACC_OPENCL_CACHE"), *env_cachedir = getenv("NEO_CACHE_DIR"); int cache = (NULL == env_cache ? 0 : atoi(env_cache)); struct stat cachedir; if (0 == cache) { - if (stat(ACC_OPENCL_CACHEDIR, &cachedir) == 0 && S_ISDIR(cachedir.st_mode)) cache = 1; - else if (stat(ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHEDIR, &cachedir) == 0 && S_ISDIR(cachedir.st_mode)) cache = 2; + if (stat(ACC_OPENCL_CACHE_DIR, &cachedir) == 0 && S_ISDIR(cachedir.st_mode)) cache = 1; + else if (stat(ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHE_DIR, &cachedir) == 0 && S_ISDIR(cachedir.st_mode)) cache = 2; } if (1 == cache) { - static char neo_cachedir[] = "NEO_CACHE_DIR=" ACC_OPENCL_CACHEDIR; - static char ocl_cachedir[] = "cl_cache_dir=" ACC_OPENCL_CACHEDIR; + static char neo_cachedir[] = "NEO_CACHE_DIR=" ACC_OPENCL_CACHE_DIR; + static char ocl_cachedir[] = "cl_cache_dir=" ACC_OPENCL_CACHE_DIR; ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(neo_cachedir)); /* putenv before entering OpenCL */ ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(ocl_cachedir)); /* putenv before entering OpenCL */ - env_cachedir = ACC_OPENCL_CACHEDIR; + env_cachedir = ACC_OPENCL_CACHE_DIR; } # if defined(ACC_OPENCL_TEMPDIR) else if (NULL == env_cachedir) { /* code-path entered by default */ if (NULL == env_cache || 0 != cache) { /* customize NEO_CACHE_DIR unless ACC_OPENCL_CACHE=0 */ - static char neo_cachedir[] = "NEO_CACHE_DIR=" ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHEDIR; + static char neo_cachedir[] = "NEO_CACHE_DIR=" ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHE_DIR; ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(neo_cachedir)); /* putenv before entering OpenCL */ - env_cachedir = ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHEDIR; + env_cachedir = ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHE_DIR; } if (0 != cache) { /* legacy-NEO is treated with explicit opt-in */ - static char ocl_cachedir[] = "cl_cache_dir=" ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHEDIR; + static char ocl_cachedir[] = "cl_cache_dir=" ACC_OPENCL_TEMPDIR "/" ACC_OPENCL_CACHE_DIR; ACC_OPENCL_EXPECT(0 == LIBXSMM_PUTENV(ocl_cachedir)); /* putenv before entering OpenCL */ } } @@ -310,9 +311,8 @@ int c_dbcsr_acc_init(void) { } } # endif - if (CL_SUCCESS == clGetPlatformIDs(0, NULL, &nplatforms) && 0 < nplatforms) { - ACC_OPENCL_CHECK( - clGetPlatformIDs(nplatforms <= ACC_OPENCL_DEVICES_MAXCOUNT ? nplatforms : ACC_OPENCL_DEVICES_MAXCOUNT, platforms, 0), + if (EXIT_SUCCESS == clGetPlatformIDs(0, NULL, &nplatforms) && 0 < nplatforms) { + ACC_OPENCL_CHECK(clGetPlatformIDs(nplatforms <= ACC_OPENCL_MAXNDEVS ? nplatforms : ACC_OPENCL_MAXNDEVS, platforms, 0), "retrieve platform ids", result); } if (EXIT_SUCCESS == result) { @@ -332,7 +332,7 @@ int c_dbcsr_acc_init(void) { } c_dbcsr_acc_opencl_config.ndevices = 0; for (i = 0; i < nplatforms; ++i) { - if (CL_SUCCESS == clGetDeviceIDs(platforms[i], type, 0, NULL, &ndevices) && 0 < ndevices) { + if (EXIT_SUCCESS == clGetDeviceIDs(platforms[i], type, 0, NULL, &ndevices) && 0 < ndevices) { ACC_OPENCL_CHECK(clGetDeviceIDs(platforms[i], type, ndevices, devices, NULL), "retrieve device ids", result); if (EXIT_SUCCESS == result) { cl_uint j = 0; @@ -348,7 +348,7 @@ int c_dbcsr_acc_init(void) { CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN, CL_DEVICE_AFFINITY_DOMAIN_NUMA, /*terminator*/ 0}; cl_uint nunits = 0; if (0 != devsplit && - CL_SUCCESS == clGetDeviceInfo(devices[j], CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(cl_uint), &nunits, NULL) && + EXIT_SUCCESS == clGetDeviceInfo(devices[j], CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(cl_uint), &nunits, NULL) && 1 < nunits) { if (1 < devsplit) { @@ -357,8 +357,8 @@ int c_dbcsr_acc_init(void) { } } if ((NULL != env_devsplit && '0' == *env_devsplit) || - (c_dbcsr_acc_opencl_config.ndevices + 1) == ACC_OPENCL_DEVICES_MAXCOUNT || - (CL_SUCCESS != clCreateSubDevices(devices[j], properties, 0, NULL, &n))) + (c_dbcsr_acc_opencl_config.ndevices + 1) == ACC_OPENCL_MAXNDEVS || + (EXIT_SUCCESS != clCreateSubDevices(devices[j], properties, 0, NULL, &n))) # endif { c_dbcsr_acc_opencl_config.devices[c_dbcsr_acc_opencl_config.ndevices] = devices[j]; @@ -371,8 +371,8 @@ int c_dbcsr_acc_init(void) { properties[1] = 1; n = nunits; } - if (ACC_OPENCL_DEVICES_MAXCOUNT < (c_dbcsr_acc_opencl_config.ndevices + n)) { - n = (cl_uint)ACC_OPENCL_DEVICES_MAXCOUNT - c_dbcsr_acc_opencl_config.ndevices; + if (ACC_OPENCL_MAXNDEVS < (c_dbcsr_acc_opencl_config.ndevices + n)) { + n = (cl_uint)ACC_OPENCL_MAXNDEVS - c_dbcsr_acc_opencl_config.ndevices; } if (EXIT_SUCCESS == clCreateSubDevices(devices[j], properties, n, c_dbcsr_acc_opencl_config.devices + c_dbcsr_acc_opencl_config.ndevices, NULL)) @@ -397,12 +397,12 @@ int c_dbcsr_acc_init(void) { /* filter device by vendor (if requested) */ if (NULL != env_vendor && '\0' != *env_vendor) { for (i = 0; (int)i < c_dbcsr_acc_opencl_config.ndevices;) { - if (CL_SUCCESS == + if (EXIT_SUCCESS == clGetDeviceInfo(c_dbcsr_acc_opencl_config.devices[i], CL_DEVICE_VENDOR, ACC_OPENCL_BUFFERSIZE, buffer, NULL)) { if (NULL == LIBXSMM_STRISTR(buffer, env_vendor)) { # if defined(CL_VERSION_1_2) - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseDevice(c_dbcsr_acc_opencl_config.devices[i])); + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseDevice(c_dbcsr_acc_opencl_config.devices[i])); # endif --c_dbcsr_acc_opencl_config.ndevices; if ((int)i < c_dbcsr_acc_opencl_config.ndevices) { /* keep original order (stable) */ @@ -422,9 +422,9 @@ int c_dbcsr_acc_init(void) { } /* ACC_OPENCL_DEVIDS is parsed as a list of devices (whitelist) */ if (EXIT_SUCCESS == result && NULL != env_devids && '\0' != *env_devids) { - cl_uint devids[ACC_OPENCL_DEVICES_MAXCOUNT], ndevids = 0; + cl_uint devids[ACC_OPENCL_MAXNDEVS], ndevids = 0; char* did = strtok(env_devids, ACC_OPENCL_DELIMS " "); - for (; NULL != did && ndevids < ACC_OPENCL_DEVICES_MAXCOUNT; did = strtok(NULL, ACC_OPENCL_DELIMS " ")) { + for (; NULL != did && ndevids < ACC_OPENCL_MAXNDEVS; did = strtok(NULL, ACC_OPENCL_DELIMS " ")) { const int id = atoi(did); if (0 <= id && id < c_dbcsr_acc_opencl_config.ndevices) devids[ndevids++] = id; } @@ -440,7 +440,7 @@ int c_dbcsr_acc_init(void) { while (++j < ndevids); if (0 == match) { # if defined(CL_VERSION_1_2) - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseDevice(c_dbcsr_acc_opencl_config.devices[i])); + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseDevice(c_dbcsr_acc_opencl_config.devices[i])); # endif c_dbcsr_acc_opencl_config.devices[i] = NULL; } @@ -467,7 +467,7 @@ int c_dbcsr_acc_init(void) { for (i = 0; i < ndevices; ++i) { cl_device_type itype; result = clGetDeviceInfo(c_dbcsr_acc_opencl_config.devices[i], CL_DEVICE_TYPE, sizeof(cl_device_type), &itype, NULL); - if (CL_SUCCESS == result) { + if (EXIT_SUCCESS == result) { if (0 != (CL_DEVICE_TYPE_DEFAULT & itype)) { if (0 < i) { c_dbcsr_acc_opencl_config.devices[0] = c_dbcsr_acc_opencl_config.devices[i]; @@ -478,7 +478,7 @@ int c_dbcsr_acc_init(void) { } else if (CL_DEVICE_TYPE_ALL == type && NULL == env_devtype /*&& CL_DEVICE_TYPE_GPU == itype*/ && device_id <= (int)i) { result = clGetDeviceInfo(c_dbcsr_acc_opencl_config.devices[i], CL_DEVICE_NAME, ACC_OPENCL_BUFFERSIZE, buffer, NULL); - if (CL_SUCCESS == result /* prune for homogeneous set of devices */ + if (EXIT_SUCCESS == result /* prune for homogeneous set of devices */ && ('\0' == *tmp || 0 == strncmp(buffer, tmp, ACC_OPENCL_BUFFERSIZE))) { c_dbcsr_acc_opencl_config.ndevices = i + 1; @@ -503,14 +503,77 @@ int c_dbcsr_acc_init(void) { } if (device_id < c_dbcsr_acc_opencl_config.ndevices) { if (EXIT_SUCCESS == result) { - assert(NULL == c_dbcsr_acc_opencl_config.device && 0 < c_dbcsr_acc_opencl_config.ndevices); - assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_DEVICES_MAXCOUNT); - c_dbcsr_acc_opencl_config.device = (c_dbcsr_acc_opencl_device_t*)calloc(/* thread-specific */ - c_dbcsr_acc_opencl_config.nthreads, sizeof(c_dbcsr_acc_opencl_device_t)); - if (NULL != c_dbcsr_acc_opencl_config.device) { - result = c_dbcsr_acc_opencl_set_active_device(/*main*/ 0, device_id); - assert(EXIT_SUCCESS == result || NULL == c_dbcsr_acc_opencl_config.device[/*main*/ 0].context); - if (1 < c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { + const size_t nhandles = ACC_OPENCL_MAXNITEMS * c_dbcsr_acc_opencl_config.nthreads; + assert(0 < c_dbcsr_acc_opencl_config.ndevices); + assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_MAXNDEVS); +# if defined(ACC_OPENCL_MEM_DEVPTR) + c_dbcsr_acc_opencl_config.memptrs = NULL; + c_dbcsr_acc_opencl_config.memptr_data = NULL; + c_dbcsr_acc_opencl_config.nmemptrs = 0; +# endif + c_dbcsr_acc_opencl_config.streams = NULL; + c_dbcsr_acc_opencl_config.events = NULL; + c_dbcsr_acc_opencl_config.stream_data = NULL; + c_dbcsr_acc_opencl_config.event_data = NULL; + c_dbcsr_acc_opencl_config.nstreams = c_dbcsr_acc_opencl_config.nevents = 0; +# if defined(ACC_OPENCL_CACHE_DID) + c_dbcsr_acc_opencl_active_id = device_id + 1; /* update c_dbcsr_acc_opencl_active_id */ +# endif +# if defined(ACC_OPENCL_MEM_DEVPTR) /* allocate and initialize memptr registry */ + c_dbcsr_acc_opencl_config.nmemptrs = nhandles; + c_dbcsr_acc_opencl_config.memptrs = (c_dbcsr_acc_opencl_info_memptr_t**)malloc( + sizeof(c_dbcsr_acc_opencl_info_memptr_t*) * nhandles); + c_dbcsr_acc_opencl_config.memptr_data = (c_dbcsr_acc_opencl_info_memptr_t*)malloc( + sizeof(c_dbcsr_acc_opencl_info_memptr_t) * nhandles); + if (NULL != c_dbcsr_acc_opencl_config.memptrs && NULL != c_dbcsr_acc_opencl_config.memptr_data) { + c_dbcsr_acc_opencl_pmalloc_init(NULL /*lock*/, sizeof(c_dbcsr_acc_opencl_info_memptr_t), + &c_dbcsr_acc_opencl_config.nmemptrs, (void**)c_dbcsr_acc_opencl_config.memptrs, c_dbcsr_acc_opencl_config.memptr_data); + } + else { + free(c_dbcsr_acc_opencl_config.memptrs); + free(c_dbcsr_acc_opencl_config.memptr_data); + c_dbcsr_acc_opencl_config.memptr_data = NULL; + c_dbcsr_acc_opencl_config.memptrs = NULL; + c_dbcsr_acc_opencl_config.nmemptrs = 0; + result = EXIT_FAILURE; + } +# endif + /* allocate and initialize streams registry */ + c_dbcsr_acc_opencl_config.nstreams = nhandles; + c_dbcsr_acc_opencl_config.streams = (c_dbcsr_acc_opencl_stream_t**)malloc(sizeof(c_dbcsr_acc_opencl_stream_t*) * nhandles); + c_dbcsr_acc_opencl_config.stream_data = (c_dbcsr_acc_opencl_stream_t*)malloc( + sizeof(c_dbcsr_acc_opencl_stream_t) * nhandles); + if (NULL != c_dbcsr_acc_opencl_config.streams && NULL != c_dbcsr_acc_opencl_config.stream_data) { + c_dbcsr_acc_opencl_pmalloc_init(NULL /*lock*/, sizeof(c_dbcsr_acc_opencl_stream_t), &c_dbcsr_acc_opencl_config.nstreams, + (void**)c_dbcsr_acc_opencl_config.streams, c_dbcsr_acc_opencl_config.stream_data); + } + else { + free(c_dbcsr_acc_opencl_config.streams); + free(c_dbcsr_acc_opencl_config.stream_data); + c_dbcsr_acc_opencl_config.stream_data = NULL; + c_dbcsr_acc_opencl_config.streams = NULL; + c_dbcsr_acc_opencl_config.nstreams = 0; + result = EXIT_FAILURE; + } + /* allocate and initialize events registry */ + c_dbcsr_acc_opencl_config.nevents = nhandles; + c_dbcsr_acc_opencl_config.events = (cl_event**)malloc(sizeof(cl_event*) * nhandles); + c_dbcsr_acc_opencl_config.event_data = (cl_event*)malloc(sizeof(cl_event) * nhandles); + if (NULL != c_dbcsr_acc_opencl_config.events && NULL != c_dbcsr_acc_opencl_config.event_data) { + c_dbcsr_acc_opencl_pmalloc_init(NULL /*lock*/, sizeof(cl_event*), &c_dbcsr_acc_opencl_config.nevents, + (void**)c_dbcsr_acc_opencl_config.events, c_dbcsr_acc_opencl_config.event_data); + } + else { + free(c_dbcsr_acc_opencl_config.events); + free(c_dbcsr_acc_opencl_config.event_data); + c_dbcsr_acc_opencl_config.event_data = NULL; + c_dbcsr_acc_opencl_config.events = NULL; + c_dbcsr_acc_opencl_config.nevents = 0; + result = EXIT_FAILURE; + } + if (EXIT_SUCCESS == result) { /* lastly, print active device and list of devices */ + result = c_dbcsr_acc_opencl_set_active_device(NULL /*lock*/, device_id); + if (2 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { char platform_name[ACC_OPENCL_BUFFERSIZE]; for (i = 0; i < (cl_uint)c_dbcsr_acc_opencl_config.ndevices; ++i) { if (EXIT_SUCCESS == c_dbcsr_acc_opencl_device_name(c_dbcsr_acc_opencl_config.devices[i], buffer, @@ -521,56 +584,6 @@ int c_dbcsr_acc_init(void) { } } } - else { - result = EXIT_FAILURE; - } - c_dbcsr_acc_opencl_config.nclmems = c_dbcsr_acc_opencl_config.nevents = 0; - c_dbcsr_acc_opencl_config.clmems = c_dbcsr_acc_opencl_config.events = NULL; - c_dbcsr_acc_opencl_config.storage = NULL; -# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && defined(ACC_OPENCL_HANDLES_MAXCOUNT) && \ - (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - if (EXIT_SUCCESS == result) { - const size_t nhandles = ACC_OPENCL_HANDLES_MAXCOUNT * c_dbcsr_acc_opencl_config.nthreads; -# if defined(ACC_OPENCL_MEM_OFFSET) - c_dbcsr_acc_opencl_config.nclmems = nhandles; - c_dbcsr_acc_opencl_config.clmems = (void**)malloc(sizeof(void*) * nhandles); - c_dbcsr_acc_opencl_config.storage = malloc(sizeof(void*) * (nhandles + nhandles)); - if (NULL != c_dbcsr_acc_opencl_config.clmems && NULL != c_dbcsr_acc_opencl_config.storage) { - libxsmm_pmalloc_init(sizeof(void*), &c_dbcsr_acc_opencl_config.nclmems, c_dbcsr_acc_opencl_config.clmems, - (void**)c_dbcsr_acc_opencl_config.storage + nhandles); - } - else { - free(c_dbcsr_acc_opencl_config.clmems); - c_dbcsr_acc_opencl_config.clmems = NULL; - c_dbcsr_acc_opencl_config.nclmems = 0; - result = EXIT_FAILURE; - } -# else - c_dbcsr_acc_opencl_config.storage = malloc(sizeof(void*) * nhandles); -# endif - c_dbcsr_acc_opencl_config.nevents = nhandles; - c_dbcsr_acc_opencl_config.events = (void**)malloc(sizeof(void*) * nhandles); - if (NULL != c_dbcsr_acc_opencl_config.events && NULL != c_dbcsr_acc_opencl_config.storage) { - libxsmm_pmalloc_init(sizeof(void*), &c_dbcsr_acc_opencl_config.nevents, c_dbcsr_acc_opencl_config.events, - c_dbcsr_acc_opencl_config.storage); - } - else { - free(c_dbcsr_acc_opencl_config.events); - c_dbcsr_acc_opencl_config.events = NULL; - c_dbcsr_acc_opencl_config.nevents = 0; - result = EXIT_FAILURE; - } - if (EXIT_SUCCESS != result) { - free(c_dbcsr_acc_opencl_config.storage); - c_dbcsr_acc_opencl_config.storage = NULL; - } - } -# endif - if (EXIT_SUCCESS == result) { - const int nelements = c_dbcsr_acc_opencl_config.nthreads * c_dbcsr_acc_opencl_config.nstreams; - c_dbcsr_acc_opencl_config.streams = (void**)calloc(nelements, sizeof(void*)); /* allocate streams */ - if (NULL == c_dbcsr_acc_opencl_config.streams) result = EXIT_FAILURE; - } } } else { /* mark as initialized */ @@ -607,12 +620,14 @@ int c_dbcsr_acc_finalize(void) { # endif if (0 != c_dbcsr_acc_opencl_config.ndevices) { int i; - assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_DEVICES_MAXCOUNT); + assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_MAXNDEVS); if (0 != c_dbcsr_acc_opencl_config.verbosity) { - cl_device_id device; + cl_device_id device = NULL; int d; fprintf(stderr, "INFO ACC/OpenCL: pid=%u nthreads=%i", libxsmm_get_pid(), c_dbcsr_acc_opencl_config.nthreads); - if (EXIT_SUCCESS == c_dbcsr_acc_opencl_device(0, &device) && + if (NULL != c_dbcsr_acc_opencl_config.device.context && + EXIT_SUCCESS == + clGetContextInfo(c_dbcsr_acc_opencl_config.device.context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device, NULL) && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_id(device, NULL /*devid*/, &d)) { fprintf(stderr, " device=%i", d); @@ -628,17 +643,7 @@ int c_dbcsr_acc_finalize(void) { if (EXIT_SUCCESS == result) result = libsmm_acc_finalize(); # endif libxsmm_finalize(); - if (NULL != c_dbcsr_acc_opencl_config.device) { - for (i = 0; i < c_dbcsr_acc_opencl_config.nthreads; ++i) { - const cl_context context = c_dbcsr_acc_opencl_config.device[i].context; - if (NULL != context) { - c_dbcsr_acc_opencl_config.device[i].context = NULL; - clReleaseContext(context); /* ignore return code */ - } - } - free(c_dbcsr_acc_opencl_config.device); /* release buffer */ - } - for (i = 0; i < ACC_OPENCL_DEVICES_MAXCOUNT; ++i) { + for (i = 0; i < ACC_OPENCL_MAXNDEVS; ++i) { const cl_device_id device_id = c_dbcsr_acc_opencl_config.devices[i]; if (NULL != device_id) { # if defined(CL_VERSION_1_2) && defined(_DEBUG) @@ -648,12 +653,33 @@ int c_dbcsr_acc_finalize(void) { c_dbcsr_acc_opencl_config.devices[i] = NULL; } } +# if defined(ACC_OPENCL_STREAM_PRV) + if (NULL != c_dbcsr_acc_opencl_config.device.queue) { /* release private stream */ + clReleaseCommandQueue(c_dbcsr_acc_opencl_config.device.queue); /* ignore return code */ + } +# endif + if (NULL != c_dbcsr_acc_opencl_config.device.context) { + const cl_context context = c_dbcsr_acc_opencl_config.device.context; + c_dbcsr_acc_opencl_config.device.context = NULL; + clReleaseContext(context); /* ignore return code */ + } + for (i = 0; i < ACC_OPENCL_NLOCKS; ++i) { /* destroy locks */ + ACC_OPENCL_DESTROY((ACC_OPENCL_LOCKTYPE*)(c_dbcsr_acc_opencl_locks + ACC_OPENCL_CACHELINE * i)); + } /* release/reset buffers */ - free(c_dbcsr_acc_opencl_config.events); - free(c_dbcsr_acc_opencl_config.storage); +# if defined(ACC_OPENCL_MEM_DEVPTR) + free(c_dbcsr_acc_opencl_config.memptrs); + free(c_dbcsr_acc_opencl_config.memptr_data); +# endif free(c_dbcsr_acc_opencl_config.streams); - /* clear configuration */ + free(c_dbcsr_acc_opencl_config.stream_data); + free(c_dbcsr_acc_opencl_config.events); + free(c_dbcsr_acc_opencl_config.event_data); + /* clear entire configuration structure */ memset(&c_dbcsr_acc_opencl_config, 0, sizeof(c_dbcsr_acc_opencl_config)); +# if defined(ACC_OPENCL_CACHE_DID) + c_dbcsr_acc_opencl_active_id = 0; /* reset cached active device-ID */ +# endif } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -692,30 +718,9 @@ int c_dbcsr_acc_get_ndevices(int* ndevices) { } -int c_dbcsr_acc_opencl_device(int thread_id, cl_device_id* device) { - int result = EXIT_SUCCESS; - assert(0 <= thread_id && thread_id < c_dbcsr_acc_opencl_config.nthreads); - assert(NULL != device); - if (NULL != c_dbcsr_acc_opencl_config.device) { - cl_context context = c_dbcsr_acc_opencl_config.device[thread_id].context; -# if defined(_OPENMP) - if (NULL == context && 0 < thread_id) { /* fallback to master's context */ - context = c_dbcsr_acc_opencl_config.device[/*main*/ 0].context; - } -# endif - if (NULL != context) { - result = clGetContextInfo(context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), device, NULL); - } - else *device = NULL; - } - else *device = NULL; - return result; -} - - int c_dbcsr_acc_opencl_device_id(cl_device_id device, int* device_id, int* global_id) { int result = EXIT_SUCCESS, i; - assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_DEVICES_MAXCOUNT); + assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_MAXNDEVS); assert(NULL != device_id || NULL != global_id); for (i = 0; i < c_dbcsr_acc_opencl_config.ndevices; ++i) { if (device == c_dbcsr_acc_opencl_config.devices[i]) break; @@ -724,7 +729,7 @@ int c_dbcsr_acc_opencl_device_id(cl_device_id device, int* device_id, int* globa if (NULL != device_id) *device_id = i; if (NULL != global_id) { *global_id = i; - for (++i; i < ACC_OPENCL_DEVICES_MAXCOUNT; ++i) { + for (++i; i < ACC_OPENCL_MAXNDEVS; ++i) { if (NULL != c_dbcsr_acc_opencl_config.devices[i]) { if (device == c_dbcsr_acc_opencl_config.devices[i]) { *global_id = i; @@ -749,16 +754,14 @@ int c_dbcsr_acc_opencl_device_vendor(cl_device_id device, const char vendor[], i int result = EXIT_SUCCESS; assert(NULL != device && NULL != vendor); if (0 == use_platform_name) { - ACC_OPENCL_CHECK( - clGetDeviceInfo(device, CL_DEVICE_VENDOR, ACC_OPENCL_BUFFERSIZE, buffer, NULL), "retrieve device vendor", result); + result = clGetDeviceInfo(device, CL_DEVICE_VENDOR, ACC_OPENCL_BUFFERSIZE, buffer, NULL); } else { - cl_platform_id platform_id; - ACC_OPENCL_CHECK( - clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform_id, NULL), "retrieve platform id", result); + cl_platform_id platform; + result = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL); if (EXIT_SUCCESS == result) { - ACC_OPENCL_CHECK( - clGetPlatformInfo(platform_id, CL_PLATFORM_NAME, ACC_OPENCL_BUFFERSIZE, buffer, NULL), "retrieve platform name", result); + result = clGetPlatformInfo( + platform, 1 == use_platform_name ? CL_PLATFORM_NAME : CL_PLATFORM_VENDOR, ACC_OPENCL_BUFFERSIZE, buffer, NULL); } } if (EXIT_SUCCESS == result) { @@ -808,7 +811,7 @@ int c_dbcsr_acc_opencl_device_name( assert(NULL != name || NULL != platform); if (NULL != name && 0 != name_maxlen) { result_name = clGetDeviceInfo(device, CL_DEVICE_NAME, name_maxlen, name, NULL); - if (0 != cleanup && CL_SUCCESS == result_name) { + if (0 != cleanup && EXIT_SUCCESS == result_name) { char* const part = strchr(name, ':'); if (NULL != part) *part = '\0'; } @@ -816,7 +819,7 @@ int c_dbcsr_acc_opencl_device_name( if (NULL != platform && 0 != platform_maxlen) { cl_platform_id platform_id; result_platform = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform_id, NULL); - if (CL_SUCCESS == result_platform) { + if (EXIT_SUCCESS == result_platform) { result_platform = clGetPlatformInfo(platform_id, CL_PLATFORM_NAME, platform_maxlen, platform, NULL); } } @@ -825,61 +828,57 @@ int c_dbcsr_acc_opencl_device_name( int c_dbcsr_acc_opencl_device_level( - cl_device_id device, int* level_major, int* level_minor, char cl_std[16], cl_device_type* type) { - cl_int result = EXIT_SUCCESS; - assert(NULL != device && (NULL != level_major || NULL != level_minor || NULL != cl_std || NULL != type)); - if (NULL != level_major || NULL != level_minor || NULL != cl_std) { - char buffer[ACC_OPENCL_BUFFERSIZE]; - result = clGetDeviceInfo(device, CL_DEVICE_VERSION, ACC_OPENCL_BUFFERSIZE, buffer, NULL); - if (CL_SUCCESS == result) { - unsigned int cl_std_level[2]; - if (2 == sscanf(buffer, "OpenCL %u.%u", cl_std_level, cl_std_level + 1)) { - if (NULL != level_major) *level_major = (int)cl_std_level[0]; - if (NULL != level_minor) *level_minor = (int)cl_std_level[1]; - if (NULL != cl_std) { - if (2 <= cl_std_level[0]) { - const int nchar = LIBXSMM_SNPRINTF(cl_std, 16, "-cl-std=CL%u.0", cl_std_level[0]); - if (0 >= nchar || 16 <= nchar) result = EXIT_FAILURE; - } - else if (1 <= cl_std_level[0]) { - if (1 <= cl_std_level[1]) { - const int nchar = LIBXSMM_SNPRINTF(cl_std, 16, "-cl-std=CL%u.%u", cl_std_level[0], cl_std_level[1]); - if (0 >= nchar || 16 <= nchar) result = EXIT_FAILURE; - } - else { - result = clGetDeviceInfo(device, CL_DEVICE_OPENCL_C_VERSION, ACC_OPENCL_BUFFERSIZE, buffer, NULL); - if (CL_SUCCESS == result) { - if (2 == sscanf(buffer, "OpenCL C %u.%u", cl_std_level, cl_std_level + 1)) { - const int nchar = LIBXSMM_SNPRINTF(cl_std, 16, "-cl-std=CL%u.%u", cl_std_level[0], cl_std_level[1]); - if (0 >= nchar || 16 <= nchar) result = EXIT_FAILURE; - } - else { - result = EXIT_FAILURE; - *cl_std = '\0'; - } - } - else *cl_std = '\0'; - } - } - else *cl_std = '\0'; - } - } - else { - if (NULL != level_major) *level_major = 0; - if (NULL != level_minor) *level_minor = 0; - if (NULL != cl_std) *cl_std = '\0'; - result = EXIT_FAILURE; + cl_device_id device, int std_clevel[2], int std_level[2], char std_flag[16], cl_device_type* type) { + char buffer[ACC_OPENCL_BUFFERSIZE]; + unsigned int std_clevel_uint[2] = {0}, std_level_uint[2] = {0}; + int result = EXIT_SUCCESS; + assert(NULL != device && (NULL != std_clevel || NULL != std_level || NULL != std_flag || NULL != type)); + result = clGetDeviceInfo(device, CL_DEVICE_OPENCL_C_VERSION, ACC_OPENCL_BUFFERSIZE / 2, buffer, NULL); + if (EXIT_SUCCESS == result && (NULL != std_clevel || NULL != std_flag)) { + if (2 == sscanf(buffer, "OpenCL C %u.%u", std_clevel_uint, std_clevel_uint + 1)) { + std_clevel[0] = (int)std_clevel_uint[0]; + std_clevel[1] = (int)std_clevel_uint[1]; + } + else result = EXIT_FAILURE; + } + if (EXIT_SUCCESS == result && (NULL != std_level || NULL != std_flag)) { + result = clGetDeviceInfo( + device, CL_DEVICE_VERSION, ACC_OPENCL_BUFFERSIZE - ACC_OPENCL_BUFFERSIZE / 2, buffer + ACC_OPENCL_BUFFERSIZE / 2, NULL); + if (EXIT_SUCCESS == result) { + if (2 == sscanf(buffer + ACC_OPENCL_BUFFERSIZE / 2, "OpenCL %u.%u", std_level_uint, std_level_uint + 1)) { + std_level[0] = (int)std_level_uint[0]; + std_level[1] = (int)std_level_uint[1]; } + else result = EXIT_FAILURE; } - else { - if (NULL != level_major) *level_major = 0; - if (NULL != level_minor) *level_minor = 0; - if (NULL != cl_std) *cl_std = '\0'; + } + if (EXIT_SUCCESS == result && NULL != std_flag) { + if (2 <= std_level_uint[0]) { + const int nchar = LIBXSMM_SNPRINTF(std_flag, 16, "-cl-std=CL%u.0", std_level_uint[0]); + if (0 >= nchar || 16 <= nchar) result = EXIT_FAILURE; + } + else if (1 <= std_level_uint[0]) { + if (1 <= std_level_uint[1]) { + const int nchar = LIBXSMM_SNPRINTF(std_flag, 16, "-cl-std=CL%u.%u", std_level_uint[0], std_level_uint[1]); + if (0 >= nchar || 16 <= nchar) result = EXIT_FAILURE; + } + else if (1 <= std_clevel_uint[0]) { /* fallback */ + const int nchar = LIBXSMM_SNPRINTF(std_flag, 16, "-cl-std=CL%u.%u", std_clevel_uint[0], std_clevel_uint[1]); + if (0 >= nchar || 16 <= nchar) result = EXIT_FAILURE; + } + else *std_flag = '\0'; /* not an error */ } + else *std_flag = '\0'; /* not an error */ } - if (NULL != type && EXIT_SUCCESS == result) { + if (EXIT_SUCCESS == result && NULL != type) { result = clGetDeviceInfo(device, CL_DEVICE_TYPE, sizeof(cl_device_type), type, NULL); } + if (EXIT_SUCCESS != result) { + if (NULL != std_clevel) std_clevel[0] = std_clevel[1] = 0; + if (NULL != std_level) std_level[0] = std_level[1] = 0; + if (NULL != std_flag) *std_flag = '\0'; + if (NULL != type) *type = 0; + } return result; } @@ -907,35 +906,28 @@ int c_dbcsr_acc_opencl_device_ext(cl_device_id device, const char* const extname } -int c_dbcsr_acc_opencl_create_context(int thread_id, cl_device_id active_id) { +int c_dbcsr_acc_opencl_create_context(cl_device_id active_id, cl_context* context) { cl_platform_id platform = NULL; - cl_int result; - assert(0 <= thread_id && thread_id < c_dbcsr_acc_opencl_config.nthreads); - assert(NULL == c_dbcsr_acc_opencl_config.device[thread_id].context); + int result; assert(0 < c_dbcsr_acc_opencl_config.ndevices); - assert(NULL != active_id); + assert(NULL != active_id && NULL != context); result = clGetDeviceInfo(active_id, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL); - assert(CL_SUCCESS != result || NULL != platform); - if (CL_SUCCESS == result) { + assert(EXIT_SUCCESS != result || NULL != platform); + if (EXIT_SUCCESS == result) { void (*const notify)( const char*, const void*, size_t, void*) = (0 != c_dbcsr_acc_opencl_config.verbosity ? c_dbcsr_acc_opencl_notify : NULL); cl_context_properties properties[] = { CL_CONTEXT_PLATFORM, 0 /*placeholder*/, 0 /* end of properties */ }; - cl_context context = NULL; + cl_context ctx = NULL; properties[1] = (long)platform; - context = clCreateContext(properties, 1 /*num_devices*/, &active_id, notify, NULL /* user_data*/, &result); - if (CL_SUCCESS != result && CL_INVALID_DEVICE != result) { /* retry */ - context = clCreateContext(NULL /*properties*/, 1 /*num_devices*/, &active_id, notify, NULL /* user_data*/, &result); + ctx = clCreateContext(properties, 1 /*num_devices*/, &active_id, notify, NULL /* user_data*/, &result); + if (EXIT_SUCCESS != result && CL_INVALID_DEVICE != result) { /* retry */ + ctx = clCreateContext(NULL /*properties*/, 1 /*num_devices*/, &active_id, notify, NULL /* user_data*/, &result); } - if (CL_SUCCESS == result) { - assert(NULL != context); - c_dbcsr_acc_opencl_config.device[thread_id].context = context; - if (0 != thread_id) { - /* apply context to master-thread if master's context is NULL */ - LIBXSMM_ATOMIC_CMPSWP(&c_dbcsr_acc_opencl_config.device[/*main*/ 0].context, NULL, context, LIBXSMM_ATOMIC_RELAXED); - assert(NULL != c_dbcsr_acc_opencl_config.device[/*main*/ 0].context); - } + if (EXIT_SUCCESS == result) { + assert(NULL != ctx); + *context = ctx; if (0 != c_dbcsr_acc_opencl_config.verbosity) { char buffer[ACC_OPENCL_BUFFERSIZE]; int global_id = 0; @@ -955,104 +947,143 @@ int c_dbcsr_acc_opencl_create_context(int thread_id, cl_device_id active_id) { } } } - else if (CL_INVALID_DEVICE == result && - EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor(active_id, "nvidia", 0 /*use_platform_name*/)) - { - fprintf(stderr, "WARN ACC/OpenCL: if MPI-ranks target the same device in exclusive mode,\n" - " SMI must be used to enable sharing the device.\n"); + else { + if (CL_INVALID_DEVICE == result && + EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor(active_id, "nvidia", 0 /*use_platform_name*/)) + { + fprintf(stderr, "WARN ACC/OpenCL: if MPI-ranks target the same device in exclusive mode,\n" + " SMI must be used to enable sharing the device.\n"); + } + *context = NULL; } } return result; } -int c_dbcsr_acc_opencl_set_active_device(int thread_id, int device_id) { +int c_dbcsr_acc_opencl_set_active_device(ACC_OPENCL_LOCKTYPE* lock, int device_id) { int result = EXIT_SUCCESS; - cl_device_id active_id; - assert(0 <= thread_id && thread_id < c_dbcsr_acc_opencl_config.nthreads); - assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_DEVICES_MAXCOUNT); + cl_device_id active_id = NULL, context_id = NULL; + assert(c_dbcsr_acc_opencl_config.ndevices < ACC_OPENCL_MAXNDEVS); if (0 <= device_id && device_id < c_dbcsr_acc_opencl_config.ndevices) { - assert(NULL != c_dbcsr_acc_opencl_config.device); + /* accessing devices is thread-safe (array is fixed after initialization) */ active_id = c_dbcsr_acc_opencl_config.devices[device_id]; if (NULL != active_id) { -# if defined(_OPENMP) -# pragma omp critical(c_dbcsr_acc_set_active_device) -# endif - { - int inherit_id = 0; - const cl_context context = c_dbcsr_acc_opencl_device_context(active_id, &inherit_id); - const cl_context inherit = c_dbcsr_acc_opencl_config.device[inherit_id].context; - if (NULL != context) { - if (context != inherit) { - if (NULL != inherit) { - c_dbcsr_acc_opencl_config.device[inherit_id].context = NULL; - result = clReleaseContext(inherit); - } - else if (thread_id != inherit_id) { - c_dbcsr_acc_opencl_config.device[inherit_id].context = context; - result = clRetainContext(context); - } - } + cl_context context = NULL; + if (NULL != lock) ACC_OPENCL_ACQUIRE(lock); + context = c_dbcsr_acc_opencl_config.device.context; + if (NULL != context) { + result = clGetContextInfo(context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &context_id, NULL); + if (EXIT_SUCCESS == result && active_id != context_id) { + assert(NULL != context_id); + result = clReleaseContext(context); + context = NULL; } - else if (NULL == c_dbcsr_acc_opencl_config.device[thread_id].context) { - result = c_dbcsr_acc_opencl_create_context(thread_id, active_id); - if (EXIT_SUCCESS == result && NULL /*context*/ != inherit) { - c_dbcsr_acc_opencl_config.device[inherit_id].context = c_dbcsr_acc_opencl_config.device[thread_id].context; - result = clReleaseContext(inherit); - } + } + if (EXIT_SUCCESS == result && active_id != context_id) { + result = c_dbcsr_acc_opencl_create_context(active_id, &context); + assert(NULL != context || EXIT_SUCCESS != result); + } + if (EXIT_SUCCESS == result && active_id != context_id) { /* update/cache device-specific information */ +# if defined(ACC_OPENCL_STREAM_PRV) + if (NULL != c_dbcsr_acc_opencl_config.device.queue) { /* release private stream */ + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseCommandQueue(c_dbcsr_acc_opencl_config.device.queue)); } - if (EXIT_SUCCESS == result) { /* update/cache device-specific information */ - result = c_dbcsr_acc_opencl_device_level(active_id, c_dbcsr_acc_opencl_config.device[thread_id].level, - c_dbcsr_acc_opencl_config.device[thread_id].level + 1, NULL /*cl_std*/, - &c_dbcsr_acc_opencl_config.device[thread_id].type); - if (EXIT_SUCCESS == result) { - char devname[ACC_OPENCL_BUFFERSIZE]; -# if defined(CL_VERSION_2_0) - const char* const env_svm = getenv("ACC_OPENCL_SVM"); - c_dbcsr_acc_opencl_config.device[thread_id].svm_interop = - ((NULL == env_svm || 2 > *c_dbcsr_acc_opencl_config.device[thread_id].level) ? 0 : atoi(env_svm)); # endif - if (CL_SUCCESS != clGetDeviceInfo(active_id, CL_DEVICE_HOST_UNIFIED_MEMORY, sizeof(cl_bool), - &c_dbcsr_acc_opencl_config.device[thread_id].unified, NULL)) - { - c_dbcsr_acc_opencl_config.device[thread_id].unified = CL_FALSE; - } - if (EXIT_SUCCESS != c_dbcsr_acc_opencl_device_name(active_id, devname, ACC_OPENCL_BUFFERSIZE, NULL /*platform*/, - 0 /*platform_maxlen*/, /*cleanup*/ 1) || - EXIT_SUCCESS != c_dbcsr_acc_opencl_device_uid(active_id, devname, &c_dbcsr_acc_opencl_config.device[thread_id].uid)) - { - c_dbcsr_acc_opencl_config.device[thread_id].uid = (cl_uint)-1; - } - c_dbcsr_acc_opencl_config.device[thread_id].intel = (EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor( - active_id, "intel", 0 /*use_platform_name*/)); - c_dbcsr_acc_opencl_config.device[thread_id].nv = (EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor( - active_id, "nvidia", 0 /*use_platform_name*/)); - if (EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor(active_id, "amd", 0 /*use_platform_name*/) || - EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor(active_id, "amd", 1 /*use_platform_name*/)) - { - char buffer[ACC_OPENCL_BUFFERSIZE]; - c_dbcsr_acc_opencl_config.device[thread_id].amd = 1; - if (EXIT_SUCCESS == c_dbcsr_acc_opencl_device_name(active_id, buffer, ACC_OPENCL_BUFFERSIZE, NULL /*platform*/, - 0 /*platform_maxlen*/, /*cleanup*/ 1)) - { - const char* const gfxname = LIBXSMM_STRISTR(buffer, "gfx"); - if (NULL != gfxname && 90 <= atoi(gfxname + 3)) { - c_dbcsr_acc_opencl_config.device[thread_id].amd = 2; - } + memset(&c_dbcsr_acc_opencl_config.device, 0, sizeof(c_dbcsr_acc_opencl_config.device)); + result = c_dbcsr_acc_opencl_device_level(active_id, c_dbcsr_acc_opencl_config.device.std_clevel, + c_dbcsr_acc_opencl_config.device.std_level, c_dbcsr_acc_opencl_config.device.std_flag, + &c_dbcsr_acc_opencl_config.device.type); + if (EXIT_SUCCESS == result) { + char devname[ACC_OPENCL_BUFFERSIZE] = ""; +# if defined(ACC_OPENCL_CMDAGR) || defined(ACC_OPENCL_STREAM_PRV) + ACC_OPENCL_STREAM_PROPERTIES_TYPE properties[4] = { + CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0 /* terminator */ + }; +# endif + cl_platform_id platform = NULL; + cl_bitfield bitfield = 0; + c_dbcsr_acc_opencl_config.device.intel = (EXIT_SUCCESS == + c_dbcsr_acc_opencl_device_vendor(active_id, "intel", 0 /*use_platform_name*/)); + c_dbcsr_acc_opencl_config.device.nv = (EXIT_SUCCESS == + c_dbcsr_acc_opencl_device_vendor(active_id, "nvidia", 0 /*use_platform_name*/)); + + if (EXIT_SUCCESS != c_dbcsr_acc_opencl_device_name(active_id, devname, ACC_OPENCL_BUFFERSIZE, NULL /*platform*/, + 0 /*platform_maxlen*/, /*cleanup*/ 1) || + EXIT_SUCCESS != c_dbcsr_acc_opencl_device_uid(active_id, devname, &c_dbcsr_acc_opencl_config.device.uid)) + { + c_dbcsr_acc_opencl_config.device.uid = (cl_uint)-1; + } + if (EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor(active_id, "amd", 0 /*use_platform_name*/) || + EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor(active_id, "amd", 1 /*use_platform_name*/)) + { + c_dbcsr_acc_opencl_config.device.amd = 1; + if ('\0' != *devname) { + const char* const gfxname = LIBXSMM_STRISTR(devname, "gfx"); + if (NULL != gfxname && 90 <= atoi(gfxname + 3)) { + c_dbcsr_acc_opencl_config.device.amd = 2; } } } + if (EXIT_SUCCESS != clGetDeviceInfo(active_id, CL_DEVICE_HOST_UNIFIED_MEMORY, sizeof(cl_bool) /*cl_int*/, + &c_dbcsr_acc_opencl_config.device.unified, NULL)) + { + c_dbcsr_acc_opencl_config.device.unified = CL_FALSE; + } + if (0 != (4 & c_dbcsr_acc_opencl_config.xhints) && 2 <= *c_dbcsr_acc_opencl_config.device.std_level && + 0 != c_dbcsr_acc_opencl_config.device.intel && 0 == c_dbcsr_acc_opencl_config.device.unified && + EXIT_SUCCESS == clGetDeviceInfo(active_id, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL) && + EXIT_SUCCESS == c_dbcsr_acc_opencl_device_vendor(active_id, "intel", 2 /*platform vendor*/) && + EXIT_SUCCESS == clGetDeviceInfo(active_id, 0x4191 /*CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL*/, sizeof(cl_bitfield), + &bitfield, NULL) && + 0 != bitfield) /* cl_intel_unified_shared_memory extension */ + { + void* ptr = NULL; + ptr = clGetExtensionFunctionAddressForPlatform(platform, "clSetKernelArgMemPointerINTEL"); + LIBXSMM_ASSIGN127(&c_dbcsr_acc_opencl_config.device.clSetKernelArgMemPointerINTEL, &ptr); + ptr = clGetExtensionFunctionAddressForPlatform(platform, "clEnqueueMemFillINTEL"); + LIBXSMM_ASSIGN127(&c_dbcsr_acc_opencl_config.device.clEnqueueMemFillINTEL, &ptr); + ptr = clGetExtensionFunctionAddressForPlatform(platform, "clEnqueueMemcpyINTEL"); + LIBXSMM_ASSIGN127(&c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL, &ptr); + ptr = clGetExtensionFunctionAddressForPlatform(platform, "clDeviceMemAllocINTEL"); + LIBXSMM_ASSIGN127(&c_dbcsr_acc_opencl_config.device.clDeviceMemAllocINTEL, &ptr); + ptr = clGetExtensionFunctionAddressForPlatform(platform, "clMemFreeINTEL"); + LIBXSMM_ASSIGN127(&c_dbcsr_acc_opencl_config.device.clMemFreeINTEL, &ptr); + } +# if defined(ACC_OPENCL_CMDAGR) + if (0 != c_dbcsr_acc_opencl_config.device.intel) { /* device vendor (above) can now be used */ + int result_cmdagr = EXIT_SUCCESS; + const cl_command_queue q = ACC_OPENCL_CREATE_COMMAND_QUEUE(context, active_id, properties, &result_cmdagr); + if (EXIT_SUCCESS == result_cmdagr) { +# if 0 /* force host-timer? */ + c_dbcsr_acc_opencl_config.timer = c_dbcsr_acc_opencl_timer_host; +# endif + assert(NULL != q); + clReleaseCommandQueue(q); + } + } +# endif +# if defined(ACC_OPENCL_STREAM_PRV) + properties[1] = 0; + c_dbcsr_acc_opencl_config.device.queue = ACC_OPENCL_CREATE_COMMAND_QUEUE(context, active_id, properties, &result); +# endif } + if (EXIT_SUCCESS == result) { + if (active_id != context_id) c_dbcsr_acc_opencl_config.device.context = context; + } + else memset(&c_dbcsr_acc_opencl_config.device, 0, sizeof(c_dbcsr_acc_opencl_config.device)); } + if (NULL != lock) ACC_OPENCL_RELEASE(lock); } else result = EXIT_FAILURE; } + assert(EXIT_SUCCESS == result || NULL == c_dbcsr_acc_opencl_config.device.context); return result; } int c_dbcsr_acc_set_active_device(int device_id) { - int result; + int result = EXIT_SUCCESS; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; @@ -1060,58 +1091,15 @@ int c_dbcsr_acc_set_active_device(int device_id) { c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif assert(0 != c_dbcsr_acc_opencl_config.ndevices); - result = c_dbcsr_acc_opencl_set_active_device(ACC_OPENCL_OMP_TID(), device_id); -# if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) - c_dbcsr_timestop(&routine_handle); -# endif - ACC_OPENCL_RETURN(result); -} - - -int c_dbcsr_acc_opencl_device_synchronize(int thread_id) { - void** const streams = c_dbcsr_acc_opencl_config.streams + thread_id * c_dbcsr_acc_opencl_config.nstreams; - int result = EXIT_SUCCESS; - int i = 0; - assert(0 <= thread_id && thread_id < c_dbcsr_acc_opencl_config.nthreads); - assert(NULL != c_dbcsr_acc_opencl_config.streams); - for (; i < c_dbcsr_acc_opencl_config.nstreams; ++i) { - void* const stream = streams[i]; - if (NULL != stream) { - if (NULL != *ACC_OPENCL_STREAM(stream)) { /* soft-error? */ - result = c_dbcsr_acc_stream_sync(stream); - if (EXIT_SUCCESS != result) break; - } - } -# if defined(ACC_OPENCL_STREAM_COMPACT) - else break; +# if defined(ACC_OPENCL_CACHE_DID) + if (c_dbcsr_acc_opencl_active_id != (device_id + 1)) # endif - } - return result; -} - - -int c_dbcsr_acc_device_synchronize(void) { - int result = EXIT_SUCCESS; -# if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) - int routine_handle; - static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; - static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; - c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); + { + result = c_dbcsr_acc_opencl_set_active_device(c_dbcsr_acc_opencl_config.lock_main, device_id); +# if defined(ACC_OPENCL_CACHE_DID) + if (EXIT_SUCCESS == result) c_dbcsr_acc_opencl_active_id = device_id + 1; # endif -# if defined(_OPENMP) - if (1 < omp_get_num_threads()) { - result = c_dbcsr_acc_opencl_device_synchronize(omp_get_thread_num()); } - else { - int i; -# pragma omp parallel for private(i) - for (i = 0; i < c_dbcsr_acc_opencl_config.nthreads; ++i) { - ACC_OPENCL_EXPECT(EXIT_SUCCESS == c_dbcsr_acc_opencl_device_synchronize(i)); - } - } -# else - result = c_dbcsr_acc_opencl_device_synchronize(/*main*/ 0); -# endif # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); # endif @@ -1151,19 +1139,24 @@ int c_dbcsr_acc_opencl_wgsize(cl_device_id device, cl_kernel kernel, size_t* max } -int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_atomic_fp_t kind, - const c_dbcsr_acc_opencl_device_t* devinfo, const char* exts[], int exts_maxlen, char flags[], size_t flags_maxlen) { +int c_dbcsr_acc_opencl_flags_atomics(const c_dbcsr_acc_opencl_device_t* devinfo, c_dbcsr_acc_opencl_atomic_fp_t kind, + const char* exts[], int exts_maxlen, char flags[], size_t flags_maxlen) { + cl_device_id device_id = NULL; int result = 0, ext1, ext2; - for (ext1 = 0; ext1 < exts_maxlen; ++ext1) + for (ext1 = 0; ext1 < exts_maxlen; ++ext1) { if (NULL == exts[ext1] || '\0' == *exts[ext1]) break; - for (ext2 = ext1 + 1; ext2 < exts_maxlen; ++ext2) + } + for (ext2 = ext1 + 1; ext2 < exts_maxlen; ++ext2) { if (NULL == exts[ext2] || '\0' == *exts[ext2]) break; - if (NULL != devinfo && ext2 < exts_maxlen) { + } + if (NULL != devinfo && ext2 < exts_maxlen && + EXIT_SUCCESS == clGetContextInfo(devinfo->context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device_id, NULL)) + { const char* atomic_type = ""; switch (kind) { case c_dbcsr_acc_opencl_atomic_fp_64: { exts[ext1] = "cl_khr_fp64 cl_khr_int64_base_atomics cl_khr_int64_extended_atomics"; - if (2 <= *devinfo->level && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_ext(device_id, exts, ext2)) { + if (2 <= *devinfo->std_level && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_ext(device_id, exts, ext2)) { atomic_type = "-DTA=long -DTA2=atomic_long -DTF=atomic_double"; } else { @@ -1173,7 +1166,7 @@ int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_ } else { /* fallback */ exts[ext1] = "cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics"; - if (2 <= *devinfo->level && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_ext(device_id, exts, ext2)) { + if (2 <= *devinfo->std_level && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_ext(device_id, exts, ext2)) { atomic_type = "-DATOMIC32_ADD64 -DTA=int -DTA2=atomic_int -DTF=atomic_double"; } else { @@ -1188,7 +1181,7 @@ int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_ } break; case c_dbcsr_acc_opencl_atomic_fp_32: { exts[ext1] = "cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics"; - if (2 <= *devinfo->level && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_ext(device_id, exts, ext2)) { + if (2 <= *devinfo->std_level && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_ext(device_id, exts, ext2)) { exts[ext2] = "cl_khr_int64_base_atomics cl_khr_int64_extended_atomics"; atomic_type = "-DTA=int -DTA2=atomic_int -DTF=atomic_float"; } @@ -1208,7 +1201,7 @@ int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_ const char* const env_barrier = getenv("ACC_OPENCL_BARRIER"); const char* const env_atomics = getenv("ACC_OPENCL_ATOMICS"); if (NULL == env_barrier || '0' != *env_barrier) { - barrier_expr = ((2 <= *devinfo->level && (0 == devinfo->intel || (CL_DEVICE_TYPE_CPU != devinfo->type))) + barrier_expr = ((2 <= *devinfo->std_level && (0 == devinfo->intel || (CL_DEVICE_TYPE_CPU != devinfo->type))) ? "-D\"BARRIER(A)=work_group_barrier(A,memory_scope_work_group)\"" : "-D\"BARRIER(A)=barrier(A)\""); } @@ -1218,12 +1211,15 @@ int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_ /* can signal/force atomics without confirmation */ const int force_atomics = ((NULL == env_atomics || '\0' == *env_atomics) ? 0 : atoi(env_atomics)); if (NULL == env_atomics || '\0' == *env_atomics || 0 != force_atomics) { - cl_bitfield fp_atomics; - if (CL_SUCCESS == clGetDeviceInfo(device_id, (cl_device_info)(c_dbcsr_acc_opencl_atomic_fp_64 == kind ? 0x4232 : 0x4231), - sizeof(cl_bitfield), &fp_atomics, NULL) && + cl_bitfield fp_atomics = 0; + if (EXIT_SUCCESS == clGetDeviceInfo(device_id, + (cl_device_info)(c_dbcsr_acc_opencl_atomic_fp_64 == kind ? 0x4232 : 0x4231), sizeof(cl_bitfield), + &fp_atomics, NULL) && 0 != (/*add*/ (1 << 1) & fp_atomics)) { +# if 0 /* enabling this permitted extension in source code causes compiler warning */ exts[ext2] = "cl_ext_float_atomics"; +# endif atomic_exp = (c_dbcsr_acc_opencl_atomic_fp_64 == kind ? "atomic_fetch_add_explicit((GLOBAL_VOLATILE(atomic_double)*)A,B," "memory_order_relaxed,memory_scope_work_group)" @@ -1239,13 +1235,13 @@ int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_ atomic_ops = "-Dcl_intel_global_float_atomics"; } else { - atomic_ops = ((2 > *devinfo->level && 2 > force_atomics) + atomic_ops = ((2 > *devinfo->std_level && 2 > force_atomics) ? "-DATOMIC_PROTOTYPES=1" : (3 > force_atomics ? "-DATOMIC_PROTOTYPES=2" : "-DATOMIC_PROTOTYPES=3")); } - atomic_exp = ((2 > *devinfo->level && 2 > force_atomics) ? "atomic_add(A,B)" - : "atomic_fetch_add_explicit((GLOBAL_VOLATILE(TF)*)A,B," - "memory_order_relaxed,memory_scope_work_group)"); + atomic_exp = ((2 > *devinfo->std_level && 2 > force_atomics) ? "atomic_add(A,B)" + : "atomic_fetch_add_explicit((GLOBAL_VOLATILE(TF)*)A,B," + "memory_order_relaxed,memory_scope_work_group)"); } else { atomic_exp = "atomic_add_global_cmpxchg(A,B)"; @@ -1292,17 +1288,19 @@ int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_ } -int c_dbcsr_acc_opencl_flags(const char build_params[], const char build_options[], const char try_build_options[], - const char cl_std[], char buffer[], size_t buffer_size) { - int result; +int c_dbcsr_acc_opencl_flags( + const char build_params[], const char build_options[], const char try_build_options[], char buffer[], size_t buffer_size) { + int result = EXIT_SUCCESS; if (NULL != buffer) { - const int nchar = LIBXSMM_SNPRINTF(buffer, buffer_size, "%s %s %s %s", NULL != cl_std ? cl_std : "", - NULL != build_options ? build_options : "", NULL != build_params ? build_params : "", - NULL != try_build_options ? try_build_options : ""); + const int std_clevel = 100 * c_dbcsr_acc_opencl_config.device.std_clevel[0] + + 10 * c_dbcsr_acc_opencl_config.device.std_clevel[1]; + const int std_level = 100 * c_dbcsr_acc_opencl_config.device.std_level[0] + 10 * c_dbcsr_acc_opencl_config.device.std_level[1]; + const int nchar = LIBXSMM_SNPRINTF(buffer, buffer_size, "%s -DACC_OPENCL_VERSION=%u -DACC_OPENCL_C_VERSION=%u %s %s %s", + c_dbcsr_acc_opencl_config.device.std_flag, std_level, std_clevel, NULL != build_options ? build_options : "", + NULL != build_params ? build_params : "", NULL != try_build_options ? try_build_options : ""); if (0 < nchar && (int)buffer_size > nchar) { char* replace = strpbrk(buffer, "\""); /* more portable (system/cpp needs quotes to protect braces) */ for (; NULL != replace; replace = strpbrk(replace + 1, "\"")) *replace = ' '; - result = EXIT_SUCCESS; } else { result = EXIT_FAILURE; @@ -1317,21 +1315,19 @@ int c_dbcsr_acc_opencl_flags(const char build_params[], const char build_options int c_dbcsr_acc_opencl_kernel(int source_is_file, const char source[], const char kernel_name[], const char build_params[], const char build_options[], const char try_build_options[], int* try_ok, const char* const extnames[], int num_exts, cl_kernel* kernel) { - char buffer[ACC_OPENCL_BUFFERSIZE] = "", cl_std[16]; - char buffer_name[ACC_OPENCL_MAXSTRLEN * 2]; - int tid = 0, ok = EXIT_SUCCESS, source_is_cl = 1, nchar, level_major, level_minor; - const cl_context context = c_dbcsr_acc_opencl_context(&tid); + char buffer[ACC_OPENCL_BUFFERSIZE] = "", buffer_name[ACC_OPENCL_MAXSTRLEN * 2]; + int ok = EXIT_SUCCESS, source_is_cl = 1, nchar; cl_device_id active_id = NULL; - cl_int result = ((NULL != source && NULL != kernel_name && '\0' != *kernel_name && NULL != kernel) - ? c_dbcsr_acc_opencl_device(tid, &active_id) - : EXIT_FAILURE); + int result = ((NULL != source && NULL != kernel_name && '\0' != *kernel_name) + ? clGetContextInfo( + c_dbcsr_acc_opencl_config.device.context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &active_id, NULL) + : EXIT_FAILURE); cl_program program = NULL; FILE* file_src = NULL; size_t size_src = 0; - if (EXIT_SUCCESS == result) { - result = c_dbcsr_acc_opencl_device_level(active_id, &level_major, &level_minor, cl_std, NULL /*type*/); - if (0 != source_is_file) file_src = fopen(source, "rb"); - } + assert(NULL != kernel); + *kernel = NULL; + if (EXIT_SUCCESS == result && 0 != source_is_file) file_src = fopen(source, "rb"); if (NULL != file_src) { if (EXIT_SUCCESS == result) { const char* const file_ext = strrchr(source, '.'); @@ -1442,16 +1438,19 @@ int c_dbcsr_acc_opencl_kernel(int source_is_file, const char source[], const cha const int file_tmp = mkstemp(buffer_name); fclose(file_cpp); /* existence-check */ if (0 <= file_tmp) { - const int cl_std_len = (int)strlen(cl_std); + const int std_clevel = 100 * c_dbcsr_acc_opencl_config.device.std_clevel[0] + + 10 * c_dbcsr_acc_opencl_config.device.std_clevel[1]; + const int std_level = 100 * c_dbcsr_acc_opencl_config.device.std_level[0] + + 10 * c_dbcsr_acc_opencl_config.device.std_level[1]; + const int std_flag_len = (int)strlen(c_dbcsr_acc_opencl_config.device.std_flag); nchar = LIBXSMM_SNPRINTF(buffer, sizeof(buffer), - ACC_OPENCL_CPPBIN " -P -C -nostdinc -D__OPENCL_VERSION__=%u %s %s %s %s >%s.cl", 100 * level_major + 10 * level_minor, - EXIT_SUCCESS != c_dbcsr_acc_opencl_device_vendor(active_id, "nvidia", 0 /*use_platform_name*/) - ? "" - : "-D__NV_CL_C_VERSION", + ACC_OPENCL_CPPBIN " -P -C -nostdinc -DACC_OPENCL_VERSION=%u -DACC_OPENCL_C_VERSION=%u %s %s %s %s >%s.cl", std_level, + std_clevel, 0 == c_dbcsr_acc_opencl_config.device.nv ? "" : "-D__NV_CL_C_VERSION", NULL != build_params ? build_params : "", buffer_name, sed_pattern, kernel_name); if (0 < nchar && (int)sizeof(buffer) > nchar && - (0 == cl_std_len || (3 == write(file_tmp, "/*\n", 3) && cl_std_len == write(file_tmp, cl_std, cl_std_len) && - 4 == write(file_tmp, "\n*/\n", 4))) && + (0 == std_flag_len || (3 == write(file_tmp, "/*\n", 3) && + std_flag_len == write(file_tmp, c_dbcsr_acc_opencl_config.device.std_flag, std_flag_len) && + 4 == write(file_tmp, "\n*/\n", 4))) && size_src == (size_t)write(file_tmp, ext_source, size_src)) { if (EXIT_SUCCESS == system(buffer)) { @@ -1488,20 +1487,20 @@ int c_dbcsr_acc_opencl_kernel(int source_is_file, const char source[], const cha } } # endif - program = clCreateProgramWithSource(context, 1 /*nlines*/, &ext_source, NULL, &result); - if (CL_SUCCESS == result) { + program = clCreateProgramWithSource(c_dbcsr_acc_opencl_config.device.context, 1 /*nlines*/, &ext_source, NULL, &result); + if (EXIT_SUCCESS == result) { assert(NULL != program); - result = c_dbcsr_acc_opencl_flags(build_params, build_options, try_build_options, cl_std, buffer, sizeof(buffer)); + result = c_dbcsr_acc_opencl_flags(build_params, build_options, try_build_options, buffer, sizeof(buffer)); if (EXIT_SUCCESS == result) { result = clBuildProgram(program, 1 /*num_devices*/, &active_id, buffer, NULL /*callback*/, NULL /*user_data*/); } - if (CL_SUCCESS != result && NULL != try_build_options && '\0' != *try_build_options) { - result = c_dbcsr_acc_opencl_flags(build_params, build_options, NULL /*try_build_options*/, cl_std, buffer, sizeof(buffer)); + if (EXIT_SUCCESS != result && NULL != try_build_options && '\0' != *try_build_options) { + result = c_dbcsr_acc_opencl_flags(build_params, build_options, NULL /*try_build_options*/, buffer, sizeof(buffer)); if (EXIT_SUCCESS == result) { - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); /* recreate below (to avoid unclean state) */ - program = clCreateProgramWithSource(context, 1 /*nlines*/, &ext_source, NULL, &result); - assert(CL_SUCCESS != result || NULL != program); - if (CL_SUCCESS == result) { + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseProgram(program)); /* recreate below (to avoid unclean state) */ + program = clCreateProgramWithSource(c_dbcsr_acc_opencl_config.device.context, 1 /*nlines*/, &ext_source, NULL, &result); + assert(EXIT_SUCCESS != result || NULL != program); + if (EXIT_SUCCESS == result) { result = clBuildProgram(program, 1 /*num_devices*/, &active_id, buffer, NULL /*callback*/, NULL /*user_data*/); } } @@ -1513,58 +1512,35 @@ int c_dbcsr_acc_opencl_kernel(int source_is_file, const char source[], const cha libxsmm_free(p); } buffer[0] = '\0'; /* reset to empty */ - if (CL_SUCCESS == result) { + if (EXIT_SUCCESS == result) { /* extract kernel */ *kernel = clCreateKernel(program, kernel_name, &result); - if (CL_SUCCESS == result) { + if (EXIT_SUCCESS == result) { assert(NULL != *kernel); if (NULL == file_src && (2 <= c_dbcsr_acc_opencl_config.dump || 0 > c_dbcsr_acc_opencl_config.dump)) { unsigned char* binary = NULL; size_t size; - binary = (unsigned char*)(CL_SUCCESS == clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES, sizeof(size_t), &size, NULL) + binary = (unsigned char*)(EXIT_SUCCESS == + clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES, sizeof(size_t), &size, NULL) ? libxsmm_aligned_scratch(size, 0 /*auto-align*/) : NULL); if (NULL != binary) { result = clGetProgramInfo(program, CL_PROGRAM_BINARIES, sizeof(unsigned char*), &binary, NULL); - if (CL_SUCCESS == result) { + if (EXIT_SUCCESS == result) { /* successfully queried program binary */ FILE* file; nchar = LIBXSMM_SNPRINTF(buffer, sizeof(buffer), "%s.dump", kernel_name); file = (0 < nchar && (int)sizeof(buffer) > nchar) ? fopen(buffer, "wb") : NULL; buffer[0] = '\0'; /* reset to empty */ if (NULL != file) { - if (size != fwrite(binary, 1, size, file)) { - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseKernel(*kernel)); - result = EXIT_FAILURE; - } + if (size != fwrite(binary, 1, size, file)) result = EXIT_FAILURE; fclose(file); } - else { - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseKernel(*kernel)); - result = EXIT_FAILURE; - } - } - else { /* error: querying program binary */ - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseKernel(*kernel)); + else result = EXIT_FAILURE; } libxsmm_free(binary); } - else { - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseKernel(*kernel)); - result = EXIT_FAILURE; - } + else result = EXIT_FAILURE; } } - else { /* error: creating kernel */ - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); - } - } - else { - ACC_OPENCL_EXPECT( - CL_SUCCESS == clGetProgramBuildInfo(program, active_id, CL_PROGRAM_BUILD_LOG, ACC_OPENCL_BUFFERSIZE, buffer, NULL)); - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); } } else if (source != ext_source) { /* error: creating program */ @@ -1575,61 +1551,52 @@ int c_dbcsr_acc_opencl_kernel(int source_is_file, const char source[], const cha } else if (EXIT_SUCCESS == result) { /* binary representation */ # if defined(CL_VERSION_2_1) - if (0 != c_dbcsr_acc_opencl_config.dump) program = clCreateProgramWithIL(context, source, size_src, &result); + if (0 != c_dbcsr_acc_opencl_config.dump) + program = clCreateProgramWithIL(c_dbcsr_acc_opencl_config.device.context, source, size_src, &result); else # endif { - program = clCreateProgramWithBinary( - context, 1, &active_id, &size_src, (const unsigned char**)&source, NULL /*binary_status*/, &result); + program = clCreateProgramWithBinary(c_dbcsr_acc_opencl_config.device.context, 1, &active_id, &size_src, + (const unsigned char**)&source, NULL /*binary_status*/, &result); } - if (CL_SUCCESS == result) { + if (EXIT_SUCCESS == result) { assert(NULL != program); - result = c_dbcsr_acc_opencl_flags(build_params, build_options, try_build_options, cl_std, buffer, sizeof(buffer)); + result = c_dbcsr_acc_opencl_flags(build_params, build_options, try_build_options, buffer, sizeof(buffer)); if (EXIT_SUCCESS == result) { result = clBuildProgram(program, 1 /*num_devices*/, &active_id, buffer, NULL /*callback*/, NULL /*user_data*/); } - if (CL_SUCCESS != result && NULL != try_build_options && '\0' != *try_build_options) { - result = c_dbcsr_acc_opencl_flags(build_params, build_options, NULL /*try_build_options*/, cl_std, buffer, sizeof(buffer)); + if (EXIT_SUCCESS != result && NULL != try_build_options && '\0' != *try_build_options) { + result = c_dbcsr_acc_opencl_flags(build_params, build_options, NULL /*try_build_options*/, buffer, sizeof(buffer)); if (EXIT_SUCCESS == result) { - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); /* recreate below (to avoid unclean state) */ + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseProgram(program)); /* recreate below (to avoid unclean state) */ # if defined(CL_VERSION_2_1) - if (0 != c_dbcsr_acc_opencl_config.dump) program = clCreateProgramWithIL(context, source, size_src, &result); + if (0 != c_dbcsr_acc_opencl_config.dump) + program = clCreateProgramWithIL(c_dbcsr_acc_opencl_config.device.context, source, size_src, &result); else # endif { - program = clCreateProgramWithBinary( - context, 1, &active_id, &size_src, (const unsigned char**)&source, NULL /*binary_status*/, &result); + program = clCreateProgramWithBinary(c_dbcsr_acc_opencl_config.device.context, 1, &active_id, &size_src, + (const unsigned char**)&source, NULL /*binary_status*/, &result); } - assert(CL_SUCCESS != result || NULL != program); - if (CL_SUCCESS == result) { + assert(EXIT_SUCCESS != result || NULL != program); + if (EXIT_SUCCESS == result) { result = clBuildProgram(program, 1 /*num_devices*/, &active_id, buffer, NULL /*callback*/, NULL /*user_data*/); } } ok = EXIT_FAILURE; } - if (CL_SUCCESS == result) { + if (EXIT_SUCCESS == result) { *kernel = clCreateKernel(program, kernel_name, &result); - assert(CL_SUCCESS != result || NULL != *kernel); - if (CL_SUCCESS != result) { /* error: creating kernel */ # if defined(CL_VERSION_1_2) - /* discover available kernels in program, and adopt the last kernel listed */ - if (CL_SUCCESS == clGetProgramInfo(program, CL_PROGRAM_KERNEL_NAMES, sizeof(char*), buffer, NULL) && '\0' != *buffer) { - const char *const semicolon = strrchr(buffer, ';'), *const name = (NULL == semicolon ? buffer : (semicolon + 1)); - *kernel = clCreateKernel(program, name, &result); - assert(CL_SUCCESS != result || NULL != *kernel); - if (CL_SUCCESS != result) ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); - } - else -# endif - { - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); - } + /* error creating kernel: discover available kernels in program, and adopt the last kernel listed */ + if (EXIT_SUCCESS != result && + EXIT_SUCCESS == clGetProgramInfo(program, CL_PROGRAM_KERNEL_NAMES, sizeof(char*), buffer, NULL) && '\0' != *buffer) + { + const char *const semicolon = strrchr(buffer, ';'), *const name = (NULL == semicolon ? buffer : (semicolon + 1)); + *kernel = clCreateKernel(program, name, &result); } - } - else { - ACC_OPENCL_EXPECT( - CL_SUCCESS == clGetProgramBuildInfo(program, active_id, CL_PROGRAM_BUILD_LOG, ACC_OPENCL_BUFFERSIZE, buffer, NULL)); - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseProgram(program)); +# endif + assert(EXIT_SUCCESS != result || NULL != *kernel); } } } @@ -1639,13 +1606,33 @@ int c_dbcsr_acc_opencl_kernel(int source_is_file, const char source[], const cha assert(0 != source_is_file); libxsmm_free(p); } -# if !defined(NDEBUG) - if (EXIT_SUCCESS != result && NULL != kernel) *kernel = NULL; -# endif + if (NULL != program) { + if (EXIT_SUCCESS != result && NULL != *kernel) { + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseKernel(*kernel)); + *kernel = NULL; + } + if (2 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { + if (EXIT_SUCCESS == clGetProgramBuildInfo(program, active_id, CL_PROGRAM_BUILD_LOG, ACC_OPENCL_BUFFERSIZE, buffer, NULL)) { + const char* info = buffer; + while ('\0' != *info && NULL != strchr("\n\r\t ", *info)) ++info; /* remove preceding newline etc. */ + assert(NULL != kernel_name && '\0' != *kernel_name); + if ('\0' != *info) fprintf(stderr, "INFO ACC/OpenCL: %s -> %s\n", kernel_name, info); + } + else buffer[0] = '\0'; /* reset to empty */ + } + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseProgram(program)); /* release in any case (EXIT_SUCCESS) */ + } if (NULL != try_ok) *try_ok = result | ok; ACC_OPENCL_RETURN_CAUSE(result, buffer); } + +int c_dbcsr_acc_opencl_set_kernel_ptr(cl_kernel kernel, cl_uint arg_index, const void* arg_value) { + return (NULL != c_dbcsr_acc_opencl_config.device.clSetKernelArgMemPointerINTEL + ? c_dbcsr_acc_opencl_config.device.clSetKernelArgMemPointerINTEL(kernel, arg_index, arg_value) + : clSetKernelArg(kernel, arg_index, sizeof(cl_mem), &arg_value)); +} + # if defined(__cplusplus) } # endif diff --git a/src/acc/opencl/acc_opencl.h b/src/acc/opencl/acc_opencl.h index 58e1e4ea9e9..5395effdada 100644 --- a/src/acc/opencl/acc_opencl.h +++ b/src/acc/opencl/acc_opencl.h @@ -59,12 +59,6 @@ LIBXSMM_VERSION4(LIBXSMM_VERSION_MAJOR, LIBXSMM_VERSION_MINOR, LIBXSMM_VERSION_UPDATE, LIBXSMM_VERSION_PATCH) #endif -#if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER -# define LIBXSMM_STRISTR libxsmm_stristr -#else -# define LIBXSMM_STRISTR strstr -#endif - #include "../acc.h" #if !defined(NDEBUG) # include @@ -72,11 +66,19 @@ #include #include -#if !defined(ACC_OPENCL_CACHELINE_NBYTES) -# define ACC_OPENCL_CACHELINE_NBYTES LIBXSMM_CACHELINE +#if !defined(ACC_OPENCL_CACHELINE) +# define ACC_OPENCL_CACHELINE LIBXSMM_CACHELINE +#endif +#if !defined(ACC_OPENCL_ATOMIC) +# define ACC_OPENCL_ATOMIC LIBXSMM_ATOMIC_SEQ_CST +#endif +#if defined(LIBXSMM_ATOMIC_LOCKTYPE) +# define ACC_OPENCL_ATOMIC_LOCKTYPE volatile LIBXSMM_ATOMIC_LOCKTYPE +#else +# define ACC_OPENCL_ATOMIC_LOCKTYPE volatile int #endif -#if !defined(ACC_OPENCL_MAXALIGN_NBYTES) -# define ACC_OPENCL_MAXALIGN_NBYTES (2 << 20 /*2MB*/) +#if !defined(ACC_OPENCL_MAXALIGN) +# define ACC_OPENCL_MAXALIGN (2 << 20 /*2MB*/) #endif #if !defined(ACC_OPENCL_BUFFERSIZE) # define ACC_OPENCL_BUFFERSIZE (8 << 10 /*8KB*/) @@ -84,77 +86,100 @@ #if !defined(ACC_OPENCL_MAXSTRLEN) # define ACC_OPENCL_MAXSTRLEN 48 #endif -#if !defined(ACC_OPENCL_DEVICES_MAXCOUNT) -# define ACC_OPENCL_DEVICES_MAXCOUNT 64 -#endif -/** Counted on a per-thread basis! */ -#if !defined(ACC_OPENCL_HANDLES_MAXCOUNT) -# define ACC_OPENCL_HANDLES_MAXCOUNT 64 +#if !defined(ACC_OPENCL_MAXNDEVS) +# define ACC_OPENCL_MAXNDEVS 64 #endif -/** Counted on a per-thread basis! */ -#if !defined(ACC_OPENCL_STREAMS_MAXCOUNT) -# define ACC_OPENCL_STREAMS_MAXCOUNT 64 -#endif -#if !defined(ACC_OPENCL_OVERMALLOC) -# if defined(__DBCSR_ACC) || 1 -# define ACC_OPENCL_OVERMALLOC 0 -# else -# define ACC_OPENCL_OVERMALLOC 8192 -# endif +/* Counted on a per-thread basis! */ +#if !defined(ACC_OPENCL_MAXNITEMS) +# define ACC_OPENCL_MAXNITEMS 1024 #endif /* First char is CSV-separator by default (w/o spaces) */ #if !defined(ACC_OPENCL_DELIMS) # define ACC_OPENCL_DELIMS ",;" #endif - #if !defined(ACC_OPENCL_LAZYINIT) && (defined(__DBCSR_ACC) || 1) # define ACC_OPENCL_LAZYINIT #endif +#if !defined(ACC_OPENCL_ASYNC) && 1 +# define ACC_OPENCL_ASYNC getenv("ACC_OPENCL_ASYNC") +#endif #if !defined(ACC_OPENCL_STREAM_PRIORITIES) && 0 # if defined(CL_QUEUE_PRIORITY_KHR) # define ACC_OPENCL_STREAM_PRIORITIES # endif #endif -/** Streams are registered in compact/consecutive fashion */ -#if !defined(ACC_OPENCL_STREAM_COMPACT) && 1 -# define ACC_OPENCL_STREAM_COMPACT -#endif -/** Stream-argument (ACC-interface) can be NULL (synchronous) */ +/* Stream-argument (ACC-interface) can be NULL (synchronous) */ #if !defined(ACC_OPENCL_STREAM_NULL) && 1 # define ACC_OPENCL_STREAM_NULL #endif - -/** Automatically determine cl_mem offset */ -#if !defined(ACC_OPENCL_MEM_OFFSET) && 1 -# define ACC_OPENCL_MEM_OFFSET +/* Stream for internal purpose. */ +#if !defined(ACC_OPENCL_STREAM_PRV) && 0 +# define ACC_OPENCL_STREAM_PRV #endif - -/** Use DBCSR's profile for detailed timings */ +/* Support arithmetic for device-pointers (DBM) */ +#if !defined(ACC_OPENCL_MEM_DEVPTR) && 1 +# define ACC_OPENCL_MEM_DEVPTR +#endif +#if !defined(ACC_OPENCL_OMPLOCKS) && 1 +# define ACC_OPENCL_OMPLOCKS +#endif +/* Use DBCSR's profile for detailed timings */ #if !defined(ACC_OPENCL_PROFILE) && 0 # define ACC_OPENCL_PROFILE #endif -/* attaching c_dbcsr_acc_opencl_info_stream_t is needed */ -#define ACC_OPENCL_STREAM(A) ((cl_command_queue*)(A)) +/* attaching c_dbcsr_acc_opencl_stream_t is needed */ +#define ACC_OPENCL_STREAM(A) ((const c_dbcsr_acc_opencl_stream_t*)(A)) /* incompatible with c_dbcsr_acc_event_record */ -#define ACC_OPENCL_EVENT(A) ((cl_event*)(A)) +#define ACC_OPENCL_EVENT(A) ((const cl_event*)(A)) #if defined(_OPENMP) # include # define ACC_OPENCL_OMP_TID() omp_get_thread_num() #else # define ACC_OPENCL_OMP_TID() (/*main*/ 0) +# undef ACC_OPENCL_OMPLOCKS #endif -#if 1 -# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER -# define ACC_OPENCL_EXPECT(EXPR) LIBXSMM_EXPECT(EXPR) -# else -# define ACC_OPENCL_EXPECT(EXPR) \ - if (0 == (EXPR)) assert(0); -# endif -#else /* elide */ -# define ACC_OPENCL_EXPECT(EXPR) (void)(EXPR) +#define ACC_OPENCL_ATOMIC_ACQUIRE(LOCK) \ + do { \ + LIBXSMM_ATOMIC_ACQUIRE(LOCK, LIBXSMM_SYNC_NPAUSE, ACC_OPENCL_ATOMIC); \ + } while (0) +#define ACC_OPENCL_ATOMIC_RELEASE(LOCK) \ + do { \ + LIBXSMM_ATOMIC_RELEASE(LOCK, ACC_OPENCL_ATOMIC); \ + } while (0) + +#if defined(ACC_OPENCL_OMPLOCKS) +# define ACC_OPENCL_INIT(LOCK) omp_init_lock(LOCK) +# define ACC_OPENCL_DESTROY(LOCK) omp_destroy_lock(LOCK) +# define ACC_OPENCL_ACQUIRE(LOCK) omp_set_lock(LOCK) +# define ACC_OPENCL_RELEASE(LOCK) omp_unset_lock(LOCK) +# define ACC_OPENCL_LOCKTYPE omp_lock_t +#else +# define ACC_OPENCL_INIT(LOCK) (*(LOCK) = 0) +# define ACC_OPENCL_DESTROY(LOCK) +# define ACC_OPENCL_ACQUIRE(LOCK) ACC_OPENCL_ATOMIC_ACQUIRE(LOCK) +# define ACC_OPENCL_RELEASE(LOCK) ACC_OPENCL_ATOMIC_RELEASE(LOCK) +# define ACC_OPENCL_LOCKTYPE ACC_OPENCL_ATOMIC_LOCKTYPE +#endif + +#if defined(CL_VERSION_2_0) +# define ACC_OPENCL_STREAM_PROPERTIES_TYPE cl_queue_properties +# define ACC_OPENCL_CREATE_COMMAND_QUEUE(CTX, DEV, PROPS, RESULT) clCreateCommandQueueWithProperties(CTX, DEV, PROPS, RESULT) +#else +# define ACC_OPENCL_STREAM_PROPERTIES_TYPE cl_int +# define ACC_OPENCL_CREATE_COMMAND_QUEUE(CTX, DEV, PROPS, RESULT) \ + clCreateCommandQueue(CTX, DEV, (cl_command_queue_properties)(NULL != (PROPS) ? ((PROPS)[1]) : 0), RESULT) +#endif + +#if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER +# define ACC_OPENCL_EXPECT(EXPR) LIBXSMM_EXPECT(EXPR) +# define LIBXSMM_STRISTR libxsmm_stristr +#else +# define ACC_OPENCL_EXPECT(EXPR) \ + if (0 == (EXPR)) assert(0) +# define LIBXSMM_STRISTR strstr #endif #if !defined(NDEBUG) && 1 @@ -163,15 +188,15 @@ if (EXIT_SUCCESS == (RESULT)) { \ (RESULT) = (EXPR); \ assert((MSG) && *(MSG)); \ - if (CL_SUCCESS != (RESULT)) { \ - assert(CL_SUCCESS == EXIT_SUCCESS); \ + if (EXIT_SUCCESS != (RESULT)) { \ + assert(EXIT_SUCCESS == EXIT_SUCCESS); \ if (-1001 != (RESULT)) { \ fprintf(stderr, "ERROR ACC/OpenCL: " MSG); \ if (EXIT_FAILURE != (RESULT)) { \ fprintf(stderr, " (code=%i)", RESULT); \ } \ fprintf(stderr, ".\n"); \ - assert(CL_SUCCESS != (RESULT)); \ + assert(EXIT_SUCCESS != (RESULT)); \ } \ else { \ fprintf(stderr, "ERROR ACC/OpenCL: incomplete installation (" MSG ").\n"); \ @@ -222,43 +247,75 @@ extern "C" { typedef struct c_dbcsr_acc_opencl_device_t { /** Activated device context. */ cl_context context; +#if defined(ACC_OPENCL_STREAM_PRV) + cl_command_queue queue; +#endif + char std_flag[16]; /** OpenCL support-level of device. */ - cl_int level[2]; + cl_int std_level[2], std_clevel[2]; /** Kind of device (GPU, CPU, or other). */ cl_device_type type; -#if defined(CL_VERSION_2_0) - /** Runtime SVM support. */ - cl_bool svm_interop; -#endif /** Whether host memory is unified. */ - cl_bool unified; + cl_int unified; /** Device-ID. */ cl_uint uid; /** Main vendor? */ cl_int intel, amd, nv; + /* USM support functions */ + cl_int (*clSetKernelArgMemPointerINTEL)(cl_kernel, cl_uint, const void*); + cl_int (*clEnqueueMemFillINTEL)(cl_command_queue, void*, const void*, size_t, size_t, cl_uint, const cl_event*, cl_event*); + cl_int (*clEnqueueMemcpyINTEL)(cl_command_queue, cl_bool, void*, const void*, size_t, cl_uint, const cl_event*, cl_event*); + void* (*clDeviceMemAllocINTEL)(cl_context, cl_device_id, const cl_mem_properties_intel*, size_t, cl_uint, cl_int*); + cl_int (*clMemFreeINTEL)(cl_context, void*); } c_dbcsr_acc_opencl_device_t; +/** Information about host/device-memory pointer. */ +typedef struct c_dbcsr_acc_opencl_info_memptr_t { + cl_mem memory; /* first item! */ + void* memptr; +} c_dbcsr_acc_opencl_info_memptr_t; + +/** Information about streams (c_dbcsr_acc_stream_create). */ +typedef struct c_dbcsr_acc_opencl_stream_t { + cl_command_queue queue; + int tid, priority; +} c_dbcsr_acc_opencl_stream_t; + /** Enumeration of timer kinds used for built-in execution-profile. */ typedef enum c_dbcsr_acc_opencl_timer_t { c_dbcsr_acc_opencl_timer_device, c_dbcsr_acc_opencl_timer_host } c_dbcsr_acc_opencl_timer_t; +/** Enumeration of FP-atomic kinds. */ +typedef enum c_dbcsr_acc_opencl_atomic_fp_t { + c_dbcsr_acc_opencl_atomic_fp_no = 0, + c_dbcsr_acc_opencl_atomic_fp_32 = 1, + c_dbcsr_acc_opencl_atomic_fp_64 = 2 +} c_dbcsr_acc_opencl_atomic_fp_t; + /** * Settings discovered/setup during c_dbcsr_acc_init (independent of the device) * and settings updated during c_dbcsr_acc_set_active_device (devinfo). */ typedef struct c_dbcsr_acc_opencl_config_t { /** Table of ordered viable/discovered devices (matching criterion). */ - cl_device_id devices[ACC_OPENCL_DEVICES_MAXCOUNT]; + cl_device_id devices[ACC_OPENCL_MAXNDEVS]; /** Table of devices (thread-specific). */ - c_dbcsr_acc_opencl_device_t* device; + c_dbcsr_acc_opencl_device_t device; + /** Locks used by domain. */ + ACC_OPENCL_LOCKTYPE *lock_main, *lock_stream, *lock_event, *lock_memory; +#if defined(ACC_OPENCL_MEM_DEVPTR) + /** All memptrs and related storage/counter. */ + c_dbcsr_acc_opencl_info_memptr_t **memptrs, *memptr_data; + size_t nmemptrs; /* counter */ +#endif /** Handle-counter. */ - size_t nclmems, nevents; - /** All handles and related storage. */ - void **clmems, **events, *storage; - /** All created streams partitioned by thread-ID (thread-local slots). */ - void** streams; + size_t nstreams, nevents; + /** All streams and related storage. */ + c_dbcsr_acc_opencl_stream_t **streams, *stream_data; + /** All events and related storage. */ + cl_event **events, *event_data; /** Kind of timer used for built-in execution-profile. */ c_dbcsr_acc_opencl_timer_t timer; /* c_dbcsr_acc_opencl_device_t? */ /** Kernel-parameters are matched against device's UID */ @@ -269,16 +326,14 @@ typedef struct c_dbcsr_acc_opencl_config_t { cl_int ndevices; /** Maximum number of threads (omp_get_max_threads). */ cl_int nthreads; - /** Maximum number of streams per thread. */ - cl_int nstreams; /** How to apply/use stream priorities. */ cl_int priority; - /** How to zero/copy device-side buffers. */ - cl_int devcopy; - /** Execution-hints (command stream). */ + /** Configuration and execution-hints. */ cl_int xhints; - /** Asynchronous memory ops. */ + /** Asynchronous memory operations. */ cl_int async; + /** Debug (output/symbols, etc.). */ + cl_int debug; /** Dump level. */ cl_int dump; } c_dbcsr_acc_opencl_config_t; @@ -286,39 +341,25 @@ typedef struct c_dbcsr_acc_opencl_config_t { /** Global configuration setup in c_dbcsr_acc_init. */ extern c_dbcsr_acc_opencl_config_t c_dbcsr_acc_opencl_config; -/** Contexts implement 1:1 relation with device. */ -cl_context c_dbcsr_acc_opencl_context(int* thread_id); -/** Share context for given device (start searching at optional thread_id), or return NULL). */ -cl_context c_dbcsr_acc_opencl_device_context(cl_device_id device, const int* thread_id); - -/** Information about host-memory pointer (c_dbcsr_acc_host_mem_allocate). */ -typedef struct c_dbcsr_acc_opencl_info_hostptr_t { - cl_mem memory; - void* mapped; -} c_dbcsr_acc_opencl_info_hostptr_t; -c_dbcsr_acc_opencl_info_hostptr_t* c_dbcsr_acc_opencl_info_hostptr(void* memory); - -/** Determines cl_mem object and offset of memory. */ -void* c_dbcsr_acc_opencl_info_devptr(const void* memory, size_t elsize, const size_t* amount, size_t* offset); - -/** Information about streams (c_dbcsr_acc_stream_create). */ -typedef struct c_dbcsr_acc_opencl_info_stream_t { - void* pointer; - int priority; - int tid; -} c_dbcsr_acc_opencl_info_stream_t; -c_dbcsr_acc_opencl_info_stream_t* c_dbcsr_acc_opencl_info_stream(void* stream); -const int* c_dbcsr_acc_opencl_stream_priority(const void* stream); - -void* c_dbcsr_acc_opencl_stream_default(void); - -/** Get host-pointer associated with device-memory (c_dbcsr_acc_dev_mem_allocate). */ -void* c_dbcsr_acc_opencl_get_hostptr(cl_mem memory); +/** Determines host-pointer registration for modification. */ +c_dbcsr_acc_opencl_info_memptr_t* c_dbcsr_acc_opencl_info_hostptr(void* memory); +/** Determines device-pointer registration for modification (internal). */ +c_dbcsr_acc_opencl_info_memptr_t* c_dbcsr_acc_opencl_info_devptr_modify( + ACC_OPENCL_LOCKTYPE* lock, void* memory, size_t elsize, const size_t* amount, size_t* offset); +/** Determines device-pointer registration for information (lock-control). */ +int c_dbcsr_acc_opencl_info_devptr_lock(c_dbcsr_acc_opencl_info_memptr_t* info, ACC_OPENCL_LOCKTYPE* lock, const void* memory, + size_t elsize, const size_t* amount, size_t* offset); +/** Determines device-pointer registration for information. */ +int c_dbcsr_acc_opencl_info_devptr( + c_dbcsr_acc_opencl_info_memptr_t* info, const void* memory, size_t elsize, const size_t* amount, size_t* offset); +/** Finds an existing stream for the given thread-ID (or NULL). */ +const c_dbcsr_acc_opencl_stream_t* c_dbcsr_acc_opencl_stream(ACC_OPENCL_LOCKTYPE* lock, int thread_id); +/** Determines default-stream (see ACC_OPENCL_STREAM_NULL). */ +const c_dbcsr_acc_opencl_stream_t* c_dbcsr_acc_opencl_stream_default(void); +/** Like c_dbcsr_acc_memset_zero, but supporting an arbitrary value used as initialization pattern. */ int c_dbcsr_acc_opencl_memset(void* dev_mem, int value, size_t offset, size_t nbytes, void* stream); /** Amount of device memory; local memory is only non-zero if separate from global. */ int c_dbcsr_acc_opencl_info_devmem(cl_device_id device, size_t* mem_free, size_t* mem_total, size_t* mem_local, int* mem_unified); -/** Get device associated with thread-ID. */ -int c_dbcsr_acc_opencl_device(int thread_id, cl_device_id* device); /** Get device-ID for given device, and optionally global device-ID. */ int c_dbcsr_acc_opencl_device_id(cl_device_id device, int* device_id, int* global_id); /** Confirm the vendor of the given device. */ @@ -329,13 +370,14 @@ int c_dbcsr_acc_opencl_device_uid(cl_device_id device, const char devname[], uns int c_dbcsr_acc_opencl_device_name( cl_device_id device, char name[], size_t name_maxlen, char platform[], size_t platform_maxlen, int cleanup); /** Return the OpenCL support-level for the given device. */ -int c_dbcsr_acc_opencl_device_level(cl_device_id device, int* level_major, int* level_minor, char cl_std[16], cl_device_type* type); +int c_dbcsr_acc_opencl_device_level( + cl_device_id device, int std_clevel[2], int std_level[2], char std_flag[16], cl_device_type* type); /** Check if given device supports the extensions. */ int c_dbcsr_acc_opencl_device_ext(cl_device_id device, const char* const extnames[], int num_exts); -/** Create context for given thread-ID and device. */ -int c_dbcsr_acc_opencl_create_context(int thread_id, cl_device_id device_id); +/** Create context for given device. */ +int c_dbcsr_acc_opencl_create_context(cl_device_id device_id, cl_context* context); /** Internal variant of c_dbcsr_acc_set_active_device. */ -int c_dbcsr_acc_opencl_set_active_device(int thread_id, int device_id); +int c_dbcsr_acc_opencl_set_active_device(ACC_OPENCL_LOCKTYPE* lock, int device_id); /** Get preferred multiple and max. size of workgroup (kernel- or device-specific). */ int c_dbcsr_acc_opencl_wgsize(cl_device_id device, cl_kernel kernel, size_t* max_value, size_t* preferred_multiple); /** @@ -347,24 +389,22 @@ int c_dbcsr_acc_opencl_kernel(int source_is_file, const char source[], const cha const char build_options[], const char try_build_options[], int* try_ok, const char* const extnames[], int num_exts, cl_kernel* kernel); /** Per-thread variant of c_dbcsr_acc_device_synchronize. */ -int c_dbcsr_acc_opencl_device_synchronize(int thread_id); -/** Create user-event if not created and sets initial state. */ -int c_dbcsr_acc_opencl_event_create(cl_event* event_p); - -/** Enumeration of FP-atomic kinds. */ -typedef enum c_dbcsr_acc_opencl_atomic_fp_t { - c_dbcsr_acc_opencl_atomic_fp_no = 0, - c_dbcsr_acc_opencl_atomic_fp_32 = 1, - c_dbcsr_acc_opencl_atomic_fp_64 = 2 -} c_dbcsr_acc_opencl_atomic_fp_t; - +int c_dbcsr_acc_opencl_device_synchronize(ACC_OPENCL_LOCKTYPE* lock, int thread_id); /** Assemble flags to support atomic operations. */ -int c_dbcsr_acc_opencl_flags_atomics(cl_device_id device_id, c_dbcsr_acc_opencl_atomic_fp_t kind, - const c_dbcsr_acc_opencl_device_t* devinfo, const char* exts[], int exts_maxlen, char flags[], size_t flags_maxlen); - -/** Combines build-params and build-options, some optional flags (try_build_options), and applies language std. (cl_std). */ -int c_dbcsr_acc_opencl_flags(const char build_params[], const char build_options[], const char try_build_options[], - const char cl_std[], char buffer[], size_t buffer_size); +int c_dbcsr_acc_opencl_flags_atomics(const c_dbcsr_acc_opencl_device_t* devinfo, c_dbcsr_acc_opencl_atomic_fp_t kind, + const char* exts[], int exts_maxlen, char flags[], size_t flags_maxlen); +/** Combines build-params and build-options, optional flags (try_build_options). */ +int c_dbcsr_acc_opencl_flags( + const char build_params[], const char build_options[], const char try_build_options[], char buffer[], size_t buffer_size); +/** To support USM, call this function for pointer arguments instead of clSetKernelArg. */ +int c_dbcsr_acc_opencl_set_kernel_ptr(cl_kernel kernel, cl_uint arg_index, const void* arg_value); + +/** Support older LIBXSMM (libxsmm_pmalloc_init). */ +void c_dbcsr_acc_opencl_pmalloc_init(ACC_OPENCL_LOCKTYPE* lock, size_t size, size_t* num, void* pool[], void* storage); +/** Support older LIBXSMM (libxsmm_pmalloc). */ +void* c_dbcsr_acc_opencl_pmalloc(ACC_OPENCL_LOCKTYPE* lock, void* pool[], size_t* i); +/** Support older LIBXSMM (libxsmm_pfree). */ +void c_dbcsr_acc_opencl_pfree(ACC_OPENCL_LOCKTYPE* lock, const void* pointer, void* pool[], size_t* i); #if defined(__cplusplus) } diff --git a/src/acc/opencl/acc_opencl_event.c b/src/acc/opencl/acc_opencl_event.c index a755fa42741..dc012a25fce 100644 --- a/src/acc/opencl/acc_opencl_event.c +++ b/src/acc/opencl/acc_opencl_event.c @@ -9,17 +9,8 @@ #if defined(__OPENCL) # include "acc_opencl.h" -# if defined(CL_VERSION_1_2) -# define ACC_OPENCL_WAIT_EVENT(QUEUE, EVENT) clEnqueueMarkerWithWaitList(QUEUE, 1, EVENT, NULL) -# else -# define ACC_OPENCL_WAIT_EVENT(QUEUE, EVENT) clEnqueueWaitForEvents(QUEUE, 1, EVENT) -# endif - -# if !defined(ACC_OPENCL_EVENT_BARRIER) && 0 -# define ACC_OPENCL_EVENT_BARRIER -# endif -# if !defined(ACC_OPENCL_EVENT_CREATE) && 0 -# define ACC_OPENCL_EVENT_CREATE +# if !defined(ACC_OPENCL_EVENT_FLUSH) && 0 +# define ACC_OPENCL_EVENT_FLUSH # endif @@ -27,69 +18,19 @@ extern "C" { # endif -int c_dbcsr_acc_opencl_event_create(cl_event* event_p) { - int result; - assert(NULL != event_p); - if (NULL != *event_p) result = EXIT_SUCCESS; - else { - *event_p = clCreateUserEvent(c_dbcsr_acc_opencl_context(NULL /*tid*/), &result); - } - if (CL_SUCCESS == result) { - assert(NULL != *event_p); - /* an empty event (unrecorded) has no work to wait for; hence it is - * considered occurred and c_dbcsr_acc_event_synchronize must not block - */ - result = clSetUserEventStatus(*event_p, CL_COMPLETE); - if (CL_SUCCESS != result) { /* error: setting initial event state */ - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseEvent(*event_p)); - *event_p = NULL; - } - } - else { - *event_p = NULL; /* error: creating user-defined event */ - } - return result; -} - - int c_dbcsr_acc_event_create(void** event_p) { int result = EXIT_SUCCESS; - cl_event event = NULL; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - assert(NULL != event_p); -# if defined(ACC_OPENCL_EVENT_CREATE) - result = c_dbcsr_acc_opencl_event_create(&event); - assert(NULL != event || EXIT_SUCCESS != result); - if (EXIT_SUCCESS == result) -# endif - { - assert(NULL == c_dbcsr_acc_opencl_config.events || sizeof(void*) >= sizeof(cl_event)); - *event_p = ( -# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && defined(ACC_OPENCL_HANDLES_MAXCOUNT) && \ - (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - NULL != c_dbcsr_acc_opencl_config.events - ? libxsmm_pmalloc(c_dbcsr_acc_opencl_config.events, &c_dbcsr_acc_opencl_config.nevents) - : -# endif - malloc(sizeof(cl_event))); - if (NULL != *event_p) { - *(cl_event*)*event_p = event; - } - else { - if (NULL != event) ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseEvent(event)); - result = EXIT_FAILURE; - } - } -# if defined(ACC_OPENCL_EVENT_CREATE) - else { - *event_p = NULL; /* error: creating user-defined event */ - } -# endif + assert(NULL != c_dbcsr_acc_opencl_config.events && NULL != event_p); + *event_p = c_dbcsr_acc_opencl_pmalloc( + c_dbcsr_acc_opencl_config.lock_event, (void**)c_dbcsr_acc_opencl_config.events, &c_dbcsr_acc_opencl_config.nevents); + if (NULL != *event_p) *(cl_event*)*event_p = NULL; + else result = EXIT_FAILURE; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); # endif @@ -107,18 +48,16 @@ int c_dbcsr_acc_event_destroy(void* event) { # endif if (NULL != event) { const cl_event clevent = *ACC_OPENCL_EVENT(event); - if (NULL != clevent) result = clReleaseEvent(clevent); -# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && defined(ACC_OPENCL_HANDLES_MAXCOUNT) && \ - (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - if (NULL != c_dbcsr_acc_opencl_config.events) { - /**(cl_event*)event = NULL; assert(NULL == *ACC_OPENCL_EVENT(event));*/ - libxsmm_pfree(event, c_dbcsr_acc_opencl_config.events, &c_dbcsr_acc_opencl_config.nevents); - } - else + assert(NULL != c_dbcsr_acc_opencl_config.events); + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_event); + c_dbcsr_acc_opencl_pfree(NULL /*lock*/, event, (void**)c_dbcsr_acc_opencl_config.events, &c_dbcsr_acc_opencl_config.nevents); + if (NULL != clevent) { + result = clReleaseEvent(clevent); +# if !defined(NDEBUG) + *(cl_event*)event = NULL; # endif - { - free(event); } + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_event); } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -129,22 +68,42 @@ int c_dbcsr_acc_event_destroy(void* event) { int c_dbcsr_acc_stream_wait_event(void* stream, void* event) { /* wait for an event (device-side) */ int result = EXIT_SUCCESS; - cl_event clevent; + const c_dbcsr_acc_opencl_stream_t* str = NULL; + cl_event clevent = NULL; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - assert(NULL != stream && NULL != event); +# if defined(ACC_OPENCL_STREAM_NULL) + str = (NULL != stream ? ACC_OPENCL_STREAM(stream) : c_dbcsr_acc_opencl_stream_default()); +# else + str = ACC_OPENCL_STREAM(stream); +# endif + assert(NULL != str && NULL != str->queue && NULL != event); clevent = *ACC_OPENCL_EVENT(event); -# if defined(ACC_OPENCL_EVENT_CREATE) - assert(NULL != clevent); + if (NULL != clevent) { +# if defined(CL_VERSION_1_2) + cl_event clevent_result = NULL; + result = clEnqueueBarrierWithWaitList(str->queue, 1, &clevent, &clevent_result); + if (EXIT_SUCCESS == result) { + result = clReleaseEvent(clevent); + assert(NULL != clevent_result); + *(cl_event*)event = (EXIT_SUCCESS == result ? clevent_result : NULL); + } + else # else - if (NULL != clevent) + result = clEnqueueWaitForEvents(str->queue, 1, &clevent); + if (EXIT_SUCCESS != result) # endif - { - result = ACC_OPENCL_WAIT_EVENT(*ACC_OPENCL_STREAM(stream), &clevent); + { + ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseEvent(clevent)); + *(cl_event*)event = NULL; + } + } + else if (3 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { + fprintf(stderr, "WARN ACC/OpenCL: c_dbcsr_acc_stream_wait_event discovered an empty event.\n"); } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -154,25 +113,43 @@ int c_dbcsr_acc_stream_wait_event(void* stream, void* event) { /* wait for an ev int c_dbcsr_acc_event_record(void* event, void* stream) { - int result; - cl_event clevent = NULL; + int result = EXIT_SUCCESS; + const c_dbcsr_acc_opencl_stream_t* str = NULL; + cl_event clevent = NULL, clevent_result = NULL; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - assert(NULL != event && NULL != stream); -# if defined(ACC_OPENCL_EVENT_BARRIER) && defined(CL_VERSION_1_2) - result = clEnqueueBarrierWithWaitList(*ACC_OPENCL_STREAM(stream), 0, NULL, &clevent); -# elif defined(CL_VERSION_1_2) - result = clEnqueueMarkerWithWaitList(*ACC_OPENCL_STREAM(stream), 0, NULL, &clevent); +# if defined(ACC_OPENCL_STREAM_NULL) + str = (NULL != stream ? ACC_OPENCL_STREAM(stream) : c_dbcsr_acc_opencl_stream_default()); # else - result = clEnqueueMarker(*ACC_OPENCL_STREAM(stream), &clevent); + str = ACC_OPENCL_STREAM(stream); # endif - if (CL_SUCCESS == result) { - assert(NULL != clevent); - *(cl_event*)event = clevent; + assert(NULL != str && NULL != str->queue && NULL != event); + clevent = *ACC_OPENCL_EVENT(event); +# if defined(CL_VERSION_1_2) + result = (NULL == clevent ? clEnqueueMarkerWithWaitList(str->queue, 0, NULL, &clevent_result) + : clEnqueueMarkerWithWaitList(str->queue, 1, &clevent, &clevent_result)); +# else + if (NULL != clevent) result = clEnqueueWaitForEvents(str->queue, 1, &clevent); + if (EXIT_SUCCESS == result) result = clEnqueueMarker(str->queue, &clevent_result); +# endif +# if defined(ACC_OPENCL_EVENT_FLUSH) + if (EXIT_SUCCESS == result) result = clFlush(str->queue); +# endif + if (NULL != clevent) { + const int result_release = clReleaseEvent(clevent); + if (EXIT_SUCCESS == result) result = result_release; + } + if (EXIT_SUCCESS == result) { + assert(NULL != clevent_result); + *(cl_event*)event = clevent_result; + } + else { + if (NULL != clevent_result) ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseEvent(clevent_result)); + *(cl_event*)event = NULL; } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -192,13 +169,9 @@ int c_dbcsr_acc_event_query(void* event, c_dbcsr_acc_bool_t* has_occurred) { # endif assert(NULL != event && NULL != has_occurred); result = clGetEventInfo(*ACC_OPENCL_EVENT(event), CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(cl_int), &status, NULL); - if (CL_SUCCESS == result && 0 <= status) *has_occurred = (CL_COMPLETE == status ? 1 : 0); + if (EXIT_SUCCESS == result && 0 <= status) *has_occurred = (CL_COMPLETE == status ? 1 : 0); else { /* error state */ -# if defined(ACC_OPENCL_EVENT_CREATE) - if (CL_SUCCESS == result) result = EXIT_FAILURE; -# else - result = EXIT_SUCCESS; -# endif + result = EXIT_SUCCESS; /* soft-error */ *has_occurred = 1; } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) @@ -209,7 +182,7 @@ int c_dbcsr_acc_event_query(void* event, c_dbcsr_acc_bool_t* has_occurred) { int c_dbcsr_acc_event_synchronize(void* event) { /* waits on the host-side */ - int result; + int result = EXIT_SUCCESS; cl_event clevent; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; @@ -219,14 +192,9 @@ int c_dbcsr_acc_event_synchronize(void* event) { /* waits on the host-side */ # endif assert(NULL != event); clevent = *ACC_OPENCL_EVENT(event); -# if !defined(ACC_OPENCL_EVENT_CREATE) - if (NULL == clevent) { - result = EXIT_SUCCESS; - } - else -# endif - { - result = clWaitForEvents(1, &clevent); + if (NULL != clevent) result = clWaitForEvents(1, &clevent); + else if (3 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { + fprintf(stderr, "WARN ACC/OpenCL: c_dbcsr_acc_event_synchronize discovered an empty event.\n"); } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); diff --git a/src/acc/opencl/acc_opencl_mem.c b/src/acc/opencl/acc_opencl_mem.c index 9f4bf1e1fa3..33519b46e99 100644 --- a/src/acc/opencl/acc_opencl_mem.c +++ b/src/acc/opencl/acc_opencl_mem.c @@ -19,150 +19,198 @@ # include # endif -# if !defined(ACC_OPENCL_MEM_DEBUG) && !defined(NDEBUG) && 0 -# define ACC_OPENCL_MEM_DEBUG -# endif # if !defined(ACC_OPENCL_MEM_ALIGNSCALE) # define ACC_OPENCL_MEM_ALIGNSCALE 8 # endif +# if !defined(ACC_OPENCL_MEM_CPYSYNC) && 1 +# define ACC_OPENCL_MEM_CPYSYNC +# endif # if defined(__cplusplus) extern "C" { # endif -int c_dbcsr_acc_opencl_memalignment(size_t /*size*/); -int c_dbcsr_acc_opencl_memalignment(size_t size) { - int result; - if ((ACC_OPENCL_MEM_ALIGNSCALE * ACC_OPENCL_MAXALIGN_NBYTES) <= size) { - result = ACC_OPENCL_MAXALIGN_NBYTES; - } - else if ((ACC_OPENCL_MEM_ALIGNSCALE * ACC_OPENCL_CACHELINE_NBYTES) <= size) { - result = ACC_OPENCL_CACHELINE_NBYTES; - } - else { - result = sizeof(void*); - } - return result; +void c_dbcsr_acc_opencl_pmalloc_init(ACC_OPENCL_LOCKTYPE* lock, size_t size, size_t* num, void* pool[], void* storage) { + char* p = (char*)storage; + size_t n, i = 0; + assert(0 < size && NULL != num && NULL != pool && NULL != storage); + if (NULL != lock) ACC_OPENCL_ACQUIRE(lock); + for (n = *num; i < n; ++i, p += size) pool[i] = p; + if (NULL != lock) ACC_OPENCL_RELEASE(lock); } -void* c_dbcsr_acc_opencl_get_hostptr(cl_mem memory) { - void* result = NULL; - ACC_OPENCL_EXPECT(CL_SUCCESS == clGetMemObjectInfo(memory, CL_MEM_HOST_PTR, sizeof(void*), &result, NULL)); - return result; +void* c_dbcsr_acc_opencl_pmalloc(ACC_OPENCL_LOCKTYPE* lock, void* pool[], size_t* i) { + void* pointer; + assert(NULL != pool && NULL != i); + if (NULL != lock) ACC_OPENCL_ACQUIRE(lock); + pointer = (0 < *i ? pool[--(*i)] : NULL); + if (NULL != lock) ACC_OPENCL_RELEASE(lock); + assert(NULL != pointer); + return pointer; } -c_dbcsr_acc_opencl_info_hostptr_t* c_dbcsr_acc_opencl_info_hostptr(void* memory) { - assert(NULL == memory || sizeof(c_dbcsr_acc_opencl_info_hostptr_t) <= (uintptr_t)memory); - return (NULL != memory ? (c_dbcsr_acc_opencl_info_hostptr_t*)((uintptr_t)memory - sizeof(c_dbcsr_acc_opencl_info_hostptr_t)) - : (c_dbcsr_acc_opencl_info_hostptr_t*)NULL); +void c_dbcsr_acc_opencl_pfree(ACC_OPENCL_LOCKTYPE* lock, const void* pointer, void* pool[], size_t* i) { + assert(NULL != pool && NULL != i); + if (NULL != pointer) { + if (NULL != lock) ACC_OPENCL_ACQUIRE(lock); + LIBXSMM_ASSIGN127(pool + *i, &pointer); + ++(*i); + if (NULL != lock) ACC_OPENCL_RELEASE(lock); + } } -void* c_dbcsr_acc_opencl_info_devptr(const void* memory, size_t elsize, const size_t* amount, size_t* offset) { - void* result = NULL; -# if defined(ACC_OPENCL_MEM_OFFSET) && LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && \ - defined(ACC_OPENCL_HANDLES_MAXCOUNT) && (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - if (NULL != c_dbcsr_acc_opencl_config.clmems && NULL != memory && 0 < elsize) { - const char* const buffer = (const char*)memory; - const size_t n = ACC_OPENCL_HANDLES_MAXCOUNT * c_dbcsr_acc_opencl_config.nthreads; - size_t i = c_dbcsr_acc_opencl_config.nclmems, hit = (size_t)-1; - for (; i < n; ++i) { - void** const handle = c_dbcsr_acc_opencl_config.clmems[i]; - char* const mem = (char*)(NULL != handle ? *handle : NULL); - if (mem == buffer) { /* fast-path */ - if (NULL != offset) *offset = 0; - assert(NULL != mem); - result = handle; - break; - } - else if (NULL != mem && mem < buffer && NULL != offset) { - size_t d = buffer - mem, s = 0; - if (d < hit && CL_SUCCESS == clGetMemObjectInfo((cl_mem)mem, CL_MEM_SIZE, sizeof(size_t), &s, NULL) && - (1 == elsize || (0 == (d % elsize) && 0 == (s % elsize))) && (NULL == amount || (*amount + d) <= s)) - { - *offset = (1 == elsize ? d : (d / elsize)); - result = handle; - hit = d; +c_dbcsr_acc_opencl_info_memptr_t* c_dbcsr_acc_opencl_info_hostptr(void* memory) { + assert(NULL == memory || sizeof(c_dbcsr_acc_opencl_info_memptr_t) <= (uintptr_t)memory); + return (NULL != memory ? (c_dbcsr_acc_opencl_info_memptr_t*)((uintptr_t)memory - sizeof(c_dbcsr_acc_opencl_info_memptr_t)) + : (c_dbcsr_acc_opencl_info_memptr_t*)NULL); +} + + +c_dbcsr_acc_opencl_info_memptr_t* c_dbcsr_acc_opencl_info_devptr_modify( + ACC_OPENCL_LOCKTYPE* lock, void* memory, size_t elsize, const size_t* amount, size_t* offset) { + c_dbcsr_acc_opencl_info_memptr_t* result = NULL; + assert(0 < elsize); + if (NULL != memory) { +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL == c_dbcsr_acc_opencl_config.device.clSetKernelArgMemPointerINTEL) { + const char* const pointer = (const char*)memory; + const size_t n = ACC_OPENCL_MAXNITEMS * c_dbcsr_acc_opencl_config.nthreads; + size_t hit = (size_t)-1, i; + assert(NULL != c_dbcsr_acc_opencl_config.memptrs); + if (NULL != lock) ACC_OPENCL_ACQUIRE(lock); + for (i = c_dbcsr_acc_opencl_config.nmemptrs; i < n; ++i) { + c_dbcsr_acc_opencl_info_memptr_t* const info = c_dbcsr_acc_opencl_config.memptrs[i]; + if (NULL != info) { + char* const memptr = (char*)info->memptr; + assert(NULL != memptr); + if (memptr == pointer) { /* fast-path */ + if (NULL != offset) *offset = 0; + result = info; + break; + } + else if (memptr < pointer && NULL != offset) { + size_t d = pointer - memptr, s = d; + assert(0 != d); + if (d < hit && +# if !defined(NDEBUG) + (EXIT_SUCCESS == clGetMemObjectInfo(info->memory, CL_MEM_SIZE, sizeof(size_t), &s, NULL)) && + (NULL == amount || (*amount * elsize + d) <= s) && +# endif + (1 == elsize || (0 == (d % elsize) && 0 == (s % elsize))) && d <= s) + { + *offset = (1 == elsize ? d : (d / elsize)); + result = info; + hit = d; + } + } } + else break; } + if (NULL != lock) ACC_OPENCL_RELEASE(lock); } - } + else +# endif + { +# if defined(ACC_OPENCL_MEM_DEVPTR) +# if defined(NDEBUG) + LIBXSMM_UNUSED(amount); +# endif # else - LIBXSMM_UNUSED(memory); - LIBXSMM_UNUSED(elsize); - LIBXSMM_UNUSED(amount); - LIBXSMM_UNUSED(offset); + LIBXSMM_UNUSED(lock); + LIBXSMM_UNUSED(elsize); + LIBXSMM_UNUSED(amount); # endif + /* assume only first item of c_dbcsr_acc_opencl_info_memptr_t is accessed */ + result = (c_dbcsr_acc_opencl_info_memptr_t*)memory; + if (NULL != offset) *offset = 0; + } + } return result; } +int c_dbcsr_acc_opencl_info_devptr_lock(c_dbcsr_acc_opencl_info_memptr_t* info, ACC_OPENCL_LOCKTYPE* lock, const void* memory, + size_t elsize, const size_t* amount, size_t* offset) { + c_dbcsr_acc_opencl_info_memptr_t* devptr = NULL; + int result = EXIT_SUCCESS; + void* non_const; + LIBXSMM_ASSIGN127(&non_const, &memory); + assert(NULL != info); + devptr = c_dbcsr_acc_opencl_info_devptr_modify(lock, non_const, elsize, amount, offset); + if (NULL != devptr) { +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL == c_dbcsr_acc_opencl_config.device.clSetKernelArgMemPointerINTEL) { + LIBXSMM_ASSIGN127(info, devptr); + } + else +# endif + { +# if !defined(NDEBUG) + LIBXSMM_MEMZERO127(info); +# endif + info->memory = (cl_mem)devptr; + } + } + else result = EXIT_FAILURE; + return result; +} + + +int c_dbcsr_acc_opencl_info_devptr( + c_dbcsr_acc_opencl_info_memptr_t* info, const void* memory, size_t elsize, const size_t* amount, size_t* offset) { + return c_dbcsr_acc_opencl_info_devptr_lock(info, c_dbcsr_acc_opencl_config.lock_memory, memory, elsize, amount, offset); +} + + int c_dbcsr_acc_host_mem_allocate(void** host_mem, size_t nbytes, void* stream) { - c_dbcsr_acc_opencl_info_stream_t* const info = c_dbcsr_acc_opencl_info_stream(stream); - const size_t size_meminfo = sizeof(c_dbcsr_acc_opencl_info_hostptr_t); - const int alignment = c_dbcsr_acc_opencl_memalignment(nbytes); - void* host_ptr = NULL; + const size_t size_meminfo = sizeof(c_dbcsr_acc_opencl_info_memptr_t); + int result = EXIT_SUCCESS, alignment = sizeof(void*); cl_mem memory = NULL; - cl_int result; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - nbytes += alignment + size_meminfo - 1; - assert(NULL != host_mem && NULL != info); -# if defined(CL_VERSION_2_0) - if (0 != c_dbcsr_acc_opencl_config.device[info->tid].svm_interop) { - host_ptr = clSVMAlloc( - c_dbcsr_acc_opencl_config.device[info->tid].context, CL_MEM_READ_WRITE, nbytes, sizeof(void*) /*minimal alignment*/); - if (NULL == host_ptr) c_dbcsr_acc_opencl_config.device[info->tid].svm_interop = 0; /* sanitize */ + if ((ACC_OPENCL_MEM_ALIGNSCALE * ACC_OPENCL_CACHELINE) <= nbytes) { + alignment = ((ACC_OPENCL_MEM_ALIGNSCALE * ACC_OPENCL_MAXALIGN) <= nbytes ? ACC_OPENCL_MAXALIGN : ACC_OPENCL_CACHELINE); } -# endif - memory = clCreateBuffer(c_dbcsr_acc_opencl_config.device[info->tid].context, - NULL == host_ptr ? CL_MEM_ALLOC_HOST_PTR : CL_MEM_USE_HOST_PTR, nbytes, host_ptr, &result); - assert(CL_SUCCESS == result || NULL == memory); - if (CL_SUCCESS == result) { + nbytes += alignment + size_meminfo - 1; + assert(NULL != host_mem); + memory = clCreateBuffer(c_dbcsr_acc_opencl_config.device.context, CL_MEM_ALLOC_HOST_PTR, nbytes, NULL /*host_ptr*/, &result); + if (EXIT_SUCCESS == result) { # if defined(ACC_OPENCL_STREAM_NULL) - cl_command_queue queue = *ACC_OPENCL_STREAM(NULL != stream ? stream : c_dbcsr_acc_opencl_stream_default()); + const c_dbcsr_acc_opencl_stream_t* const str = (NULL != stream ? ACC_OPENCL_STREAM(stream) + : c_dbcsr_acc_opencl_stream_default()); # else - cl_command_queue queue = *ACC_OPENCL_STREAM(stream); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); # endif void* const mapped = clEnqueueMapBuffer( - queue, memory, CL_TRUE /*blocking*/, CL_MAP_READ | CL_MAP_WRITE, 0 /*offset*/, nbytes, 0, NULL, NULL, &result); - assert(CL_SUCCESS == result || NULL == mapped); - if (CL_SUCCESS == result) { + str->queue, memory, CL_TRUE /*always block*/, CL_MAP_READ | CL_MAP_WRITE, 0 /*offset*/, nbytes, 0, NULL, NULL, &result); + assert(EXIT_SUCCESS == result || NULL == mapped); + if (EXIT_SUCCESS == result) { const uintptr_t address = (uintptr_t)mapped; const uintptr_t aligned = LIBXSMM_UP2(address + size_meminfo, alignment); - c_dbcsr_acc_opencl_info_hostptr_t* meminfo; + c_dbcsr_acc_opencl_info_memptr_t* meminfo; assert(address + size_meminfo <= aligned); - meminfo = (c_dbcsr_acc_opencl_info_hostptr_t*)(aligned - size_meminfo); + meminfo = (c_dbcsr_acc_opencl_info_memptr_t*)(aligned - size_meminfo); if (NULL != meminfo) { meminfo->memory = memory; - meminfo->mapped = mapped; + meminfo->memptr = mapped; *host_mem = (void*)aligned; } - else { /* error: buffer info */ - result = EXIT_FAILURE; - *host_mem = NULL; - } -# if defined(ACC_OPENCL_STREAM_NULL) - if (NULL == stream && EXIT_SUCCESS == result) { - result = c_dbcsr_acc_stream_sync(&queue); - } -# endif - } - else { /* error: mapping host buffer */ - ACC_OPENCL_EXPECT(CL_SUCCESS == clReleaseMemObject(memory)); - *host_mem = NULL; + else result = EXIT_FAILURE; } } - else { - *host_mem = NULL; /* error: creating host buffer */ + if (EXIT_SUCCESS != result) { + if (NULL != memory) ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseMemObject(memory)); + *host_mem = NULL; } + assert(EXIT_SUCCESS == result || NULL == *host_mem); # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); # endif @@ -171,7 +219,7 @@ int c_dbcsr_acc_host_mem_allocate(void** host_mem, size_t nbytes, void* stream) int c_dbcsr_acc_host_mem_deallocate(void* host_mem, void* stream) { - int result; + int result = EXIT_SUCCESS; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; @@ -179,39 +227,26 @@ int c_dbcsr_acc_host_mem_deallocate(void* host_mem, void* stream) { c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif if (NULL != host_mem) { - c_dbcsr_acc_opencl_info_hostptr_t* const meminfo = c_dbcsr_acc_opencl_info_hostptr(host_mem); + c_dbcsr_acc_opencl_info_memptr_t* const meminfo = c_dbcsr_acc_opencl_info_hostptr(host_mem); if (NULL != meminfo->memory) { - const c_dbcsr_acc_opencl_info_hostptr_t info = *meminfo; /* copy meminfo prior to unmap */ + const c_dbcsr_acc_opencl_info_memptr_t info = *meminfo; /* copy meminfo prior to unmap */ # if defined(ACC_OPENCL_STREAM_NULL) - cl_command_queue queue = *ACC_OPENCL_STREAM(NULL != stream ? stream : c_dbcsr_acc_opencl_stream_default()); + const c_dbcsr_acc_opencl_stream_t* const str = (NULL != stream ? ACC_OPENCL_STREAM(stream) + : c_dbcsr_acc_opencl_stream_default()); # else - cl_command_queue queue = *ACC_OPENCL_STREAM(stream); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); # endif int result_release; - result = clEnqueueUnmapMemObject(queue, info.memory, info.mapped, 0, NULL, NULL); -# if defined(CL_VERSION_2_0) - { - const c_dbcsr_acc_opencl_info_stream_t* const qinfo = c_dbcsr_acc_opencl_info_stream(stream); - assert(NULL != qinfo); - if (0 != c_dbcsr_acc_opencl_config.device[qinfo->tid].svm_interop) { - clSVMFree(c_dbcsr_acc_opencl_config.device[qinfo->tid].context, info.mapped); - } - } -# endif + cl_event event; + assert(NULL != str && NULL != str->queue); + result = clEnqueueUnmapMemObject(str->queue, info.memory, info.memptr, 0, NULL, &event); # if defined(ACC_OPENCL_STREAM_NULL) - if (NULL == stream && EXIT_SUCCESS == result) { - result = c_dbcsr_acc_stream_sync(&queue); - } + if (NULL == stream && EXIT_SUCCESS == result) result = clWaitForEvents(1, &event); # endif result_release = clReleaseMemObject(info.memory); if (EXIT_SUCCESS == result) result = result_release; } - else { - result = EXIT_FAILURE; - } - } - else { - result = EXIT_FAILURE; + else result = EXIT_FAILURE; } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -220,73 +255,149 @@ int c_dbcsr_acc_host_mem_deallocate(void* host_mem, void* stream) { } +/* like c_dbcsr_acc_memcpy_d2h, but accounting for some async support/workaround. */ +int c_dbcsr_acc_opencl_memcpy_d2h( + cl_mem /*dev_mem*/, void* /*host_mem*/, size_t /*offset*/, size_t /*nbytes*/, cl_command_queue /*queue*/, int /*blocking*/); +int c_dbcsr_acc_opencl_memcpy_d2h( + cl_mem dev_mem, void* host_mem, size_t offset, size_t nbytes, cl_command_queue queue, int blocking) { +# if defined(ACC_OPENCL_ASYNC) + const cl_bool finish = (0 != blocking || 0 == (2 & c_dbcsr_acc_opencl_config.async) || + (0 != c_dbcsr_acc_opencl_config.device.nv && NULL == (ACC_OPENCL_ASYNC))); +# else + const cl_bool finish = CL_TRUE; +# endif + int result = EXIT_SUCCESS; +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL != c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL) { + result = c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL(queue, finish, host_mem, dev_mem, nbytes, 0, NULL, NULL); + } + else +# endif + { + result = clEnqueueReadBuffer(queue, dev_mem, finish, offset, nbytes, host_mem, 0, NULL, NULL); + } +# if defined(ACC_OPENCL_MEM_CPYSYNC) + if (EXIT_SUCCESS != result && !finish) { + int result_sync = EXIT_SUCCESS; +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL != c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL) { + result_sync = c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL(queue, CL_TRUE, host_mem, dev_mem, nbytes, 0, NULL, NULL); + } + else +# endif + { + result_sync = clEnqueueReadBuffer(queue, dev_mem, CL_TRUE, offset, nbytes, host_mem, 0, NULL, NULL); + } + if (EXIT_SUCCESS == result_sync) { + c_dbcsr_acc_opencl_config.async &= ~2; /* retract async feature */ + if (0 != c_dbcsr_acc_opencl_config.verbosity) { + fprintf(stderr, "WARN ACC/OpenCL: falling back to synchronous readback (code=%i).\n", result); + } + result = EXIT_SUCCESS; + } + } +# endif + return result; +} + + int c_dbcsr_acc_dev_mem_allocate(void** dev_mem, size_t nbytes) { - cl_int result; - int tid = 0; - const cl_context context = c_dbcsr_acc_opencl_context(&tid); - const int devuid = c_dbcsr_acc_opencl_config.device[tid].uid, - try_flag = ((0 != c_dbcsr_acc_opencl_config.device[tid].unified || 0 == c_dbcsr_acc_opencl_config.device[tid].intel || - (0x4905 != devuid && 0x020a != devuid && (0x0bd0 > devuid || 0x0bdb < devuid))) - ? 0 - : (1u << 22)); - cl_mem buffer; + int result = EXIT_SUCCESS; + /* assume no lock is needed to protect against context/device changes */ + const cl_context context = c_dbcsr_acc_opencl_config.device.context; + cl_mem memory = NULL; + void* memptr = NULL; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - assert(NULL != dev_mem && 0 <= ACC_OPENCL_OVERMALLOC); - assert(sizeof(void*) >= sizeof(cl_mem)); - assert(NULL != context); - buffer = ( -# if defined(CL_VERSION_2_0) - 0 != c_dbcsr_acc_opencl_config.device[tid].svm_interop - ? clCreateBuffer(context, CL_MEM_USE_HOST_PTR, nbytes + ACC_OPENCL_OVERMALLOC, - clSVMAlloc( - context, (cl_mem_flags)(CL_MEM_READ_WRITE | try_flag), nbytes + ACC_OPENCL_OVERMALLOC, 0 /*default alignment*/), - &result) - : -# endif - clCreateBuffer( - context, (cl_mem_flags)(CL_MEM_READ_WRITE | try_flag), nbytes + ACC_OPENCL_OVERMALLOC, NULL /*host_ptr*/, &result)); - if (0 != try_flag && CL_SUCCESS != result) { /* retry without try_flag */ - buffer = ( -# if defined(CL_VERSION_2_0) - 0 != c_dbcsr_acc_opencl_config.device[tid].svm_interop - ? clCreateBuffer(context, CL_MEM_USE_HOST_PTR, nbytes + ACC_OPENCL_OVERMALLOC, - clSVMAlloc(context, CL_MEM_READ_WRITE, nbytes + ACC_OPENCL_OVERMALLOC, 0 /*default alignment*/), &result) - : -# endif - clCreateBuffer(context, CL_MEM_READ_WRITE, nbytes + ACC_OPENCL_OVERMALLOC, NULL /*host_ptr*/, &result)); + assert(NULL != dev_mem && NULL != context); +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL != c_dbcsr_acc_opencl_config.device.clDeviceMemAllocINTEL) { + cl_device_id device = NULL; + result = clGetContextInfo(context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device, NULL); + if (EXIT_SUCCESS == result) { + *dev_mem = memptr = c_dbcsr_acc_opencl_config.device.clDeviceMemAllocINTEL( + context, device, NULL /*properties*/, nbytes, 0 /*alignment*/, &result); + } + if (EXIT_SUCCESS != result) *dev_mem = NULL; } - if (EXIT_SUCCESS == result) { - assert(NULL != buffer); -# if defined(ACC_OPENCL_MEM_OFFSET) && LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && \ - defined(ACC_OPENCL_HANDLES_MAXCOUNT) && (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - assert(NULL != c_dbcsr_acc_opencl_config.clmems); - { - void** handle = libxsmm_pmalloc(c_dbcsr_acc_opencl_config.clmems, &c_dbcsr_acc_opencl_config.nclmems); - if (NULL != handle) { - *handle = buffer; -# if defined(ACC_OPENCL_MEM_DEBUG) - printf("c_dbcsr_acc_dev_mem_allocate: %p size=%llu\n", buffer, (unsigned long long)nbytes); + else +# endif + { + const int devuid = c_dbcsr_acc_opencl_config.device.uid; + const int try_flag = ((0 != c_dbcsr_acc_opencl_config.device.unified || 0 == c_dbcsr_acc_opencl_config.device.intel || + (0x4905 != devuid && 0x020a != devuid && (0x0bd0 > devuid || 0x0bdb < devuid))) + ? 0 + : (1u << 22)); + memory = clCreateBuffer(context, (cl_mem_flags)(CL_MEM_READ_WRITE | try_flag), nbytes, NULL /*host_ptr*/, &result); + if (0 != try_flag && EXIT_SUCCESS != result) { /* retry without try_flag */ + memory = clCreateBuffer(context, CL_MEM_READ_WRITE, nbytes, NULL /*host_ptr*/, &result); + } + if (EXIT_SUCCESS == result) { +# if defined(ACC_OPENCL_MEM_DEVPTR) + static cl_kernel kernel = NULL; + cl_command_queue queue = NULL; + const size_t size = 1; + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_memory); +# if defined(ACC_OPENCL_STREAM_PRV) + queue = c_dbcsr_acc_opencl_config.device.queue; +# else + { /* use existing stream with thread-affinity rather than private stream */ + const c_dbcsr_acc_opencl_stream_t* const stream = c_dbcsr_acc_opencl_stream(NULL /*lock*/, ACC_OPENCL_OMP_TID()); + if (NULL != stream) queue = stream->queue; + } # endif + /* determine device-side value of device-memory object by running some kernel */ + assert(NULL != memory && NULL != queue); + if (NULL == kernel) { /* generate kernel */ + const char source[] = "kernel void memptr(global unsigned long* ptr) {\n" + " const union { global unsigned long* p; unsigned long u; } cast = { ptr };\n" + " const size_t i = get_global_id(0);\n" + " ptr[i] = cast.u + i;\n" + "}\n"; + assert(sizeof(size_t) == sizeof(cl_ulong)); + result = c_dbcsr_acc_opencl_kernel(0 /*source_is_file*/, source, "memptr" /*kernel_name*/, NULL /*build_params*/, + NULL /*build_options*/, NULL /*try_build_options*/, NULL /*try_ok*/, NULL /*extnames*/, 0 /*num_exts*/, &kernel); } - else result = EXIT_FAILURE; + /* TODO: backup/restore memory */ + if (EXIT_SUCCESS == result) result = clSetKernelArg(kernel, 0, sizeof(cl_mem), &memory); + if (EXIT_SUCCESS == result) { + result = clEnqueueNDRangeKernel( + queue, kernel, 1 /*work_dim*/, NULL /*offset*/, &size, NULL /*local_work_size*/, 0, NULL, NULL); + } + if (EXIT_SUCCESS == result) { + result = c_dbcsr_acc_opencl_memcpy_d2h(memory, &memptr, 0, sizeof(void*), queue, 1 /*blocking*/); + } + assert(EXIT_SUCCESS != result || NULL != memptr); + if (EXIT_SUCCESS == result) { + c_dbcsr_acc_opencl_info_memptr_t* const info = (c_dbcsr_acc_opencl_info_memptr_t*)c_dbcsr_acc_opencl_pmalloc( + NULL /*lock*/, (void**)c_dbcsr_acc_opencl_config.memptrs, &c_dbcsr_acc_opencl_config.nmemptrs); + assert(NULL != memptr); + if (NULL != info) { + info->memory = memory; + info->memptr = memptr; + *dev_mem = memptr; + } + else result = EXIT_FAILURE; + } + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_memory); +# else + *dev_mem = memptr = memory; +# endif } if (EXIT_SUCCESS != result) { - *dev_mem = NULL; /* TODO: clReleaseMemObject */ - } - else -# endif - { - *dev_mem = (void*)buffer; + if (NULL != memory) ACC_OPENCL_EXPECT(EXIT_SUCCESS == clReleaseMemObject(memory)); + *dev_mem = NULL; } } - else { - *dev_mem = NULL; /* error: creating device buffer */ + if (0 != c_dbcsr_acc_opencl_config.debug && 0 != c_dbcsr_acc_opencl_config.verbosity && EXIT_SUCCESS == result) { + fprintf(stderr, "INFO ACC/OpenCL: memory=%p pointer=%p size=%llu allocated\n", (const void*)memory, memptr, + (unsigned long long)nbytes); } + assert(EXIT_SUCCESS == result || NULL == *dev_mem); # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); # endif @@ -303,50 +414,51 @@ int c_dbcsr_acc_dev_mem_deallocate(void* dev_mem) { c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif if (NULL != dev_mem) { - const cl_mem buffer = (cl_mem)dev_mem; - assert(sizeof(void*) >= sizeof(cl_mem)); -# if defined(ACC_OPENCL_MEM_OFFSET) && LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && \ - defined(ACC_OPENCL_HANDLES_MAXCOUNT) && (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - assert(NULL != c_dbcsr_acc_opencl_config.clmems); -# if defined(_OPENMP) -# pragma omp critical(c_dbcsr_acc_dev_mem_deallocate) -# endif - { - void** handle = c_dbcsr_acc_opencl_info_devptr(dev_mem, 1 /*elsize*/, NULL /*amount*/, NULL /*offset*/); - if (NULL != handle) { - void** const pfree = c_dbcsr_acc_opencl_config.clmems[c_dbcsr_acc_opencl_config.nclmems]; - libxsmm_pfree(pfree, c_dbcsr_acc_opencl_config.clmems, &c_dbcsr_acc_opencl_config.nclmems); - *handle = *pfree; -# if defined(ACC_OPENCL_MEM_DEBUG) - printf("c_dbcsr_acc_dev_mem_deallocate: %p\n", buffer); -# endif - } -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - else result = EXIT_FAILURE; -# endif - } -# endif -# if defined(CL_VERSION_2_0) - { - const int tid = ACC_OPENCL_OMP_TID(); - if (0 != c_dbcsr_acc_opencl_config.device[tid].svm_interop) { - void* const ptr = (0 != c_dbcsr_acc_opencl_config.device[tid].svm_interop ? c_dbcsr_acc_opencl_get_hostptr(buffer) : NULL); - const cl_context context = c_dbcsr_acc_opencl_context(NULL /*thread_id*/); - clSVMFree(context, ptr); + cl_mem memory = NULL; +# if !defined(ACC_OPENCL_MEM_DEVPTR) + memory = (cl_mem)dev_mem; +# else + if (NULL != c_dbcsr_acc_opencl_config.device.clMemFreeINTEL) { + cl_device_id device = NULL; + assert(NULL != c_dbcsr_acc_opencl_config.device.context); + result = clGetContextInfo(c_dbcsr_acc_opencl_config.device.context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device, NULL); + if (EXIT_SUCCESS == result) { + result = c_dbcsr_acc_opencl_config.device.clMemFreeINTEL(c_dbcsr_acc_opencl_config.device.context, dev_mem); } } -# endif - ACC_OPENCL_CHECK(clReleaseMemObject(buffer), "release device memory buffer", result); + else { + c_dbcsr_acc_opencl_info_memptr_t* info = NULL; + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_memory); + info = c_dbcsr_acc_opencl_info_devptr_modify(NULL /*lock*/, dev_mem, 1 /*elsize*/, NULL /*amount*/, NULL /*offset*/); + if (NULL != info && info->memptr == dev_mem && NULL != info->memory) { + c_dbcsr_acc_opencl_info_memptr_t* const pfree = c_dbcsr_acc_opencl_config.memptrs[c_dbcsr_acc_opencl_config.nmemptrs]; + memory = info->memory; +# endif + result = clReleaseMemObject(memory); +# if defined(ACC_OPENCL_MEM_DEVPTR) + c_dbcsr_acc_opencl_pfree(NULL /*lock*/, pfree, (void**)c_dbcsr_acc_opencl_config.memptrs, &c_dbcsr_acc_opencl_config.nmemptrs); + *info = *pfree; +# if !defined(NDEBUG) + LIBXSMM_MEMZERO127(pfree); +# endif } + else result = EXIT_FAILURE; + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_memory); +} +# endif +if (0 != c_dbcsr_acc_opencl_config.debug && 0 != c_dbcsr_acc_opencl_config.verbosity && EXIT_SUCCESS == result) { + fprintf(stderr, "INFO ACC/OpenCL: memory=%p pointer=%p deallocated\n", (const void*)memory, dev_mem); +} +} # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) - c_dbcsr_timestop(&routine_handle); +c_dbcsr_timestop(&routine_handle); # endif - ACC_OPENCL_RETURN(result); +ACC_OPENCL_RETURN(result); } -int c_dbcsr_acc_dev_mem_set_ptr(void** dev_mem, void* other, size_t lb) { - int result; +int c_dbcsr_acc_dev_mem_set_ptr(void** dev_mem, void* other, size_t offset) { + int result = EXIT_SUCCESS; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; @@ -354,12 +466,12 @@ int c_dbcsr_acc_dev_mem_set_ptr(void** dev_mem, void* other, size_t lb) { c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif assert(NULL != dev_mem); - if (NULL != other || 0 == lb) { - *dev_mem = (char*)other + lb; - result = EXIT_SUCCESS; + if (NULL != other || 0 == offset) { + *dev_mem = (char*)other + offset; } else { result = EXIT_FAILURE; + *dev_mem = NULL; } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -376,36 +488,40 @@ int c_dbcsr_acc_memcpy_h2d(const void* host_mem, void* dev_mem, size_t nbytes, v static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - assert((NULL != host_mem || 0 == nbytes) && (NULL != dev_mem || 0 == nbytes)); + assert((NULL != host_mem && NULL != dev_mem) || 0 == nbytes); if (NULL != host_mem && NULL != dev_mem && 0 != nbytes) { - cl_mem buffer = (cl_mem)dev_mem; - size_t offset = 0; -# if defined(ACC_OPENCL_MEM_OFFSET) && LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && \ - defined(ACC_OPENCL_HANDLES_MAXCOUNT) && (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - assert(NULL != c_dbcsr_acc_opencl_config.clmems); - { - void* const handle = c_dbcsr_acc_opencl_info_devptr(dev_mem, 1 /*elsize*/, &nbytes, &offset); - if (NULL != handle) buffer = *(cl_mem*)handle; -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - else result = EXIT_FAILURE; -# endif - } -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - if (EXIT_SUCCESS == result) -# endif -# endif - { # if defined(ACC_OPENCL_STREAM_NULL) - cl_command_queue queue = *ACC_OPENCL_STREAM(NULL != stream ? stream : c_dbcsr_acc_opencl_stream_default()); + const c_dbcsr_acc_opencl_stream_t* const str = + (NULL != stream ? ACC_OPENCL_STREAM(stream) : c_dbcsr_acc_opencl_stream(NULL /*lock*/, ACC_OPENCL_OMP_TID())); # else - cl_command_queue queue = *ACC_OPENCL_STREAM(stream); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); # endif - result = clEnqueueWriteBuffer( - queue, buffer, 0 == (1 & c_dbcsr_acc_opencl_config.async), offset, nbytes, host_mem, 0, NULL, NULL); -# if defined(ACC_OPENCL_STREAM_NULL) - if (NULL == stream && EXIT_SUCCESS == result) { - result = c_dbcsr_acc_stream_sync(&queue); +# if defined(ACC_OPENCL_ASYNC) + const cl_bool finish = (0 == (1 & c_dbcsr_acc_opencl_config.async) || NULL == stream || + (0 != c_dbcsr_acc_opencl_config.device.nv && NULL == (ACC_OPENCL_ASYNC))); +# else + const cl_bool finish = CL_TRUE; +# endif + assert(NULL != str && NULL != str->queue); +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL != c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL) { + result = c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL(str->queue, finish, dev_mem, host_mem, nbytes, 0, NULL, NULL); + } + else +# endif + { + c_dbcsr_acc_opencl_info_memptr_t info; + size_t offset = 0; +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_memory); +# endif + result = c_dbcsr_acc_opencl_info_devptr_lock(&info, NULL /*lock*/, dev_mem, 1 /*elsize*/, &nbytes, &offset); + if (EXIT_SUCCESS == result) { + assert(NULL != info.memory); + result = clEnqueueWriteBuffer(str->queue, info.memory, finish, offset, nbytes, host_mem, 0, NULL, NULL); } +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_memory); # endif } } @@ -424,47 +540,30 @@ int c_dbcsr_acc_memcpy_d2h(const void* dev_mem, void* host_mem, size_t nbytes, v static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - assert((NULL != dev_mem || 0 == nbytes) && (NULL != host_mem || 0 == nbytes)); + assert((NULL != dev_mem && NULL != host_mem) || 0 == nbytes); if (NULL != host_mem && NULL != dev_mem && 0 != nbytes) { - cl_mem buffer = NULL; - size_t offset = 0; - LIBXSMM_ASSIGN127(&buffer, &dev_mem); -# if defined(ACC_OPENCL_MEM_OFFSET) && LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && \ - defined(ACC_OPENCL_HANDLES_MAXCOUNT) && (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - assert(NULL != c_dbcsr_acc_opencl_config.clmems); - { - void* const handle = c_dbcsr_acc_opencl_info_devptr(dev_mem, 1 /*elsize*/, &nbytes, &offset); - if (NULL != handle) buffer = *(cl_mem*)handle; -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - else result = EXIT_FAILURE; -# endif - } -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - if (EXIT_SUCCESS == result) -# endif -# endif - { # if defined(ACC_OPENCL_STREAM_NULL) - cl_command_queue queue = *ACC_OPENCL_STREAM(NULL != stream ? stream : c_dbcsr_acc_opencl_stream_default()); + const c_dbcsr_acc_opencl_stream_t* const str = + (NULL != stream ? ACC_OPENCL_STREAM(stream) : c_dbcsr_acc_opencl_stream(NULL /*lock*/, ACC_OPENCL_OMP_TID())); + const cl_bool finish = (NULL != stream ? CL_FALSE : CL_TRUE); # else - cl_command_queue queue = *ACC_OPENCL_STREAM(stream); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); + const cl_bool finish = CL_FALSE; # endif - result = clEnqueueReadBuffer( - queue, buffer, 0 == (2 & c_dbcsr_acc_opencl_config.async), offset, nbytes, host_mem, 0, NULL, NULL); - if (CL_SUCCESS == result) { -# if defined(ACC_OPENCL_STREAM_NULL) - if (NULL == stream) result = c_dbcsr_acc_stream_sync(&queue); + c_dbcsr_acc_opencl_info_memptr_t info; + size_t offset = 0; + assert(NULL != str && NULL != str->queue); +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_memory); # endif - } - else { /* synchronous */ - const int result_sync = clEnqueueReadBuffer(queue, buffer, CL_TRUE, offset, nbytes, host_mem, 0, NULL, NULL); - c_dbcsr_acc_opencl_config.async |= 2; /* retract feature */ - if (0 != c_dbcsr_acc_opencl_config.verbosity) { - fprintf(stderr, "WARN ACC/OpenCL: falling back to synchronous readback (code=%i).\n", result); - } - result = result_sync; - } + result = c_dbcsr_acc_opencl_info_devptr_lock(&info, NULL /*lock*/, dev_mem, 1 /*elsize*/, &nbytes, &offset); + if (EXIT_SUCCESS == result) { + assert(NULL != info.memory); + result = c_dbcsr_acc_opencl_memcpy_d2h(info.memory, host_mem, offset, nbytes, str->queue, finish); } +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_memory); +# endif } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -481,71 +580,42 @@ int c_dbcsr_acc_memcpy_d2d(const void* devmem_src, void* devmem_dst, size_t nbyt static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif - assert((NULL != devmem_src || 0 == nbytes) && (NULL != devmem_dst || 0 == nbytes)); + assert((NULL != devmem_src && NULL != devmem_dst) || 0 == nbytes); if (NULL != devmem_src && NULL != devmem_dst && 0 != nbytes) { - cl_mem src = NULL, dst = (cl_mem)devmem_dst; - size_t src_offset = 0, dst_offset = 0; - LIBXSMM_ASSIGN127(&src, &devmem_src); -# if defined(ACC_OPENCL_MEM_OFFSET) && LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && \ - defined(ACC_OPENCL_HANDLES_MAXCOUNT) && (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - assert(NULL != c_dbcsr_acc_opencl_config.clmems); - { - void* const handle_src = c_dbcsr_acc_opencl_info_devptr(devmem_src, 1 /*elsize*/, &nbytes, &src_offset); - void* const handle_dst = c_dbcsr_acc_opencl_info_devptr(devmem_dst, 1 /*elsize*/, &nbytes, &dst_offset); - if (NULL != handle_src) src = *(cl_mem*)handle_src; -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - else result = EXIT_FAILURE; -# endif - if (NULL != handle_dst) dst = *(cl_mem*)handle_dst; -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - else result = EXIT_FAILURE; -# endif - } -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - if (EXIT_SUCCESS == result) -# endif -# endif - { # if defined(ACC_OPENCL_STREAM_NULL) - cl_command_queue queue = *ACC_OPENCL_STREAM(NULL != stream ? stream : c_dbcsr_acc_opencl_stream_default()); + const c_dbcsr_acc_opencl_stream_t* const str = + (NULL != stream ? ACC_OPENCL_STREAM(stream) : c_dbcsr_acc_opencl_stream(NULL /*lock*/, ACC_OPENCL_OMP_TID())); # else - cl_command_queue queue = *ACC_OPENCL_STREAM(stream); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); +# endif + cl_event event = NULL; + assert(NULL != str && NULL != str->queue); +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL != c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL) { + result = c_dbcsr_acc_opencl_config.device.clEnqueueMemcpyINTEL( + str->queue, CL_FALSE /*blocking*/, devmem_dst, devmem_src, nbytes, 0, NULL, &event); + } + else # endif - if (0 == (2 & c_dbcsr_acc_opencl_config.devcopy)) { - result = clEnqueueCopyBuffer(queue, src, dst, src_offset, dst_offset, nbytes, 0, NULL, NULL); - } - else { - static volatile int lock; /* creating cl_kernel and clSetKernelArg must be synchronized */ - static cl_kernel kernel = NULL; - LIBXSMM_ATOMIC_ACQUIRE(&lock, LIBXSMM_SYNC_NPAUSE, LIBXSMM_ATOMIC_RELAXED); - if (NULL == kernel) { /* generate kernel */ - const char source[] = "kernel void memcpy_d2d(\n" - " global uchar *restrict dst, size_t dst_offset,\n" - " global uchar *restrict src, size_t src_offset)\n" - "{\n" - " const size_t i = get_global_id(0);\n" - " dst[i+dst_offset] = src[i+src_offset];\n" - "}\n"; - result = c_dbcsr_acc_opencl_kernel(0 /*source_is_file*/, source, "memcpy_d2d" /*kernel_name*/, NULL /*build_params*/, - NULL /*build_options*/, NULL /*try_build_options*/, NULL /*try_ok*/, NULL /*extnames*/, 0 /*num_exts*/, &kernel); - } - if (EXIT_SUCCESS == result) { - ACC_OPENCL_CHECK(clSetKernelArg(kernel, 0, sizeof(cl_mem), &dst), "set src argument of memcpy_d2d kernel", result); - ACC_OPENCL_CHECK(clSetKernelArg(kernel, 1, sizeof(cl_mem), &dst_offset), "set dst-offset of memcpy_d2d kernel", result); - ACC_OPENCL_CHECK(clSetKernelArg(kernel, 2, sizeof(cl_mem), &src), "set dst argument of memcpy_d2d kernel", result); - ACC_OPENCL_CHECK(clSetKernelArg(kernel, 3, sizeof(cl_mem), &src_offset), "set src-offset of memcpy_d2d kernel", result); - ACC_OPENCL_CHECK(clEnqueueNDRangeKernel( - queue, kernel, 1 /*work_dim*/, NULL /*offset*/, &nbytes, NULL /*local_work_size*/, 0, NULL, NULL), - "launch memcpy_d2d kernel", result); - } - LIBXSMM_ATOMIC_RELEASE(&lock, LIBXSMM_ATOMIC_RELAXED); - } -# if defined(ACC_OPENCL_STREAM_NULL) - if (NULL == stream && EXIT_SUCCESS == result) { - result = c_dbcsr_acc_stream_sync(&queue); + { + c_dbcsr_acc_opencl_info_memptr_t info_src, info_dst; + size_t offset_src = 0, offset_dst = 0; +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_memory); +# endif + result |= c_dbcsr_acc_opencl_info_devptr_lock(&info_src, NULL /*lock*/, devmem_src, 1 /*elsize*/, &nbytes, &offset_src); + result |= c_dbcsr_acc_opencl_info_devptr_lock(&info_dst, NULL /*lock*/, devmem_dst, 1 /*elsize*/, &nbytes, &offset_dst); + if (EXIT_SUCCESS == result) { + assert(NULL != info_src.memory && NULL != info_dst.memory); + result = clEnqueueCopyBuffer(str->queue, info_src.memory, info_dst.memory, offset_src, offset_dst, nbytes, 0, NULL, &event); } +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_memory); # endif } +# if defined(ACC_OPENCL_STREAM_NULL) + if (NULL == stream && EXIT_SUCCESS == result) result = clWaitForEvents(1, &event); +# endif } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -564,61 +634,48 @@ int c_dbcsr_acc_opencl_memset(void* dev_mem, int value, size_t offset, size_t nb # endif assert(NULL != dev_mem || 0 == nbytes); if (0 != nbytes) { - cl_mem buffer = (cl_mem)dev_mem; -# if defined(ACC_OPENCL_MEM_OFFSET) && LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER && \ - defined(ACC_OPENCL_HANDLES_MAXCOUNT) && (0 < ACC_OPENCL_HANDLES_MAXCOUNT) - if (0 == offset && NULL != c_dbcsr_acc_opencl_config.clmems) { - void* const handle = c_dbcsr_acc_opencl_info_devptr(dev_mem, 1 /*elsize*/, &nbytes, &offset); - if (NULL != handle) buffer = *(cl_mem*)handle; -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - else result = EXIT_FAILURE; -# endif - } -# if !defined(NDEBUG) || defined(ACC_OPENCL_MEM_DEBUG) - if (EXIT_SUCCESS == result) -# endif -# endif - { # if defined(ACC_OPENCL_STREAM_NULL) - cl_command_queue queue = *ACC_OPENCL_STREAM(NULL != stream ? stream : c_dbcsr_acc_opencl_stream_default()); + const c_dbcsr_acc_opencl_stream_t* const str = + (NULL != stream ? ACC_OPENCL_STREAM(stream) : c_dbcsr_acc_opencl_stream(NULL /*lock*/, ACC_OPENCL_OMP_TID())); # else - cl_command_queue queue = *ACC_OPENCL_STREAM(stream); -# endif - if (0 == (1 & c_dbcsr_acc_opencl_config.devcopy)) { - static LIBXSMM_TLS cl_long pattern = 0; - size_t size_of_pattern = 1; - pattern = value; /* fill with value */ - if (0 == LIBXSMM_MOD2(nbytes, sizeof(cl_long))) size_of_pattern = sizeof(cl_long); - else if (0 == LIBXSMM_MOD2(nbytes, 4)) size_of_pattern = 4; - else if (0 == LIBXSMM_MOD2(nbytes, 2)) size_of_pattern = 2; - result = clEnqueueFillBuffer(queue, buffer, &pattern, size_of_pattern, offset, nbytes, 0, NULL, NULL); - } - else { - static volatile int lock; /* creating cl_kernel and clSetKernelArg must be synchronized */ - static cl_kernel kernel = NULL; - LIBXSMM_ATOMIC_ACQUIRE(&lock, LIBXSMM_SYNC_NPAUSE, LIBXSMM_ATOMIC_RELAXED); - if (NULL == kernel) { /* generate kernel */ - const char source[] = "kernel void memset(global uchar *restrict buffer, uchar value) {\n" - " buffer[get_global_id(0)] = value;\n" - "}\n"; - result = c_dbcsr_acc_opencl_kernel(0 /*source_is_file*/, source, "memset" /*kernel_name*/, NULL /*build_params*/, - NULL /*build_options*/, NULL /*try_build_options*/, NULL /*try_ok*/, NULL /*extnames*/, 0 /*num_exts*/, &kernel); - } - if (EXIT_SUCCESS == result) { - ACC_OPENCL_CHECK(clSetKernelArg(kernel, 0, sizeof(cl_mem), &buffer), "set buffer argument of memset-kernel", result); - ACC_OPENCL_CHECK(clSetKernelArg(kernel, 1, sizeof(cl_uchar), &value), "set value argument of memset-kernel", result); - ACC_OPENCL_CHECK( - clEnqueueNDRangeKernel(queue, kernel, 1 /*work_dim*/, &offset, &nbytes, NULL /*local_work_size*/, 0, NULL, NULL), - "launch memset-kernel", result); - } - LIBXSMM_ATOMIC_RELEASE(&lock, LIBXSMM_ATOMIC_RELAXED); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); +# endif + size_t size_of_value = 1; + cl_event event; + if (0 == LIBXSMM_MOD2(nbytes, 4)) size_of_value = 4; + else if (0 == LIBXSMM_MOD2(nbytes, 2)) size_of_value = 2; + assert(NULL != str && NULL != str->queue); +# if defined(ACC_OPENCL_MEM_DEVPTR) + if (NULL != c_dbcsr_acc_opencl_config.device.clEnqueueMemFillINTEL) { + cl_device_id device = NULL; + assert(NULL != c_dbcsr_acc_opencl_config.device.context); + result = clGetContextInfo(c_dbcsr_acc_opencl_config.device.context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device, NULL); + if (EXIT_SUCCESS == result) { + result = c_dbcsr_acc_opencl_config.device.clEnqueueMemFillINTEL( + str->queue, (char*)dev_mem + offset, &value, size_of_value, nbytes, 0, NULL, &event); } -# if defined(ACC_OPENCL_STREAM_NULL) - if (NULL == stream && EXIT_SUCCESS == result) { - result = c_dbcsr_acc_stream_sync(&queue); + } + else +# endif + { + size_t offset_info = 0; + c_dbcsr_acc_opencl_info_memptr_t info; +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_memory); +# endif + result = c_dbcsr_acc_opencl_info_devptr_lock(&info, NULL /*lock*/, dev_mem, 1 /*elsize*/, &nbytes, &offset_info); + if (EXIT_SUCCESS == result) { + assert(NULL != info.memory); + offset_info += offset; + result = clEnqueueFillBuffer(str->queue, info.memory, &value, size_of_value, offset_info, nbytes, 0, NULL, &event); } +# if defined(ACC_OPENCL_MEM_DEVPTR) + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_memory); # endif } +# if defined(ACC_OPENCL_STREAM_NULL) + if (NULL == stream && EXIT_SUCCESS == result) result = clWaitForEvents(1, &event); +# endif } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -644,35 +701,35 @@ int c_dbcsr_acc_opencl_info_devmem(cl_device_id device, size_t* mem_free, size_t } # else # if defined(_SC_PAGE_SIZE) - const long page_size = sysconf(_SC_PAGE_SIZE); + const long page_size = sysconf(_SC_PAGE_SIZE); # else - const long page_size = 4096; + const long page_size = 4096; # endif - long pages_free = 0, pages_total = 0; + long pages_free = 0, pages_total = 0; # if defined(__linux__) # if defined(_SC_PHYS_PAGES) - pages_total = sysconf(_SC_PHYS_PAGES); + pages_total = sysconf(_SC_PHYS_PAGES); # else - pages_total = 0; + pages_total = 0; # endif # if defined(_SC_AVPHYS_PAGES) - pages_free = sysconf(_SC_AVPHYS_PAGES); + pages_free = sysconf(_SC_AVPHYS_PAGES); # else - pages_free = pages_total; + pages_free = pages_total; # endif # elif defined(__APPLE__) && defined(__MACH__) - /*const*/ size_t size_pages_free = sizeof(const long), size_pages_total = sizeof(const long); - ACC_OPENCL_EXPECT(0 == sysctlbyname("hw.memsize", &pages_total, &size_pages_total, NULL, 0)); - if (0 < page_size) pages_total /= page_size; - if (0 != sysctlbyname("vm.page_free_count", &pages_free, &size_pages_free, NULL, 0)) { - pages_free = pages_total; - } + /*const*/ size_t size_pages_free = sizeof(const long), size_pages_total = sizeof(const long); + ACC_OPENCL_EXPECT(0 == sysctlbyname("hw.memsize", &pages_total, &size_pages_total, NULL, 0)); + if (0 < page_size) pages_total /= page_size; + if (0 != sysctlbyname("vm.page_free_count", &pages_free, &size_pages_free, NULL, 0)) { + pages_free = pages_total; + } # endif - if (0 < page_size && 0 <= pages_free && 0 <= pages_total) { - const size_t size_page = (size_t)page_size; - size_total = size_page * (size_t)pages_total; - size_free = size_page * (size_t)pages_free; - } + if (0 < page_size && 0 <= pages_free && 0 <= pages_total) { + const size_t size_page = (size_t)page_size; + size_total = size_page * (size_t)pages_total; + size_free = size_page * (size_t)pages_free; + } # endif if (NULL != device) { cl_device_local_mem_type cl_local_type = CL_GLOBAL; @@ -706,8 +763,10 @@ int c_dbcsr_acc_opencl_info_devmem(cl_device_id device, size_t* mem_free, size_t int c_dbcsr_acc_dev_mem_info(size_t* mem_free, size_t* mem_total) { - cl_device_id active_id = NULL; - int result = 0 < c_dbcsr_acc_opencl_config.ndevices ? c_dbcsr_acc_opencl_device(ACC_OPENCL_OMP_TID(), &active_id) : EXIT_FAILURE; + cl_device_id device = NULL; + int result = (0 < c_dbcsr_acc_opencl_config.ndevices ? clGetContextInfo(c_dbcsr_acc_opencl_config.device.context, + CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device, NULL) + : EXIT_FAILURE); # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; @@ -715,7 +774,7 @@ int c_dbcsr_acc_dev_mem_info(size_t* mem_free, size_t* mem_total) { c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif if (EXIT_SUCCESS == result) { - result = c_dbcsr_acc_opencl_info_devmem(active_id, mem_free, mem_total, NULL /*mem_local*/, NULL /*mem_unified*/); + result = c_dbcsr_acc_opencl_info_devmem(device, mem_free, mem_total, NULL /*mem_local*/, NULL /*mem_unified*/); } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); diff --git a/src/acc/opencl/acc_opencl_stream.c b/src/acc/opencl/acc_opencl_stream.c index cc1df74160c..52b2f4220c3 100644 --- a/src/acc/opencl/acc_opencl_stream.c +++ b/src/acc/opencl/acc_opencl_stream.c @@ -10,14 +10,6 @@ # include "acc_opencl.h" # include -# if defined(CL_VERSION_2_0) -# define ACC_OPENCL_STREAM_PROPERTIES_TYPE cl_queue_properties -# define ACC_OPENCL_CREATE_COMMAND_QUEUE(CTX, DEV, PROPS, RESULT) clCreateCommandQueueWithProperties(CTX, DEV, PROPS, RESULT) -# else -# define ACC_OPENCL_STREAM_PROPERTIES_TYPE cl_int -# define ACC_OPENCL_CREATE_COMMAND_QUEUE(CTX, DEV, PROPS, RESULT) \ - clCreateCommandQueue(CTX, DEV, (cl_command_queue_properties)(NULL != (PROPS) ? ((PROPS)[1]) : 0), RESULT) -# endif # if defined(__cplusplus) extern "C" { @@ -27,41 +19,38 @@ int c_dbcsr_acc_opencl_stream_counter_base; int c_dbcsr_acc_opencl_stream_counter; -c_dbcsr_acc_opencl_info_stream_t* c_dbcsr_acc_opencl_info_stream(void* stream) { - assert(NULL == stream || sizeof(c_dbcsr_acc_opencl_info_stream_t) <= (uintptr_t)stream); - return ( - NULL != stream ? ((c_dbcsr_acc_opencl_info_stream_t*)((uintptr_t)stream - sizeof(c_dbcsr_acc_opencl_info_stream_t))) : NULL); -} - - -const int* c_dbcsr_acc_opencl_stream_priority(const void* stream) { - const int* result; -# if !defined(ACC_OPENCL_STREAM_PRIORITIES) - LIBXSMM_UNUSED(stream); -# else - const c_dbcsr_acc_opencl_info_stream_t* const info = c_dbcsr_acc_opencl_info_stream((void*)stream); - if (NULL != info) { - result = &info->priority; +const c_dbcsr_acc_opencl_stream_t* c_dbcsr_acc_opencl_stream(ACC_OPENCL_LOCKTYPE* lock, int thread_id) { + const c_dbcsr_acc_opencl_stream_t *result = NULL, *result_main = NULL; + const size_t n = ACC_OPENCL_MAXNITEMS * c_dbcsr_acc_opencl_config.nthreads; + size_t i; + assert(NULL != c_dbcsr_acc_opencl_config.streams); + assert(thread_id < c_dbcsr_acc_opencl_config.nthreads); + if (NULL != lock) ACC_OPENCL_ACQUIRE(lock); + for (i = c_dbcsr_acc_opencl_config.nstreams; i < n; ++i) { + const c_dbcsr_acc_opencl_stream_t* const str = c_dbcsr_acc_opencl_config.streams[i]; + if (NULL != str && NULL != str->queue) { + if (str->tid == thread_id || 0 > thread_id) { /* hit */ + result = str; + break; + } + else if (NULL == result_main && 0 == str->tid) { + result_main = str; + } + } + else break; /* error */ } - else -# endif - result = NULL; + if (0 != thread_id && NULL == result) { /* fallback */ + result = result_main; + } + if (NULL != lock) ACC_OPENCL_RELEASE(lock); return result; } -void* c_dbcsr_acc_opencl_stream_default(void) { - const int tid = ACC_OPENCL_OMP_TID(), base = tid * c_dbcsr_acc_opencl_config.nstreams; - void* result = NULL; - int i = base; - assert(tid < c_dbcsr_acc_opencl_config.nthreads); - assert(NULL != c_dbcsr_acc_opencl_config.streams); - for (; i < (base + c_dbcsr_acc_opencl_config.nstreams); ++i) { - if (NULL != c_dbcsr_acc_opencl_config.streams[i]) { - result = c_dbcsr_acc_opencl_config.streams + i; - break; - } - } +const c_dbcsr_acc_opencl_stream_t* c_dbcsr_acc_opencl_stream_default(void) { + const c_dbcsr_acc_opencl_stream_t* result = NULL; + result = c_dbcsr_acc_opencl_stream(c_dbcsr_acc_opencl_config.lock_stream, ACC_OPENCL_OMP_TID()); + assert(NULL != result); return result; } @@ -70,9 +59,8 @@ int c_dbcsr_acc_stream_create(void** stream_p, const char* name, int priority) { ACC_OPENCL_STREAM_PROPERTIES_TYPE properties[8] = { CL_QUEUE_PROPERTIES, 0 /*placeholder*/, 0 /* terminator */ }; - int result, i, tid = 0, offset = 0; + int result, tid = 0, offset = 0; cl_command_queue queue = NULL; - cl_context context = NULL; # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; @@ -106,64 +94,39 @@ int c_dbcsr_acc_stream_create(void** stream_p, const char* name, int priority) { properties[4] = 0; /* terminator */ } # endif + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_stream); # if defined(_OPENMP) if (1 < omp_get_num_threads()) { + const int i = c_dbcsr_acc_opencl_stream_counter++; assert(0 < c_dbcsr_acc_opencl_config.nthreads); -# if (201107 /*v3.1*/ <= _OPENMP) -# pragma omp atomic capture -# else -# pragma omp critical(c_dbcsr_acc_opencl_stream) -# endif - i = c_dbcsr_acc_opencl_stream_counter++; tid = (i < c_dbcsr_acc_opencl_config.nthreads ? i : (i % c_dbcsr_acc_opencl_config.nthreads)); - if (NULL != c_dbcsr_acc_opencl_config.device) { /* inherit master's context if current context is NULL */ - LIBXSMM_ATOMIC_CMPSWP(&c_dbcsr_acc_opencl_config.device[tid].context, NULL, - c_dbcsr_acc_opencl_config.device[/*main*/ 0].context, LIBXSMM_ATOMIC_RELAXED); - } } else offset = c_dbcsr_acc_opencl_stream_counter_base++; # endif - if (NULL != c_dbcsr_acc_opencl_config.device) context = c_dbcsr_acc_opencl_config.device[tid].context; - if (NULL != context) { + if (NULL != c_dbcsr_acc_opencl_config.device.context) { cl_device_id device = NULL; - result = clGetContextInfo(context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device, NULL); - if (CL_SUCCESS == result) { - if (0 != c_dbcsr_acc_opencl_config.device[tid].intel) { - const int xhints = ((1 == c_dbcsr_acc_opencl_config.xhints || 0 > c_dbcsr_acc_opencl_config.xhints) - ? (0 != c_dbcsr_acc_opencl_config.device[tid].intel ? 1 : 0) - : (c_dbcsr_acc_opencl_config.xhints >> 1)); - if (0 != (1 & xhints)) { /* attempt to enable command aggregation */ - const ACC_OPENCL_STREAM_PROPERTIES_TYPE props[4] = { - CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0 /* terminator */ - }; - const cl_command_queue q = ACC_OPENCL_CREATE_COMMAND_QUEUE(context, device, props, &result); - if (CL_SUCCESS == result) { - c_dbcsr_acc_opencl_config.timer = c_dbcsr_acc_opencl_timer_host; /* force host-timer */ - clReleaseCommandQueue(q); - } - else result = CL_SUCCESS; - } - if (0 != (2 & xhints)) { /* attempt to enable queue families */ - struct { - cl_command_queue_properties properties; - cl_bitfield capabilities; - cl_uint count; - char name[64 /*CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL*/]; - } intel_qfprops[16]; - size_t nbytes = 0, i; - if (CL_SUCCESS == clGetDeviceInfo(device, 0x418B /*CL_DEVICE_QUEUE_FAMILY_PROPERTIES_INTEL*/, sizeof(intel_qfprops), + result = clGetContextInfo(c_dbcsr_acc_opencl_config.device.context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &device, NULL); + if (EXIT_SUCCESS == result) { + if (0 != (2 & c_dbcsr_acc_opencl_config.xhints) && 0 != c_dbcsr_acc_opencl_config.device.intel) { /* enable queue families */ + struct { + cl_command_queue_properties properties; + cl_bitfield capabilities; + cl_uint count; + char name[64 /*CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL*/]; + } intel_qfprops[16]; + size_t nbytes = 0, i; + if (EXIT_SUCCESS == clGetDeviceInfo(device, 0x418B /*CL_DEVICE_QUEUE_FAMILY_PROPERTIES_INTEL*/, sizeof(intel_qfprops), intel_qfprops, &nbytes)) - { - for (i = 0; (i * sizeof(*intel_qfprops)) < nbytes; ++i) { - if (0 /*CL_QUEUE_DEFAULT_CAPABILITIES_INTEL*/ == intel_qfprops[i].capabilities && 1 < intel_qfprops[i].count) { - const int j = (0 /*terminator*/ == properties[2] ? 2 : 4); - properties[j + 0] = 0x418C; /* CL_QUEUE_FAMILY_INTEL */ - properties[j + 1] = (int)i; - properties[j + 2] = 0x418D; /* CL_QUEUE_INDEX_INTEL */ - properties[j + 3] = (i + offset) % intel_qfprops[i].count; - properties[j + 4] = 0; /* terminator */ - break; - } + { + for (i = 0; (i * sizeof(*intel_qfprops)) < nbytes; ++i) { + if (0 /*CL_QUEUE_DEFAULT_CAPABILITIES_INTEL*/ == intel_qfprops[i].capabilities && 1 < intel_qfprops[i].count) { + const int j = (0 /*terminator*/ == properties[2] ? 2 : 4); + properties[j + 0] = 0x418C; /* CL_QUEUE_FAMILY_INTEL */ + properties[j + 1] = (int)i; + properties[j + 2] = 0x418D; /* CL_QUEUE_INDEX_INTEL */ + properties[j + 3] = (i + offset) % intel_qfprops[i].count; + properties[j + 4] = 0; /* terminator */ + break; } } } @@ -173,51 +136,30 @@ int c_dbcsr_acc_stream_create(void** stream_p, const char* name, int priority) { { properties[1] = CL_QUEUE_PROFILING_ENABLE; } - queue = ACC_OPENCL_CREATE_COMMAND_QUEUE(context, device, properties, &result); + queue = ACC_OPENCL_CREATE_COMMAND_QUEUE(c_dbcsr_acc_opencl_config.device.context, device, properties, &result); } } else { result = EXIT_FAILURE; } -# if defined(_OPENMP) && 0 -# pragma omp critical(c_dbcsr_acc_opencl_stream) + if (EXIT_SUCCESS == result) { /* register stream */ + assert(NULL != c_dbcsr_acc_opencl_config.streams && NULL != queue); + *stream_p = c_dbcsr_acc_opencl_pmalloc( + NULL /*lock*/, (void**)c_dbcsr_acc_opencl_config.streams, &c_dbcsr_acc_opencl_config.nstreams); + if (NULL != *stream_p) { + c_dbcsr_acc_opencl_stream_t* const str = (c_dbcsr_acc_opencl_stream_t*)*stream_p; +# if !defined(NDEBUG) + LIBXSMM_MEMZERO127(str); # endif - if (EXIT_SUCCESS == result) { - void** const streams = c_dbcsr_acc_opencl_config.streams + tid * c_dbcsr_acc_opencl_config.nstreams; - for (i = 0; i < c_dbcsr_acc_opencl_config.nstreams; ++i) { - if (NULL == streams[i]) break; - } - if (i < c_dbcsr_acc_opencl_config.nstreams) { /* register stream */ - const size_t size_info = sizeof(c_dbcsr_acc_opencl_info_stream_t); - const size_t size = sizeof(cl_command_queue) + sizeof(void*) + size_info - 1; - void* const handle = malloc(size); - assert(NULL != queue); - if (NULL != handle) { - const uintptr_t address = (uintptr_t)handle; - const uintptr_t aligned = LIBXSMM_UP2(address + size_info, sizeof(void*)); - c_dbcsr_acc_opencl_info_stream_t* const info = (c_dbcsr_acc_opencl_info_stream_t*)(aligned - size_info); - assert(address + size_info <= aligned && NULL != info); - info->pointer = (void*)address; - info->priority = priority; - info->tid = tid; - *(cl_command_queue*)aligned = queue; - streams[i] = *stream_p = (void*)aligned; - assert(queue == *ACC_OPENCL_STREAM(streams[i])); - assert(queue == *ACC_OPENCL_STREAM(*stream_p)); - } - else { - clReleaseCommandQueue(queue); - result = EXIT_FAILURE; - *stream_p = NULL; - } - } - else { - clReleaseCommandQueue(queue); - result = EXIT_FAILURE; - *stream_p = NULL; + str->queue = queue; + str->priority = priority; + str->tid = tid; } + else result = EXIT_FAILURE; } - else { + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_stream); + if (EXIT_SUCCESS != result && NULL != queue) { + clReleaseCommandQueue(queue); *stream_p = NULL; } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) @@ -234,43 +176,20 @@ int c_dbcsr_acc_stream_destroy(void* stream) { static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); -# endif -# if defined(_OPENMP) -# pragma omp critical(c_dbcsr_acc_opencl_stream) # endif if (NULL != stream) { - const cl_command_queue queue = *ACC_OPENCL_STREAM(stream); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); + const cl_command_queue queue = str->queue; + assert(NULL != c_dbcsr_acc_opencl_config.streams); + ACC_OPENCL_ACQUIRE(c_dbcsr_acc_opencl_config.lock_stream); + c_dbcsr_acc_opencl_pfree(NULL /*lock*/, stream, (void**)c_dbcsr_acc_opencl_config.streams, &c_dbcsr_acc_opencl_config.nstreams); if (NULL != queue) { - const int result_release = clReleaseCommandQueue(queue); /* soft-error */ - int tid = 0, i = c_dbcsr_acc_opencl_config.nstreams; - assert(NULL != c_dbcsr_acc_opencl_config.streams); - for (; tid < c_dbcsr_acc_opencl_config.nthreads; ++tid) { /* unregister */ - void** const streams = c_dbcsr_acc_opencl_config.streams + tid * c_dbcsr_acc_opencl_config.nstreams; - for (i = 0; i < c_dbcsr_acc_opencl_config.nstreams; ++i) { - if (stream == streams[i]) { - int k = i; -# if defined(ACC_OPENCL_STREAM_COMPACT) - const int j = i + 1; - if (j < c_dbcsr_acc_opencl_config.nstreams && NULL != streams[j]) { /* compacting streams is not thread-safe */ - k = c_dbcsr_acc_opencl_config.nstreams - j; - memmove(streams + i, streams + j, sizeof(void*) * k); - } + result = clReleaseCommandQueue(queue); +# if !defined(NDEBUG) + LIBXSMM_MEMZERO127((c_dbcsr_acc_opencl_stream_t*)stream); # endif - streams[k] = NULL; - tid = c_dbcsr_acc_opencl_config.nthreads; /* leave outer loop */ - result = result_release; /* promote */ - break; - } -# if defined(ACC_OPENCL_STREAM_COMPACT) - else if (NULL == streams[i]) { /* compact streams */ - break; - } -# endif - } - } } - c_dbcsr_acc_opencl_stream_counter_base = c_dbcsr_acc_opencl_stream_counter = 0; /* reset */ - free(c_dbcsr_acc_opencl_info_stream(stream)->pointer); + ACC_OPENCL_RELEASE(c_dbcsr_acc_opencl_config.lock_stream); } # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); @@ -295,7 +214,8 @@ int c_dbcsr_acc_stream_priority_range(int* least, int* greatest) { cl_platform_id platform = NULL; cl_device_id active_id = NULL; if (EXIT_SUCCESS == result) { - result = c_dbcsr_acc_opencl_device(ACC_OPENCL_OMP_TID(), &active_id); + result = clGetContextInfo( + c_dbcsr_acc_opencl_config.device.context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), &active_id, NULL); } ACC_OPENCL_CHECK(clGetDeviceInfo(active_id, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL), "retrieve platform associated with active device", result); @@ -321,11 +241,8 @@ int c_dbcsr_acc_stream_priority_range(int* least, int* greatest) { int c_dbcsr_acc_stream_sync(void* stream) { - cl_command_queue queue = NULL; + const c_dbcsr_acc_opencl_stream_t* str = NULL; int result = EXIT_SUCCESS; -# if defined(ACC_OPENCL_STREAM_PRIORITIES) - const int* const priority = NULL; -# endif # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) int routine_handle; static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; @@ -333,11 +250,62 @@ int c_dbcsr_acc_stream_sync(void* stream) { c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); # endif # if defined(ACC_OPENCL_STREAM_NULL) - queue = *ACC_OPENCL_STREAM(NULL != stream ? stream : c_dbcsr_acc_opencl_stream_default()); + str = (NULL != stream ? ACC_OPENCL_STREAM(stream) : c_dbcsr_acc_opencl_stream_default()); +# else + str = ACC_OPENCL_STREAM(stream); +# endif + assert(NULL != str && NULL != str->queue); + result = clFinish(str->queue); +# if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) + c_dbcsr_timestop(&routine_handle); +# endif + ACC_OPENCL_RETURN(result); +} + + +int c_dbcsr_acc_opencl_device_synchronize(ACC_OPENCL_LOCKTYPE* lock, int thread_id) { + int result = EXIT_SUCCESS; + const size_t n = ACC_OPENCL_MAXNITEMS * c_dbcsr_acc_opencl_config.nthreads; + size_t i; + assert(thread_id < c_dbcsr_acc_opencl_config.nthreads); + assert(NULL != c_dbcsr_acc_opencl_config.streams); + if (NULL != lock) ACC_OPENCL_ACQUIRE(lock); + for (i = c_dbcsr_acc_opencl_config.nstreams; i < n; ++i) { + const c_dbcsr_acc_opencl_stream_t* const str = c_dbcsr_acc_opencl_config.streams[i]; + if (NULL != str && NULL != str->queue) { + if (str->tid == thread_id || 0 > thread_id) { /* hit */ + result = clFinish(str->queue); + if (EXIT_SUCCESS != result) break; + } + } + else { /* error */ + result = EXIT_FAILURE; + break; + } + } + if (NULL != lock) ACC_OPENCL_RELEASE(lock); + return result; +} + + +int c_dbcsr_acc_device_synchronize(void) { + int result = EXIT_SUCCESS; +# if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) + int routine_handle; + static const char* const routine_name_ptr = LIBXSMM_FUNCNAME; + static const int routine_name_len = (int)sizeof(LIBXSMM_FUNCNAME) - 1; + c_dbcsr_timeset((const char**)&routine_name_ptr, &routine_name_len, &routine_handle); +# endif +# if defined(_OPENMP) + if (1 == omp_get_num_threads()) { + result = c_dbcsr_acc_opencl_device_synchronize(c_dbcsr_acc_opencl_config.lock_stream, -1 /*all*/); + } + else { + result = c_dbcsr_acc_opencl_device_synchronize(NULL /*lock*/, omp_get_thread_num()); + } # else - queue = *ACC_OPENCL_STREAM(stream); + result = c_dbcsr_acc_opencl_device_synchronize(NULL /*lock*/, /*main*/ 0); # endif - result = clFinish(queue); # if defined(__DBCSR_ACC) && defined(ACC_OPENCL_PROFILE) c_dbcsr_timestop(&routine_handle); # endif diff --git a/src/acc/opencl/common/opencl_common.h b/src/acc/opencl/common/opencl_common.h index 16326725c76..8fa27d612c0 100644 --- a/src/acc/opencl/common/opencl_common.h +++ b/src/acc/opencl/common/opencl_common.h @@ -9,10 +9,19 @@ #ifndef OPENCL_COMMON_H #define OPENCL_COMMON_H -#if (200 /*CL_VERSION_2_0*/ <= __OPENCL_VERSION__) || defined(__NV_CL_C_VERSION) +#if !defined(ACC_OPENCL_C_VERSION) +# define ACC_OPENCL_C_VERSION __OPENCL_C_VERSION__ +#endif +#if !defined(ACC_OPENCL_VERSION) +# define ACC_OPENCL_VERSION __OPENCL_VERSION__ +#endif + +#if (200 /*CL_VERSION_2_0*/ <= ACC_OPENCL_C_VERSION) || defined(__NV_CL_C_VERSION) # define UNROLL_FORCE(N) __attribute__((opencl_unroll_hint(N))) +# define UNROLL_AUTO __attribute__((opencl_unroll_hint)) #else # define UNROLL_FORCE(N) +# define UNROLL_AUTO #endif #if !defined(MIN) @@ -28,11 +37,13 @@ #if !defined(LU) || (-1 == LU) # define UNROLL_OUTER(N) # define UNROLL(N) -#else -# if (1 <= LU) +#else /* (-2) full, (-1) no hints, (0) inner, (1) outer-dehint, (2) block-m */ +# if (1 <= LU) /* outer-dehint */ # define UNROLL_OUTER(N) UNROLL_FORCE(1) -# else +# elif (-1 > LU) /* full */ # define UNROLL_OUTER(N) UNROLL_FORCE(N) +# else /* inner */ +# define UNROLL_OUTER(N) # endif # define UNROLL(N) UNROLL_FORCE(N) #endif diff --git a/src/acc/opencl/smm/CMakeLists.txt b/src/acc/opencl/smm/CMakeLists.txt index 52edab1c7a0..d3b37392f73 100644 --- a/src/acc/opencl/smm/CMakeLists.txt +++ b/src/acc/opencl/smm/CMakeLists.txt @@ -1,27 +1,35 @@ -set(LIBSMM_ACC_HEADER_KERNELS ${CMAKE_CURRENT_SOURCE_DIR}/opencl_kernels.h) +set(LIBSMM_ACC_KERNELS_INC ${CMAKE_CURRENT_SOURCE_DIR}/opencl_kernels.h) -set(SMM_ACC_KERNEL_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/../acc_opencl.sh) +set(SMM_ACC_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/../acc_opencl.sh) set(SMM_ACC_COMMON ../common/opencl_atomics.h ../common/opencl_common.h) set(SMM_ACC_KERNELS kernels/multiply.cl kernels/transpose.cl) list(TRANSFORM SMM_ACC_KERNELS PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/) set(SMM_ACC_PARAMS_WITHGPU ${CMAKE_CURRENT_SOURCE_DIR}/params/tune_multiply_${WITH_GPU}.csv) -set(SMM_ACC_PARAMS_DEFAULT ${CMAKE_CURRENT_SOURCE_DIR}/tune_multiply.csv) +set(SMM_ACC_PARAMS_CUSTOM ${CMAKE_CURRENT_SOURCE_DIR}/tune_multiply.csv) if (EXISTS ${SMM_ACC_PARAMS_WITHGPU}) + set(SMM_ACC_SCRIPT_MSG "ACC/LIBSMM OpenCL: using parameters for ${WITH_GPU}") set(SMM_ACC_PARAMS ${SMM_ACC_PARAMS_WITHGPU}) -elseif (EXISTS ${SMM_ACC_PARAMS_DEFAULT}) - set(SMM_ACC_PARAMS ${SMM_ACC_PARAMS_DEFAULT}) +elseif (WITH_GPU MATCHES "none") + set(SMM_ACC_SCRIPT_MSG "ACC/LIBSMM OpenCL: no tuned parameters used") + set(SMM_ACC_SCRIPT_ARGS -p \"\") +elseif (EXISTS ${SMM_ACC_PARAMS_CUSTOM}) + set(SMM_ACC_SCRIPT_MSG "ACC/LIBSMM OpenCL: using custom parameters") + set(SMM_ACC_PARAMS ${SMM_ACC_PARAMS_CUSTOM}) +else () + set(SMM_ACC_SCRIPT_MSG "ACC/LIBSMM OpenCL: using all tuned parameters") endif () +message(STATUS ${SMM_ACC_SCRIPT_MSG}) add_custom_target( - parameters ALL - COMMAND ${SMM_ACC_KERNEL_SCRIPT} ${SMM_ACC_KERNELS} ${SMM_ACC_PARAMS} - ${LIBSMM_ACC_HEADER_KERNELS} - DEPENDS ${SMM_ACC_KERNEL_SCRIPT} ${SMM_ACC_KERNELS} ${SMM_ACC_COMMON} - BYPRODUCTS ${LIBSMM_ACC_HEADER_KERNELS} - COMMENT "ACC/LIBSMM OpenCL: collecting tuned kernel parameters...") + parameters # ALL + COMMAND ${SMM_ACC_SCRIPT} ${SMM_ACC_SCRIPT_ARGS} ${SMM_ACC_KERNELS} + ${SMM_ACC_PARAMS} ${LIBSMM_ACC_KERNELS_INC} + DEPENDS ${SMM_ACC_SCRIPT} ${SMM_ACC_KERNELS} ${SMM_ACC_COMMON} + BYPRODUCTS ${LIBSMM_ACC_KERNELS_INC} + COMMENT ${SMM_ACC_SCRIPT_MSG}) add_dependencies(dbcsr parameters) target_include_directories(dbcsr PRIVATE ${CMAKE_CURRENT_BINARY_DIR} diff --git a/src/acc/opencl/smm/kernels/multiply.cl b/src/acc/opencl/smm/kernels/multiply.cl index c732105f1d0..bf02cce2ade 100644 --- a/src/acc/opencl/smm/kernels/multiply.cl +++ b/src/acc/opencl/smm/kernels/multiply.cl @@ -462,24 +462,21 @@ FN(global T* restrict cdata, GLOBAL const T* restrict adata, GLOBAL const T* res # if defined(BARRIER) && (MAX(1, SGS) < SWG) && defined(SLM_A) BARRIER(CLK_LOCAL_MEM_FENCE); # endif -# if (WRK == SM) && (SM <= SGS || SM <= SWG) && !defined(SLM_A) && !defined(REG_A) +# if defined(ACC_OPENCL_VERSION) && (200 /*2.0*/ <= ACC_OPENCL_VERSION) && (!defined(GPU) || (0 != GPU)) && !defined(SLM_A) && \ + !defined(REG_A) && (WRK == SM) && (SM <= SGS || SM <= SWG) /* use ACC_OPENCL_VERSION rather than ACC_OPENCL_C_VERSION */ const T a = AMK(idx, k); -# endif UNROLL_FORCE(SM) for (SINT m = 0; m < SM; ++m) { -# if (200 /*CL_VERSION_2_0*/ <= __OPENCL_VERSION__) && !defined(SLM_A) && !defined(REG_A) && (WRK == SM) && \ - (SM <= SGS || SM <= SWG) # if (SM <= SGS) - /* size of subgroup is sufficient */ - CNM(idx, m) = MAD(sub_group_broadcast(a, m), b, CNM(idx, m)); + CNM(idx, m) = MAD(sub_group_broadcast(a, m), b, CNM(idx, m)); /* size of subgroup is sufficient */ # else - /* size of workgroup is sufficient */ - CNM(idx, m) = MAD(work_group_broadcast(a, m), b, CNM(idx, m)); + CNM(idx, m) = MAD(work_group_broadcast(a, m), b, CNM(idx, m)); /* size of workgroup is sufficient */ # endif + } # else - CNM(idx, m) = MAD(AMK(m, k), b, CNM(idx, m)); /* fallback */ + UNROLL_FORCE(SM) + for (SINT m = 0; m < SM; ++m) CNM(idx, m) = MAD(AMK(m, k), b, CNM(idx, m)); /* fallback */ # endif - } # if defined(BARRIER) && (MAX(1, SGS) < SWG) && defined(SLM_A) BARRIER(CLK_LOCAL_MEM_FENCE); # endif diff --git a/src/acc/opencl/smm/opencl_libsmm.c b/src/acc/opencl/smm/opencl_libsmm.c index d3771e37ac2..0f158363676 100644 --- a/src/acc/opencl/smm/opencl_libsmm.c +++ b/src/acc/opencl/smm/opencl_libsmm.c @@ -13,30 +13,21 @@ # include "../../acc_bench.h" # include +# if !defined(OPENCL_KERNELS_SOURCE_TRANSPOSE) +# error "OpenCL transpose-kernel code not found!" +# endif +# if !defined(OPENCL_KERNELS_SOURCE_MULTIPLY) +# error "OpenCL SMM-kernel code not found!" +# endif + # if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER -# define OPENCL_LIBSMM_GEMM_BATCH(IPREC, OPREC, TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, STRIDE_A, B, LDB, STRIDE_B, BETA, C, \ - LDC, STRIDE_C, INDEX_STRIDE, INDEX_BASE, BATCHSIZE) \ - OPENCL_LIBSMM_USEOMP(libxsmm_gemm_batch) \ - (IPREC, OPREC, TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, STRIDE_A, B, LDB, STRIDE_B, BETA, C, LDC, STRIDE_C, INDEX_STRIDE, \ - INDEX_BASE, BATCHSIZE, 0 /*batchcheck*/) # define OPENCL_LIBSMM_DESCINIT(BLOB, PREC, M, N, K, LDA, LDB, LDC, FLAGS, PREFETCH) \ libxsmm_gemm_descriptor_init(BLOB, PREC, PREC, PREC, PREC, M, N, K, LDA, LDB, LDC, FLAGS, PREFETCH) # else -# define OPENCL_LIBSMM_GEMM_BATCH(IPREC, OPREC, TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, STRIDE_A, B, LDB, STRIDE_B, BETA, C, \ - LDC, STRIDE_C, INDEX_STRIDE, INDEX_BASE, BATCHSIZE) \ - OPENCL_LIBSMM_USEOMP(libxsmm_gemm_batch) \ - ((libxsmm_gemm_precision)(IPREC), (libxsmm_gemm_precision)(OPREC), TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, \ - LDC, INDEX_BASE, INDEX_STRIDE, STRIDE_A, STRIDE_B, STRIDE_C, BATCHSIZE) # define OPENCL_LIBSMM_DESCINIT(BLOB, PREC, M, N, K, LDA, LDB, LDC, FLAGS, PREFETCH) \ libxsmm_gemm_descriptor_dinit(BLOB, PREC, M, N, K, LDA, LDB, LDC, 1.0, 1.0, FLAGS, PREFETCH) # endif -# if defined(_OPENMP) && !defined(__DBCSR_ACC) -# define OPENCL_LIBSMM_USEOMP(FUNC) LIBXSMM_USEOMP(FUNC) -# else -# define OPENCL_LIBSMM_USEOMP(FUNC) (FUNC) -# endif - # if !defined(OPENCL_LIBSMM_VALIDATE_TRANS) && defined(OPENCL_LIBSMM_VALIDATE) && \ (1 < OPENCL_LIBSMM_VALIDATE || 0 > OPENCL_LIBSMM_VALIDATE) # define OPENCL_LIBSMM_VALIDATE_TRANS @@ -94,34 +85,15 @@ /* approximate arithmetic intensity for SMMs like C += Ai * Bi (beta=1) */ # define OPENCL_LIBSMM_AI(M, N, K, TYPESIZE) ((2.0 * (M) * (N) * (K)) / ((TYPESIZE) * (K) * ((M) + (N)))) - +/* determine type-size of a given type-ID */ # define OPENCL_LIBSMM_TYPESIZE(TYPEID) \ (dbcsr_type_real_8 == (TYPEID) ? ((int)sizeof(double)) : (dbcsr_type_real_4 == (TYPEID) ? ((int)sizeof(float)) : 0 /*unknown*/)) -# define OPENCL_LIBSMM_ISORT(IARR, SIZE) \ - { \ - int opencl_libsmm_isort_i_ = 0; \ - for (; opencl_libsmm_isort_i_ < ((int)(SIZE)-1); ++opencl_libsmm_isort_i_) { \ - int opencl_libsmm_isort_j_ = opencl_libsmm_isort_i_ + 2; \ - int opencl_libsmm_isort_k_ = opencl_libsmm_isort_i_ + 1; \ - for (; opencl_libsmm_isort_j_ < ((int)(SIZE)); ++opencl_libsmm_isort_j_) { \ - if ((IARR)[opencl_libsmm_isort_j_] < (IARR)[opencl_libsmm_isort_k_]) { \ - opencl_libsmm_isort_k_ = opencl_libsmm_isort_j_; \ - } \ - } \ - if ((IARR)[opencl_libsmm_isort_k_] < (IARR)[opencl_libsmm_isort_i_]) { \ - LIBXSMM_ISWAP((IARR)[opencl_libsmm_isort_i_], (IARR)[opencl_libsmm_isort_k_]); \ - } \ - } \ - } - # if defined(__cplusplus) extern "C" { # endif -/* maintain GFLOPS/AI ratios for performance estimates and suitability */ -double opencl_libsmm_shst, opencl_libsmm_dhst, opencl_libsmm_sacc, opencl_libsmm_dacc; /* track initialization status of LIBSMM */ int opencl_libsmm_initialized; @@ -156,8 +128,8 @@ void opencl_libsmm_print_matrix(FILE* ostream, const char* label, libsmm_acc_dat } for (j = 0; j < n; ++j) { switch (type) { - case dbcsr_type_real_8: fprintf(ostream, "%.2f ", ((double*)mat)[i * n + j]); break; - case dbcsr_type_real_4: fprintf(ostream, "%.2f ", ((float*)mat)[i * n + j]); break; + case dbcsr_type_real_8: fprintf(ostream, "%.2f ", ((const double*)mat)[i * n + j]); break; + case dbcsr_type_real_4: fprintf(ostream, "%.2f ", ((const float*)mat)[i * n + j]); break; default: fprintf(ostream, "? "); } } @@ -422,7 +394,7 @@ int libsmm_acc_init(void) { int result = EXIT_SUCCESS; # endif /* multiple calls to libsmm_acc_init are not considered as an error */ - if (1 == LIBXSMM_ATOMIC_ADD_FETCH(&opencl_libsmm_initialized, 1, LIBXSMM_ATOMIC_RELAXED)) { + if (1 == LIBXSMM_ATOMIC_ADD_FETCH(&opencl_libsmm_initialized, 1, ACC_OPENCL_ATOMIC)) { # if !defined(__DBCSR_ACC) /* DBCSR shall call c_dbcsr_acc_init as well as libsmm_acc_init (since both interfaces are used). * Also, libsmm_acc_init may privately call c_dbcsr_acc_init (as it depends on the ACC interface). @@ -435,12 +407,6 @@ int libsmm_acc_init(void) { if (EXIT_SUCCESS == result) { opencl_libsmm_perfest_t perfest; char* const env_params = getenv("OPENCL_LIBSMM_SMM_PARAMS"); - const char* const env_suitable = getenv("OPENCL_LIBSMM_SUITABLE"); -# if defined(OPENCL_LIBSMM_SUITABLE) - const int suitable = (NULL == env_suitable ? 1 : ('0' != *env_suitable)); -# else - const int suitable = (NULL == env_suitable ? 0 : ('0' != *env_suitable)); -# endif memset(&perfest, 0, sizeof(perfest)); if (NULL == env_params || '0' != *env_params) { char buffer[ACC_OPENCL_BUFFERSIZE], bufname[ACC_OPENCL_BUFFERSIZE], control = '0'; @@ -501,7 +467,8 @@ int libsmm_acc_init(void) { cl_device_id active_id = NULL; unsigned int active_uid; int active_match = -1; - if (EXIT_SUCCESS == c_dbcsr_acc_opencl_device(ACC_OPENCL_OMP_TID(), &active_id) && + if (EXIT_SUCCESS == clGetContextInfo(c_dbcsr_acc_opencl_config.device.context, CL_CONTEXT_DEVICES, sizeof(cl_device_id), + &active_id, NULL) && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_name(active_id, bufname, ACC_OPENCL_BUFFERSIZE, NULL /*platform*/, 0 /*platform_maxlen*/, /*cleanup*/ 1) && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_uid(active_id, bufname, &active_uid)) @@ -599,7 +566,7 @@ int libsmm_acc_init(void) { fprintf(stderr, "INFO ACC/LIBSMM: PARAMS in %u set%s loaded targeting ", ntuned, 1 != ntuned ? "s" : ""); if (0 != c_dbcsr_acc_opencl_config.devmatch) { fprintf(stderr, "%i device%s\n", ndevices_params, 1 != ndevices_params ? "s" : ""); - if (1 < c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { + if (2 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { unsigned int i = 0; for (; i < (unsigned int)ndevices_params; ++i) { fprintf(stderr, "INFO ACC/LIBSMM: PARAMS -> \"%s\"\n", OPENCL_KERNELS_DEVICES[i]); @@ -611,85 +578,6 @@ int libsmm_acc_init(void) { # endif } } - if (0 != suitable && EXIT_SUCCESS == result) { - const int stack_size = 30000, nrepeat = 100; - const int nc = LIBXSMM_MAX(stack_size / 16, 1), na = 10 * nc, nb = 10 * nc; - const int m = 8, n = 8, k = 8, mn = m * n, mk = m * k, kn = k * n; - const size_t scratch_size = /*stack*/ stack_size * 3 * sizeof(int) + - (/*a*/ na * mk + /*b*/ nb * kn + /*c*/ nc * mn) * /*max.typesize*/ sizeof(double) + - 3 * (LIBXSMM_ALIGNMENT - 1) /*alignments*/; - void* const scratch = libxsmm_aligned_scratch(scratch_size, LIBXSMM_ALIGNMENT); - int *const s = (int*)scratch, i; - libxsmm_timer_tickint start; - const char notrans = 'N'; - if (0 != perfest.scount && 0 < perfest.gf_ai_sratio_max) { - if (NULL != scratch) { - float* const a = (float*)LIBXSMM_UP2((uintptr_t)s + sizeof(int) * stack_size * 3, LIBXSMM_ALIGNMENT); - float* const b = (float*)LIBXSMM_UP2((uintptr_t)a + sizeof(float) * na * mk, LIBXSMM_ALIGNMENT); - float* const c = (float*)LIBXSMM_UP2((uintptr_t)b + sizeof(float) * nb * kn, LIBXSMM_ALIGNMENT); - const float alpha = 1, beta = 1; - init_stack(s, stack_size, 0 /*rnd_size*/, NULL /*rnd*/, mn, mk, kn, nc, na, nb); -# if defined(_OPENMP) -# pragma omp parallel -# endif - { -# if defined(_OPENMP) -# pragma omp for -# endif - for (i = 0; i < na; ++i) INIT_MAT(float, i + 42, &a[i * mk], m, k, 1.0 / (nc * na)); -# if defined(_OPENMP) -# pragma omp for -# endif - for (i = 0; i < nb; ++i) INIT_MAT(float, i + 24, &b[i * kn], k, n, 1.0 / (nc * nb)); - } - memset(c, 0, sizeof(float) * nc * mn); - start = libxsmm_timer_tick(); - for (i = 0; i < nrepeat; ++i) { - OPENCL_LIBSMM_GEMM_BATCH(LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, ¬rans, ¬rans, m, n, k, &alpha, a, - &m /*lda*/, s + 0 /*stride_a*/, b, &k /*ldb*/, s + 1 /*stride_b*/, &beta, c, &m /*ldc*/, s + 2 /*stride_c*/, - sizeof(int) * 3, 1 /*index_base*/, stack_size); - } - opencl_libsmm_shst = 1E-9 * ((size_t)2 * m * n * k * stack_size * nrepeat) / - (libxsmm_timer_duration(start, libxsmm_timer_tick()) * OPENCL_LIBSMM_AI(m, n, k, sizeof(float))); - } - opencl_libsmm_sacc = (/*sqrt(perfest.gf_ai_sratio_max **/ - exp(perfest.gf_ai_sratio_sumlog / perfest.scount)); - } - if (0 != perfest.dcount && 0 < perfest.gf_ai_dratio_max) { - if (NULL != scratch) { - double* const a = (double*)LIBXSMM_UP2((uintptr_t)s + sizeof(int) * stack_size * 3, LIBXSMM_ALIGNMENT); - double* const b = (double*)LIBXSMM_UP2((uintptr_t)a + sizeof(double) * na * mk, LIBXSMM_ALIGNMENT); - double* const c = (double*)LIBXSMM_UP2((uintptr_t)b + sizeof(double) * nb * kn, LIBXSMM_ALIGNMENT); - const double alpha = 1, beta = 1; - init_stack(s, stack_size, 0 /*rnd_size*/, NULL /*rnd*/, mn, mk, kn, nc, na, nb); -# if defined(_OPENMP) -# pragma omp parallel -# endif - { -# if defined(_OPENMP) -# pragma omp for -# endif - for (i = 0; i < na; ++i) INIT_MAT(double, i + 42, &a[i * mk], m, k, 1.0 / (nc * na)); -# if defined(_OPENMP) -# pragma omp for -# endif - for (i = 0; i < nb; ++i) INIT_MAT(double, i + 24, &b[i * kn], k, n, 1.0 / (nc * nb)); - } - memset(c, 0, sizeof(double) * nc * mn); - start = libxsmm_timer_tick(); - for (i = 0; i < nrepeat; ++i) { - OPENCL_LIBSMM_GEMM_BATCH(LIBXSMM_DATATYPE_F64, LIBXSMM_DATATYPE_F64, ¬rans, ¬rans, m, n, k, &alpha, a, - &m /*lda*/, s + 0 /*stride_a*/, b, &k /*ldb*/, s + 1 /*stride_b*/, &beta, c, &m /*ldc*/, s + 2 /*stride_c*/, - sizeof(int) * 3, 1 /*index_base*/, stack_size); - } - opencl_libsmm_dhst = 1E-9 * ((size_t)2 * m * n * k * stack_size * nrepeat) / - (libxsmm_timer_duration(start, libxsmm_timer_tick()) * OPENCL_LIBSMM_AI(m, n, k, sizeof(double))); - } - opencl_libsmm_dacc = (/*sqrt(perfest.gf_ai_dratio_max **/ - exp(perfest.gf_ai_dratio_sumlog / perfest.dcount)); - } - libxsmm_free(scratch); - } } } ACC_OPENCL_RETURN(result); @@ -708,7 +596,7 @@ int libsmm_acc_finalize(void) { int result = EXIT_SUCCESS; # endif /* multiple calls to libsmm_acc_finalize are not considered as an error */ - if (0 == LIBXSMM_ATOMIC_SUB_FETCH(&opencl_libsmm_initialized, 1, LIBXSMM_ATOMIC_RELAXED)) { + if (0 == LIBXSMM_ATOMIC_SUB_FETCH(&opencl_libsmm_initialized, 1, ACC_OPENCL_ATOMIC)) { # if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER char fname[ACC_OPENCL_MAXSTRLEN]; const void* regentry = libxsmm_get_registry_begin(LIBXSMM_KERNEL_KIND_USER, NULL /*key*/); @@ -717,24 +605,23 @@ int libsmm_acc_finalize(void) { cl_kernel kernel = *(const cl_kernel*)regentry; if (NULL == kernel) kernel = ((const opencl_libsmm_smm_t*)regentry)->kernel[1]; if (NULL != kernel) { /* only consider user-entry if clGetKernelInfo succeeded */ - cl_int result_entry = clGetKernelInfo(kernel, CL_KERNEL_FUNCTION_NAME, sizeof(fname), fname, NULL); - if (CL_SUCCESS == result_entry) { + int result_entry = clGetKernelInfo(kernel, CL_KERNEL_FUNCTION_NAME, sizeof(fname), fname, NULL); + if (EXIT_SUCCESS == result_entry) { if (NULL != strstr(fname, OPENCL_LIBSMM_KERNELNAME_TRANS)) { /* trans-kernel */ result_entry = clReleaseKernel(kernel); } else if (NULL != strstr(fname, OPENCL_LIBSMM_KERNELNAME_SMM)) { /* SMM-kernel */ result_entry = clReleaseKernel(kernel); - if (CL_SUCCESS == result_entry && kernel != ((const opencl_libsmm_smm_t*)regentry)->kernel[1]) { + if (EXIT_SUCCESS == result_entry && kernel != ((const opencl_libsmm_smm_t*)regentry)->kernel[1]) { kernel = ((const opencl_libsmm_smm_t*)regentry)->kernel[1]; /* release 2nd kernel */ if (NULL != kernel) result_entry = clReleaseKernel(kernel); } } - if (CL_SUCCESS != result_entry) result = result_entry; + if (EXIT_SUCCESS != result_entry) result = result_entry; } } } # endif - opencl_libsmm_shst = opencl_libsmm_dhst = opencl_libsmm_sacc = opencl_libsmm_dacc = 0; # if !defined(__DBCSR_ACC) /* DBCSR shall call c_dbcsr_acc_init as well as libsmm_acc_init (since both interfaces are used). * Also, libsmm_acc_init may privately call c_dbcsr_acc_init (as it depends on the ACC interface). @@ -762,34 +649,35 @@ c_dbcsr_acc_bool_t libsmm_acc_is_thread_safe(void) { int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, void* dev_data, libsmm_acc_data_t datatype, int m, int n, int max_kernel_dim, void* stream) { + c_dbcsr_acc_opencl_info_memptr_t info_stack, info_mdata; int result = EXIT_SUCCESS; -# if !defined(OPENCL_KERNELS_SOURCE_TRANSPOSE) - result = EXIT_FAILURE; -# else const int mn = m * n; assert((NULL != dev_trs_stack && NULL != stream && NULL != dev_data && 0 <= offset && 0 <= stack_size) || 0 == stack_size); - if (( -# if defined(OPENCL_LIBSMM_F64) + result |= c_dbcsr_acc_opencl_info_devptr(&info_stack, dev_trs_stack, sizeof(int), NULL /*amount*/, NULL /*offset*/); + result |= c_dbcsr_acc_opencl_info_devptr(&info_mdata, dev_data, 1 /*elsize*/, NULL /*amount*/, NULL /*offset*/); + if (EXIT_SUCCESS == result && + ( +# if defined(OPENCL_LIBSMM_F64) dbcsr_type_real_8 == datatype -# else +# else 0 -# endif +# endif || -# if defined(OPENCL_LIBSMM_F32) +# if defined(OPENCL_LIBSMM_F32) dbcsr_type_real_4 == datatype -# else +# else 0 -# endif +# endif ) && 0 < stack_size && 1 < mn && m <= max_kernel_dim && n <= max_kernel_dim) { - const cl_command_queue queue = *ACC_OPENCL_STREAM(stream); + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); opencl_libsmm_trans_t* config; opencl_libsmm_transkey_t key; -# if !defined(OPENCL_LIBSMM_VALIDATE_TRANS) +# if !defined(OPENCL_LIBSMM_VALIDATE_TRANS) double duration; const libxsmm_timer_tickint start = libxsmm_timer_tick(); -# endif +# endif LIBXSMM_MEMZERO127(&key); /* potentially heterogeneous key-data (alignment gaps) */ key.type = datatype; key.m = m; @@ -801,23 +689,23 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v int nchar = LIBXSMM_SNPRINTF(fname, sizeof(fname), /* kernel name are meant to be unambiguous (BLAS-typeprefix and kernelsize) */ "x" OPENCL_LIBSMM_KERNELNAME_TRANS "%ix%i", m, n); -# if defined(__DBCSR_ACC) +# if defined(__DBCSR_ACC) int routine_handle; c_dbcsr_timeset(LIBSMM_ACC_TRANSPOSE_ROUTINE_NAME_STRPTR, LIBSMM_ACC_TRANSPOSE_ROUTINE_NAME_LENPTR, &routine_handle); -# endif +# endif if (0 < nchar && (int)sizeof(fname) > nchar) { cl_device_id active_device; - result = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &active_device, NULL); - if (CL_SUCCESS == result) { + result = clGetCommandQueueInfo(str->queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &active_device, NULL); + if (EXIT_SUCCESS == result) { const char *const env_cl = getenv("OPENCL_LIBSMM_TRANS_BUILDOPTS"), *const env_bm = getenv("OPENCL_LIBSMM_TRANS_BM"); const char* const cmem = (EXIT_SUCCESS != opencl_libsmm_use_cmem(active_device) ? "global" : "constant"); const char* const param_format = "-DGLOBAL=%s -DINPLACE=%i -DFN=%s -DSM=%i -DSN=%i -DSWG=%i -DT=%s"; const char *const env_inplace = getenv("OPENCL_LIBSMM_TRANS_INPLACE"), *tname = ""; -# if defined(OPENCL_LIBSMM_TRANS_INPLACE) +# if defined(OPENCL_LIBSMM_TRANS_INPLACE) const int inplace = ((m == n) && (NULL == env_inplace ? 1 : ('0' != *env_inplace))); -# else +# else const int inplace = ((m == n) && (NULL == env_inplace ? 0 : ('0' != *env_inplace))); -# endif +# endif const int blockm = ((NULL == env_bm || '\0' == *env_bm) ? 0 : atoi(env_bm)); const int bm = (0 >= blockm ? (NULL == config ? /*default*/ m : /*LIBXSMM_CLMP(config->bm, 1, m)*/ m) : LIBXSMM_MIN(blockm, m)); @@ -863,7 +751,7 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v } if (EXIT_SUCCESS == result) { config = (opencl_libsmm_trans_t*)libxsmm_xregister(&key, sizeof(key), sizeof(new_config), &new_config); -# if !defined(OPENCL_LIBSMM_VALIDATE_TRANS) +# if !defined(OPENCL_LIBSMM_VALIDATE_TRANS) if (2 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { LIBXSMM_STDIO_ACQUIRE(); duration = libxsmm_timer_duration(start, libxsmm_timer_tick()); @@ -876,7 +764,7 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v fprintf(stderr, " gen=%.1f ms\n", 1E3 * duration); LIBXSMM_STDIO_RELEASE(); } -# endif +# endif } } } @@ -889,9 +777,9 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v else { result = EXIT_FAILURE; } -# if defined(__DBCSR_ACC) +# if defined(__DBCSR_ACC) c_dbcsr_timestop(&routine_handle); -# endif +# endif } assert((NULL != config && NULL != config->kernel && 0 < config->wgsize) || EXIT_SUCCESS != result); if (EXIT_SUCCESS == result) { @@ -901,13 +789,13 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v : &event); const size_t work_size = config->wgsize * stack_size; const int typesize = OPENCL_LIBSMM_TYPESIZE(datatype); -# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) +# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) const int offset_stack_size = offset + stack_size; char *imat = NULL, *omat = NULL, *gold = NULL; void* scratch = NULL; int* stack = NULL; size_t data_size; - if (CL_SUCCESS == clGetMemObjectInfo((cl_mem)dev_data, CL_MEM_SIZE, sizeof(size_t), &data_size, NULL)) { + if (EXIT_SUCCESS == clGetMemObjectInfo(info_mdata.memory, CL_MEM_SIZE, sizeof(size_t), &data_size, NULL)) { const size_t scratch_size = (sizeof(int) * offset_stack_size) /*stack*/ + data_size /*imat*/ + data_size /*omat*/ + (mn * typesize) /*gold*/ + 3 * (LIBXSMM_ALIGNMENT - 1) /*alignments*/; @@ -926,30 +814,29 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v else { result = EXIT_FAILURE; } -# endif +# endif assert(!(OPENCL_LIBSMM_NLOCKS_TRANS & (OPENCL_LIBSMM_NLOCKS_TRANS - 1))); /* POT */ - { /* OpenCL is thread-safe except for clSetKernelArg and launching such shared kernel */ - static volatile int locks[OPENCL_LIBSMM_NLOCKS_TRANS]; -# if (1 < OPENCL_LIBSMM_NLOCKS_TRANS) + { /* calling clSetKernelArg/clEnqueueNDRangeKernel must be consistent */ + static ACC_OPENCL_ATOMIC_LOCKTYPE locks[OPENCL_LIBSMM_NLOCKS_TRANS]; +# if (1 < OPENCL_LIBSMM_NLOCKS_TRANS) const unsigned int hash = libxsmm_hash(&config->kernel, sizeof(cl_kernel), 25071975 /*seed*/); const unsigned int lidx = LIBXSMM_MOD2(hash, OPENCL_LIBSMM_NLOCKS_TRANS); - volatile int* const lock = locks + lidx; -# else - volatile int* const lock = locks; -# endif - /* calling clSetKernelArg must be consistent across host-threads */ - LIBXSMM_ATOMIC_ACQUIRE(lock, LIBXSMM_SYNC_NPAUSE, LIBXSMM_ATOMIC_RELAXED); + ACC_OPENCL_ATOMIC_LOCKTYPE* const lock = locks + lidx; +# else + ACC_OPENCL_ATOMIC_LOCKTYPE* const lock = locks; +# endif + ACC_OPENCL_ATOMIC_ACQUIRE(lock); ACC_OPENCL_CHECK( clSetKernelArg(config->kernel, 0, sizeof(int), &offset), "set offset argument of transpose kernel", result); - ACC_OPENCL_CHECK( - clSetKernelArg(config->kernel, 1, sizeof(cl_mem), &dev_trs_stack), "set batch-list argument of transpose kernel", result); - ACC_OPENCL_CHECK( - clSetKernelArg(config->kernel, 2, sizeof(cl_mem), &dev_data), "set matrix-data argument of transpose kernel", result); - ACC_OPENCL_CHECK(clEnqueueNDRangeKernel(queue, config->kernel, 1 /*work_dim*/, NULL /*offset*/, &work_size, &config->wgsize, - 0, NULL, perf_event), + ACC_OPENCL_CHECK(c_dbcsr_acc_opencl_set_kernel_ptr(config->kernel, 1, info_stack.memory), + "set batch-list argument of transpose kernel", result); + ACC_OPENCL_CHECK(c_dbcsr_acc_opencl_set_kernel_ptr(config->kernel, 2, info_mdata.memory), + "set matrix-data argument of transpose kernel", result); + ACC_OPENCL_CHECK(clEnqueueNDRangeKernel(str->queue, config->kernel, 1 /*work_dim*/, NULL /*offset*/, &work_size, + &config->wgsize, 0, NULL, perf_event), "launch transpose kernel", result); /* eventually update performance counters inside of locked region */ -# if !defined(OPENCL_LIBSMM_VALIDATE_TRANS) +# if !defined(OPENCL_LIBSMM_VALIDATE_TRANS) if (3 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { if (NULL != perf_event) { cl_ulong begin = 0, end = 0; @@ -961,33 +848,31 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v duration = 1E-9 * LIBXSMM_DELTA(begin, end); /* Nanoseconds->seconds */ } else { - clFinish(queue); + clFinish(str->queue); duration = libxsmm_timer_duration(start, libxsmm_timer_tick()); /* seconds */ } if (EXIT_SUCCESS == result) { const double membw = (1ULL * stack_size * (typesize * m * n)) / (duration * (1ULL << 30)); - const int* const priority = c_dbcsr_acc_opencl_stream_priority(stream); LIBXSMM_STDIO_ACQUIRE(); fprintf(stderr, "INFO ACC/LIBSMM: TRANS-kernel "); opencl_libsmm_write_trans_params( stderr, 1 /*only_key*/, &key, NULL /*config*/, NULL /*delim*/, NULL /*begin*/, NULL /*close*/); fprintf(stderr, "="); opencl_libsmm_write_trans_params(stderr, 1 /*only_key*/, &key, config, NULL /*delim*/, NULL /*begin*/, NULL /*close*/); - fprintf(stderr, " prio=%i ss=%i cur=%.1f GB/s dur=%.2g ms\n", NULL != priority ? *priority : -1, stack_size, membw, - 1E3 * duration); + fprintf(stderr, " prio=%i ss=%i cur=%.1f GB/s dur=%.2g ms\n", str->priority, stack_size, membw, 1E3 * duration); LIBXSMM_STDIO_RELEASE(); } } -# endif - LIBXSMM_ATOMIC_RELEASE(lock, LIBXSMM_ATOMIC_RELAXED); +# endif + ACC_OPENCL_ATOMIC_RELEASE(lock); } -# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) +# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) ACC_OPENCL_CHECK(c_dbcsr_acc_memcpy_d2h(dev_data, omat, data_size, stream), "transfer validation test", result); -# endif -# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) +# endif +# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) ACC_OPENCL_CHECK(c_dbcsr_acc_stream_sync(stream), "sync stream", result); -# endif -# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) +# endif +# if defined(OPENCL_LIBSMM_VALIDATE_TRANS) if (EXIT_SUCCESS == result) { int i, j; LIBXSMM_STDIO_ACQUIRE(); @@ -1015,30 +900,30 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v } fprintf(stderr, " => ERROR\n"); if (3 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { - fprintf(stderr, "stackposition = %i (index=%llu)\n", i, index); + fprintf(stderr, "stackposition = %i (index=%llu)\n", i, (unsigned long long)index); opencl_libsmm_print_matrix(stderr, "orig = ", datatype, orig, m, n); opencl_libsmm_print_matrix(stderr, "gold = ", datatype, gold, n, m); opencl_libsmm_print_matrix(stderr, "test = ", datatype, test, n, m); fprintf(stderr, "\n"); } -# if defined(OPENCL_LIBSMM_VALIDATE_EXIT) +# if defined(OPENCL_LIBSMM_VALIDATE_EXIT) exit(EXIT_FAILURE); -# else +# else result = EXIT_FAILURE; break; -# endif +# endif } for (j = offset; j < i; ++j) { const size_t duplicate = stack[j]; if (index == duplicate) { fprintf(stderr, " => ERROR\n"); -# if defined(OPENCL_LIBSMM_VALIDATE_EXIT) +# if defined(OPENCL_LIBSMM_VALIDATE_EXIT) exit(EXIT_FAILURE); -# else +# else i = offset_stack_size; result = EXIT_FAILURE; break; -# endif +# endif } } } @@ -1048,10 +933,9 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v LIBXSMM_STDIO_RELEASE(); } libxsmm_free(scratch); -# endif +# endif } } -# endif ACC_OPENCL_RETURN(result); } @@ -1059,7 +943,6 @@ int libsmm_acc_transpose(const int* dev_trs_stack, int offset, int stack_size, v c_dbcsr_acc_bool_t libsmm_acc_process_suitable( c_dbcsr_acc_bool_t def_mnk, libsmm_acc_data_t datatype, int stack_size, int m_max, int n_max, int k_max, int max_kernel_dim) { c_dbcsr_acc_bool_t result = 0; /* false */ - double hst = 0, acc = 0; if (0 < m_max && 0 < n_max && 0 < k_max && 0 < stack_size && 0 != def_mnk /*homogeneous*/ /* allow k_max to exceed max_kernel_dim, TODO: BLAS for large kernels (m,n) */ @@ -1068,16 +951,12 @@ c_dbcsr_acc_bool_t libsmm_acc_process_suitable( switch (datatype) { # if defined(OPENCL_LIBSMM_F64) case dbcsr_type_real_8: { - hst = opencl_libsmm_dhst; - acc = opencl_libsmm_dacc; - if (0 >= hst || 0 >= acc || hst < acc) result = 1; /* true */ + result = 1; /* true */ } break; # endif # if defined(OPENCL_LIBSMM_F32) case dbcsr_type_real_4: { - hst = opencl_libsmm_shst; - acc = opencl_libsmm_sacc; - if (0 >= hst || 0 >= acc || hst < acc) result = 1; /* true */ + result = 1; /* true */ } break; # endif default: assert(/*false*/ 0 == result); @@ -1098,13 +977,7 @@ c_dbcsr_acc_bool_t libsmm_acc_process_suitable( opencl_libsmm_write_smm_params(stderr, 1 /*only_key*/, &key, &dummy, NULL /*delim*/, NULL /*begin*/, NULL /*close*/); fprintf(stderr, " ss=%i", stack_size); if (m_max <= max_kernel_dim && n_max <= max_kernel_dim) { - if (0 < hst && 0 < acc) { - const double ai = OPENCL_LIBSMM_AI(m_max, n_max, k_max, OPENCL_LIBSMM_TYPESIZE(datatype)); - fprintf(stderr, " hst=%.1f acc=%.1f GFLOPS/s is not suitable\n", ai * hst, ai * acc); - } - else { - fprintf(stderr, 0 != def_mnk ? " is ignored\n" : " is inhomogeneous\n"); - } + fprintf(stderr, 0 != def_mnk ? " is ignored\n" : " is inhomogeneous\n"); } else fprintf(stderr, " is too large\n"); LIBXSMM_STDIO_RELEASE(); @@ -1118,43 +991,43 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, c_dbcsr_acc_bool_t def_mnk, void* stream, void* c_stream) { int result = EXIT_SUCCESS; const int nparams = 3; -# if !defined(OPENCL_KERNELS_SOURCE_MULTIPLY) - result = EXIT_FAILURE; -# else LIBXSMM_UNUSED(c_stream); /* TODO */ assert(0 == stack_size || (NULL != dev_a_data && NULL != dev_b_data && NULL != dev_c_data)); assert(0 == stack_size || (NULL != host_param_stack && NULL != dev_param_stack)); assert(0 < nparams && 0 < max_kernel_dim && NULL != stream); assert(0 <= stack_size && 0 <= m_max && 0 <= n_max && 0 <= k_max); if (0 != libsmm_acc_process_suitable(def_mnk, datatype, stack_size, m_max, n_max, k_max, max_kernel_dim)) { + c_dbcsr_acc_opencl_info_memptr_t info_stack, info_adata, info_bdata, info_cdata; opencl_libsmm_smmkey_t key; -# if !defined(OPENCL_LIBSMM_VALIDATE_SMM) +# if !defined(OPENCL_LIBSMM_VALIDATE_SMM) double duration; const libxsmm_timer_tickint start = libxsmm_timer_tick(); -# endif - const c_dbcsr_acc_opencl_info_stream_t* const qinfo = c_dbcsr_acc_opencl_info_stream(stream); - const c_dbcsr_acc_opencl_device_t* const devinfo = c_dbcsr_acc_opencl_config.device + qinfo->tid; - const cl_command_queue queue = *ACC_OPENCL_STREAM(stream); +# endif + const c_dbcsr_acc_opencl_stream_t* const str = ACC_OPENCL_STREAM(stream); LIBXSMM_MEMZERO127(&key); /* potentially heterogeneous key-data */ key.devuid = ((1 != c_dbcsr_acc_opencl_config.devmatch && ((unsigned int)-1) != c_dbcsr_acc_opencl_config.devmatch) ? c_dbcsr_acc_opencl_config.devmatch - : devinfo->uid); + : c_dbcsr_acc_opencl_config.device.uid); key.type = datatype; key.m = m_max; key.n = n_max; key.k = k_max; - if (CL_SUCCESS == result) { - static volatile int locks[OPENCL_LIBSMM_NLOCKS_SMM]; /* OpenCL is thread-safe except for clSetKernelArg */ + result |= c_dbcsr_acc_opencl_info_devptr(&info_stack, dev_param_stack, sizeof(int), NULL /*amount*/, NULL /*offset*/); + result |= c_dbcsr_acc_opencl_info_devptr(&info_adata, dev_a_data, 1 /*elsize*/, NULL /*amount*/, NULL /*offset*/); + result |= c_dbcsr_acc_opencl_info_devptr(&info_bdata, dev_b_data, 1 /*elsize*/, NULL /*amount*/, NULL /*offset*/); + result |= c_dbcsr_acc_opencl_info_devptr(&info_cdata, dev_c_data, 1 /*elsize*/, NULL /*amount*/, NULL /*offset*/); + if (EXIT_SUCCESS == result) { + static ACC_OPENCL_ATOMIC_LOCKTYPE locks[OPENCL_LIBSMM_NLOCKS_SMM]; const char *const env_s = getenv("OPENCL_LIBSMM_SMM_S"), *const env_bs = getenv("OPENCL_LIBSMM_SMM_BS"); const int s = ((NULL == env_s || '\0' == *env_s) ? OPENCL_LIBSMM_SMM_S : atoi(env_s)); int kernel_idx = 0, bs = ((NULL == env_bs || '\0' == *env_bs) ? 0 : atoi(env_bs)); opencl_libsmm_smm_t* config; - volatile int* lock = locks; -# if (1 < OPENCL_LIBSMM_NLOCKS_SMM) + ACC_OPENCL_ATOMIC_LOCKTYPE* lock = locks; +# if (1 < OPENCL_LIBSMM_NLOCKS_SMM) assert(!(OPENCL_LIBSMM_NLOCKS_SMM & (OPENCL_LIBSMM_NLOCKS_SMM - 1))); /* POT */ lock += LIBXSMM_MOD2(libxsmm_hash(&key, sizeof(key), 25071975 /*seed*/), OPENCL_LIBSMM_NLOCKS_SMM); -# endif - LIBXSMM_ATOMIC_ACQUIRE(lock, LIBXSMM_SYNC_NPAUSE, LIBXSMM_ATOMIC_RELAXED); +# endif + ACC_OPENCL_ATOMIC_ACQUIRE(lock); /* calling clSetKernelArg/clEnqueueNDRangeKernel must be consistent */ config = (opencl_libsmm_smm_t*)libxsmm_xdispatch(&key, sizeof(key)); if (0 >= bs) bs = ((NULL != config && 0 < config->bs) ? config->bs : OPENCL_LIBSMM_DEFAULT_BS); /* determine kernel-kind (mini-batch vs. mini-kernel) */ @@ -1165,12 +1038,12 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, /* kernel name are meant to be unambiguous (BLAS-typeprefix and kernelsize) */ "x" OPENCL_LIBSMM_KERNELNAME_SMM "%ix%ix%i", m_max, n_max, k_max); cl_device_id active_device = NULL; -# if defined(__DBCSR_ACC) +# if defined(__DBCSR_ACC) int routine_handle; c_dbcsr_timeset(LIBSMM_ACC_PROCESS_ROUTINE_NAME_STRPTR, LIBSMM_ACC_PROCESS_ROUTINE_NAME_LENPTR, &routine_handle); -# endif +# endif result = ((0 < nchar && (int)sizeof(fname) > nchar) - ? clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &active_device, NULL) + ? clGetCommandQueueInfo(str->queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &active_device, NULL) : EXIT_FAILURE); if (EXIT_SUCCESS == result) { c_dbcsr_acc_opencl_atomic_fp_t tkind = c_dbcsr_acc_opencl_atomic_fp_no; @@ -1190,7 +1063,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, } if (NULL != tname) { const char *extensions[] = {NULL, NULL}, *const env_devid = getenv("OPENCL_LIBSMM_SMM_DEVID"); - const unsigned int devuid = (NULL == env_devid || '\0' == *env_devid) ? devinfo->uid + const unsigned int devuid = (NULL == env_devid || '\0' == *env_devid) ? c_dbcsr_acc_opencl_config.device.uid : (unsigned int)strtoul(env_devid, NULL, 0); size_t wgsize_max, wgsize_prf, sgs = 0; opencl_libsmm_smm_t new_config; @@ -1212,7 +1085,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, const char *const env_ab = getenv("OPENCL_LIBSMM_SMM_AB"), *const env_ac = getenv("OPENCL_LIBSMM_SMM_AC"); const char *const env_xf = getenv("OPENCL_LIBSMM_SMM_XF"), *const env_cl = getenv("OPENCL_LIBSMM_SMM_BUILDOPTS"); const char* const intel_xf = "-cl-intel-256-GRF-per-thread"; - const int default_lu = (0 != devinfo->intel ? -1 : 0); + const int default_lu = (0 != c_dbcsr_acc_opencl_config.device.intel ? -1 : 0); const int unroll = LIBXSMM_MAX(-2, (NULL == env_lu || '\0' == *env_lu) ? (0 == kernel_idx ? (NULL == config ? default_lu : config->lu) : default_lu) : atoi(env_lu)); /* populate only lower bound */ @@ -1254,7 +1127,9 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, 0, 1); new_config.al = LIBXSMM_CLMP( (NULL == env_al || '\0' == *env_al) - ? (0 == devinfo->amd ? (0 == kernel_idx ? (NULL == config ? /*default*/ 0 : config->al) : /*default*/ 0) : 1) + ? (0 == c_dbcsr_acc_opencl_config.device.amd + ? (0 == kernel_idx ? (NULL == config ? /*default*/ 0 : config->al) : /*default*/ 0) + : 1) : atoi(env_al), 0, 1); new_config.tb = LIBXSMM_CLMP((NULL == env_tb || '\0' == *env_tb) @@ -1285,8 +1160,8 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, : atoi(env_ac), 0, 1); if (NULL == env_xf || '\0' == *env_xf) { - if (0 == devinfo->intel || CL_DEVICE_TYPE_GPU != devinfo->type || NULL == env_cl || - NULL == strstr(env_cl, intel_xf)) + if (0 == c_dbcsr_acc_opencl_config.device.intel || CL_DEVICE_TYPE_GPU != c_dbcsr_acc_opencl_config.device.type || + NULL == env_cl || NULL == strstr(env_cl, intel_xf)) { new_config.flags = (NULL == config ? /*default*/ 0 : config->flags); } @@ -1298,7 +1173,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, nbm = (m_max + new_config.bm - 1) / new_config.bm; nbn = (n_max + new_config.bn - 1) / new_config.bn; new_config.wgsize[kernel_idx] = LIBXSMM_MAX(nbm * nbn, new_config.ws); -# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER +# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER if (0 != new_config.wg) { const unsigned int limit = (unsigned int)LIBXSMM_MAX(wgsize_prf, OPENCL_LIBSMM_VLEN); unsigned int r = libxsmm_remainder( @@ -1334,7 +1209,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, else wgsize_prf = r; } else -# endif +# endif { wgsize_prf = new_config.wgsize[kernel_idx]; } @@ -1376,12 +1251,12 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, const int slm_c = (1 != new_config.ac ? 0 : (LIBXSMM_ISPOT(m_max * typesize) + 1)); /* compose build parameters and flags */ nchar = LIBXSMM_SNPRINTF(build_params, sizeof(build_params), - "-DT=%s -DINTEL=%u -DGLOBAL=%s -DSWG=%i -DSGS=%i -DFN=%s -DREPEAT=%i -DLU=%i " + "-DT=%s -DGPU=%u -DGLOBAL=%s -DSWG=%i -DSGS=%i -DFN=%s -DREPEAT=%i -DLU=%i " "-DSM=%i -DSN=%i -DSK=%i -DBS=%i -DVL=%i %s -DBM=%i -DBN=%i -DBK=%i " "%s %s %s %s %s %s %s %s ", /* space! */ - tname, 0 != devinfo->intel ? devinfo->uid : 0, cmem, (int)new_config.wgsize[kernel_idx], (int)sgs, fname, - NULL == env_nrepeat ? 1 : atoi(env_nrepeat), new_config.lu, m_max, n_max, k_max, bs, OPENCL_LIBSMM_VMIN, - bs == new_config.bs ? "-DBSC" : "", new_config.bm, new_config.bn, new_config.bk, + tname, CL_DEVICE_TYPE_GPU == c_dbcsr_acc_opencl_config.device.type, cmem, (int)new_config.wgsize[kernel_idx], + (int)sgs, fname, NULL == env_nrepeat ? 1 : atoi(env_nrepeat), new_config.lu, m_max, n_max, k_max, bs, + OPENCL_LIBSMM_VMIN, bs == new_config.bs ? "-DBSC" : "", new_config.bm, new_config.bn, new_config.bk, 0 == new_config.tb ? "" : "-DTRACK_B", 0 != new_config.tc ? "-DTRACK_C" : "", 0 == new_config.nz ? "" : "-DATOMIC_INC_NZ", 0 == new_config.al ? "" : "-DAL", 0 == new_config.ap ? "" : "-DSLM_P", @@ -1390,18 +1265,22 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, 0 == new_config.ac ? "" : (1 == slm_c ? "-DSLM_C=1" : "-DSLM_C=2")); /* apply support for FP-atomics */ if (0 < nchar && (int)sizeof(build_params) > nchar) { - nchar = c_dbcsr_acc_opencl_flags_atomics(active_device, tkind, devinfo, extensions, + nchar = c_dbcsr_acc_opencl_flags_atomics(&c_dbcsr_acc_opencl_config.device, tkind, extensions, sizeof(extensions) / sizeof(*extensions), build_params + nchar, sizeof(build_params) - nchar); } else result = EXIT_FAILURE; if (0 < nchar && (int)sizeof(build_params) > nchar) { - const char* const cl_debug = ( -# if !defined(NDBGDEV) - (0 != devinfo->intel && CL_DEVICE_TYPE_CPU != devinfo->type) ? "-gline-tables-only" : -# endif - ""); - nchar = LIBXSMM_SNPRINTF(buffer, sizeof(buffer), "%s %s -cl-fast-relaxed-math -cl-denorms-are-zero %s", - (0 == new_config.flags || 0 == devinfo->intel || CL_DEVICE_TYPE_GPU != devinfo->type) ? "" : intel_xf, cl_debug, + const char* const cl_debug = ((0 != c_dbcsr_acc_opencl_config.debug && + 0 != c_dbcsr_acc_opencl_config.device.intel && + CL_DEVICE_TYPE_CPU != c_dbcsr_acc_opencl_config.device.type) + ? "-gline-tables-only" + : ""); + nchar = LIBXSMM_SNPRINTF(buffer, sizeof(buffer), "%s %s %s %s", + (0 == new_config.flags || 0 == c_dbcsr_acc_opencl_config.device.intel || + CL_DEVICE_TYPE_GPU != c_dbcsr_acc_opencl_config.device.type) + ? "" + : intel_xf, + cl_debug, 0 == c_dbcsr_acc_opencl_config.debug ? "-cl-fast-relaxed-math -cl-denorms-are-zero" : "", NULL == env_cl ? "" : env_cl); if (0 >= nchar || (int)sizeof(buffer) <= nchar) result = EXIT_FAILURE; } @@ -1427,7 +1306,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, config = (opencl_libsmm_smm_t*)libxsmm_xregister(&key, sizeof(key), sizeof(new_config), &new_config); } if (NULL != config) { -# if !defined(OPENCL_LIBSMM_VALIDATE_SMM) +# if !defined(OPENCL_LIBSMM_VALIDATE_SMM) if (2 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { LIBXSMM_STDIO_ACQUIRE(); duration = libxsmm_timer_duration(start, libxsmm_timer_tick()); @@ -1440,7 +1319,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, fprintf(stderr, " gen=%.1f ms\n", 1E3 * duration); LIBXSMM_STDIO_RELEASE(); } -# endif +# endif } /* failed to register config */ else result = EXIT_FAILURE; @@ -1454,7 +1333,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, } } } -# if defined(NDEBUG) +# if defined(NDEBUG) else if (2 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { LIBXSMM_STDIO_ACQUIRE(); fprintf(stderr, "WARNING: SMM-kernel "); @@ -1466,7 +1345,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, fprintf(stderr, " failed to compile!\n"); LIBXSMM_STDIO_RELEASE(); } -# endif +# endif } } /* insufficient device capabilities */ @@ -1476,9 +1355,9 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, if (EXIT_SUCCESS != result && NULL != config) { libxsmm_xrelease(&key, sizeof(key)); } -# if defined(__DBCSR_ACC) +# if defined(__DBCSR_ACC) c_dbcsr_timestop(&routine_handle); -# endif +# endif } assert(EXIT_SUCCESS != result || (NULL != config && NULL != config->kernel[kernel_idx])); assert(EXIT_SUCCESS != result || (1 <= config->bm && config->bm <= m_max)); @@ -1504,7 +1383,7 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, ? NULL : &event); size_t work_size; -# if defined(OPENCL_LIBSMM_VALIDATE_SMM) +# if defined(OPENCL_LIBSMM_VALIDATE_SMM) /* validate result (implies readback from device and performance penalty) */ int* pinp = NULL; char *ainp = NULL, *binp = NULL, *test = NULL, *gold = NULL, *btrn = NULL; @@ -1515,10 +1394,10 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, libxsmm_xmmfunction kernel_cpu = {NULL}; size_t psize, asize, bsize, csize; void* scratch = NULL; - if (CL_SUCCESS == clGetMemObjectInfo((cl_mem)dev_param_stack, CL_MEM_SIZE, sizeof(size_t), &psize, NULL) && - CL_SUCCESS == clGetMemObjectInfo((cl_mem)dev_a_data, CL_MEM_SIZE, sizeof(size_t), &asize, NULL) && - CL_SUCCESS == clGetMemObjectInfo((cl_mem)dev_b_data, CL_MEM_SIZE, sizeof(size_t), &bsize, NULL) && - CL_SUCCESS == clGetMemObjectInfo((cl_mem)dev_c_data, CL_MEM_SIZE, sizeof(size_t), &csize, NULL)) + if (EXIT_SUCCESS == clGetMemObjectInfo(info_stack.memory, CL_MEM_SIZE, sizeof(size_t), &psize, NULL) && + EXIT_SUCCESS == clGetMemObjectInfo(info_adata.memory, CL_MEM_SIZE, sizeof(size_t), &asize, NULL) && + EXIT_SUCCESS == clGetMemObjectInfo(info_bdata.memory, CL_MEM_SIZE, sizeof(size_t), &bsize, NULL) && + EXIT_SUCCESS == clGetMemObjectInfo(info_cdata.memory, CL_MEM_SIZE, sizeof(size_t), &csize, NULL)) { libxsmm_descriptor_blob blob; libxsmm_gemm_descriptor* const desc = OPENCL_LIBSMM_DESCINIT( @@ -1544,27 +1423,27 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, else result = EXIT_FAILURE; } else result = EXIT_FAILURE; -# endif +# endif /* scale intra-kernel batchsize according to stacksize */ if (0 == kernel_idx && 1 < config->bs && stack_size < config->s) { -# if defined(OPENCL_LIBSMM_BS_MIN) +# if defined(OPENCL_LIBSMM_BS_MIN) const int config_bs = LIBXSMM_MAX(config->bs, OPENCL_LIBSMM_BS_MIN); -# else +# else const int config_bs = config->bs; -# endif +# endif bs = (stack_size * config_bs + config->s - 1) / (config->s - 1); if (config->bs < bs) bs = config->bs; } /* adjust launchsize according to intra-kernel batchsize */ work_size = ((stack_size + bs - 1) / bs) * config->wgsize[kernel_idx]; - /* calling clSetKernelArg must be consistent across host-threads */ - ACC_OPENCL_CHECK(clSetKernelArg(config->kernel[kernel_idx], 0, sizeof(cl_mem), &dev_c_data), + /* calling clSetKernelArg/clEnqueueNDRangeKernel must be consistent */ + ACC_OPENCL_CHECK(c_dbcsr_acc_opencl_set_kernel_ptr(config->kernel[kernel_idx], 0, info_cdata.memory), "set C-matrix argument of SMM-kernel", result); - ACC_OPENCL_CHECK(clSetKernelArg(config->kernel[kernel_idx], 1, sizeof(cl_mem), &dev_a_data), + ACC_OPENCL_CHECK(c_dbcsr_acc_opencl_set_kernel_ptr(config->kernel[kernel_idx], 1, info_adata.memory), "set A-matrix argument of SMM-kernel", result); - ACC_OPENCL_CHECK(clSetKernelArg(config->kernel[kernel_idx], 2, sizeof(cl_mem), &dev_b_data), + ACC_OPENCL_CHECK(c_dbcsr_acc_opencl_set_kernel_ptr(config->kernel[kernel_idx], 2, info_bdata.memory), "set B-matrix argument of SMM-kernel", result); - ACC_OPENCL_CHECK(clSetKernelArg(config->kernel[kernel_idx], 3, sizeof(cl_mem), &dev_param_stack), + ACC_OPENCL_CHECK(c_dbcsr_acc_opencl_set_kernel_ptr(config->kernel[kernel_idx], 3, info_stack.memory), "set batch-list argument of SMM-kernel", result); if (0 == kernel_idx) { assert(bs <= config->bs); @@ -1573,11 +1452,11 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, ACC_OPENCL_CHECK( clSetKernelArg(config->kernel[kernel_idx], 5, sizeof(int), &bs), "set minibatch argument of SMM-kernel", result); } - ACC_OPENCL_CHECK(clEnqueueNDRangeKernel(queue, config->kernel[kernel_idx], 1 /*work_dim*/, NULL /*offset*/, &work_size, + ACC_OPENCL_CHECK(clEnqueueNDRangeKernel(str->queue, config->kernel[kernel_idx], 1 /*work_dim*/, NULL /*offset*/, &work_size, config->wgsize + kernel_idx, 0, NULL, perf_event), "launch SMM-kernel", result); /* eventually update performance counters inside of locked region */ -# if !defined(OPENCL_LIBSMM_VALIDATE_SMM) +# if !defined(OPENCL_LIBSMM_VALIDATE_SMM) if (3 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { if (NULL != perf_event) { cl_ulong begin = 0, end = 0; @@ -1589,29 +1468,23 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, duration = 1E-9 * LIBXSMM_DELTA(begin, end); /* Nanoseconds->seconds */ } else { - clFinish(queue); + clFinish(str->queue); duration = libxsmm_timer_duration(start, libxsmm_timer_tick()); /* seconds */ } if (EXIT_SUCCESS == result) { const double gflops = 1E-9 * (2ULL * m_max * n_max * k_max * stack_size) / duration; - const double est = (dbcsr_type_real_8 == datatype - ? (OPENCL_LIBSMM_AI(m_max, n_max, k_max, sizeof(double)) * opencl_libsmm_dacc) - : (OPENCL_LIBSMM_AI(m_max, n_max, k_max, sizeof(float)) * opencl_libsmm_sacc)); - const int* const priority = c_dbcsr_acc_opencl_stream_priority(stream); LIBXSMM_STDIO_ACQUIRE(); fprintf(stderr, "INFO ACC/LIBSMM: SMM-kernel "); opencl_libsmm_write_smm_params( stderr, 1 /*only_key*/, &key, NULL /*config*/, NULL /*delim*/, NULL /*begin*/, NULL /*close*/); fprintf(stderr, "="); opencl_libsmm_write_smm_params(stderr, 1 /*only_key*/, &key, config, NULL /*delim*/, NULL /*begin*/, NULL /*close*/); - fprintf(stderr, " prio=%i ss=%i cur=%.1f", NULL != priority ? *priority : -1, stack_size, gflops); - if (0 < est) fprintf(stderr, " est=%.1f", est); - fprintf(stderr, " GFLOPS/s dur=%.2g ms\n", 1E3 * duration); + fprintf(stderr, " prio=%i ss=%i cur=%.1f GFLOPS/s dur=%.2g ms\n", str->priority, stack_size, gflops, 1E3 * duration); LIBXSMM_STDIO_RELEASE(); } } -# endif -# if defined(OPENCL_LIBSMM_VALIDATE_SMM) +# endif +# if defined(OPENCL_LIBSMM_VALIDATE_SMM) ACC_OPENCL_CHECK(c_dbcsr_acc_memcpy_d2h(dev_c_data, test, csize, stream), "transfer validation test", result); ACC_OPENCL_CHECK(c_dbcsr_acc_stream_sync(stream), "sync stream", result); if (EXIT_SUCCESS == result) { @@ -1640,34 +1513,34 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, libxsmm_matdiff_info diff; libxsmm_matdiff( &diff, (libxsmm_datatype)precision, m_max, n_max, gold + ic, test + ic, &m_max /*ldref*/, &m_max /*ldtst*/); -# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER +# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER epsilon = libxsmm_matdiff_epsilon(&diff); -# else +# else epsilon = diff.normf_rel; -# endif +# endif if (tolerance < epsilon) { if (0 == c_dbcsr_acc_opencl_config.verbosity) { fprintf(stderr, "libsmm_acc_process(size=%i, type=%s, m=%i, n=%i, k=%i, max=%i, stream=%p)", stack_size, dbcsr_type_real_8 == datatype ? "f64" : (dbcsr_type_real_4 == datatype ? "f32" : "unknown"), m_max, n_max, k_max, max_kernel_dim, stream); } -# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER +# if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER fprintf(stderr, " => ERROR diff=%g (%g != %g)\n", diff.linf_abs, diff.v_ref, diff.v_tst); -# else +# else fprintf(stderr, " => ERROR diff=%g\n", diff.linf_abs); -# endif +# endif if (3 <= c_dbcsr_acc_opencl_config.verbosity || 0 > c_dbcsr_acc_opencl_config.verbosity) { fprintf(stderr, "stackposition = %llu (index=%llu)\n", (unsigned long long)i, (unsigned long long)ic); opencl_libsmm_print_matrix(stderr, "gold = ", datatype, gold + ic, m_max, n_max); opencl_libsmm_print_matrix(stderr, "test = ", datatype, test + ic, m_max, n_max); fprintf(stderr, "\n"); } -# if defined(OPENCL_LIBSMM_VALIDATE_EXIT) +# if defined(OPENCL_LIBSMM_VALIDATE_EXIT) exit(EXIT_FAILURE); -# else +# else result = EXIT_FAILURE; break; -# endif +# endif } } if (0 != c_dbcsr_acc_opencl_config.verbosity && EXIT_SUCCESS == result) { @@ -1676,18 +1549,19 @@ int libsmm_acc_process(const int* host_param_stack, const int* dev_param_stack, LIBXSMM_STDIO_RELEASE(); } libxsmm_free(scratch); -# elif defined(NDEBUG) - LIBXSMM_UNUSED(host_param_stack); +# elif defined(NDEBUG) LIBXSMM_UNUSED(nparams); -# endif +# endif +# if defined(NDEBUG) + LIBXSMM_UNUSED(host_param_stack); +# endif } - LIBXSMM_ATOMIC_RELEASE(lock, LIBXSMM_ATOMIC_RELAXED); + ACC_OPENCL_ATOMIC_RELEASE(lock); } } else if (0 < stack_size) { /* inhomogeneous, large kernel, or unsupported datatype */ return -1; /* TODO: document result code to trigger host-fallback */ } -# endif ACC_OPENCL_RETURN(result); } diff --git a/src/acc/opencl/smm/opencl_libsmm.h b/src/acc/opencl/smm/opencl_libsmm.h index 36e11e0f947..8a354ca78ec 100644 --- a/src/acc/opencl/smm/opencl_libsmm.h +++ b/src/acc/opencl/smm/opencl_libsmm.h @@ -12,14 +12,10 @@ #include "../../acc_libsmm.h" #include "../acc_opencl.h" -/* Inplace-transpose by default (similar environment variable exists for runtime) */ +/* Inplace-transpose by default (corresponding environment variable exists also) */ #if !defined(OPENCL_LIBSMM_TRANS_INPLACE) && 0 # define OPENCL_LIBSMM_TRANS_INPLACE #endif -/* Suitability check by default (similar environment variable exists for runtime) */ -#if !defined(OPENCL_LIBSMM_SUITABLE) && 0 -# define OPENCL_LIBSMM_SUITABLE -#endif /* Validate kernels (1: OPENCL_LIBSMM_VALIDATE_SMM, 2: OPENCL_LIBSMM_VALIDATE_TRANS) */ #if !defined(OPENCL_LIBSMM_VALIDATE) && 0 # define OPENCL_LIBSMM_VALIDATE 1 diff --git a/src/acc/opencl/smm/params/tune_multiply_A100-40GB.csv b/src/acc/opencl/smm/params/tune_multiply_A100-40GB.csv deleted file mode 100644 index 026356ccc31..00000000000 --- a/src/acc/opencl/smm/params/tune_multiply_A100-40GB.csv +++ /dev/null @@ -1,215 +0,0 @@ -DEVICE;TYPEID;M;N;K;S;GFLOPS;BS;BM;BN;BK;WS;WG;LU;NZ;AL;TB;TC;AP;AA;AB;AC -NVIDIA A100-PCIE-40GB [0xa01f];3;2;2;2;30000;0;9;2;1;2;0;1;0;0;0;0;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;3;3;3;30000;0;9;1;1;2;0;0;1;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;4;30000;0;10;1;1;1;0;-1;-2;1;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;5;30000;0;10;1;1;1;0;-1;1;0;0;1;1;0;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;7;30000;0;10;4;1;2;0;1;-1;0;0;1;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;9;30000;0;6;1;2;3;0;0;-2;1;0;1;1;0;2;1;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;10;30000;0;6;1;1;1;0;1;0;1;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;13;30000;0;10;1;1;2;0;-1;0;1;0;1;1;0;2;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;15;30000;0;22;1;1;3;0;-2;1;1;0;0;0;1;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;17;30000;0;5;4;1;4;0;1;-1;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;25;30000;0;14;1;1;2;0;0;1;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;26;30000;0;4;1;1;2;0;0;-1;1;0;1;1;0;0;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;28;30000;0;20;1;1;3;0;0;0;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;4;32;30000;0;18;1;1;3;0;-1;1;0;0;0;0;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;4;30000;0;10;1;1;3;0;-1;-2;0;0;0;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;5;30000;0;9;1;1;3;0;1;-1;1;0;1;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;7;30000;0;12;1;1;4;0;1;-1;1;0;1;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;9;30000;0;6;1;3;4;0;1;1;1;0;1;1;0;2;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;13;30000;0;21;1;1;3;0;-1;-2;1;0;1;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;17;30000;0;5;4;1;2;0;0;-1;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;25;30000;0;6;1;1;3;0;0;-1;0;0;0;0;0;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;5;32;30000;0;5;4;1;4;0;1;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;7;4;30000;0;10;1;1;3;0;2;0;1;0;1;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;7;5;30000;0;9;1;1;1;0;1;-2;1;0;1;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;7;7;30000;0;10;1;1;1;0;-1;-1;0;0;1;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;7;9;30000;0;17;1;1;2;0;0;1;0;0;1;0;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;7;13;30000;0;16;2;1;4;0;-2;-1;1;0;1;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;9;4;30000;0;11;1;2;4;0;1;-2;0;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;9;5;30000;0;19;2;1;1;0;-1;-1;1;0;0;1;1;2;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;9;7;30000;0;14;4;1;4;0;0;-1;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;9;9;30000;0;13;1;1;4;0;1;-2;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;9;13;30000;0;9;3;1;4;0;-1;0;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;10;4;30000;0;15;3;1;2;0;1;1;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;10;10;30000;0;15;4;1;2;0;1;0;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;13;4;30000;0;19;4;1;2;0;-2;-2;0;0;0;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;13;5;30000;0;17;2;1;1;0;0;-2;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;13;7;30000;0;14;2;1;1;0;2;0;0;0;0;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;13;9;30000;0;7;2;1;3;0;-2;-2;1;0;1;1;1;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;13;13;30000;0;10;4;1;2;0;-1;-1;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;13;17;30000;0;14;4;1;2;0;0;1;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;13;32;30000;0;7;4;1;4;0;0;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;15;4;30000;0;20;2;1;1;0;0;-2;0;0;1;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;17;4;30000;0;18;4;1;3;0;0;0;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;17;5;30000;0;14;4;1;2;0;-1;0;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;17;13;30000;0;13;4;1;3;0;0;0;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;17;17;30000;0;10;4;1;3;0;-1;-1;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;17;32;30000;0;7;4;1;4;0;-2;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;25;4;30000;0;23;4;1;1;0;0;0;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;25;5;30000;0;21;4;1;2;0;0;0;0;0;0;1;0;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;26;4;30000;0;22;4;1;1;0;0;0;1;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;28;4;30000;0;20;4;1;1;0;-1;0;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;32;4;30000;0;21;4;1;3;0;0;0;0;0;0;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;32;5;30000;0;14;4;1;2;0;-1;-1;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;32;13;30000;0;11;4;1;2;0;1;-2;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;32;17;30000;0;12;4;1;3;0;0;-2;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;4;32;32;30000;0;8;4;1;4;0;0;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;4;30000;0;11;1;1;3;0;0;-2;1;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;5;30000;0;9;1;1;2;0;-1;0;0;0;0;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;7;30000;0;12;1;1;1;0;1;-1;1;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;9;30000;0;12;1;1;4;0;-1;-2;0;0;0;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;13;30000;0;12;1;1;5;0;1;-2;0;0;1;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;17;30000;0;5;5;1;5;0;-2;1;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;25;30000;0;27;1;1;4;0;1;-2;0;0;0;0;0;2;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;4;32;30000;0;3;5;1;5;0;-2;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;5;4;30000;0;11;1;1;5;0;1;-1;0;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;5;5;30000;0;10;1;1;3;0;-2;1;0;0;0;1;0;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;5;7;30000;0;9;1;1;5;0;1;-1;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;5;9;30000;0;25;1;1;4;0;1;-2;0;0;1;1;0;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;5;13;30000;0;10;2;1;4;0;1;-1;0;0;1;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;5;17;30000;0;5;5;1;5;0;0;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;5;32;30000;0;3;5;1;5;0;0;0;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;7;4;30000;0;11;2;1;3;0;1;0;0;0;1;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;7;5;30000;0;16;5;1;5;0;-1;0;1;0;1;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;7;7;30000;0;19;2;1;4;0;0;-2;1;0;0;1;1;0;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;7;9;30000;0;12;1;2;4;0;-2;0;0;0;0;1;1;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;7;13;30000;0;20;1;2;5;0;1;-1;1;0;1;1;1;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;9;4;30000;0;15;1;2;4;0;0;-1;0;0;1;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;9;5;30000;0;34;2;1;2;0;1;-2;0;0;1;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;9;7;30000;0;15;5;1;2;0;1;1;1;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;9;9;30000;0;25;1;2;2;0;0;1;0;0;1;1;1;2;1;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;13;4;30000;0;20;5;1;1;0;0;0;0;0;0;1;1;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;13;5;30000;0;14;1;3;1;0;1;0;1;0;0;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;13;7;30000;0;24;3;1;2;0;1;0;1;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;13;13;30000;0;6;5;1;2;0;-1;-1;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;13;17;30000;0;12;5;1;5;0;0;-2;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;5;25;4;30000;0;30;5;1;1;0;1;-2;0;0;0;1;1;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;6;6;30000;0;18;6;1;3;0;0;1;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;6;7;30000;0;19;2;1;6;0;1;-1;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;6;8;30000;0;15;6;1;3;0;1;1;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;7;6;30000;0;28;2;1;1;0;-2;-2;0;0;0;1;0;2;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;7;7;30000;0;12;1;2;1;0;0;1;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;7;8;30000;0;15;2;1;6;0;-1;1;0;0;0;1;0;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;8;6;30000;0;14;3;1;2;0;0;0;0;0;0;1;1;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;8;7;30000;0;32;1;2;4;0;-1;0;0;0;1;1;1;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;6;8;8;30000;0;23;1;2;5;0;-1;0;1;0;1;0;0;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;4;4;30000;0;9;1;1;6;0;0;0;0;0;0;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;4;5;30000;0;15;1;1;7;0;-2;0;0;0;1;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;4;7;30000;0;24;1;1;4;0;-1;0;0;0;0;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;4;9;30000;0;14;1;1;6;0;1;-1;0;0;0;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;4;13;30000;0;15;1;4;2;0;-1;-1;0;0;0;1;1;0;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;5;4;30000;0;15;7;1;2;0;0;-1;1;0;0;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;5;5;30000;0;6;2;1;2;0;0;-2;0;0;0;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;5;7;30000;0;14;3;1;2;0;-2;-2;0;0;1;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;5;9;30000;0;10;1;1;4;0;1;0;0;0;1;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;5;13;30000;0;5;1;2;1;0;1;-2;1;0;1;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;6;6;30000;0;14;1;3;7;0;0;1;0;0;1;1;1;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;6;7;30000;0;19;2;1;1;0;1;-2;1;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;6;8;30000;0;43;1;2;4;0;1;0;1;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;7;4;30000;0;18;7;1;3;0;-1;-1;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;7;5;30000;0;29;1;2;1;0;1;-1;0;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;7;6;30000;0;18;3;1;4;0;-2;0;0;0;1;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;7;7;30000;0;18;7;1;2;0;2;0;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;7;8;30000;0;11;2;1;1;0;-1;-2;1;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;7;9;30000;0;11;1;2;7;0;1;-2;0;0;0;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;7;13;30000;0;9;2;1;4;0;2;1;1;0;0;1;1;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;8;6;30000;0;10;2;1;2;0;0;1;1;0;0;1;0;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;8;7;0;0;18;7;1;0;0;1;0;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;8;8;30000;0;10;2;1;4;0;1;-1;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;9;4;30000;0;16;1;1;2;0;-2;0;0;0;1;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;9;5;30000;0;13;3;1;2;0;-1;-2;1;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;9;7;30000;0;9;1;8;1;0;-2;-2;1;0;1;1;1;2;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;13;4;30000;0;21;4;1;1;0;1;-2;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;13;5;30000;0;9;1;4;3;0;1;1;1;0;1;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;13;7;30000;0;14;7;1;3;0;1;0;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;7;13;13;0;0;12;7;1;0;0;2;-2;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;6;6;30000;0;14;1;2;4;0;-2;-2;0;0;1;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;6;7;30000;0;13;2;1;5;0;1;-1;0;0;0;1;0;2;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;6;8;30000;0;20;1;2;8;0;1;1;0;0;0;0;0;0;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;7;6;30000;0;5;1;7;6;0;-1;-1;0;0;1;1;1;0;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;7;7;30000;0;22;2;1;2;0;-2;-1;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;7;8;30000;0;16;2;1;3;0;-1;0;1;0;0;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;8;6;30000;0;18;8;1;2;0;1;-2;1;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;8;7;30000;0;14;2;1;3;0;-1;-2;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;8;8;8;30000;0;18;8;1;6;0;0;0;0;0;1;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;4;4;30000;0;17;1;1;1;0;-2;1;1;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;4;5;30000;0;11;1;3;1;0;-2;1;1;0;0;1;0;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;4;7;30000;0;10;2;1;3;0;1;1;1;0;0;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;4;9;30000;0;10;1;1;7;0;-2;1;1;0;1;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;4;13;30000;0;10;1;2;2;0;0;0;0;0;1;0;0;1;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;5;4;30000;0;18;1;2;3;0;-2;-1;1;0;1;1;0;0;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;5;5;30000;0;19;2;1;1;0;-1;0;1;0;1;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;5;7;30000;0;12;1;5;5;0;0;-1;1;0;0;1;0;0;1;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;5;9;30000;0;14;2;1;2;0;1;-2;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;7;4;30000;0;16;4;1;1;0;0;1;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;7;5;30000;0;18;6;1;3;0;0;-2;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;7;7;30000;0;19;1;1;3;0;1;-1;0;0;0;1;0;0;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;9;4;30000;0;24;9;1;8;0;-2;0;0;0;1;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;9;5;30000;0;17;3;1;7;0;-2;1;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;9;9;30000;0;15;3;1;3;0;-1;-2;0;0;0;1;0;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;9;16;30000;0;15;3;1;1;0;1;1;0;0;0;1;1;2;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;9;22;30000;0;12;1;3;9;0;1;-1;1;0;0;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;9;32;0;0;14;1;3;8;0;0;-1;0;0;0;0;1;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;13;4;30000;0;17;9;1;3;0;-1;0;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;16;9;0;0;13;9;1;0;0;1;-2;0;0;0;1;1;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;16;16;30000;0;12;7;1;1;0;0;0;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;16;22;30000;0;19;5;1;1;0;1;-2;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;22;9;30000;0;17;9;1;6;0;-2;-2;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;22;16;0;0;13;9;1;0;0;1;-2;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;22;22;30000;0;10;9;1;6;0;1;0;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;9;22;32;0;0;24;9;7;9;0;0;-2;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;10;4;4;30000;0;14;1;2;5;0;-2;-1;0;0;0;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;10;4;10;30000;0;10;1;2;1;0;0;-2;1;0;0;1;1;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;10;10;4;30000;0;24;10;1;5;0;1;1;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;10;10;10;30000;0;14;4;1;9;0;0;-1;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;4;4;30000;0;16;1;2;9;0;0;0;0;0;0;1;1;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;4;5;30000;0;17;2;1;7;0;1;-2;1;0;1;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;4;7;30000;0;19;2;1;11;0;1;0;1;0;0;1;1;0;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;4;9;30000;0;9;2;1;1;0;1;-1;1;0;1;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;5;4;30000;0;14;4;1;2;0;1;-1;0;0;1;1;0;0;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;5;5;30000;0;15;13;1;2;0;2;-2;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;5;7;30000;0;6;1;1;13;0;-2;-2;0;0;0;1;1;1;1;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;5;13;30000;0;9;1;1;1;0;-2;0;0;0;0;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;7;4;30000;0;21;1;1;11;0;1;-2;1;0;1;1;0;0;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;7;5;30000;0;18;3;2;5;0;0;1;1;0;1;1;1;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;7;7;30000;0;5;1;5;9;0;-1;0;1;0;1;1;0;2;1;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;7;13;30000;0;10;1;4;8;0;-2;-2;1;0;1;1;0;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;9;4;30000;0;18;9;1;1;0;0;0;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;13;5;30000;0;24;13;1;5;0;1;1;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;13;7;30000;0;24;13;1;2;0;1;0;1;0;1;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;13;13;13;30000;0;14;13;1;3;0;1;-2;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;15;4;4;30000;0;21;2;1;4;0;1;-2;1;0;0;1;1;2;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;15;15;15;30000;0;16;15;1;14;0;-2;0;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;9;9;30000;0;12;16;1;2;0;0;-2;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;9;16;30000;0;14;2;1;1;0;0;-2;1;0;0;1;1;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;9;22;30000;0;20;6;1;9;0;0;-2;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;16;9;30000;0;18;16;1;6;0;1;1;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;16;16;0;0;14;16;1;0;0;1;0;1;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;16;22;0;0;14;16;1;0;0;0;-2;1;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;22;9;30000;0;18;16;1;4;0;1;-2;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;22;16;0;0;19;16;1;0;0;2;-2;1;0;0;1;1;1;0;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;16;22;22;0;0;24;16;1;0;0;1;-2;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;20;20;20;30000;0;15;20;17;14;0;0;0;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;9;9;30000;0;6;2;5;4;0;-1;1;0;0;0;1;0;2;2;1;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;9;16;0;0;14;22;1;0;0;1;-2;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;9;22;0;0;24;22;1;0;0;0;-2;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;9;32;0;0;10;8;1;4;0;0;-1;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;16;9;0;0;19;22;1;0;0;1;-2;1;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;16;16;0;0;14;22;1;0;0;1;-2;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;16;22;0;0;18;22;1;0;0;1;-2;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;22;9;0;0;24;22;1;0;0;1;-2;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;22;16;0;0;15;22;1;0;0;1;-2;1;0;0;1;1;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;22;22;0;0;24;22;1;0;0;2;-2;1;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;22;22;32;0;0;15;22;14;17;0;0;-2;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;23;23;23;30000;0;24;23;1;22;0;-2;0;1;0;0;1;1;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;24;24;24;0;0;18;24;1;0;0;1;-2;1;0;0;1;1;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;25;4;4;0;0;15;25;1;0;0;0;0;0;0;0;1;0;1;0;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;25;4;5;0;0;18;25;1;0;0;2;-2;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;25;5;4;0;0;18;25;1;0;0;2;0;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;25;25;25;0;0;24;25;1;0;0;1;-2;1;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;26;4;4;0;0;18;26;1;0;0;2;-2;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;28;4;4;0;0;18;28;1;0;0;0;0;0;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;28;28;28;0;0;18;28;1;0;0;1;-2;1;0;0;1;1;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;30;30;30;0;0;18;30;1;0;0;0;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100-PCIE-40GB [0xa01f];3;32;32;32;0;0;36;32;4;32;0;0;0;0;0;0;1;0;1;2;0;0 diff --git a/src/acc/opencl/smm/params/tune_multiply_A100-80GB.csv b/src/acc/opencl/smm/params/tune_multiply_A100.csv similarity index 93% rename from src/acc/opencl/smm/params/tune_multiply_A100-80GB.csv rename to src/acc/opencl/smm/params/tune_multiply_A100.csv index 9eb9d2e9a5d..8077da6bbf2 100644 --- a/src/acc/opencl/smm/params/tune_multiply_A100-80GB.csv +++ b/src/acc/opencl/smm/params/tune_multiply_A100.csv @@ -1,7 +1,7 @@ DEVICE;TYPEID;M;N;K;S;GFLOPS;BS;BM;BN;BK;WS;WG;LU;NZ;AL;TB;TC;AP;AA;AB;AC NVIDIA A100 80GB PCIe [0x1f79];3;2;2;2;30000;0;9;2;1;2;0;1;-1;0;0;0;1;0;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;3;3;3;30000;0;9;3;1;3;1;-1;-2;0;0;0;1;0;2;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;4;4;4;30000;0;9;1;1;2;1;0;0;1;1;0;1;0;2;0;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;4;4;4;30000;0;9;1;1;2;1;-1;-2;0;1;0;1;0;2;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;4;5;30000;0;6;1;1;4;0;1;-1;1;0;0;1;1;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;4;7;30000;0;7;4;1;2;1;1;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;4;9;30000;0;5;4;1;2;1;-1;0;0;0;0;1;0;1;2;0;0 @@ -16,23 +16,23 @@ NVIDIA A100 80GB PCIe [0x1f79];3;4;4;32;30000;0;3;4;1;4;0;1;-1;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;5;4;30000;0;12;4;1;4;1;1;-1;0;0;0;1;0;0;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;5;5;30000;0;9;1;1;1;0;-1;1;1;1;0;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;5;7;30000;0;6;4;1;2;1;1;0;0;1;0;1;0;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;4;5;9;30000;0;6;4;1;2;1;-1;-2;0;0;0;1;0;1;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;4;5;9;30000;0;6;4;1;2;1;0;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;5;13;30000;0;4;4;1;4;0;-1;-2;1;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;5;17;30000;0;5;4;1;2;0;1;-1;0;0;0;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;5;25;30000;0;6;4;1;3;0;-1;-1;0;0;1;0;0;1;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;4;5;32;30000;0;2;1;1;2;0;-2;-2;0;0;0;1;1;2;0;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;4;5;32;30000;0;2;1;1;2;1;-2;1;0;0;0;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;7;4;30000;0;24;4;1;3;1;0;0;0;0;0;1;0;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;7;5;30000;0;14;4;1;2;1;1;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;7;7;30000;0;10;4;1;1;0;-1;-1;0;1;1;1;1;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;7;9;30000;0;6;4;1;3;0;-2;0;0;1;0;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;7;13;30000;0;4;4;1;3;0;1;-2;1;0;0;1;0;1;0;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;9;4;30000;0;15;4;1;4;0;0;-2;0;0;0;1;1;2;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;4;9;5;30000;0;10;4;1;4;1;1;-1;0;1;0;1;0;1;0;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;4;9;5;30000;0;10;4;1;2;1;0;-1;0;1;0;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;9;7;30000;0;14;4;1;4;0;0;-1;0;0;0;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;9;9;30000;0;10;4;1;4;0;1;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;9;13;30000;0;5;4;1;4;0;0;0;0;0;0;1;1;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;4;10;4;30000;0;24;4;1;4;1;1;-1;0;1;0;1;0;2;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;4;10;10;30000;0;7;4;1;2;0;0;0;0;0;0;1;1;1;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;4;10;4;30000;0;24;4;1;4;1;-2;-1;0;1;0;1;0;2;0;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;4;10;10;30000;0;14;4;1;4;1;0;0;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;13;4;30000;0;12;2;1;3;0;1;0;0;1;0;1;0;0;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;13;5;30000;0;16;2;2;4;0;-2;-1;0;1;1;1;0;0;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;13;7;30000;0;14;4;1;1;0;2;0;0;0;0;1;0;2;0;0;0 @@ -51,7 +51,7 @@ NVIDIA A100 80GB PCIe [0x1f79];3;4;25;5;30000;0;21;4;1;2;0;0;0;0;0;1;1;0;2;2;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;26;4;30000;0;22;4;1;1;0;-2;0;1;0;1;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;28;4;30000;0;18;4;1;1;0;-2;0;0;1;1;1;0;2;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;32;4;30000;0;19;4;1;1;0;0;-2;1;0;0;1;0;2;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;4;32;5;30000;0;19;4;1;4;0;1;-1;0;0;1;1;0;0;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;4;32;5;30000;0;19;4;1;2;1;1;-2;0;1;0;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;32;13;30000;0;12;4;1;3;0;1;-1;0;0;0;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;32;17;30000;0;13;4;1;3;0;1;1;0;0;0;1;1;1;2;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;4;32;32;30000;0;25;4;1;4;0;1;-1;0;1;0;1;1;1;2;1;0 @@ -60,18 +60,18 @@ NVIDIA A100 80GB PCIe [0x1f79];3;5;4;5;30000;0;12;1;1;3;1;0;-2;0;1;0;1;0;0;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;4;7;30000;0;15;1;1;1;0;-2;0;0;0;0;1;0;2;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;4;9;30000;0;12;1;1;5;1;0;0;0;0;0;1;0;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;4;13;30000;0;10;1;1;2;0;0;-1;0;1;0;0;0;2;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;5;4;17;30000;0;9;1;1;2;0;1;-2;0;1;1;1;1;0;2;1;0 +NVIDIA A100 80GB PCIe [0x1f79];3;5;4;17;30000;0;4;1;1;1;1;0;-2;0;1;0;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;4;25;30000;0;5;5;1;4;0;1;-2;0;0;0;0;0;2;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;5;4;32;30000;0;2;1;1;2;0;0;1;0;0;0;1;0;2;0;1;0 +NVIDIA A100 80GB PCIe [0x1f79];3;5;4;32;30000;0;2;1;1;2;1;0;0;0;0;0;1;0;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;5;4;30000;0;10;1;1;2;1;0;0;1;1;0;1;0;2;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;5;5;5;30000;0;18;5;1;2;1;1;-1;0;1;0;1;0;1;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;5;5;5;30000;0;18;5;1;2;1;1;-1;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;5;7;30000;0;7;5;1;5;1;-1;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;5;9;30000;0;25;5;1;5;0;1;-2;0;0;0;1;0;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;5;5;13;30000;0;10;1;1;2;0;0;-1;1;0;1;1;0;0;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;5;5;17;30000;0;4;1;1;5;0;0;0;1;0;0;1;1;2;0;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;5;5;13;30000;0;10;1;1;2;1;0;-1;0;0;0;1;0;0;0;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;5;5;17;30000;0;4;1;1;3;1;0;1;0;0;0;1;0;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;5;32;30000;0;5;5;1;2;0;-2;-1;0;0;0;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;7;4;30000;0;12;5;1;2;1;1;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;5;7;5;30000;0;14;5;1;2;1;0;-2;0;0;0;1;0;1;0;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;5;7;5;30000;0;14;5;1;2;1;1;-2;0;1;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;7;7;30000;0;14;5;1;4;0;-2;0;1;0;1;1;0;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;7;9;30000;0;16;5;1;4;0;-1;-1;1;0;1;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;5;7;13;30000;0;12;5;1;5;0;-1;-2;1;0;0;1;1;1;2;0;0 @@ -118,7 +118,7 @@ NVIDIA A100 80GB PCIe [0x1f79];3;7;5;13;30000;0;10;1;2;3;0;1;-2;1;0;1;1;0;2;0;0; NVIDIA A100 80GB PCIe [0x1f79];3;7;6;6;30000;0;14;7;1;7;0;0;-1;0;0;0;1;1;0;0;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;7;6;7;30000;0;14;2;1;3;0;1;-2;1;0;1;1;1;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;7;6;8;30000;0;20;7;1;2;0;0;-1;0;1;1;1;1;0;2;1;0 -NVIDIA A100 80GB PCIe [0x1f79];3;7;7;4;30000;0;24;7;1;2;1;0;0;0;0;0;1;0;1;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;7;7;4;30000;0;24;7;1;2;1;0;-2;0;1;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;7;7;5;30000;0;13;7;1;6;0;-2;0;0;0;0;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;7;7;6;30000;0;35;7;1;3;0;0;1;1;0;1;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;7;7;7;30000;0;18;7;1;2;0;2;0;0;0;1;1;0;1;0;0;0 @@ -135,7 +135,7 @@ NVIDIA A100 80GB PCIe [0x1f79];3;7;13;4;30000;0;21;7;1;6;0;0;-2;0;0;1;1;0;0;2;0; NVIDIA A100 80GB PCIe [0x1f79];3;7;13;5;30000;0;9;7;1;4;0;1;0;1;0;1;1;1;1;1;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;7;13;7;30000;0;22;7;1;2;0;0;0;1;0;1;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;7;13;13;30000;0;5;1;2;3;0;0;-2;1;1;1;1;0;2;0;1;0 -NVIDIA A100 80GB PCIe [0x1f79];3;8;6;6;30000;0;10;1;2;7;0;0;-1;0;0;0;1;0;0;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;8;6;6;30000;0;12;1;2;8;1;-1;0;0;0;0;1;0;2;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;8;6;7;30000;0;13;8;1;8;0;-2;-1;0;0;0;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;8;6;8;30000;0;18;8;1;8;0;1;1;0;0;0;1;0;0;2;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;8;7;6;30000;0;15;8;1;2;0;0;-1;0;1;0;1;0;2;2;0;0 @@ -146,11 +146,11 @@ NVIDIA A100 80GB PCIe [0x1f79];3;8;8;7;30000;0;14;8;1;3;0;0;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;8;8;8;30000;0;12;8;1;5;0;0;-1;0;0;1;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;4;4;30000;0;14;9;1;4;1;-1;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;4;5;30000;0;14;9;1;4;1;1;0;0;0;0;1;0;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;9;4;7;30000;0;10;2;1;3;0;1;1;0;0;0;1;0;2;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;9;4;9;30000;0;10;1;2;9;0;-2;-1;0;1;1;0;0;0;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;9;4;7;30000;0;9;2;1;4;1;1;1;0;0;0;1;0;2;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;9;4;9;30000;0;9;1;2;8;1;0;-2;0;1;0;1;0;2;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;4;13;30000;0;10;9;1;2;0;1;0;0;0;1;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;5;4;30000;0;14;9;1;7;1;-2;-2;0;0;0;1;0;1;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;9;5;5;30000;0;12;2;1;2;0;-1;0;1;0;1;1;0;2;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;9;5;5;30000;0;12;2;1;3;1;0;0;0;0;0;1;0;2;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;5;7;30000;0;18;9;1;4;0;-2;-1;0;0;0;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;5;9;30000;0;14;2;1;3;0;0;-2;0;0;0;1;1;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;7;4;30000;0;18;9;1;3;0;-1;0;1;0;1;1;1;1;2;1;0 @@ -163,7 +163,7 @@ NVIDIA A100 80GB PCIe [0x1f79];3;9;9;16;30000;0;10;9;1;6;0;1;-1;1;1;1;1;0;1;2;1; NVIDIA A100 80GB PCIe [0x1f79];3;9;9;22;30000;0;10;9;1;2;0;-2;1;0;1;1;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;9;32;30000;0;12;9;1;3;0;-1;-1;0;1;0;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;13;4;30000;0;17;9;1;3;0;-1;0;1;0;0;1;1;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;9;16;9;30000;0;12;9;1;8;0;-1;-2;1;1;1;1;1;1;2;1;0 +NVIDIA A100 80GB PCIe [0x1f79];3;9;16;9;30000;0;12;9;1;2;1;-1;-2;0;1;0;1;0;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;16;16;30000;0;2;1;8;8;0;-2;-1;0;0;0;0;0;2;1;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;16;22;30000;0;8;9;1;2;0;-1;0;0;1;0;1;1;1;1;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;9;22;9;30000;0;15;9;1;2;0;1;-2;1;0;0;1;1;1;0;0;0 @@ -179,13 +179,13 @@ NVIDIA A100 80GB PCIe [0x1f79];3;10;10;4;30000;0;24;10;1;5;0;1;1;0;0;0;1;1;1;2;0 NVIDIA A100 80GB PCIe [0x1f79];3;10;10;10;30000;0;3;10;1;3;0;-2;-1;1;0;0;1;1;1;2;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;4;4;30000;0;16;1;2;5;0;1;1;0;0;0;1;1;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;4;5;30000;0;9;13;1;9;0;-1;0;1;0;1;1;1;0;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;13;4;7;30000;0;16;2;1;12;0;1;0;1;0;0;1;0;0;0;1;0 +NVIDIA A100 80GB PCIe [0x1f79];3;13;4;7;30000;0;10;2;1;10;1;1;0;0;0;0;1;0;0;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;4;9;30000;0;9;2;1;2;0;0;-1;1;0;1;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;4;13;30000;0;12;13;1;12;0;0;-2;0;0;0;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;4;17;30000;0;10;13;1;1;0;-1;-2;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;4;32;30000;0;15;13;1;2;0;-1;-1;1;0;0;1;1;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;13;5;4;30000;0;9;1;3;13;0;-1;-1;1;1;0;1;0;2;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;13;5;5;30000;0;19;3;1;12;0;-2;-2;0;0;0;1;0;0;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;13;5;4;30000;0;9;1;3;13;1;-1;-1;0;1;0;1;0;2;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;13;5;5;30000;0;14;3;1;8;1;0;1;0;0;0;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;5;7;30000;0;4;13;1;12;0;1;-1;1;1;1;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;5;13;30000;0;10;3;1;9;0;-1;-1;0;0;1;1;0;0;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;5;17;30000;0;14;2;2;5;0;-1;0;0;1;0;1;0;0;1;0;0 @@ -211,7 +211,7 @@ NVIDIA A100 80GB PCIe [0x1f79];3;13;32;5;30000;0;18;13;1;4;0;-1;0;0;0;0;1;1;1;2; NVIDIA A100 80GB PCIe [0x1f79];3;13;32;13;30000;0;20;13;1;13;0;1;-1;0;0;0;1;1;1;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;32;17;30000;0;26;13;1;9;0;-1;-1;0;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;13;32;32;30000;0;12;13;1;13;1;-1;0;1;0;0;1;0;1;0;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;15;4;4;30000;0;9;2;1;3;0;1;0;1;0;0;1;1;2;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;15;4;4;30000;0;9;2;1;2;1;-1;-2;0;0;0;1;0;0;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;15;15;15;30000;0;15;15;1;2;0;-1;0;1;0;0;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;16;9;9;30000;0;10;16;1;8;0;0;0;1;1;1;1;0;1;1;1;0 NVIDIA A100 80GB PCIe [0x1f79];3;16;9;16;30000;0;10;16;1;4;0;0;0;0;0;0;1;0;1;0;1;0 @@ -269,7 +269,7 @@ NVIDIA A100 80GB PCIe [0x1f79];3;25;4;5;30000;0;1;25;1;15;0;0;1;0;1;0;0;1;2;0;0; NVIDIA A100 80GB PCIe [0x1f79];3;25;5;4;30000;0;5;25;1;14;0;-2;0;0;1;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;25;25;25;30000;0;24;25;1;13;1;1;-2;1;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;26;4;4;30000;0;18;26;1;3;0;0;-2;0;0;0;1;1;1;2;0;0 -NVIDIA A100 80GB PCIe [0x1f79];3;28;4;4;30000;0;18;28;1;2;0;0;1;0;0;0;1;1;1;2;0;0 +NVIDIA A100 80GB PCIe [0x1f79];3;28;4;4;30000;0;14;28;1;16;1;1;4;0;0;0;1;0;2;0;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;28;28;28;30000;0;25;28;1;3;1;1;-2;1;0;1;1;1;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;30;30;30;30000;0;41;30;1;16;1;-2;-2;1;0;0;1;0;1;2;0;0 NVIDIA A100 80GB PCIe [0x1f79];3;32;4;4;30000;0;19;2;2;32;0;-1;-1;0;1;0;1;0;0;2;0;0 diff --git a/src/acc/opencl/smm/params/tune_multiply_PVC.csv b/src/acc/opencl/smm/params/tune_multiply_PVC.csv index 6b4451a5cdf..0ea79f00032 100644 --- a/src/acc/opencl/smm/params/tune_multiply_PVC.csv +++ b/src/acc/opencl/smm/params/tune_multiply_PVC.csv @@ -231,7 +231,7 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;5;45;25;30000;0;5;5;1;1;45;-2;-1;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;5;45;26;30000;0;6;5;1;1;45;-2;-1;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;5;45;28;30000;0;5;5;1;1;45;-1;-2;1;0;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;5;45;32;30000;0;4;5;1;1;45;-1;-2;0;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;5;45;45;30000;0;7;5;1;1;45;-1;0;1;0;0;1;1;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;5;45;45;30000;0;9;5;1;1;45;-2;-1;0;0;0;1;1;0;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;6;6;6;30000;0;9;6;1;3;1;-2;0;0;1;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;6;6;7;30000;0;10;6;1;1;1;-1;-1;1;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;6;6;8;30000;0;12;6;1;1;1;-1;-1;1;0;0;1;0;0;0;0;0 @@ -298,17 +298,17 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;32;25;30000;0;8;7;1;1;32;0;-1;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;32;26;30000;0;8;7;1;1;32;-1;-2;0;0;1;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;32;28;30000;0;8;7;1;1;32;-2;-2;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;32;32;30000;0;8;7;1;1;32;0;0;0;0;0;1;0;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;32;45;30000;0;15;7;1;1;32;1;0;1;1;0;1;0;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;32;45;30000;0;15;7;1;1;32;1;0;1;0;0;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;4;30000;0;42;7;1;1;45;-2;-1;1;0;1;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;5;30000;0;55;7;1;3;45;-2;-1;1;0;1;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;7;30000;0;15;7;1;3;45;1;-1;1;1;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;9;30000;0;41;7;1;5;45;0;-2;0;0;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;13;30000;0;15;7;1;3;45;-1;5;0;1;0;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;25;30000;0;15;7;1;1;45;1;0;1;1;0;1;1;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;26;30000;0;10;7;1;1;45;-1;0;0;0;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;28;30000;0;13;7;1;1;45;0;-2;1;0;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;26;30000;0;10;7;1;1;45;0;-2;0;0;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;28;30000;0;11;7;1;1;45;-1;-2;1;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;32;30000;0;8;7;1;1;45;-2;0;1;0;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;45;30000;0;9;7;1;1;45;1;0;1;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;7;45;45;30000;0;9;7;1;1;45;1;0;1;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;8;6;6;30000;0;16;8;1;6;1;-1;-1;0;0;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;8;6;7;30000;0;13;8;1;4;1;0;-2;0;1;1;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;8;6;8;30000;0;11;8;1;5;1;-2;-2;1;0;1;1;1;2;2;0;0 @@ -385,8 +385,8 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;13;30000;0;9;9;1;6;25;0;-1;1;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;25;30000;0;8;9;1;9;25;-2;1;1;0;1;1;1;0;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;26;30000;0;8;9;1;1;25;0;-2;1;0;1;1;1;2;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;28;30000;0;8;9;1;1;25;-2;-1;1;0;0;1;1;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;32;30000;0;9;9;1;1;25;-1;0;1;0;0;1;1;0;0;1;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;45;30000;0;15;9;1;1;25;-2;0;0;1;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;32;30000;0;8;9;1;1;25;-2;-2;1;1;0;1;1;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;25;45;30000;0;15;9;1;1;25;1;0;1;1;1;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;4;30000;0;30;9;1;7;26;1;0;1;1;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;5;30000;0;27;9;1;8;26;0;-2;1;1;0;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;7;30000;0;18;9;1;2;26;-1;1;1;1;0;1;0;1;0;0;0 @@ -396,7 +396,7 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;25;30000;0;8;9;1;1;26;-1;1;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;26;30000;0;8;9;1;1;26;-2;0;1;1;1;1;1;2;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;28;30000;0;8;9;1;1;26;1;-2;1;0;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;32;30000;0;8;9;1;1;26;-2;-2;1;0;1;1;1;2;0;1;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;45;30000;0;16;9;1;1;26;0;0;1;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;26;45;30000;0;15;9;1;1;26;0;0;1;1;0;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;4;30000;0;33;9;1;1;28;-1;-1;0;0;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;5;30000;0;28;9;1;4;28;-2;-2;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;7;30000;0;23;9;1;1;28;-1;-2;1;1;1;1;1;0;0;0;0 @@ -404,8 +404,8 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;9;30000;0;21;9;1;7;28;-2;-2;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;13;30000;0;15;9;1;4;28;0;1;1;1;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;25;30000;0;8;9;1;1;28;0;0;0;1;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;26;30000;0;10;9;1;1;28;-2;0;0;1;1;1;0;0;0;1;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;28;30000;0;8;9;1;1;28;-1;0;1;0;1;1;0;2;0;1;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;32;30000;0;16;9;1;1;28;-1;-2;0;0;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;28;30000;0;8;9;1;1;28;-1;0;1;1;0;1;0;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;32;30000;0;15;9;1;1;28;-1;-2;0;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;28;45;30000;0;15;9;1;1;28;-2;0;0;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;4;30000;0;32;9;1;5;32;0;-1;1;1;1;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;5;30000;0;28;9;1;3;32;0;-2;0;0;0;1;0;0;0;0;0 @@ -413,32 +413,45 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;7;30000;0;28;9;1;9;32;1;-1;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;9;30000;0;22;9;1;9;1;0;-1;1;0;0;1;1;2;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;13;30000;0;9;9;1;4;32;0;0;0;0;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;22;30000;0;8;9;1;1;1;-1;1;1;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;25;30000;0;8;9;1;1;32;-1;1;1;1;1;1;1;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;26;30000;0;8;9;1;1;32;1;1;1;0;0;1;1;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;28;30000;0;15;9;1;1;32;-1;0;0;0;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;32;30000;0;15;9;1;1;1;-2;0;1;1;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;45;30000;0;15;9;1;1;32;-1;0;0;1;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;25;30000;0;8;9;1;1;32;1;1;1;1;0;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;26;30000;0;8;9;1;1;32;0;1;1;0;1;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;28;30000;0;15;9;1;1;32;0;0;0;0;0;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;32;30000;0;15;9;1;1;1;-2;0;1;0;0;1;1;0;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;32;45;30000;0;15;9;1;1;32;1;0;0;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;45;32;30000;0;10;9;1;1;45;1;0;1;0;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;45;45;30000;0;9;9;1;1;45;0;0;1;1;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;9;45;45;30000;0;9;9;1;1;45;1;-2;1;1;1;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;4;4;30000;0;16;10;1;1;1;-1;-1;0;0;0;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;4;10;30000;0;12;10;1;1;1;-1;-2;0;0;1;1;0;2;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;4;15;30000;0;8;10;1;3;10;-1;1;0;1;0;1;1;0;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;10;4;30000;0;20;10;1;4;1;-1;0;1;1;0;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;10;10;30000;0;8;10;1;2;1;-1;-2;0;1;0;1;1;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;10;15;30000;0;8;10;1;1;10;-1;0;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;15;4;30000;0;22;10;1;1;15;-1;0;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;15;10;30000;0;17;10;1;9;15;-1;-2;0;0;0;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;10;15;15;30000;0;12;10;1;2;15;-2;0;0;1;0;1;0;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;12;12;12;30000;0;8;12;1;12;12;-2;-1;1;1;1;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;4;30000;0;16;13;1;1;1;-1;-1;0;1;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;5;30000;0;16;13;1;1;1;-1;-1;0;1;1;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;7;30000;0;11;13;1;7;1;-2;-2;0;1;0;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;9;30000;0;9;13;1;4;1;-1;1;0;0;1;1;0;2;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;13;30000;0;9;13;1;2;1;-2;1;1;1;1;1;0;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;17;30000;0;8;13;1;13;1;-1;-1;0;0;1;1;1;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;25;30000;0;8;13;1;1;13;-2;-1;1;0;1;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;26;30000;0;8;13;1;1;13;-1;-1;0;1;0;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;28;30000;0;8;13;1;1;13;-2;-1;1;1;1;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;32;30000;0;8;13;1;11;1;-2;0;0;1;1;1;1;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;4;45;30000;0;8;13;1;1;13;-1;-1;1;0;0;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;4;30000;0;16;13;1;1;1;-2;0;0;0;1;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;5;30000;0;16;13;1;1;1;-1;-2;0;1;1;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;7;30000;0;13;13;1;2;1;-2;-1;1;0;1;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;9;30000;0;11;13;1;4;13;-1;-1;0;0;0;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;13;30000;0;8;13;1;6;1;-1;-2;0;1;0;1;1;2;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;16;30000;0;8;13;1;10;1;-2;-1;1;1;1;1;0;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;17;30000;0;8;13;1;7;1;-2;-2;0;1;0;1;1;0;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;24;30000;0;8;13;1;11;1;-1;0;0;1;1;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;25;30000;0;8;13;1;1;13;-2;-1;1;1;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;26;30000;0;8;13;1;10;1;-1;-2;0;0;0;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;28;30000;0;8;13;1;1;13;-2;-1;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;32;30000;0;8;13;1;1;1;-2;0;0;1;0;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;5;45;30000;0;8;13;1;1;13;-2;0;0;1;1;1;0;0;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;7;4;30000;0;17;13;1;1;1;-1;0;1;1;1;1;1;2;2;0;0 @@ -487,20 +500,20 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;17;17;30000;0;8;13;1;1;1;-2;1;1; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;17;32;30000;0;8;13;1;1;1;1;-2;1;0;0;1;1;2;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;5;30000;0;22;13;1;5;1;1;-1;1;1;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;13;30000;0;8;13;1;8;24;-1;-1;0;0;0;1;0;1;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;24;30000;0;8;13;1;1;24;-2;1;1;0;1;1;1;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;26;30000;0;19;13;1;1;24;1;0;0;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;32;30000;0;16;13;1;1;24;0;0;1;0;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;24;30000;0;8;13;1;1;24;1;1;1;0;0;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;26;30000;0;15;13;1;1;24;1;0;0;1;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;24;32;30000;0;16;13;1;1;24;1;0;1;0;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;4;30000;0;24;13;1;4;25;-2;1;1;1;0;1;0;2;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;5;30000;0;22;13;1;3;25;0;-1;1;1;1;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;7;30000;0;15;8;1;13;25;-2;5;0;1;1;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;9;30000;0;15;8;1;4;25;-2;6;0;0;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;13;30000;0;8;13;1;7;25;-2;-1;1;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;14;30000;0;15;8;1;7;25;0;1;1;1;0;1;1;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;25;30000;0;15;8;1;1;25;-1;4;1;0;1;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;26;30000;0;15;13;1;1;25;-1;-2;1;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;28;30000;0;8;8;1;1;25;-1;0;0;1;1;1;0;1;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;32;30000;0;4;8;1;1;25;-1;0;0;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;45;30000;0;15;13;1;1;25;1;0;1;0;0;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;25;30000;0;10;8;1;3;25;1;3;0;1;1;1;0;1;0;1;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;26;30000;0;15;13;1;1;25;1;-2;1;1;0;1;1;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;28;30000;0;15;8;1;1;25;-1;2;0;1;1;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;32;30000;0;5;8;1;1;25;-1;0;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;25;45;30000;0;15;13;1;1;25;0;-2;1;0;1;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;4;30000;0;15;8;1;11;26;0;6;0;0;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;5;30000;0;23;13;1;13;1;0;-2;1;0;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;7;30000;0;22;13;1;13;26;0;-2;1;1;0;1;1;0;0;0;0 @@ -508,21 +521,21 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;9;30000;0;16;13;1;11;26;-1;-1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;13;30000;0;8;13;1;13;26;0;0;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;14;30000;0;8;13;1;11;26;-2;-2;1;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;24;30000;0;15;13;1;1;26;-1;-2;0;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;25;30000;0;15;13;1;1;26;-1;0;1;0;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;26;30000;0;18;13;1;1;26;-1;0;0;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;28;30000;0;16;13;1;1;26;-1;-2;0;1;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;32;30000;0;15;13;1;1;26;-1;0;0;0;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;45;30000;0;15;13;1;1;26;1;0;1;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;25;30000;0;15;13;1;1;26;-1;0;1;0;0;1;0;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;26;30000;0;15;13;1;1;26;-1;0;0;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;28;30000;0;16;13;1;1;26;-2;-2;0;0;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;32;30000;0;15;13;1;1;26;0;-2;1;0;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;26;45;30000;0;15;13;1;1;26;1;-2;1;0;1;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;4;30000;0;27;13;1;4;28;-1;-1;1;0;0;1;1;2;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;5;30000;0;19;13;1;9;28;-1;-2;1;0;0;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;7;30000;0;23;13;1;10;28;-1;-2;1;0;0;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;9;30000;0;17;13;1;10;28;1;-1;1;1;1;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;13;30000;0;8;13;1;13;28;0;-1;0;0;0;1;0;1;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;25;30000;0;15;13;1;1;28;0;0;1;0;0;1;0;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;25;30000;0;16;13;1;1;28;1;0;1;0;0;1;0;2;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;26;30000;0;16;13;1;1;28;-1;-2;1;1;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;28;30000;0;15;13;1;1;28;-1;-2;0;0;0;1;1;2;2;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;32;30000;0;15;13;1;1;28;-1;0;1;1;1;1;1;2;0;1;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;45;30000;0;15;13;1;1;28;-2;0;1;1;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;28;30000;0;15;13;1;1;28;-1;-2;0;1;0;1;1;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;32;30000;0;15;13;1;1;28;1;0;0;0;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;28;45;30000;0;15;13;1;1;28;-1;-2;1;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;4;30000;0;27;13;1;11;1;-2;-1;1;0;0;1;1;0;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;5;30000;0;23;13;1;9;1;0;-1;0;1;0;1;0;1;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;7;30000;0;25;13;1;6;32;0;-1;1;1;1;1;1;2;2;0;0 @@ -532,20 +545,20 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;14;30000;0;8;13;1;10;32;-2;-1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;17;30000;0;8;13;1;1;1;-1;1;1;1;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;24;30000;0;16;13;1;1;32;-2;-2;1;1;0;1;0;2;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;25;30000;0;15;13;1;1;32;1;-2;1;0;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;26;30000;0;15;13;1;1;32;-1;0;1;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;26;30000;0;15;13;1;1;32;-1;0;1;1;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;28;30000;0;16;13;1;1;32;-1;-2;1;0;1;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;32;30000;0;15;13;1;1;1;0;0;1;0;0;1;0;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;45;30000;0;15;13;1;1;32;1;-2;1;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;32;30000;0;15;13;1;1;1;0;0;1;1;1;1;0;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;32;45;30000;0;15;13;1;1;32;-2;-2;1;1;0;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;4;30000;0;26;13;1;1;45;-2;1;1;0;0;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;5;30000;0;32;8;1;4;45;1;-1;0;1;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;7;30000;0;35;13;1;5;45;-2;-2;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;9;30000;0;28;13;1;8;45;1;0;1;0;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;13;30000;0;15;13;1;11;45;1;-2;0;1;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;25;30000;0;17;8;1;9;45;0;1;1;0;1;1;0;1;0;1;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;26;30000;0;15;13;1;1;45;0;-2;1;0;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;28;30000;0;8;8;1;7;45;-1;-2;0;1;0;1;0;1;2;1;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;32;30000;0;7;8;1;13;45;1;0;0;1;0;1;1;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;45;30000;0;30;13;1;1;45;-1;0;1;0;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;26;30000;0;30;13;1;1;45;-1;-2;1;0;0;1;0;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;28;30000;0;10;8;1;6;45;-1;-1;0;1;0;1;0;1;2;1;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;32;30000;0;10;8;1;3;45;-1;0;0;1;0;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;13;45;45;30000;0;30;13;1;1;45;-2;0;1;1;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;5;28;30000;0;8;14;1;9;14;-2;0;0;0;0;1;1;2;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;13;13;30000;0;8;14;1;7;14;-2;-1;0;0;0;1;0;0;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;13;14;30000;0;8;14;1;1;14;-1;0;1;1;1;1;1;0;0;0;0 @@ -565,15 +578,35 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;16;16;30000;0;17;14;1;4;16;-1;-1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;16;29;30000;0;8;14;1;1;16;-2;-2;0;1;1;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;25;13;30000;0;8;14;1;1;25;1;1;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;25;14;30000;0;8;14;1;13;25;-2;0;0;0;0;1;0;1;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;25;25;30000;0;15;14;1;1;25;-1;-1;0;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;25;25;30000;0;15;14;1;1;25;1;-1;0;1;0;1;0;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;25;26;30000;0;15;8;1;1;25;1;3;1;0;0;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;25;32;30000;0;10;14;1;1;25;-1;1;1;0;1;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;26;13;30000;0;21;14;1;13;26;0;-2;0;1;0;1;1;2;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;26;14;30000;0;8;14;1;9;26;1;-1;0;0;0;1;0;1;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;26;25;30000;0;8;14;1;1;26;0;1;0;0;0;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;26;26;30000;0;8;14;1;1;26;-2;1;1;0;0;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;26;32;30000;0;8;14;1;1;26;-2;1;0;0;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;28;5;30000;0;32;14;1;13;28;-2;0;1;1;1;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;28;14;30000;0;8;14;1;9;28;-2;0;0;0;0;1;0;1;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;28;28;30000;0;16;14;1;1;28;-1;0;0;0;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;29;32;30000;0;15;14;1;1;29;-2;-1;1;0;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;29;30000;0;16;14;1;1;32;1;-1;0;1;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;32;30000;0;16;14;1;1;32;-1;0;1;1;1;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;28;28;30000;0;15;14;1;1;28;-1;0;0;0;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;29;14;30000;0;10;14;1;1;29;0;1;0;1;0;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;29;16;30000;0;9;14;1;9;29;1;1;0;1;0;1;1;1;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;29;29;30000;0;13;14;1;1;29;1;1;1;0;1;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;29;32;30000;0;16;14;1;1;29;1;-1;1;0;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;13;30000;0;8;14;1;8;32;0;-1;0;0;0;1;0;1;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;14;30000;0;13;14;1;12;32;-1;-2;0;1;0;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;25;30000;0;8;14;1;1;32;-2;1;1;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;26;30000;0;8;14;1;1;32;-2;1;0;1;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;29;30000;0;16;14;1;1;32;1;-2;0;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;14;32;32;30000;0;16;14;1;1;32;0;-1;1;1;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;4;4;30000;0;16;15;1;1;1;-2;-1;0;1;0;1;0;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;4;10;30000;0;11;15;1;1;15;-1;-1;1;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;4;15;30000;0;8;15;1;1;15;-2;0;1;0;1;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;10;4;30000;0;17;15;1;6;15;-1;0;1;0;0;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;10;10;30000;0;11;15;1;1;15;-2;-1;1;0;0;1;1;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;10;15;30000;0;8;15;1;8;15;-1;0;1;0;0;1;0;1;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;15;4;30000;0;28;15;1;1;15;-1;-1;1;0;0;1;0;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;15;10;30000;0;17;15;1;15;15;-1;0;1;0;1;1;1;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;15;15;15;30000;0;8;15;1;8;1;-1;-2;0;1;0;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;5;5;30000;0;16;16;1;10;1;-1;0;0;1;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;5;13;30000;0;8;8;1;15;1;-1;0;0;0;0;1;1;2;2;1;0 @@ -585,20 +618,27 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;9;9;30000;0;15;16;1;2;1;-1;-2;1; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;9;16;30000;0;8;16;1;1;1;-1;-2;1;1;0;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;9;22;30000;0;8;16;1;1;1;-1;0;0;1;0;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;13;5;30000;0;22;16;1;8;1;-1;-1;1;1;0;1;1;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;14;14;30000;0;14;16;1;1;16;-2;-1;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;14;16;30000;0;12;16;1;1;16;-2;0;1;0;0;1;1;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;14;29;30000;0;8;16;1;1;16;-1;0;1;0;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;16;5;30000;0;32;16;1;1;1;-1;0;1;0;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;16;9;30000;0;25;16;1;1;1;-1;-2;1;1;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;16;14;30000;0;27;16;1;1;16;-1;-2;1;1;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;16;16;30000;0;8;16;1;3;1;-2;1;0;1;0;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;16;22;30000;0;21;16;1;1;1;-2;0;1;0;1;1;0;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;16;29;30000;0;8;16;1;1;16;-2;0;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;16;55;30000;0;8;16;1;1;16;-2;0;1;1;0;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;22;9;30000;0;21;16;1;9;1;-2;-1;1;1;1;1;1;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;22;16;30000;0;8;16;1;1;1;-1;1;1;0;1;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;22;22;30000;0;8;16;1;1;1;0;1;1;1;0;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;24;5;30000;0;22;16;1;13;1;-2;-2;1;0;1;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;26;5;30000;0;22;16;1;6;1;1;-1;1;1;0;1;0;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;29;29;30000;0;16;16;1;1;29;-2;0;1;1;1;1;0;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;29;55;30000;0;15;16;1;1;29;0;0;1;0;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;55;16;30000;0;31;16;1;1;55;1;0;1;0;0;1;0;2;2;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;55;29;30000;0;32;16;1;1;55;-1;0;0;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;29;14;30000;0;41;16;1;11;29;-2;-1;0;0;0;1;1;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;29;16;30000;0;15;16;1;2;29;0;2;0;1;1;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;29;29;30000;0;16;16;1;1;29;1;0;1;0;1;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;29;55;30000;0;15;16;1;1;29;1;0;0;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;55;16;30000;0;32;16;1;1;55;1;-1;1;1;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;55;29;30000;0;30;16;1;1;55;-1;0;1;0;0;1;1;2;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;16;55;55;30000;0;15;16;1;1;55;1;1;1;1;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;1;1;30000;0;15;17;1;1;17;1;1;0;1;0;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;4;4;30000;0;16;17;1;1;1;-1;-1;0;0;1;1;0;2;0;0;0 @@ -620,17 +660,17 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;4;30000;0;21;17;1;6;1;-2;1;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;5;30000;0;17;17;1;10;1;-2;-1;0;1;0;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;13;30000;0;8;17;1;1;1;0;1;1;1;1;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;17;30000;0;8;17;1;4;1;-1;-1;0;1;1;1;1;2;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;32;30000;0;17;17;1;1;1;0;0;1;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;35;30000;0;15;17;1;1;1;-2;-2;1;1;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;32;30000;0;17;17;1;1;1;0;-2;1;1;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;17;35;30000;0;15;17;1;1;1;-2;-2;1;1;1;1;0;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;32;4;30000;0;36;17;1;10;1;-2;-1;0;0;0;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;32;5;30000;0;28;17;1;8;1;-2;1;0;0;1;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;32;13;30000;0;11;17;1;1;0;-2;1;1;0;1;1;1;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;32;17;30000;0;27;17;1;1;1;-1;0;0;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;32;17;30000;0;27;17;1;1;1;-1;0;0;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;32;32;30000;0;16;17;1;1;1;1;0;1;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;32;35;30000;0;15;17;1;1;1;0;0;0;0;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;35;17;30000;0;15;17;1;1;1;-2;-2;1;1;1;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;35;32;30000;0;30;17;1;1;1;-1;-2;0;0;0;1;1;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;35;35;30000;0;16;17;1;1;1;1;0;1;0;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;35;17;30000;0;30;17;1;1;1;-2;-2;1;0;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;35;32;30000;0;30;17;1;1;1;1;-2;0;1;0;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;17;35;35;30000;0;30;17;1;1;1;0;-2;1;1;1;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;20;20;20;30000;0;8;20;1;1;1;-1;1;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;9;9;30000;0;14;22;1;1;1;-1;-1;1;1;0;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;9;16;30000;0;8;22;1;1;1;-1;-2;1;1;0;1;1;0;2;0;0 @@ -642,10 +682,10 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;16;22;30000;0;8;22;1;1;1;-2;-2;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;22;9;30000;0;13;22;1;1;1;-2;1;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;22;16;30000;0;8;22;1;1;1;-2;1;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;22;22;30000;0;15;22;1;1;1;-2;-1;0;0;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;22;32;30000;0;15;22;1;1;1;-1;-2;0;1;0;1;0;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;22;32;30000;0;15;22;1;1;1;-1;-2;0;1;1;1;0;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;32;9;30000;0;41;22;1;10;1;1;-2;0;1;0;1;0;1;2;1;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;32;22;30000;0;17;22;1;1;1;-2;-1;1;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;32;32;30000;0;15;22;1;1;1;1;-1;1;1;1;1;0;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;32;22;30000;0;17;22;1;1;1;-2;-1;0;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;22;32;32;30000;0;16;22;1;1;1;-1;-1;1;0;0;1;0;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;23;23;23;30000;0;15;23;1;1;1;-1;-1;0;0;0;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;5;5;30000;0;17;8;1;21;1;-1;0;1;0;0;1;1;2;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;5;13;30000;0;8;8;1;17;1;-1;3;1;1;0;1;0;2;1;0;0 @@ -655,24 +695,24 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;5;26;30000;0;6;8;1;19;24;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;5;32;30000;0;1;8;1;6;24;-2;1;0;0;0;0;0;2;1;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;13;5;30000;0;20;24;1;24;1;-2;-2;1;1;1;1;0;0;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;13;13;30000;0;15;8;1;17;24;1;3;0;0;0;1;0;1;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;13;24;30000;0;6;8;1;1;24;0;5;1;0;1;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;13;24;30000;0;6;8;1;1;24;-1;4;1;1;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;13;26;30000;0;17;24;1;1;24;-1;-1;0;0;1;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;13;32;30000;0;5;8;1;1;24;-1;-2;1;0;0;1;0;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;13;32;30000;0;9;8;1;1;24;1;-2;1;0;0;1;0;2;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;16;5;30000;0;24;24;1;8;1;-2;-2;1;1;0;1;0;0;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;24;5;30000;0;32;8;1;18;24;-1;3;1;1;1;1;1;2;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;24;13;30000;0;15;24;1;10;24;-2;-1;0;1;0;1;0;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;24;13;30000;0;15;24;1;11;24;0;1;0;1;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;24;24;30000;0;15;24;1;1;1;-2;-1;0;1;0;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;24;26;30000;0;16;24;1;1;1;0;-1;0;1;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;24;32;30000;0;15;24;1;1;1;0;-1;0;0;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;24;32;30000;0;15;24;1;1;1;-1;-1;1;0;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;5;30000;0;32;8;1;16;26;1;4;0;1;0;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;13;30000;0;13;8;1;23;26;-2;5;0;1;0;1;1;1;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;24;30000;0;13;8;1;6;1;1;1;0;0;0;1;0;0;2;1;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;26;30000;0;16;24;1;1;26;-1;-1;0;1;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;32;30000;0;15;24;1;1;1;-1;-1;1;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;24;30000;0;10;8;1;12;1;-1;0;0;1;0;1;0;1;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;26;30000;0;16;24;1;1;26;-2;-1;0;0;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;26;32;30000;0;15;24;1;1;1;0;-1;1;0;0;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;32;5;30000;0;32;8;1;19;32;1;4;0;0;0;1;1;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;32;13;30000;0;32;8;1;8;32;0;-2;0;1;0;1;1;1;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;32;24;30000;0;19;24;1;1;1;1;-1;0;1;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;32;26;30000;0;11;8;1;8;32;-2;-2;0;0;1;1;0;1;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;32;24;30000;0;17;24;1;1;1;1;-1;1;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;32;26;30000;0;18;8;1;7;32;1;-1;0;1;1;1;0;1;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;24;32;32;30000;0;15;24;1;1;1;-1;-1;1;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;4;4;30000;0;16;25;1;1;1;-2;-1;0;1;0;1;0;0;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;4;5;30000;0;11;8;1;11;1;-1;3;1;0;1;1;0;0;0;0;0 @@ -703,7 +743,7 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;7;25;30000;0;10;8;1;4;25;-1;1;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;7;26;30000;0;8;25;1;2;25;-2;4;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;7;28;30000;0;10;8;1;6;25;-2;1;0;1;1;1;0;2;1;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;7;32;30000;0;2;8;1;1;25;0;5;1;0;1;1;1;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;7;45;30000;0;19;8;1;20;25;1;-1;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;7;45;30000;0;21;8;1;18;25;0;0;1;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;4;30000;0;15;8;1;18;25;-2;4;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;5;30000;0;10;8;1;18;25;0;-2;0;0;1;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;7;30000;0;15;8;1;3;25;0;-1;0;0;1;1;0;1;2;0;0 @@ -712,22 +752,22 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;13;30000;0;10;8;1;14;25;1;5;1; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;25;30000;0;7;8;1;1;25;0;1;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;26;30000;0;3;8;1;1;25;-1;4;1;0;1;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;28;30000;0;3;8;1;1;25;-2;0;1;1;1;1;0;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;32;30000;0;4;8;1;1;25;-1;2;0;1;0;1;1;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;45;30000;0;15;8;1;1;25;-1;1;0;0;0;1;0;2;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;32;30000;0;8;16;1;1;25;-1;2;0;1;0;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;9;45;30000;0;3;8;1;1;25;-1;0;0;1;1;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;4;30000;0;15;8;1;8;25;-2;5;1;0;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;5;30000;0;15;8;1;6;25;-2;0;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;7;30000;0;15;8;1;14;25;-1;-1;1;0;1;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;9;30000;0;15;8;1;4;25;-2;1;0;1;1;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;13;30000;0;15;8;1;18;25;-2;4;1;1;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;14;30000;0;8;25;1;10;25;1;1;0;0;0;1;0;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;25;30000;0;3;8;1;1;25;-2;3;1;1;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;26;30000;0;16;8;1;1;25;-1;0;1;0;1;1;1;2;1;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;28;30000;0;8;8;1;1;25;-2;2;0;0;1;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;32;30000;0;8;16;1;1;25;-2;3;0;1;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;25;30000;0;5;8;1;1;25;1;4;1;1;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;26;30000;0;16;8;1;1;25;0;0;0;0;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;28;30000;0;8;16;1;1;25;0;3;1;0;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;32;30000;0;8;8;1;1;25;-2;0;0;1;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;13;45;30000;0;15;25;1;1;25;0;-1;0;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;14;13;30000;0;8;25;1;10;25;1;1;0;1;1;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;14;14;30000;0;8;25;1;12;25;-2;-1;0;0;0;1;0;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;14;25;30000;0;15;25;1;1;25;0;-1;0;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;14;25;30000;0;15;25;1;1;25;-1;-1;1;1;1;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;14;26;30000;0;15;25;1;1;25;0;-1;1;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;14;32;30000;0;16;25;1;1;25;1;-1;0;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;4;30000;0;30;8;1;17;25;0;3;0;1;0;1;1;1;2;0;0 @@ -737,9 +777,9 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;9;30000;0;30;8;1;20;25;1;3;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;13;30000;0;15;25;1;1;25;0;-1;0;0;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;14;30000;0;17;25;1;1;25;-1;-1;1;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;25;30000;0;16;25;1;1;1;-2;-1;0;0;0;1;0;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;26;30000;0;17;25;1;1;25;-1;-1;1;1;0;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;26;30000;0;15;25;1;1;25;-1;-1;0;1;1;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;28;30000;0;15;25;1;1;25;0;-1;1;1;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;32;30000;0;15;25;1;1;25;-1;-1;1;0;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;32;30000;0;16;25;1;1;25;-1;-1;1;1;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;25;45;30000;0;8;25;1;1;25;-1;1;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;4;30000;0;30;8;1;20;26;-1;3;0;0;0;1;1;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;5;30000;0;30;8;1;2;26;-2;1;0;0;0;1;0;1;2;0;0 @@ -747,26 +787,36 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;7;30000;0;30;8;1;18;26;-1;3;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;9;30000;0;30;8;1;10;26;0;4;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;13;30000;0;16;25;1;1;26;1;-1;1;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;14;30000;0;17;25;1;1;26;1;-1;0;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;25;30000;0;15;25;1;1;26;0;-1;1;1;0;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;25;30000;0;15;25;1;1;26;1;0;1;1;0;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;26;30000;0;15;25;1;1;26;-1;-1;1;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;28;30000;0;6;16;1;15;26;-1;4;0;1;1;1;0;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;32;30000;0;16;25;1;1;26;-1;-1;1;0;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;28;30000;0;6;8;1;19;26;1;4;0;1;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;32;30000;0;16;25;1;1;26;0;0;1;0;0;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;26;45;30000;0;8;25;1;1;26;-2;1;0;0;1;1;1;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;4;30000;0;30;8;1;17;28;-1;6;0;1;0;1;1;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;5;30000;0;14;8;1;17;28;1;3;0;0;1;1;0;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;7;30000;0;30;8;1;23;28;-2;3;1;1;1;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;9;30000;0;8;25;1;1;28;-2;1;0;1;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;13;30000;0;15;25;1;1;28;-1;-1;1;0;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;25;30000;0;15;25;1;1;28;-2;-1;0;1;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;26;30000;0;15;25;1;1;28;1;-1;1;0;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;25;30000;0;15;25;1;1;28;0;0;0;0;1;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;26;30000;0;16;25;1;1;28;-2;-1;1;0;1;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;28;30000;0;16;25;1;1;28;-2;-1;0;0;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;32;30000;0;16;25;1;1;28;0;-1;0;1;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;45;30000;0;17;25;1;1;28;-1;-1;1;1;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;32;30000;0;16;25;1;1;28;0;0;0;1;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;28;45;30000;0;17;25;1;1;28;-1;0;1;1;1;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;4;30000;0;49;25;1;4;32;1;4;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;5;30000;0;8;25;1;1;32;-1;-1;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;7;30000;0;32;25;1;1;32;1;4;0;0;0;1;0;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;9;30000;0;62;25;1;2;32;0;1;0;1;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;13;30000;0;51;25;1;8;32;1;4;0;1;0;1;0;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;14;30000;0;32;25;1;9;32;-1;0;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;25;30000;0;8;25;1;1;32;-1;1;0;1;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;26;30000;0;8;25;1;1;32;-2;1;0;1;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;28;30000;0;8;25;1;1;32;-2;1;0;0;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;32;30000;0;4;25;1;1;32;-1;1;0;0;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;32;45;30000;0;8;25;1;1;32;-1;1;0;1;0;1;0;1;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;4;30000;0;35;25;1;9;45;-2;4;0;1;0;1;0;0;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;5;30000;0;25;25;1;9;45;-2;3;0;0;0;1;0;0;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;7;30000;0;16;25;1;12;45;1;-1;1;0;0;1;1;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;9;30000;0;17;25;1;9;45;0;1;1;1;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;13;30000;0;31;25;1;1;45;-2;-1;1;0;0;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;25;30000;0;30;25;1;1;45;-1;-1;0;0;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;26;30000;0;5;8;1;1;45;0;2;0;0;0;1;0;2;0;0;1 @@ -774,9 +824,23 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;28;30000;0;7;8;1;1;45;-2;2;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;32;30000;0;15;25;1;1;45;1;-1;1;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;25;45;45;30000;0;10;25;1;1;45;0;1;1;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;4;30000;0;16;26;1;6;1;-1;-2;1;0;1;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;5;30000;0;14;26;1;2;26;1;3;0;0;1;1;1;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;7;30000;0;9;26;1;3;26;0;4;1;1;1;1;0;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;9;30000;0;8;26;1;22;26;0;0;0;0;0;1;1;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;13;30000;0;8;26;1;5;26;0;3;0;0;1;1;0;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;25;30000;0;8;26;1;1;26;-2;4;1;0;1;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;26;30000;0;4;26;1;16;26;-2;3;1;1;0;1;1;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;28;30000;0;8;26;1;1;26;-2;3;0;1;1;1;0;2;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;32;30000;0;8;26;1;1;26;-1;-2;0;0;0;1;1;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;4;45;30000;0;8;26;1;1;26;0;4;0;0;0;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;4;30000;0;8;26;1;3;26;0;3;0;0;0;1;0;0;1;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;5;30000;0;14;26;1;3;1;-2;-1;0;1;0;1;0;2;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;7;30000;0;8;26;1;26;26;0;4;0;0;1;1;0;0;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;9;30000;0;8;26;1;20;26;0;-1;0;0;0;1;1;0;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;13;30000;0;15;26;1;16;0;-1;0;0;0;1;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;16;30000;0;8;8;1;16;1;0;3;0;1;1;1;1;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;24;30000;0;1;26;1;11;26;0;3;1;1;0;1;0;2;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;25;30000;0;4;26;1;1;26;1;-2;0;1;1;1;1;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;26;30000;0;8;8;1;1;26;0;1;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;28;30000;0;5;26;1;13;26;-2;4;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;5;32;30000;0;3;26;1;11;26;-2;3;1;1;0;1;0;0;1;1;0 @@ -842,7 +906,7 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;9;30000;0;20;26;1;1;26;-2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;13;30000;0;30;8;1;26;26;-1;-1;1;1;1;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;14;30000;0;15;26;1;1;26;1;-1;0;1;0;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;24;30000;0;15;26;1;1;1;-1;-1;1;0;0;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;25;30000;0;8;26;1;1;26;-1;-1;1;1;0;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;25;30000;0;16;26;1;1;26;-2;-1;1;0;1;1;0;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;26;30000;0;17;26;1;1;1;0;-1;1;0;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;28;30000;0;15;26;1;1;26;-2;-1;1;1;0;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;26;32;30000;0;15;26;1;1;1;-2;-1;0;0;0;1;1;2;0;0;1 @@ -851,12 +915,12 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;4;30000;0;30;8;1;3;28;-2;-1;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;5;30000;0;30;8;1;14;28;-1;5;1;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;7;30000;0;23;26;1;23;28;-2;1;0;0;1;1;1;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;9;30000;0;15;8;1;19;28;1;3;0;1;1;1;0;1;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;13;30000;0;15;26;1;1;28;0;1;1;0;1;1;1;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;13;30000;0;15;26;1;1;28;0;-1;0;0;1;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;25;30000;0;16;26;1;1;28;-1;-1;1;0;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;26;30000;0;16;26;1;1;28;0;-1;0;0;0;1;0;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;28;30000;0;6;8;1;23;28;1;-1;0;0;1;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;28;30000;0;61;8;1;19;28;-1;1;1;1;0;1;1;1;2;1;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;32;30000;0;15;26;1;1;28;0;-1;1;1;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;45;30000;0;15;26;1;1;28;-1;-1;1;1;0;1;1;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;28;45;30000;0;15;26;1;1;28;-1;-1;0;1;0;1;1;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;32;4;30000;0;37;26;1;12;32;1;6;0;0;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;32;5;30000;0;30;26;1;6;32;-1;6;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;26;32;7;30000;0;30;26;1;3;32;-1;5;0;0;0;1;0;1;2;0;0 @@ -896,22 +960,59 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;5;9;30000;0;8;8;1;9;28;-1;4;0;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;5;13;30000;0;9;8;1;19;28;1;1;1;1;1;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;5;25;30000;0;8;28;1;25;28;-1;4;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;5;26;30000;0;5;28;1;26;28;-2;4;0;0;0;1;0;0;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;5;28;30000;0;21;28;1;23;28;-1;4;0;1;1;1;0;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;5;32;30000;0;3;28;1;6;28;-1;-1;1;0;0;1;0;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;5;45;30000;0;4;28;1;12;28;-1;-1;0;0;0;1;0;0;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;4;30000;0;14;28;1;27;28;-2;4;1;0;1;1;0;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;5;30000;0;11;28;1;18;28;0;-2;0;0;1;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;7;30000;0;9;28;1;4;28;0;4;0;0;0;1;0;1;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;9;30000;0;8;28;1;5;28;-2;4;0;1;0;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;13;30000;0;8;28;1;8;28;1;-1;1;0;0;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;25;30000;0;5;28;1;9;28;-2;4;0;1;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;26;30000;0;21;28;1;7;28;-1;4;0;0;1;1;1;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;28;30000;0;4;28;1;14;28;0;2;0;1;0;0;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;32;30000;0;5;28;1;16;28;-1;4;0;1;1;1;0;0;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;7;45;30000;0;3;28;1;14;28;0;-1;0;0;0;0;0;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;4;30000;0;15;28;1;17;28;0;4;0;0;1;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;5;30000;0;15;28;1;16;28;-2;4;1;0;0;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;7;30000;0;26;28;1;19;28;-2;-1;0;0;1;1;1;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;9;30000;0;9;28;1;23;28;-1;0;0;1;0;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;13;30000;0;9;28;1;4;28;1;-1;0;0;1;1;0;2;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;25;30000;0;15;28;1;1;28;0;4;0;1;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;26;30000;0;5;28;1;1;28;-2;4;0;0;1;1;0;0;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;28;30000;0;5;28;1;8;28;1;0;1;1;0;1;1;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;32;30000;0;5;28;1;18;28;1;4;1;0;1;1;0;0;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;9;45;30000;0;8;28;1;1;28;-2;2;0;1;1;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;4;30000;0;21;28;1;5;28;-2;-2;0;1;1;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;5;30000;0;15;28;1;17;28;1;4;0;0;1;1;1;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;7;30000;0;16;28;1;6;28;0;4;0;0;1;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;9;30000;0;21;28;1;8;28;0;0;0;1;0;1;1;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;13;30000;0;12;28;1;2;28;0;-2;0;1;1;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;25;30000;0;8;28;1;12;28;-2;4;0;0;1;1;1;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;26;30000;0;4;28;1;18;28;-1;4;1;1;1;1;0;0;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;28;30000;0;8;28;1;6;28;0;4;0;0;0;1;0;2;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;32;30000;0;1;28;1;25;28;0;0;0;0;1;0;0;2;1;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;13;45;30000;0;2;28;1;1;28;-1;3;0;1;0;1;0;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;4;30000;0;15;28;1;1;28;-1;2;1;1;1;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;5;30000;0;41;28;1;7;28;1;-2;1;1;0;1;1;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;7;30000;0;45;28;1;10;28;-2;-1;0;0;0;1;1;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;9;30000;0;11;28;1;18;28;0;-1;0;1;1;1;0;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;13;30000;0;42;28;1;3;28;1;0;1;0;0;1;1;2;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;25;30000;0;9;28;1;1;28;-1;1;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;26;30000;0;15;28;1;1;28;-1;6;0;1;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;28;30000;0;8;28;1;1;28;-1;1;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;32;30000;0;10;8;1;1;28;-2;1;0;1;0;1;0;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;45;30000;0;8;28;1;1;28;-1;1;0;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;25;45;30000;0;8;28;1;1;28;-1;1;0;1;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;4;30000;0;28;28;1;4;28;1;4;0;1;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;5;30000;0;28;28;1;13;28;0;6;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;7;30000;0;30;28;1;18;28;1;4;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;9;30000;0;32;28;1;23;28;-1;4;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;13;30000;0;23;28;1;14;28;0;-2;0;0;0;1;0;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;25;30000;0;8;28;1;1;28;-2;1;0;1;0;1;1;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;26;30000;0;15;16;1;1;28;-1;2;0;0;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;25;30000;0;8;28;1;1;28;0;1;0;1;0;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;26;30000;0;15;16;1;1;28;1;1;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;28;30000;0;8;28;1;1;28;0;1;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;32;30000;0;8;28;1;1;28;-2;1;0;1;1;1;1;2;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;45;30000;0;8;28;1;1;28;0;1;0;0;1;1;1;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;26;45;30000;0;15;28;1;1;28;1;1;1;1;1;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;4;30000;0;32;28;1;23;28;-1;4;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;5;30000;0;41;28;1;12;28;-1;0;0;0;0;1;0;2;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;7;30000;0;32;28;1;8;28;0;5;0;1;0;1;0;1;2;0;0 @@ -919,8 +1020,8 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;9;30000;0;30;28;1;4;28;1;6;0; Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;13;30000;0;8;28;1;5;28;1;1;0;1;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;14;30000;0;15;28;1;1;28;-2;1;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;25;30000;0;16;28;1;1;28;-1;1;0;1;1;1;0;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;26;30000;0;16;28;1;1;28;-1;-1;1;1;1;1;0;0;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;28;30000;0;8;8;1;18;1;-2;4;1;0;1;1;0;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;26;30000;0;16;28;1;1;28;-2;-1;1;1;1;1;0;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;28;30000;0;8;8;1;16;1;-2;4;0;0;1;1;0;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;32;30000;0;9;28;1;1;28;-2;1;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;28;45;30000;0;8;28;1;1;28;-1;1;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;28;32;4;30000;0;30;28;1;21;32;1;5;0;0;0;1;0;0;0;0;0 @@ -954,7 +1055,7 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;16;55;30000;0;8;16;1;1;29;0;-2;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;29;14;30000;0;6;29;1;22;29;1;-1;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;29;16;30000;0;13;29;1;1;29;-2;1;0;0;1;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;29;29;30000;0;8;29;1;1;29;-1;1;0;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;29;32;30000;0;10;8;1;1;29;1;4;1;1;1;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;29;32;30000;0;10;8;1;1;29;1;4;1;0;1;1;1;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;29;55;30000;0;8;29;1;1;29;-1;1;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;32;14;30000;0;9;29;1;18;32;-1;-1;0;0;0;1;0;1;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;29;32;29;30000;0;15;16;1;1;32;-1;1;0;1;1;1;0;2;0;0;0 @@ -990,7 +1091,7 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;5;25;30000;0;2;32;1;1;32;1;2;1;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;5;26;30000;0;9;8;1;1;32;-2;5;1;0;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;5;28;30000;0;4;32;1;21;32;-1;6;0;0;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;5;32;30000;0;8;32;1;1;1;-1;-1;0;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;5;45;30000;0;2;8;1;15;32;-2;6;0;0;1;1;0;0;1;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;5;45;30000;0;2;8;1;28;32;-2;6;0;1;0;1;1;0;1;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;4;30000;0;17;8;1;30;32;-2;5;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;5;30000;0;14;8;1;18;32;1;1;1;0;1;1;0;2;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;7;30000;0;14;8;1;26;32;-1;5;0;0;0;1;0;2;2;0;0 @@ -999,19 +1100,19 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;13;30000;0;21;8;1;10;32;-1;6;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;25;30000;0;8;8;1;1;32;1;5;1;1;0;1;1;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;26;30000;0;8;8;1;1;32;0;0;1;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;28;30000;0;4;8;1;17;32;0;4;1;0;1;1;0;0;1;1;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;32;30000;0;17;8;1;25;32;-2;4;0;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;45;30000;0;8;8;1;1;32;-1;1;0;0;0;1;1;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;32;30000;0;9;8;1;1;32;-1;1;0;0;1;0;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;7;45;30000;0;8;8;1;1;32;1;1;1;0;0;1;1;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;4;30000;0;17;8;1;19;32;1;5;0;0;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;5;30000;0;15;8;1;20;32;-1;4;1;1;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;7;30000;0;15;8;1;22;32;0;5;0;0;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;9;30000;0;10;8;1;1;32;1;4;0;1;0;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;13;30000;0;15;8;1;11;32;0;4;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;22;30000;0;3;8;1;1;32;-1;4;1;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;25;30000;0;6;8;1;1;32;-2;5;0;1;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;26;30000;0;8;16;1;1;32;1;2;0;1;1;1;1;0;0;1;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;28;30000;0;3;8;1;8;32;-1;4;0;0;1;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;32;30000;0;5;8;1;32;32;0;4;0;1;0;1;0;0;1;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;45;30000;0;2;32;1;31;32;1;5;0;1;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;25;30000;0;6;8;1;1;32;1;1;1;0;1;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;26;30000;0;5;16;1;1;32;1;4;0;1;1;1;1;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;28;30000;0;6;8;1;1;32;-2;-2;1;0;1;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;32;30000;0;5;8;1;30;32;1;4;0;1;0;1;0;0;1;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;9;45;30000;0;4;8;1;1;32;-1;-2;1;0;1;1;0;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;4;30000;0;22;32;1;8;1;-1;1;1;0;1;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;5;30000;0;20;32;1;8;1;-1;0;1;1;1;1;0;2;1;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;7;30000;0;17;8;1;3;32;0;6;0;1;0;1;0;2;2;0;0 @@ -1019,45 +1120,68 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;9;30000;0;21;32;1;27;32;-1;-1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;13;30000;0;9;32;1;21;1;-1;-2;1;0;0;1;1;0;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;14;30000;0;31;32;1;15;32;1;-1;1;1;0;1;0;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;17;30000;0;8;32;1;17;1;-2;-2;0;0;0;1;1;2;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;24;30000;0;15;8;1;1;32;-1;0;1;1;1;1;1;2;2;1;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;25;30000;0;8;8;1;1;32;0;4;1;0;0;1;1;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;26;30000;0;16;32;1;1;32;-2;4;0;0;1;1;0;2;2;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;28;30000;0;15;8;1;1;32;0;3;1;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;24;30000;0;15;8;1;17;32;1;3;0;1;0;1;1;0;1;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;25;30000;0;15;8;1;1;32;-2;-2;1;1;1;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;26;30000;0;15;8;1;1;32;-1;3;0;1;0;1;1;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;28;30000;0;18;16;1;5;32;-2;4;1;1;0;1;0;0;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;32;30000;0;8;32;1;1;1;-2;0;0;0;0;1;1;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;45;30000;0;4;8;1;1;32;-2;1;0;0;1;1;1;0;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;13;45;30000;0;5;8;1;1;32;-1;1;0;0;1;1;0;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;14;13;30000;0;15;32;1;28;32;-2;6;0;0;0;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;14;14;30000;0;21;32;1;7;32;1;-2;0;1;0;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;14;25;30000;0;15;32;1;1;32;-1;4;1;0;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;14;26;30000;0;15;32;1;1;32;-2;4;1;1;1;1;1;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;14;29;30000;0;8;8;1;1;32;-1;6;1;1;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;14;32;30000;0;8;32;1;1;32;-1;2;0;1;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;14;32;30000;0;8;16;1;1;32;-1;-1;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;17;4;30000;0;32;8;1;8;1;0;1;1;0;1;1;1;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;17;5;30000;0;32;8;1;27;1;1;1;0;1;0;1;1;2;2;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;17;13;30000;0;12;8;1;19;1;0;6;0;0;0;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;17;13;30000;0;12;8;1;25;1;0;0;0;1;0;1;0;1;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;17;17;30000;0;15;32;1;1;1;-1;1;1;0;1;1;1;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;17;32;30000;0;12;8;1;1;1;-2;1;1;0;0;1;0;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;22;9;30000;0;13;32;1;26;32;0;4;0;1;1;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;22;22;30000;0;12;8;1;1;1;1;4;1;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;22;32;30000;0;17;8;1;1;1;-2;0;1;1;0;1;1;2;2;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;24;24;30000;0;12;8;1;1;32;1;-2;0;1;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;22;32;30000;0;17;8;1;1;1;1;1;1;0;0;1;1;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;24;5;30000;0;18;32;1;15;32;0;4;0;1;0;1;1;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;24;13;30000;0;9;32;1;7;32;-2;-1;1;0;0;1;0;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;24;24;30000;0;12;8;1;1;32;-2;-2;1;0;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;24;26;30000;0;12;8;1;1;32;-1;5;0;0;0;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;24;32;30000;0;13;8;1;1;1;-2;1;0;1;0;1;1;2;2;1;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;24;32;30000;0;13;8;1;1;1;-1;0;0;0;0;1;1;2;2;1;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;4;30000;0;30;32;1;31;32;1;4;0;0;0;1;1;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;5;30000;0;17;32;1;20;32;1;4;1;0;1;1;0;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;7;30000;0;30;32;1;24;32;1;4;0;1;0;1;1;0;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;9;30000;0;12;32;1;10;32;-2;1;0;1;1;1;0;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;13;30000;0;30;32;1;12;32;-2;4;0;1;0;1;0;1;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;14;30000;0;30;32;1;23;32;0;4;0;1;0;1;0;2;2;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;25;30000;0;15;32;1;1;32;-1;1;0;1;1;1;1;2;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;26;30000;0;9;32;1;1;32;-1;1;0;1;0;1;0;2;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;26;30000;0;15;32;1;1;32;1;1;1;1;0;1;0;0;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;28;30000;0;6;16;1;1;32;-1;4;1;0;1;1;0;0;0;0;0 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;32;30000;0;6;8;1;1;32;-2;0;1;0;0;1;0;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;32;30000;0;12;8;1;1;32;1;0;1;0;1;1;0;1;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;25;45;30000;0;10;8;1;1;32;-2;4;1;1;1;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;4;30000;0;30;32;1;25;32;1;4;1;0;1;1;1;2;2;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;5;30000;0;31;32;1;24;32;1;4;1;0;0;1;0;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;7;30000;0;30;32;1;11;32;1;4;0;1;0;1;1;2;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;9;30000;0;30;32;1;8;32;1;4;1;0;0;1;1;2;0;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;13;30000;0;41;32;1;15;32;-1;0;1;0;1;1;0;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;14;30000;0;9;32;1;7;32;0;-1;0;0;1;1;0;0;0;1;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;24;30000;0;10;8;1;1;1;0;0;1;1;1;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;25;30000;0;10;32;1;1;32;-1;4;1;0;0;1;1;0;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;26;30000;0;30;8;1;15;1;1;2;0;1;0;1;1;0;2;1;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;28;30000;0;12;8;1;13;32;-2;4;0;0;0;1;0;0;2;1;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;28;30000;0;15;8;1;7;32;-2;4;0;0;0;1;0;2;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;32;30000;0;15;8;1;1;1;-1;-2;1;1;1;1;0;1;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;26;45;30000;0;20;8;1;1;32;-1;5;0;1;1;1;0;1;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;25;30000;0;20;8;1;1;32;1;4;0;1;1;1;0;1;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;26;30000;0;30;8;1;29;32;1;2;0;0;0;1;1;0;2;1;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;4;30000;0;16;32;1;28;32;0;4;0;0;1;1;1;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;5;30000;0;41;32;1;15;32;1;-1;0;0;0;1;1;0;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;7;30000;0;31;32;1;2;32;1;4;0;1;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;9;30000;0;41;32;1;28;32;-2;0;0;0;0;1;0;2;2;1;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;13;30000;0;15;32;1;1;32;-1;4;1;1;0;1;1;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;25;30000;0;20;8;1;1;32;-2;4;0;1;1;1;1;1;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;26;30000;0;30;16;1;31;32;0;-2;0;0;0;1;0;2;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;28;30000;0;30;16;1;1;32;0;4;1;0;1;1;0;1;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;32;30000;0;20;8;1;1;32;-2;-2;1;1;1;1;0;1;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;45;30000;0;12;8;1;1;32;0;1;0;1;1;1;0;1;0;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;14;30000;0;31;8;1;32;32;-2;-1;1;0;0;1;1;0;2;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;29;30000;0;30;8;1;25;32;0;4;1;1;0;1;0;0;2;1;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;32;30000;0;32;8;1;1;32;0;1;1;1;0;1;0;2;2;0;1 -Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;55;30000;0;59;8;1;1;32;0;4;1;0;0;1;0;1;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;28;45;30000;0;20;8;1;1;32;1;-2;0;1;1;1;0;1;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;14;30000;0;31;8;1;12;32;-2;2;0;1;0;1;0;0;0;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;29;30000;0;30;8;1;23;32;1;4;1;1;0;1;0;0;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;32;30000;0;20;8;1;1;32;-2;0;1;1;0;1;0;2;2;0;1 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;29;55;30000;0;59;8;1;1;32;-1;4;0;1;1;1;0;1;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;32;4;30000;0;30;16;1;27;1;-2;4;0;0;0;1;0;2;2;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;32;5;30000;0;30;32;1;10;1;-2;6;0;0;0;1;0;2;0;0;0 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;32;32;7;30000;0;30;32;1;27;32;1;4;0;1;0;1;0;1;2;0;0 @@ -1095,6 +1219,7 @@ Intel(R) Data Center GPU Max 1550 [0x0bd5];3;35;35;35;30000;0;9;8;1;34;1;0;4;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;36;36;36;30000;0;6;8;1;23;36;1;5;1;0;0;1;0;2;2;1;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;40;40;40;30000;0;12;8;1;1;1;0;0;1;0;0;1;1;1;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;45;4;4;30000;0;3;45;1;36;45;0;2;0;1;0;1;0;0;0;0;0 +Intel(R) Data Center GPU Max 1550 [0x0bd5];3;45;13;13;30000;0;10;8;1;1;45;1;6;0;1;0;1;0;1;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;45;32;28;30000;0;19;16;1;20;45;-1;6;0;0;0;1;0;0;2;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;45;45;45;30000;0;30;45;1;1;45;-2;1;0;0;0;1;0;2;0;0;1 Intel(R) Data Center GPU Max 1550 [0x0bd5];3;76;30;30;30000;0;12;16;1;50;76;1;10;0;1;1;1;1;0;0;1;1 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0892ee34c7a..1eeadafb63d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -102,16 +102,16 @@ set(dbcsr_unittest_common_SRCS dbcsr_test_add.F dbcsr_test_multiply.F) # OBJECT lib, but we would need cmake 3.12 to be able to specify # target_link_libraries on those to get the proper compile flags add_library(dbcsr_unittest_common STATIC ${dbcsr_unittest_common_SRCS}) +# target_link_libraries(dbcsr_unittest_common PUBLIC dbcsr) target_link_libraries(dbcsr_unittest_common PUBLIC ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}) if (OpenMP_FOUND) target_link_libraries(dbcsr_unittest_common PUBLIC OpenMP::OpenMP_Fortran) endif () - if (APPLE AND BLAS_LIBRARIES MATCHES "Accelerate") target_compile_definitions(dbcsr_unittest_common PRIVATE __ACCELERATE) endif () -target_link_libraries(dbcsr_unittest_common PUBLIC dbcsr) +target_link_libraries(dbcsr_unittest_common PUBLIC dbcsr) # last # Compile Fortran tests foreach (dbcsr_test ${DBCSR_TESTS_FTN}) diff --git a/tests/dbcsr_test_multiply.F b/tests/dbcsr_test_multiply.F index c1c8777a890..10e2b540c29 100644 --- a/tests/dbcsr_test_multiply.F +++ b/tests/dbcsr_test_multiply.F @@ -70,7 +70,7 @@ SUBROUTINE dbcsr_test_multiplies(test_name, mp_group, mp_env, npdims, io_unit, & !! processor grids CHARACTER(len=*), INTENT(IN) :: test_name - TYPE(mp_comm_type), INTENT(IN) :: mp_group + TYPE(mp_comm_type), INTENT(IN) :: mp_group !! MPI communicator TYPE(dbcsr_mp_obj), INTENT(IN) :: mp_env INTEGER, DIMENSION(2), INTENT(in) :: npdims @@ -208,7 +208,7 @@ SUBROUTINE dbcsr_test_multiplies(test_name, mp_group, mp_env, npdims, io_unit, & CALL dbcsr_make_random_block_sizes(sizes_k, matrix_sizes(3), bs_k) ! - ! if we have symmetry the row and column block sizes hae to match + ! if we have symmetry the row and column block sizes have to match IF (c_symm .NE. dbcsr_type_no_symmetry .AND. a_symm .NE. dbcsr_type_no_symmetry .AND. & b_symm .NE. dbcsr_type_no_symmetry) THEN my_sizes_m => sizes_m