diff --git a/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h b/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h index 3f5f91a716e..3a05639cadc 100644 --- a/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h +++ b/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h @@ -79,12 +79,12 @@ struct BinParams {} BinParams(const BinParams & o) : maxBins(o.maxBins), minBinSize(o.minBinSize), binningStrategy(o.binningStrategy) {} - /* Strategy to create bins for feature values. Default: quantiles */ - BinningStrategy binningStrategy = BinningStrategy::quantiles; /* Maximum number of bins for indexed data. Default: 256 */ size_t maxBins = 256; /* Minimum bin width (number of data points per bin). Default: 5*/ size_t minBinSize = 5; + /* Strategy to create bins for feature values. Default: quantiles */ + BinningStrategy binningStrategy = BinningStrategy::quantiles; }; ////////////////////////////////////////////////////////////////////////////////////////// @@ -100,16 +100,17 @@ class IndexedFeatures struct FeatureEntry { DAAL_NEW_DELETE(); - IndexType numIndices = 0; //number of indices or bins - ModelFPType * binBorders = nullptr; //right bin borders - ModelFPType min = 0; //used for random splitter, since all borders are known but min. + IndexType numIndices = 0; // number of indices or bins + ModelFPType * binBorders = nullptr; // right bin borders + ModelFPType min = 0; // used for random splitter, since all borders are known but min. services::Status allocBorders(); ~FeatureEntry(); }; public: - IndexedFeatures() : _data(nullptr), _entries(nullptr), _sizeOfIndex(sizeof(IndexType)), _nCols(0), _nRows(0), _capacity(0), _maxNumIndices(0) {} + IndexedFeatures() : _data(nullptr), _entries(nullptr), _sizeOfIndex(sizeof(IndexType)), _nRows(0), _nCols(0), _capacity(0), _maxNumIndices(0) {} + ~IndexedFeatures(); //initialize the feature indices, i.e. bins @@ -133,7 +134,7 @@ class IndexedFeatures ModelFPType binRightBorder(size_t iCol, size_t iBin) const { DAAL_ASSERT(isBinned(iCol)); - DAAL_ASSERT(iBin < numIndices(iCol)); + DAAL_ASSERT(iBin < static_cast(numIndices(iCol))); return _entries[iCol].binBorders[iBin]; } diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index 78ec5da36fe..19b7234bc6c 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -25,8 +25,8 @@ CMPLRDIRSUFF.dpcpp = _dpcpp CORE.SERV.COMPILER.dpcpp = generic --Zl.dpcpp = --DEBC.dpcpp = -g +-Zl.dpcpp = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib +-DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel @@ -39,6 +39,12 @@ link.dynamic.win.dpcpp = icx -fsycl -m64 -fsycl-device-code-split=per_kernel -fs pedantic.opts.lnx.dpcpp = -pedantic \ -Wall \ -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter + +pedantic.opts.win.dpcpp = -Wall \ + -Wextra \ + -Wwritable-strings \ -Wno-unused-parameter p4_OPT.dpcpp = -march=nocona diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index e61e6bc39bc..e929c9313f9 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -26,7 +26,7 @@ CORE.SERV.COMPILER.icx = generic -Zl.icx = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib --DEBC.icx = $(if $(OS_is_win),-debug:all -Z7,-g) +-DEBC.icx = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) @@ -37,19 +37,16 @@ COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD -Qopenmp-simd, -MDd) -nolo link.dynamic.lnx.icx = icx -m64 -no-intel-lib -pedantic.opts.icx = -pedantic \ - -Wall \ - -Wextra \ - -Wwritable-strings \ - -Wno-unused-parameter +pedantic.opts.lnx.icx = -pedantic \ + -Wall \ + -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter -pedantic.opts.icx_win = -Wall \ - -Wextra \ - -Wwritable-strings \ - -Wno-unused-parameter - -pedantic.opts.lnx.icx = $(pedantic.opts.icx) -pedantic.opts.win.icx = $(pedantic.opts.icx_win) +pedantic.opts.win.icx = -Wall \ + -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter p4_OPT.icx = -march=nocona mc3_OPT.icx = -march=nehalem diff --git a/makefile b/makefile index 4d66bd06ad4..91922e98f0b 100644 --- a/makefile +++ b/makefile @@ -116,26 +116,27 @@ AR_is_$(subst $(space),_,$(origin AR)) := yes OSList := lnx win mac -o := $(if $(OS_is_win),obj,o) -a := $(if $(OS_is_win),lib,a) -d := $(if $(OS_is_win),$(if $(MSVC_RT_is_debug),d,),) -dtbb := $(if $(OS_is_win),$(if $(MSVC_RT_is_debug),_debug,),) -plib := $(if $(OS_is_win),,lib) -scr := $(if $(OS_is_win),bat,sh) -y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) --Fo := $(if $(OS_is_win),-Fo,-o) --Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) --fPIC := $(if $(OS_is_win),,-fPIC) +o := $(if $(OS_is_win),obj,o) +a := $(if $(OS_is_win),lib,a) +d := $(if $(OS_is_win),$(if $(MSVC_RT_is_debug),d,),) +dtbb := $(if $(OS_is_win),$(if $(MSVC_RT_is_debug),_debug,),) +plib := $(if $(OS_is_win),,lib) +scr := $(if $(OS_is_win),bat,sh) +y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) +-Fo := $(if $(OS_is_win),-Fo,-o) +-Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) +-cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) +-fPIC := $(if $(OS_is_win),,-fPIC) -DMKL_ILP64 := $(if $(filter mkl,$(BACKEND_CONFIG)),-DMKL_ILP64) --Zl := $(-Zl.$(COMPILER)) --DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE --DEBJ := $(if $(REQDBG),-g,-g:none) --DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) --EHsc := $(if $(OS_is_win),-EHsc,) --isystem := $(if $(OS_is_win),-I,-isystem) --sGRP = $(if $(OS_is_lnx),-Wl$(comma)--start-group,) --eGRP = $(if $(OS_is_lnx),-Wl$(comma)--end-group,) +-Zl := $(-Zl.$(COMPILER)) +-Zl_DPCPP := $(-Zl.dpcpp) +-DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE +-DEBC_DPCPP := $(if $(REQDBG),$(-DEBC.dpcpp) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) +-DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) +-EHsc := $(if $(OS_is_win),-EHsc,) +-isystem := $(if $(OS_is_win),-I,-isystem) +-sGRP := $(if $(OS_is_lnx),-Wl$(comma)--start-group,) +-eGRP := $(if $(OS_is_lnx),-Wl$(comma)--end-group,) daalmake = make $(eval $(call set_uarch_options_for_compiler,$(COMPILER))) @@ -660,7 +661,7 @@ $(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt: | $(ONEAPI.tmpdir_y.dpc)/. # Set compilation options to the object files which are part of STATIC lib $(ONEAPI.objs_a): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_a)/inc_a_folders.txt -$(ONEAPI.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(-EHsc) $(pedantic.opts) \ +$(ONEAPI.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-EHsc) $(pedantic.opts) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -671,7 +672,7 @@ $(ONEAPI.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(-EHsc) $(pedantic $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_a))) $(ONEAPI.objs_a.dpc): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_a.dpc)/inc_a_folders.txt -$(ONEAPI.objs_a.dpc): COPT += $(-fPIC) $(-cxx17) $(-DEBC) $(-EHsc) $(pedantic.opts.dpcpp) \ +$(ONEAPI.objs_a.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl_DPCPP) $(-DMKL_ILP64) $(-DEBC_DPCPP) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ @@ -696,8 +697,11 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) +# Note: The libonedal_dpc.so library does not support debug mode. +# When compiling with the debug flag $(-DEBC_DPCPP), linking with libonedal_dpc.so may cause indefinite linking times +# due to the extensive processing of debug information. For debugging, please use the static library version (libonedal_dpc.a). $(ONEAPI.objs_y.dpc): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt -$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-DMKL_ILP64) $(-DEBC) $(-EHsc) $(pedantic.opts.dpcpp) \ +$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl_DPCPP) $(-DMKL_ILP64) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \