oneapi-src / oneCCL

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

Errors when building with DPCPP backend #71

Closed alexbatashev closed 1 year ago

alexbatashev commented 2 years ago

When building with DPCPP backend, the following errors arise:

cmake ../ -GNinja -DCMAKE_CXX_COMPILER=dpcpp -DCOMPUTE_BACKEND=dpcpp -DBUILD_FT=ON
ninja

[3/252] Building CXX object src/CMakeFiles/ccl-objects.dir/atl/atl_base_comm.cpp.o
FAILED: src/CMakeFiles/ccl-objects.dir/atl/atl_base_comm.cpp.o 
/opt/intel/oneapi/compiler/2022.0.2/linux/bin/dpcpp -DCCL_AVX_COMPILER -DCCL_AVX_TARGET_ATTRIBUTES -DCCL_BF16_AVX512BF_COMPILER -DCCL_BF16_COMPILER -DCCL_BF16_GPU_TRUNCATE -DCCL_BF16_TARGET_ATTRIBUTES -DCCL_CXX_COMPILER="\"Clang 14.0.0\"" -DCCL_C_COMPILER="\"GNU 11.2.0\"" -DCCL_FP16_COMPILER -DCCL_FP16_TARGET_ATTRIBUTES -Iinclude -I../../include -I../../src -I../../src/atl -I../../deps/ofi/include -I../../deps/hwloc/include -I../../deps/mpi/include -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror -D_GNU_SOURCE -fvisibility=internal -DCCL_ENABLE_SYCL_INTEROP_EVENT=1  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -DCCL_ENABLE_MPI -pthread -O3 -DNDEBUG  -O3 -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/ccl-objects.dir/atl/atl_base_comm.cpp.o -MF src/CMakeFiles/ccl-objects.dir/atl/atl_base_comm.cpp.o.d -o src/CMakeFiles/ccl-objects.dir/atl/atl_base_comm.cpp.o -c ../../src/atl/atl_base_comm.cpp
In file included from ../../src/atl/atl_base_comm.cpp:17:
In file included from ../../src/atl/mpi/atl_mpi.hpp:20:
In file included from ../../src/atl/mpi/atl_mpi_global_data.hpp:23:
In file included from ../../src/comp/bf16/bf16_intrisics.hpp:23:
In file included from ../../src/common/global/global.hpp:19:
In file included from ../../src/common/env/env.hpp:25:
In file included from ../../src/coll/coll.hpp:20:
In file included from ../../src/common/comm/comm.hpp:43:
In file included from ../../src/unordered_coll/unordered_coll.hpp:19:
../../src/sched/master_sched.hpp:61:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer& get_kernel_timer() {
    ~~~~~^
../../src/sched/master_sched.hpp:71:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer kernel_timer;
    ~~~~~^
2 errors generated.
[4/252] Building CXX object src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_comm.cpp.o
FAILED: src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_comm.cpp.o 
/opt/intel/oneapi/compiler/2022.0.2/linux/bin/dpcpp -DCCL_AVX_COMPILER -DCCL_AVX_TARGET_ATTRIBUTES -DCCL_BF16_AVX512BF_COMPILER -DCCL_BF16_COMPILER -DCCL_BF16_GPU_TRUNCATE -DCCL_BF16_TARGET_ATTRIBUTES -DCCL_CXX_COMPILER="\"Clang 14.0.0\"" -DCCL_C_COMPILER="\"GNU 11.2.0\"" -DCCL_FP16_COMPILER -DCCL_FP16_TARGET_ATTRIBUTES -Iinclude -I../../include -I../../src -I../../src/atl -I../../deps/ofi/include -I../../deps/hwloc/include -I../../deps/mpi/include -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror -D_GNU_SOURCE -fvisibility=internal -DCCL_ENABLE_SYCL_INTEROP_EVENT=1  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -DCCL_ENABLE_MPI -pthread -O3 -DNDEBUG  -O3 -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_comm.cpp.o -MF src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_comm.cpp.o.d -o src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_comm.cpp.o -c ../../src/atl/ofi/atl_ofi_comm.cpp
In file included from ../../src/atl/ofi/atl_ofi_comm.cpp:16:
In file included from ../../src/atl/ofi/atl_ofi_comm.hpp:19:
In file included from ../../src/atl/ofi/atl_ofi.hpp:22:
In file included from ../../src/atl/ofi/atl_ofi_helper.hpp:38:
In file included from ../../src/common/global/global.hpp:19:
In file included from ../../src/common/env/env.hpp:25:
In file included from ../../src/coll/coll.hpp:20:
In file included from ../../src/common/comm/comm.hpp:43:
In file included from ../../src/unordered_coll/unordered_coll.hpp:19:
../../src/sched/master_sched.hpp:61:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer& get_kernel_timer() {
    ~~~~~^
../../src/sched/master_sched.hpp:71:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer kernel_timer;
    ~~~~~^
2 errors generated.
[5/252] Building CXX object src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_global_data.cpp.o
FAILED: src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_global_data.cpp.o 
/opt/intel/oneapi/compiler/2022.0.2/linux/bin/dpcpp -DCCL_AVX_COMPILER -DCCL_AVX_TARGET_ATTRIBUTES -DCCL_BF16_AVX512BF_COMPILER -DCCL_BF16_COMPILER -DCCL_BF16_GPU_TRUNCATE -DCCL_BF16_TARGET_ATTRIBUTES -DCCL_CXX_COMPILER="\"Clang 14.0.0\"" -DCCL_C_COMPILER="\"GNU 11.2.0\"" -DCCL_FP16_COMPILER -DCCL_FP16_TARGET_ATTRIBUTES -Iinclude -I../../include -I../../src -I../../src/atl -I../../deps/ofi/include -I../../deps/hwloc/include -I../../deps/mpi/include -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror -D_GNU_SOURCE -fvisibility=internal -DCCL_ENABLE_SYCL_INTEROP_EVENT=1  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -DCCL_ENABLE_MPI -pthread -O3 -DNDEBUG  -O3 -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_global_data.cpp.o -MF src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_global_data.cpp.o.d -o src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_global_data.cpp.o -c ../../src/atl/mpi/atl_mpi_global_data.cpp
In file included from ../../src/atl/mpi/atl_mpi_global_data.cpp:18:
In file included from ../../src/atl/mpi/atl_mpi.hpp:20:
In file included from ../../src/atl/mpi/atl_mpi_global_data.hpp:23:
In file included from ../../src/comp/bf16/bf16_intrisics.hpp:23:
In file included from ../../src/common/global/global.hpp:19:
In file included from ../../src/common/env/env.hpp:25:
In file included from ../../src/coll/coll.hpp:20:
In file included from ../../src/common/comm/comm.hpp:43:
In file included from ../../src/unordered_coll/unordered_coll.hpp:19:
../../src/sched/master_sched.hpp:61:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer& get_kernel_timer() {
    ~~~~~^
../../src/sched/master_sched.hpp:71:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer kernel_timer;
    ~~~~~^
2 errors generated.
[6/252] Building CXX object src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi.cpp.o
FAILED: src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi.cpp.o 
/opt/intel/oneapi/compiler/2022.0.2/linux/bin/dpcpp -DCCL_AVX_COMPILER -DCCL_AVX_TARGET_ATTRIBUTES -DCCL_BF16_AVX512BF_COMPILER -DCCL_BF16_COMPILER -DCCL_BF16_GPU_TRUNCATE -DCCL_BF16_TARGET_ATTRIBUTES -DCCL_CXX_COMPILER="\"Clang 14.0.0\"" -DCCL_C_COMPILER="\"GNU 11.2.0\"" -DCCL_FP16_COMPILER -DCCL_FP16_TARGET_ATTRIBUTES -Iinclude -I../../include -I../../src -I../../src/atl -I../../deps/ofi/include -I../../deps/hwloc/include -I../../deps/mpi/include -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror -D_GNU_SOURCE -fvisibility=internal -DCCL_ENABLE_SYCL_INTEROP_EVENT=1  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -DCCL_ENABLE_MPI -pthread -O3 -DNDEBUG  -O3 -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi.cpp.o -MF src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi.cpp.o.d -o src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi.cpp.o -c ../../src/atl/ofi/atl_ofi.cpp
In file included from ../../src/atl/ofi/atl_ofi.cpp:16:
In file included from ../../src/atl/ofi/atl_ofi.hpp:22:
In file included from ../../src/atl/ofi/atl_ofi_helper.hpp:38:
In file included from ../../src/common/global/global.hpp:19:
In file included from ../../src/common/env/env.hpp:25:
In file included from ../../src/coll/coll.hpp:20:
In file included from ../../src/common/comm/comm.hpp:43:
In file included from ../../src/unordered_coll/unordered_coll.hpp:19:
../../src/sched/master_sched.hpp:61:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer& get_kernel_timer() {
    ~~~~~^
../../src/sched/master_sched.hpp:71:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer kernel_timer;
    ~~~~~^
2 errors generated.
[7/252] Building CXX object src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_comm.cpp.o
FAILED: src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_comm.cpp.o 
/opt/intel/oneapi/compiler/2022.0.2/linux/bin/dpcpp -DCCL_AVX_COMPILER -DCCL_AVX_TARGET_ATTRIBUTES -DCCL_BF16_AVX512BF_COMPILER -DCCL_BF16_COMPILER -DCCL_BF16_GPU_TRUNCATE -DCCL_BF16_TARGET_ATTRIBUTES -DCCL_CXX_COMPILER="\"Clang 14.0.0\"" -DCCL_C_COMPILER="\"GNU 11.2.0\"" -DCCL_FP16_COMPILER -DCCL_FP16_TARGET_ATTRIBUTES -Iinclude -I../../include -I../../src -I../../src/atl -I../../deps/ofi/include -I../../deps/hwloc/include -I../../deps/mpi/include -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror -D_GNU_SOURCE -fvisibility=internal -DCCL_ENABLE_SYCL_INTEROP_EVENT=1  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -DCCL_ENABLE_MPI -pthread -O3 -DNDEBUG  -O3 -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_comm.cpp.o -MF src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_comm.cpp.o.d -o src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi_comm.cpp.o -c ../../src/atl/mpi/atl_mpi_comm.cpp
In file included from ../../src/atl/mpi/atl_mpi_comm.cpp:18:
In file included from ../../src/atl/mpi/atl_mpi_comm.hpp:23:
In file included from ../../src/atl/mpi/atl_mpi.hpp:20:
In file included from ../../src/atl/mpi/atl_mpi_global_data.hpp:23:
In file included from ../../src/comp/bf16/bf16_intrisics.hpp:23:
In file included from ../../src/common/global/global.hpp:19:
In file included from ../../src/common/env/env.hpp:25:
In file included from ../../src/coll/coll.hpp:20:
In file included from ../../src/common/comm/comm.hpp:43:
In file included from ../../src/unordered_coll/unordered_coll.hpp:19:
../../src/sched/master_sched.hpp:61:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer& get_kernel_timer() {
    ~~~~~^
../../src/sched/master_sched.hpp:71:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer kernel_timer;
    ~~~~~^
2 errors generated.
[8/252] Building CXX object src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi.cpp.o
FAILED: src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi.cpp.o 
/opt/intel/oneapi/compiler/2022.0.2/linux/bin/dpcpp -DCCL_AVX_COMPILER -DCCL_AVX_TARGET_ATTRIBUTES -DCCL_BF16_AVX512BF_COMPILER -DCCL_BF16_COMPILER -DCCL_BF16_GPU_TRUNCATE -DCCL_BF16_TARGET_ATTRIBUTES -DCCL_CXX_COMPILER="\"Clang 14.0.0\"" -DCCL_C_COMPILER="\"GNU 11.2.0\"" -DCCL_FP16_COMPILER -DCCL_FP16_TARGET_ATTRIBUTES -Iinclude -I../../include -I../../src -I../../src/atl -I../../deps/ofi/include -I../../deps/hwloc/include -I../../deps/mpi/include -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror -D_GNU_SOURCE -fvisibility=internal -DCCL_ENABLE_SYCL_INTEROP_EVENT=1  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -DCCL_ENABLE_MPI -pthread -O3 -DNDEBUG  -O3 -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi.cpp.o -MF src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi.cpp.o.d -o src/CMakeFiles/ccl-objects.dir/atl/mpi/atl_mpi.cpp.o -c ../../src/atl/mpi/atl_mpi.cpp
In file included from ../../src/atl/mpi/atl_mpi.cpp:19:
In file included from ../../src/atl/mpi/atl_mpi.hpp:20:
In file included from ../../src/atl/mpi/atl_mpi_global_data.hpp:23:
In file included from ../../src/comp/bf16/bf16_intrisics.hpp:23:
In file included from ../../src/common/global/global.hpp:19:
In file included from ../../src/common/env/env.hpp:25:
In file included from ../../src/coll/coll.hpp:20:
In file included from ../../src/common/comm/comm.hpp:43:
In file included from ../../src/unordered_coll/unordered_coll.hpp:19:
../../src/sched/master_sched.hpp:61:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer& get_kernel_timer() {
    ~~~~~^
../../src/sched/master_sched.hpp:71:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer kernel_timer;
    ~~~~~^
2 errors generated.
[9/252] Building CXX object src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_helper.cpp.o
FAILED: src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_helper.cpp.o 
/opt/intel/oneapi/compiler/2022.0.2/linux/bin/dpcpp -DCCL_AVX_COMPILER -DCCL_AVX_TARGET_ATTRIBUTES -DCCL_BF16_AVX512BF_COMPILER -DCCL_BF16_COMPILER -DCCL_BF16_GPU_TRUNCATE -DCCL_BF16_TARGET_ATTRIBUTES -DCCL_CXX_COMPILER="\"Clang 14.0.0\"" -DCCL_C_COMPILER="\"GNU 11.2.0\"" -DCCL_FP16_COMPILER -DCCL_FP16_TARGET_ATTRIBUTES -Iinclude -I../../include -I../../src -I../../src/atl -I../../deps/ofi/include -I../../deps/hwloc/include -I../../deps/mpi/include -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror -D_GNU_SOURCE -fvisibility=internal -DCCL_ENABLE_SYCL_INTEROP_EVENT=1  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector -DCCL_ENABLE_MPI -pthread -O3 -DNDEBUG  -O3 -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_helper.cpp.o -MF src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_helper.cpp.o.d -o src/CMakeFiles/ccl-objects.dir/atl/ofi/atl_ofi_helper.cpp.o -c ../../src/atl/ofi/atl_ofi_helper.cpp
In file included from ../../src/atl/ofi/atl_ofi_helper.cpp:16:
In file included from ../../src/atl/ofi/atl_ofi_helper.hpp:38:
In file included from ../../src/common/global/global.hpp:19:
In file included from ../../src/common/env/env.hpp:25:
In file included from ../../src/coll/coll.hpp:20:
In file included from ../../src/common/comm/comm.hpp:43:
In file included from ../../src/unordered_coll/unordered_coll.hpp:19:
../../src/sched/master_sched.hpp:61:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer& get_kernel_timer() {
    ~~~~~^
../../src/sched/master_sched.hpp:71:10: error: no type named 'kernel_timer' in namespace 'ccl'
    ccl::kernel_timer kernel_timer;
    ~~~~~^
2 errors generated.

Works ok for dpcpp_level_zero backend, fails with DPC++ backend for both closed and open source compilers in the above way.

mshiryaev commented 2 years ago

@alexbatashev - could you try again with code from master branch?

Compute backend dpcpp_level_zero was renamed to dpcpp, so now COMPUTE_BACKEND=dpcpp is the only possible value.

https://oneapi-src.github.io/oneCCL/introduction/installation.html#enable-sycl