Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
setting RNG_BACKEND variable based on the backend config in makefile.

Signed-off-by: Dhanus M Lal <[email protected]>
  • Loading branch information
DhanusML committed Sep 27, 2024
1 parent f5ac14f commit a2ad4f3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ show_help() {
--plat:The platform to build for. This is passed to the oneDAL top level Makefile
--blas-dir:The BLAS installation directory to use to build oneDAL with in the case that the backend is given as `ref`. If the installation directory does not exist, attempts to build this from source
--tbb-dir:The TBB installation directory to use to build oneDAL with in the case that the backend is given as `ref`. If the installation directory does not exist, attempts to build this from source
--use-openrng:Set this to yes if openrng is to be used as RNG backend. Use this with the `ref` backend.
--use-openrng:Set this to yes if openrng is to be used as RNG backend. Use this only with the `ref` backend.
--sysroot:The sysroot to use, in the case that clang is used as the cross-compiler
'
}
Expand Down
21 changes: 17 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ ARCH_is_$(ARCH) := yes
DEFAULT_BUILD_PARAMETERS_LIB := $(if $(OS_is_win),no,yes)
BUILD_PARAMETERS_LIB ?= $(DEFAULT_BUILD_PARAMETERS_LIB)

ifeq ($(RNG_BACKEND), openrng)
RNG_OPENRNG := yes
endif

ifdef OS_is_win
ifeq ($(BUILD_PARAMETERS_LIB),yes)
$(error Building with the parameters library is not available on Windows OS)
Expand Down Expand Up @@ -285,6 +281,23 @@ MKLGPUFPKDIR.lib := $(MKLGPUFPKDIR)/lib
mklgpufpk.LIBS_A := $(MKLGPUFPKDIR.lib)/$(plib)daal_sycl$d.$(a)
mklgpufpk.HEADERS := $(MKLGPUFPKDIR.include)/mkl_dal_sycl.hpp $(MKLGPUFPKDIR.include)/mkl_dal_blas_sycl.hpp

ifeq ($(BACKEND_CONFIG), ref)
ifeq ($(RNG_BACKEND), openrng)
RNG_OPENRNG := yes
endif
ifndef RNG_BACKEND
RNG_BACKEND := ref
endif
$(if $(filter $(RNG_BACKEND),ref openrng),,$(error unknown rng backend $(RNG_BACKEND)))
endif

ifeq ($(BACKEND_CONFIG), mkl)
ifndef RNG_BACKEND
RNG_BACKEND := mkl
endif
$(if $(filter $(RNG_BACKEND),mkl),,$(error mkl backend does not support the rng backend $(RNG_BACKEND)))
endif

include dev/make/deps.$(BACKEND_CONFIG).mk

#===============================================================================
Expand Down

0 comments on commit a2ad4f3

Please sign in to comment.