From 121e792747d0fc0423d75ac38b54a1d8b96436be Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 16 Oct 2024 07:17:31 -0700 Subject: [PATCH 01/13] fixes for dbg build --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 4d66bd06ad4..9f62fc7bebe 100644 --- a/makefile +++ b/makefile @@ -697,7 +697,7 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) $(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) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ From 0ac3ab916a1302f4641d9ba6d45b79f777362b61 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 16 Oct 2024 07:53:39 -0700 Subject: [PATCH 02/13] minor fix --- makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 9f62fc7bebe..cac5058d414 100644 --- a/makefile +++ b/makefile @@ -660,7 +660,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 +671,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) $(-DMKL_ILP64) $(-DEBC) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ @@ -697,7 +697,7 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) $(ONEAPI.objs_y.dpc): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt -$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-EHsc) $(pedantic.opts.dpcpp) \ +$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-DMKL_ILP64) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ From 0cdd40002fbca6a66f65dbb1d5f574912f8b10e0 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 28 Oct 2024 08:44:19 -0700 Subject: [PATCH 03/13] fixes for debug --- dev/make/compiler_definitions/dpcpp.mk | 23 ++++++++++++++------ dev/make/compiler_definitions/icc.mkl.32e.mk | 4 ++-- dev/make/compiler_definitions/icx.mkl.32e.mk | 4 ++-- makefile | 3 +-- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index 78ec5da36fe..d09c9bafe71 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -25,22 +25,31 @@ 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 -fno-system-debug -O0 -fasm-blocks,-g -fno-system-debug -O0 -fasm-blocks) -COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ +COMPILER.lnx.dpcpp = icpx -fsycl -m64 -fno-system-debug -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel -COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ +COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -fno-system-debug -nologo -WX \ -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel -link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) -link.dynamic.win.dpcpp = icx -fsycl -m64 -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) +link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fno-system-debug -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) +link.dynamic.win.dpcpp = icx -fsycl -m64 -fno-system-debug -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) -pedantic.opts.lnx.dpcpp = -pedantic \ +pedantic.opts.lnx = -pedantic \ -Wall \ -Wextra \ + -Wwritable-strings \ -Wno-unused-parameter +pedantic.opts.dpcpp_win = -Wall \ + -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter + +pedantic.opts.lnx.dpcpp = $(pedantic.opts.icx) +pedantic.opts.win.dpcpp = $(pedantic.opts.dpcpp_win) + p4_OPT.dpcpp = -march=nocona mc3_OPT.dpcpp = -march=nehalem avx2_OPT.dpcpp = -march=haswell diff --git a/dev/make/compiler_definitions/icc.mkl.32e.mk b/dev/make/compiler_definitions/icc.mkl.32e.mk index a6ff2410ecc..576a77dc45b 100644 --- a/dev/make/compiler_definitions/icc.mkl.32e.mk +++ b/dev/make/compiler_definitions/icc.mkl.32e.mk @@ -29,9 +29,9 @@ CORE.SERV.COMPILER.icc = generic -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ - -Werror -Wreturn-type -diag-disable=10441 + -Werror -fno-system-debug -Wreturn-type -diag-disable=10441 COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) -COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 +COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -fno-system-debug -WX -Qopenmp-simd -Qdiag-disable:10441 COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ -Werror -Wreturn-type -diag-disable=10441 diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index e61e6bc39bc..4143cd89467 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 -fno-system-debug -O0 -fasm-blocks,-g -fno-system-debug -O0 -fasm-blocks) -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) @@ -35,7 +35,7 @@ COMPILER.lnx.icx = icx -m64 \ COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD -Qopenmp-simd, -MDd) -nologo -WX -Wno-deprecated-declarations -link.dynamic.lnx.icx = icx -m64 -no-intel-lib +link.dynamic.lnx.icx = icx -m64 -fno-system-debug -no-intel-lib pedantic.opts.icx = -pedantic \ -Wall \ diff --git a/makefile b/makefile index cac5058d414..747a29c1bbb 100644 --- a/makefile +++ b/makefile @@ -130,7 +130,6 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -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) @@ -697,7 +696,7 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) $(ONEAPI.objs_y.dpc): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt -$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-DMKL_ILP64) $(-EHsc) $(pedantic.opts.dpcpp) \ +$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBС) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ From ca891d92ba79f8095fdc8ced4e50e4e9b41026fa Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 28 Oct 2024 09:39:20 -0700 Subject: [PATCH 04/13] fixes for icc and icx --- dev/make/compiler_definitions/dpcpp.mk | 2 +- dev/make/compiler_definitions/icc.mkl.32e.mk | 4 ++-- dev/make/compiler_definitions/icx.mkl.32e.mk | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index d09c9bafe71..afa96c6018a 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -26,7 +26,7 @@ CMPLRDIRSUFF.dpcpp = _dpcpp CORE.SERV.COMPILER.dpcpp = generic -Zl.dpcpp = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib --DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7 -fno-system-debug -O0 -fasm-blocks,-g -fno-system-debug -O0 -fasm-blocks) +-DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g -fno-system-debug -O0 -fasm-blocks) -fno-system-debug -O0 -fasm-blocks COMPILER.lnx.dpcpp = icpx -fsycl -m64 -fno-system-debug -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel diff --git a/dev/make/compiler_definitions/icc.mkl.32e.mk b/dev/make/compiler_definitions/icc.mkl.32e.mk index 576a77dc45b..a6ff2410ecc 100644 --- a/dev/make/compiler_definitions/icc.mkl.32e.mk +++ b/dev/make/compiler_definitions/icc.mkl.32e.mk @@ -29,9 +29,9 @@ CORE.SERV.COMPILER.icc = generic -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ - -Werror -fno-system-debug -Wreturn-type -diag-disable=10441 + -Werror -Wreturn-type -diag-disable=10441 COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) -COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -fno-system-debug -WX -Qopenmp-simd -Qdiag-disable:10441 +COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ -Werror -Wreturn-type -diag-disable=10441 diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 4143cd89467..3e33515d920 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 -fno-system-debug -O0 -fasm-blocks,-g -fno-system-debug -O0 -fasm-blocks) +-DEBC.icx = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -O0 -fasm-blocks -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) @@ -35,7 +35,7 @@ COMPILER.lnx.icx = icx -m64 \ COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD -Qopenmp-simd, -MDd) -nologo -WX -Wno-deprecated-declarations -link.dynamic.lnx.icx = icx -m64 -fno-system-debug -no-intel-lib +link.dynamic.lnx.icx = icx -m64 -no-intel-lib pedantic.opts.icx = -pedantic \ -Wall \ From eb8e2a6a57e5b22bb05621ae7920db10451f5e3c Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 28 Oct 2024 09:54:44 -0700 Subject: [PATCH 05/13] more fixes --- dev/make/compiler_definitions/dpcpp.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index afa96c6018a..88de116673b 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -26,17 +26,17 @@ CMPLRDIRSUFF.dpcpp = _dpcpp CORE.SERV.COMPILER.dpcpp = generic -Zl.dpcpp = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib --DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g -fno-system-debug -O0 -fasm-blocks) -fno-system-debug -O0 -fasm-blocks +-DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -O0 -fasm-blocks -COMPILER.lnx.dpcpp = icpx -fsycl -m64 -fno-system-debug -stdlib=libstdc++ -fgnu-runtime -fwrapv \ +COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel -COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -fno-system-debug -nologo -WX \ +COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel -link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fno-system-debug -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) -link.dynamic.win.dpcpp = icx -fsycl -m64 -fno-system-debug -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) +link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) +link.dynamic.win.dpcpp = icx -fsycl -m64 -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) -pedantic.opts.lnx = -pedantic \ +pedantic.opts.dpcpp_lnx = -pedantic \ -Wall \ -Wextra \ -Wwritable-strings \ @@ -47,7 +47,7 @@ pedantic.opts.dpcpp_win = -Wall \ -Wwritable-strings \ -Wno-unused-parameter -pedantic.opts.lnx.dpcpp = $(pedantic.opts.icx) +pedantic.opts.lnx.dpcpp = $(pedantic.opts.dpcpp_lnx) pedantic.opts.win.dpcpp = $(pedantic.opts.dpcpp_win) p4_OPT.dpcpp = -march=nocona From 393016047423c3484eb915d7d6d7a1e13dd0d673 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 28 Oct 2024 10:20:21 -0700 Subject: [PATCH 06/13] fixes for O flag --- dev/make/compiler_definitions/dpcpp.mk | 2 +- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index 88de116673b..c95ad74bdc3 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -26,7 +26,7 @@ CMPLRDIRSUFF.dpcpp = _dpcpp CORE.SERV.COMPILER.dpcpp = generic -Zl.dpcpp = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib --DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -O0 -fasm-blocks +-DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -fasm-blocks COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 3e33515d920..2f55f0d0a39 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) -fno-system-debug -O0 -fasm-blocks +-DEBC.icx = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -fasm-blocks -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) From 4da42f77b2dde1ab611a3372a7ee023e8feb9c86 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 28 Oct 2024 10:39:33 -0700 Subject: [PATCH 07/13] remove unnecessary build --- dev/make/compiler_definitions/dpcpp.mk | 8 ++++---- dev/make/compiler_definitions/icx.mkl.32e.mk | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index c95ad74bdc3..46b9767fec6 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -26,7 +26,7 @@ CMPLRDIRSUFF.dpcpp = _dpcpp CORE.SERV.COMPILER.dpcpp = generic -Zl.dpcpp = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib --DEBC.dpcpp = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -fasm-blocks +-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 @@ -43,9 +43,9 @@ pedantic.opts.dpcpp_lnx = -pedantic \ -Wno-unused-parameter pedantic.opts.dpcpp_win = -Wall \ - -Wextra \ - -Wwritable-strings \ - -Wno-unused-parameter + -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter pedantic.opts.lnx.dpcpp = $(pedantic.opts.dpcpp_lnx) pedantic.opts.win.dpcpp = $(pedantic.opts.dpcpp_win) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 2f55f0d0a39..ee0a0350f3a 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) -fno-system-debug -fasm-blocks +-DEBC.icx = $(if $(OS_is_win),-debug:all -Z7,-g) -fno-system-debug -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) @@ -37,18 +37,18 @@ 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.icx_lnx = -pedantic \ + -Wall \ + -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter pedantic.opts.icx_win = -Wall \ - -Wextra \ - -Wwritable-strings \ - -Wno-unused-parameter + -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter -pedantic.opts.lnx.icx = $(pedantic.opts.icx) +pedantic.opts.lnx.icx = $(pedantic.opts.icx_lnx) pedantic.opts.win.icx = $(pedantic.opts.icx_win) p4_OPT.icx = -march=nocona From cc18e865abb38813acd69c4f4d20a32c5384aaf7 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 29 Oct 2024 04:02:20 -0700 Subject: [PATCH 08/13] fixes for devc --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 747a29c1bbb..f17d22e4404 100644 --- a/makefile +++ b/makefile @@ -696,7 +696,7 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) $(ONEAPI.objs_y.dpc): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt -$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBС) $(-EHsc) $(pedantic.opts.dpcpp) \ +$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ From 25a57a175cad619bfdce8f92f7fc75ffed685035 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 29 Oct 2024 09:45:38 -0700 Subject: [PATCH 09/13] fixes --- makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index f17d22e4404..0fade64cb23 100644 --- a/makefile +++ b/makefile @@ -695,8 +695,9 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) +# libonedal_dpc.so does not support debug mode. $(ONEAPI.objs_y.dpc): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt -$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-EHsc) $(pedantic.opts.dpcpp) \ +$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ From 5aa0cdfa6830782cf0a028b6add9761180783d85 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 30 Oct 2024 02:09:17 -0700 Subject: [PATCH 10/13] fixes for debug --- .../dtrees/dtrees_feature_type_helper.h | 15 +++--- dev/make/compiler_definitions/dpcpp.mk | 7 +-- dev/make/compiler_definitions/icx.mkl.32e.mk | 7 +-- makefile | 46 ++++++++++--------- 4 files changed, 38 insertions(+), 37 deletions(-) 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..17a6fe494c7 100644 --- a/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h +++ b/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h @@ -77,7 +77,7 @@ struct BinParams BinParams(size_t _maxBins, size_t _minBinSize, BinningStrategy _binningStrategy = BinningStrategy::quantiles) : maxBins(_maxBins), minBinSize(_minBinSize), binningStrategy(_binningStrategy) {} - BinParams(const BinParams & o) : maxBins(o.maxBins), minBinSize(o.minBinSize), binningStrategy(o.binningStrategy) {} + BinParams(const BinParams & o) : binningStrategy(o.binningStrategy), maxBins(o.maxBins), minBinSize(o.minBinSize) {} /* Strategy to create bins for feature values. Default: quantiles */ BinningStrategy binningStrategy = BinningStrategy::quantiles; @@ -100,16 +100,19 @@ 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 +136,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 46b9767fec6..19b7234bc6c 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -36,20 +36,17 @@ COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) link.dynamic.win.dpcpp = icx -fsycl -m64 -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=$(SYCL_LINK_PRL) -pedantic.opts.dpcpp_lnx = -pedantic \ +pedantic.opts.lnx.dpcpp = -pedantic \ -Wall \ -Wextra \ -Wwritable-strings \ -Wno-unused-parameter -pedantic.opts.dpcpp_win = -Wall \ +pedantic.opts.win.dpcpp = -Wall \ -Wextra \ -Wwritable-strings \ -Wno-unused-parameter -pedantic.opts.lnx.dpcpp = $(pedantic.opts.dpcpp_lnx) -pedantic.opts.win.dpcpp = $(pedantic.opts.dpcpp_win) - p4_OPT.dpcpp = -march=nocona mc3_OPT.dpcpp = -march=nehalem avx2_OPT.dpcpp = -march=haswell diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index ee0a0350f3a..e929c9313f9 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -37,20 +37,17 @@ 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_lnx = -pedantic \ +pedantic.opts.lnx.icx = -pedantic \ -Wall \ -Wextra \ -Wwritable-strings \ -Wno-unused-parameter -pedantic.opts.icx_win = -Wall \ +pedantic.opts.win.icx = -Wall \ -Wextra \ -Wwritable-strings \ -Wno-unused-parameter -pedantic.opts.lnx.icx = $(pedantic.opts.icx_lnx) -pedantic.opts.win.icx = $(pedantic.opts.icx_win) - p4_OPT.icx = -march=nocona mc3_OPT.icx = -march=nehalem avx2_OPT.icx = -march=haswell diff --git a/makefile b/makefile index 0fade64cb23..3ae79f80d3d 100644 --- a/makefile +++ b/makefile @@ -116,25 +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 --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) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE +-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))) @@ -670,7 +672,7 @@ $(ONEAPI.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(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) $(-DMKL_ILP64) $(-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 \ @@ -695,9 +697,11 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) -# libonedal_dpc.so does not support debug mode. +# 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) $(-Zl) $(-DMKL_ILP64) $(-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 \ From 44049ebb1fd555de83fac97ba4f460ef88dffc50 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 30 Oct 2024 02:11:07 -0700 Subject: [PATCH 11/13] clang fixes --- cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 17a6fe494c7..a80bf8cd627 100644 --- a/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h +++ b/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h @@ -109,9 +109,7 @@ class IndexedFeatures }; public: - IndexedFeatures() - : _data(nullptr), _entries(nullptr), _sizeOfIndex(sizeof(IndexType)), _nRows(0), _nCols(0), _capacity(0), _maxNumIndices(0) - {} + IndexedFeatures() : _data(nullptr), _entries(nullptr), _sizeOfIndex(sizeof(IndexType)), _nRows(0), _nCols(0), _capacity(0), _maxNumIndices(0) {} ~IndexedFeatures(); From 3c4d30d6861f2576d38cf62d2ecbe2b4aa729b23 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 30 Oct 2024 03:19:48 -0700 Subject: [PATCH 12/13] minor fix for win --- cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 a80bf8cd627..3a05639cadc 100644 --- a/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h +++ b/cpp/daal/src/algorithms/dtrees/dtrees_feature_type_helper.h @@ -77,14 +77,14 @@ struct BinParams BinParams(size_t _maxBins, size_t _minBinSize, BinningStrategy _binningStrategy = BinningStrategy::quantiles) : maxBins(_maxBins), minBinSize(_minBinSize), binningStrategy(_binningStrategy) {} - BinParams(const BinParams & o) : binningStrategy(o.binningStrategy), maxBins(o.maxBins), minBinSize(o.minBinSize) {} + 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; }; ////////////////////////////////////////////////////////////////////////////////////////// From f842d4a64d1830a5fe34fdc7cf01743d799293e9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 4 Nov 2024 02:08:51 -0800 Subject: [PATCH 13/13] upd tbb flags for dpcpp --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 3ae79f80d3d..91922e98f0b 100644 --- a/makefile +++ b/makefile @@ -131,7 +131,7 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -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) -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)