-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Labels
is:bugSomething looks wrong.Something looks wrong.is:bugfixThis fixes a bugThis fixes a bugis:confirmedSomeone confirmed this issue.Someone confirmed this issue.mod:dpcppThis is related to the DPC++ module.This is related to the DPC++ module.plat:intelThis is related to the Intel compilers.This is related to the Intel compilers.reg:buildThis is related to the build system.This is related to the build system.
Description
When we add more function into dpcpp module, the debug build will give some compilation issue.
It will throw relocation truncated to fit: R_X86_64_GOTPCREL.... and PC-relative offset overflows in PLT entry ...
The following are some observation:
- It depends on the system gcc, so different environments do not throw the error at the same commit.
- It's does not help when we add -mc-model=medium/large
- the total object file size are around 220 M but the library takes 1.9 G (when it is still compilable)
- With bloaty, more than 90% size is for
__CLANG_OFFLOAD_BUNDLE__sycl-spir64 -fsycl-device-code-split=per_sourceonly needs 216M for library, not 1.9G when-fsycl-device-code-split=per_kernel
The size seems to introduced by inserting the debug information to each kernel.
possible workaround and decision currently from our side
- split the dpcpp to several sub-libraries.
It works but requires -lginkgo_dpcpp_1 -lginkgo_dpcpp_2 ... when not using CMake.
Thus, we do not prefer this way - Collecting all subgroup/workgroup list into config and it can be changed in CMake.
By doing so, we can limit ginkgo only compiles the supported parameters kernel on specific device and use-fsycl-device-code-split=per_sourceto reduce the library size.
Before pushing these fixes, we disable the debug build in #676
pratikvn and Slaedr
Metadata
Metadata
Assignees
Labels
is:bugSomething looks wrong.Something looks wrong.is:bugfixThis fixes a bugThis fixes a bugis:confirmedSomeone confirmed this issue.Someone confirmed this issue.mod:dpcppThis is related to the DPC++ module.This is related to the DPC++ module.plat:intelThis is related to the Intel compilers.This is related to the Intel compilers.reg:buildThis is related to the build system.This is related to the build system.