oneapi-src / oneCCL

oneAPI Collective Communications Library (oneCCL)
https://oneapi-src.github.io/oneCCL
Other
191 stars 67 forks source link

libccl.so.1.0 size is so large #122

Closed hli25 closed 2 months ago

hli25 commented 3 months ago

Following the readme, I built out libccl.so.1.0 from master branch, but the lib is so big about 300M. While in oneAPI BaseKit, this lib is ~9M. Any suggustion?

hli25 commented 3 months ago

btw, oneapi is 2024.0

nikitaxgusev commented 3 months ago

@hli25 hello, can you post the build command to reproduce your issue, please?

hli25 commented 3 months ago

@hli25 hello, can you post the build command to reproduce your issue, please? Thanks! here are the commands:

  1. cmake .. -GNinja -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_FLAGS="-fsycl" -DCOMPUTE_BACKEND=dpcpp
  2. ninja Same issue when following INSTALL.md to build the lib.

btw, i reproduced it with commit b258db467fe4ecedf5baa8c7029fabe800319d68

nikitaxgusev commented 3 months ago

Hello @hli25 ,

my steps were:

git clone https://github.com/oneapi-src/oneCCL.git
mkdir build
cd ./build
cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCOMPUTE_BACKEND=dpcpp && make -j && make install
du -h ./_install/lib/libccl.so.1.0

So, what I see:

I couldn't reproduce your 300 Mb.

But I've noticed, you use -DCMAKE_CXX_FLAGS="-fsycl", is there any reason to do that? cmake .. -GNinja -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_FLAGS="-fsycl" -DCOMPUTE_BACKEND=dpcpp All the same, I had a chance to compile with your provided command and I couldn't reproduce the issue.

du -h ./_install/lib/libccl.so.1.0 with your command. 17M ./_install/lib/libccl.so.1.0

hli25 commented 3 months ago

hi @nikitaxgusev, Thanks for your update!

Which oneapi did you use, 2024.0 or 2024.1 ? With oneapi 2024.1, i could get similar resuls as yours. However, this is very differnet if you compile it via oneapi 2024.0.

nikitaxgusev commented 3 months ago

@hli25 Which oneapi did you use, 2024.0 or 2024.1 ? I used 2024.1.

hli25 commented 3 months ago

btw, oneapi is 2024.0

I used 2024.0 and get the big size lib.

nikitaxgusev commented 3 months ago

@hli25 Hello, the issue is not a part of 2024.1 oneapi, does something block you from using this newer version?

nikitaxgusev commented 2 months ago

resolved in newer oneCCL version