From cb17f71f326a31257044c27947b908094f37fe03 Mon Sep 17 00:00:00 2001 From: Hans Pabst Date: Wed, 22 Jan 2025 12:59:19 +0100 Subject: [PATCH] ocl: limit some verbose output to rank-0 --- src/acc/opencl/smm/opencl_libsmm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/acc/opencl/smm/opencl_libsmm.c b/src/acc/opencl/smm/opencl_libsmm.c index f5dc95a8683..af1583ee0b3 100644 --- a/src/acc/opencl/smm/opencl_libsmm.c +++ b/src/acc/opencl/smm/opencl_libsmm.c @@ -505,16 +505,22 @@ int libsmm_acc_init(void) { memcpy(config_init, &config, sizeof(config)); } # if LIBXSMM_VERSION4(1, 17, 0, 0) < LIBXSMM_VERSION_NUMBER - if (active_match == i && 0 != default_uid && default_uid != key.devuid) { + if (active_match == i && 0 != default_uid) { key.devuid = default_uid; config_init = (opencl_libsmm_smm_t*)libxsmm_xdispatch(&key, sizeof(key)); - if (NULL == config_init && NULL != libxsmm_xregister(&key, sizeof(key), sizeof(config), &config)) { + if (NULL != config_init || NULL != libxsmm_xregister(&key, sizeof(key), sizeof(config), &config)) { static int info = 0; - if (0 == info && 0 != c_dbcsr_acc_opencl_config.verbosity && + if (0 == info && 0 == c_dbcsr_acc_opencl_config.nrank && 0 != c_dbcsr_acc_opencl_config.verbosity && EXIT_SUCCESS == c_dbcsr_acc_opencl_device_name(c_dbcsr_acc_opencl_config.device.id, bufname, ACC_OPENCL_BUFFERSIZE, NULL /*platform*/, 0 /*platform_maxlen*/, /*cleanup*/ 0)) { - fprintf(stderr, "INFO ACC/LIBSMM: PARAMS of \"%s\" used for \"%s\"\n", OPENCL_KERNELS_DEVICES[i], bufname); + if (default_uid != key.devuid) { + fprintf(/* print best-matching device */ + stderr, "INFO ACC/LIBSMM: PARAMS of \"%s\" used for \"%s\"\n", OPENCL_KERNELS_DEVICES[i], bufname); + } + else { + fprintf(stderr, "INFO ACC/LIBSMM: PARAMS of \"%s\" used to instantiate kernels\n", OPENCL_KERNELS_DEVICES[i]); + } info = 1; } }