Merge master code 2016_10_14 till Added disabled code thrinfo_t structures

Change-Id: If7db98d286c1471fcd30f00757abee9b253ef987
This commit is contained in:
praveeng
2016-10-14 17:00:57 +05:30
5 changed files with 24 additions and 19 deletions

View File

@@ -153,9 +153,9 @@ endif
ifeq ($(CC_VENDOR),gcc)
ifeq ($(THREADING_MODEL),auto)
THREADING_MODEL := omp
THREADING_MODEL := openmp
endif
ifeq ($(THREADING_MODEL),omp)
ifeq ($(THREADING_MODEL),openmp)
CTHREADFLAGS := -fopenmp
LDFLAGS += -fopenmp
endif
@@ -167,9 +167,9 @@ endif
ifeq ($(CC_VENDOR),icc)
ifeq ($(THREADING_MODEL),auto)
THREADING_MODEL := omp
THREADING_MODEL := openmp
endif
ifeq ($(THREADING_MODEL),omp)
ifeq ($(THREADING_MODEL),openmp)
CTHREADFLAGS := -fopenmp
LDFLAGS += -fopenmp
endif
@@ -183,7 +183,7 @@ ifeq ($(CC_VENDOR),clang)
ifeq ($(THREADING_MODEL),auto)
THREADING_MODEL := pthreads
endif
ifeq ($(THREADING_MODEL),omp)
ifeq ($(THREADING_MODEL),openmp)
CTHREADFLAGS := -fopenmp
LDFLAGS += -fopenmp
endif

View File

@@ -422,6 +422,7 @@ exit(1);
return paths;
}
#endif
void bli_l3_thrinfo_free_paths
(
@@ -436,5 +437,4 @@ void bli_l3_thrinfo_free_paths
bli_free_intl( threads );
}
#endif

View File

@@ -121,10 +121,10 @@ thrinfo_t** bli_l3_thrinfo_create_full_paths
(
cntx_t* cntx
);
#endif
void bli_l3_thrinfo_free_paths
(
thrinfo_t** threads
);
#endif

View File

@@ -88,13 +88,6 @@ void bli_gemm_front
// Record the threading for each level within the context.
bli_cntx_set_thrloop_from_env( BLIS_GEMM, BLIS_LEFT, cntx );
// Create the first node in the thrinfo_t tree for each thread.
//thrinfo_t** infos = bli_l3_thrinfo_create_full_paths( cntx );
//bli_l3_thrinfo_print_paths( infos );
//exit(1);
//cntl = bli_gemm_cntl_create( BLIS_GEMM );
//thrinfo_t** infos = bli_l3_thrinfo_create_roots( cntx, cntl );
// Invoke the internal back-end via the thread handler.
bli_l3_thread_decorator
(
@@ -107,10 +100,5 @@ void bli_gemm_front
cntx,
cntl
);
//bli_l3_thrinfo_print_paths( infos );
//exit(1);
// Free the thrinfo_t structures.
//bli_l3_thrinfo_free_paths( infos );
}

View File

@@ -199,6 +199,8 @@ void bli_thrcomm_tree_barrier( barrier_t* barack )
#endif
//#define PRINT_THRINFO
void bli_l3_thread_decorator
(
l3int_t func,
@@ -217,6 +219,10 @@ void bli_l3_thread_decorator
// Allcoate a global communicator for the root thrinfo_t structures.
thrcomm_t* gl_comm = bli_thrcomm_create( n_threads );
#ifdef PRINT_THRINFO
thrinfo_t** threads = bli_malloc_intl( n_threads * sizeof( thrinfo_t* ) );
#endif
_Pragma( "omp parallel num_threads(n_threads)" )
{
dim_t id = omp_get_thread_num();
@@ -245,13 +251,24 @@ void bli_l3_thread_decorator
// Free the control tree, if one was created locally.
bli_l3_cntl_free_if( a, b, c, cntx, cntl, cntl_use, thread );
#ifdef PRINT_THRINFO
threads[id] = thread;
#else
// Free the current thread's thrinfo_t structure.
bli_l3_thrinfo_free( thread );
#endif
}
// We shouldn't free the global communicator since it was already freed
// by the global communicator's chief thread in bli_l3_thrinfo_free()
// (called above).
#ifdef PRINT_THRINFO
bli_l3_thrinfo_print_paths( threads );
bli_l3_thrinfo_free_paths( threads );
exit(1);
#endif
}
#endif