Skip to content
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

Disable multithreading while building onednn library for Intel #996

Closed
uu-praveeng opened this issue Mar 1, 2021 · 6 comments
Closed

Disable multithreading while building onednn library for Intel #996

uu-praveeng opened this issue Mar 1, 2021 · 6 comments
Assignees
Labels

Comments

@uu-praveeng
Copy link

Hi,

Is there a way to disable the multithreading/openmp while building oneDNN library for Intel.?
I see that there is hack mentioned in issue.

Can this(DNNL_CPU_RUNTIME) option be extended to take NONE as a value.
We know that this degrades performance .But, we want to address a customer use case here.

Thanks,
Praveen.

@uu-praveeng
Copy link
Author

Minor update . I tried passing the option to SEQ. But it got overridden and library is using openmp on linux.

@igorsafo igorsafo self-assigned this Mar 1, 2021
@igorsafo
Copy link
Contributor

igorsafo commented Mar 1, 2021

Hi @uu-praveeng ,
Could you please try to clean your build directory and build oneDNN again?
I tried to reproduce the issue using GCC compiler, but with no success:

$ (mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=DEBUG -DDNNL_CPU_RUNTIME=SEQ .. && make -j)
$ ldd ./build/src/libdnnl.so
        linux-vdso.so.1 =>  (0x00007ffe46b56000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007efeaae95000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007efeaac91000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007efeaa988000)
        libm.so.6 => /lib64/libm.so.6 (0x00007efeaa686000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007efeaa470000)
        libc.so.6 => /lib64/libc.so.6 (0x00007efeaa0af000)
        /lib64/ld-linux-x86-64.so.2 (0x00007efeae767000)

Regards,
Igor Safonov

@uu-praveeng
Copy link
Author

uu-praveeng commented Mar 1, 2021

Thanks Igor for replying back quickly. I have used oneDNN 1.4 where I have seen this issue. With the latest one I don't see this issue. Could you let me know in which release this issue was fixed.

Thanks,
Praveen.

@igorsafo
Copy link
Contributor

igorsafo commented Mar 1, 2021

I tried to reproduce it on rls-v1.4 branch (hash: f7c41dc) and the library doesn't have a dependency on OpenMP:

$ (export CC=icc && export CXX=icpc && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=DEBUG -DDNNL_CPU_RUNTIME=SEQ .. && make -j8)
$ ldd ./build/src/libdnnl.so
        linux-vdso.so.1 =>  (0x00007ffdd7988000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7e97f4e000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f7e97d4a000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f7e97a41000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f7e9782b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f7e9746a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7e9a88d000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f7e97168000)

@uu-praveeng
Copy link
Author

Could you check with g++ once in linux.

@igorsafo
Copy link
Contributor

igorsafo commented Mar 1, 2021

Sure.

$ (mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=DEBUG -DDNNL_CPU_RUNTIME=SEQ .. && make -j8)
$ ldd ./build/src/libdnnl.so
        linux-vdso.so.1 =>  (0x00007ffc141a0000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff1e0130000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff1dff2c000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007ff1dfc23000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ff1df921000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff1df70b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff1df34a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff1e25a2000)

Is it possible that you have a typo in the build command?

Regards,
Igor Safonov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants