diff --git a/coreblas/compute/global.c b/coreblas/compute/global.c index f924989765d7fbc7fe164b4d19b0abc82ff4094b..7ce1142c0743561f725484f3cd5a91770e6243d3 100644 --- a/coreblas/compute/global.c +++ b/coreblas/compute/global.c @@ -22,10 +22,20 @@ */ #include "coreblas.h" #include <stdarg.h> +#include <stdlib.h> int _coreblas_silent = 0; static int coreblas_gemm3m_enabled = 0; +__attribute__((unused)) __attribute__((constructor)) static void +__coreblas_lib_init() +{ + char *silent = getenv("CHAMELEON_COREBLAS_SILENT"); + if ( silent && !(strcmp( silent, "0" ) == 0) ) { + _coreblas_silent = 1; + } +} + #if defined(CHAMELEON_KERNELS_TRACE) void __coreblas_kernel_trace( const char *func, ... ) {