[vsipl++] [patch] misc benchmark fixes

Jules Bergmann jules at codesourcery.com
Mon Dec 19 19:41:57 UTC 2005


Don McCoy wrote:
> This patch adds some additional targets to the benchmark makefile in 
> order to group the benchmarks by dependencies.  Is there is a better way 
> to do this - perhaps automatically, depending on which libraries are 
> installed?

Instead of always putting the IPP and SAL bechmarks in special, you 
could selectively remove them from def_build if VSIP_IMPL_HAVE_{IPP/SAL} 
is not defined.

> 
> As it stands now, the following are available:
> 
>    'make bench'          builds benchmarks that should work on any platform
>    'make bench-ipp'      builds those tests that are dependent on ipp
>    'make bench-lapack'   builds those dependent on lapack
> 
> Regards,
> 
> 
> ------------------------------------------------------------------------
> 
> 2005-12-06  Don McCoy  <don at codesourcery.com>
> 
> 	* benchmarks/GNUmakefile.inc.in: additonal targets added. 
> 	  fixed 'bench' target to build basic performance tests only.
> 	* benchmarks/dot.cpp: corrected evaluator tag for vector-
> 	  vector dot product.
> 
> 
> ------------------------------------------------------------------------
> 


First, you'll need something like this at the start of GNUmakefile: 
(althoughthese lines are already in src/vsip/GNUmakefile.inc ... perhaps 
we should just move them into the top-level GNUmakefile so that they can 
be shared):

	VSIP_IMPL_HAVE_IPP := @VSIP_IMPL_HAVE_IPP@
	VSIP_IMPL_HAVE_SAL := @VSIP_IMPL_HAVE_SAL@


>   benchmarks_cxx_tests   := $(patsubst $(srcdir)/%.cpp, %.test,		\
>                                        $(benchmarks_cxx_sources))
>   
> ! benchmarks_cxx_exes_ipp	:= benchmarks/conv_ipp$(EXEEXT)			\
> ! 	benchmarks/fft_ipp$(EXEEXT) benchmarks/fft_ext_ipp$(EXEEXT)	\
> ! 	benchmarks/vmul_ipp$(EXEEXT)
> ! 
> ! benchmarks_cxx_exes_lapack := benchmarks/qrd$(EXEEXT)
> ! 
> ! benchmarks_cxx_exes_special   := benchmarks/main$(EXEEXT) 	\

## Leave IPP and SAL executables out of special
## DELETE > ! 	$(benchmarks_cxx_exes_ipp) $(benchmarks_cxx_exes_lapack)

>   benchmarks_cxx_exes_def_build := $(filter-out $(benchmarks_cxx_exes_special), \
>                                                 $(benchmarks_cxx_exes))

## Instead take them out here:

ifndef VSIP_IMPL_HAVE_IPP
   benchmarks_cxx_exes_def_build := ... filter out ipp exes ...
endif

ifndef VSIP_IMPL_HAVE_SAL
   benchmarks_cxx_exes_def_build := ... filter out SAL exes ...
endif


>   
> *************** cxx_sources += $(benchmarks_cxx_sources)
> *** 41,47 ****
>   # Rules
>   ########################################################################
>   
> ! bench:: $(benchmarks_cxx_exec)
>   
>   # Object files will be deleted by the parent clean rule.
>   clean::
> --- 48,58 ----
>   # Rules
>   ########################################################################
>   
> ! bench:: $(benchmarks_cxx_exes_def_build)
> ! 
> ! bench-ipp:: $(benchmarks_cxx_exes_ipp)
> ! 
> ! bench-lapack:: $(benchmarks_cxx_exes_lapack)
>   
>   # Object files will be deleted by the parent clean rule.
>   clean::
> *************** clean::
> *** 50,58 ****
> --- 61,79 ----
>   $(benchmarks_cxx_exes_def_build): %$(EXEEXT) : %.$(OBJEXT) benchmarks/main.$(OBJEXT) src/vsip/libvsip.a
>   	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) || rm -f $@
>   
> + $(benchmarks_cxx_exes_ipp): %$(EXEEXT) : %.$(OBJEXT) benchmarks/main.$(OBJEXT) src/vsip/libvsip.a
> + 	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) || rm -f $@
> + 
> + $(benchmarks_cxx_exes_lapack): %$(EXEEXT) : %.$(OBJEXT) benchmarks/main.$(OBJEXT) src/vsip/libvsip.a
> + 	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) || rm -f $@
> + 
>   xyz:
>   	@echo $(benchmarks_cxx_exes)
>   	@echo "--------------------------------------------------"
>   	@echo $(benchmarks_cxx_exes_def_build)
>   	@echo "--------------------------------------------------"
> + 	@echo $(benchmarks_cxx_exes_ipp)
> + 	@echo "--------------------------------------------------"
> + 	@echo $(benchmarks_cxx_exes_fft)
> + 	@echo "--------------------------------------------------"
>   	@echo $(benchmarks_cxx_exes_special)

Well, you should really delete this target!  I was using it for 
debugging and accidentally checked it in ...




More information about the vsipl++ mailing list