-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libclc build in Debug mode is very slow #6925
Comments
Tagging @Naghasan , @AerialMantis |
libclc uses the toolchain you build (there is actually a hack to trick cmake into thinking clang is available during configuration). This is hard to actually solve for CI (as you want a one off self contained build). Tablegen improved build time by building an optimised tablegen even in debug mode, but here this would mean an entire llvm toolchain is release when you want a debug mode... From a user perspective we could have a flag for the user to provide a pre-build libclc or an alternative clang / opt / llvm-link / llc. The first would skip the build of the lib and the second speed it up. Providing a pre-build libclc is opening the door to sync issues though, alternative clang and llvm toolchain is less of a problem as required backend or clang builtins update are not happening that often. |
Use `LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR` to specify the location of custom toolchain to be used for creation of libclc. This helps with debug build times: * debug build of sycl-toolchain with libclc built with debug tools: ```sh $ for f in $(ls lib/clc/*.bc); touch $f; time ninja sycl-toolchain [0/2] Re-checking globbed directories... [6/6] Generating ../../lib/clc/remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc ninja sycl-toolchain 682.55s user 1.33s system 112% cpu 10:07.81 total ``` * debug build of sycl-toolchain with libclc built with release tools: ```sh $ for f in $(ls lib/clc/*.bc); touch $f; time ninja sycl-toolchain [0/2] Re-checking globbed directories... [6/6] Generating ../../lib/clc/remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc ninja sycl-toolchain 158.51s user 1.15s system 189% cpu 1:24.31 total ``` Fixes: #6925
Use `LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR` to specify the location of custom toolchain to be used for creation of libclc. This helps with debug build times: * debug build of sycl-toolchain with libclc built with debug tools: ```sh $ for f in $(ls lib/clc/*.bc); touch $f; time ninja sycl-toolchain [0/2] Re-checking globbed directories... [6/6] Generating ../../lib/clc/remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc ninja sycl-toolchain 682.55s user 1.33s system 112% cpu 10:07.81 total ``` * debug build of sycl-toolchain with libclc built with release tools: ```sh $ for f in $(ls lib/clc/*.bc); touch $f; time ninja sycl-toolchain [0/2] Re-checking globbed directories... [6/6] Generating ../../lib/clc/remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc ninja sycl-toolchain 158.51s user 1.15s system 189% cpu 1:24.31 total ``` Fixes: #6925
Is there a way to improve that?
To reproduce:
I've notice that hang is happening at these lines (take ~13 minutes each):
The text was updated successfully, but these errors were encountered: