Skip to content

Commit

Permalink
feature: adding -fsycl-max-parallel-link-jobs in make (#2926)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev authored Oct 1, 2024
1 parent 52a876c commit ad75901
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/make/compiler_definitions/dpcpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \
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 -fsycl-device-code-split=per_kernel
link.dynamic.win.dpcpp = icx -fsycl -m64 -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)

pedantic.opts.lnx.dpcpp = -pedantic \
-Wall \
Expand Down
7 changes: 7 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ MSVC_RUNTIME_VERSIONs = release debug
MSVC_RUNTIME_VERSION ?= release
$(if $(filter $(MSVC_RUNTIME_VERSIONs),$(MSVC_RUNTIME_VERSION)),,$(error MSVC_RUNTIME_VERSION must be one of $(MSVC_RUNTIME_VERSIONs)))

MAKE_PID := $(shell echo $$PPID)
JOB_FLAG := $(filter -j%, $(subst -j ,-j,$(shell ps T | grep "^\s*$(MAKE_PID).*$(MAKE)")))
MAKE_JOBS := $(subst -j,,$(JOB_FLAG))
MAKE_JOBS := $(if $(filter $(MAKE_JOBS),$(shell seq 1 999)),$(MAKE_JOBS),$(shell nproc))

SYCL_LINK_PRL := $(MAKE_JOBS)

COMPILER_is_$(COMPILER) := yes
COMPILER_is_cross := $(if $(filter $(PLAT),$(IDENTIFIED_PLAT)),no,yes)
OS_is_$(_OS) := yes
Expand Down

0 comments on commit ad75901

Please sign in to comment.