├── .clang-format ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── doc_request.md │ ├── feature_request.md │ └── question.md └── workflows │ └── slack-pr.yaml ├── CMakeLists.txt ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── INSTALL.md ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── SECURITY.md ├── ccl.map ├── cmake ├── FindIntelSYCL.cmake ├── FindIntelSYCL_level_zero.cmake ├── FindNUMA.cmake ├── FindSYCL.cmake ├── SYCL.cmake ├── ccl ├── helpers.cmake ├── setvars.sh.in ├── templates │ ├── oneCCLConfig.cmake.in │ └── oneCCLConfigVersion.cmake.in └── vars.sh.in ├── deps ├── hwloc │ ├── include │ │ ├── hwloc.h │ │ └── hwloc │ │ │ ├── autogen │ │ │ └── config.h │ │ │ ├── bitmap.h │ │ │ ├── cpukinds.h │ │ │ ├── deprecated.h │ │ │ ├── diff.h │ │ │ ├── distances.h │ │ │ ├── export.h │ │ │ ├── helper.h │ │ │ ├── inlines.h │ │ │ ├── memattrs.h │ │ │ └── rename.h │ └── lib │ │ └── libhwloc.a ├── itt │ ├── include │ │ └── ittnotify.h │ └── lib64 │ │ ├── libittnotify.a │ │ └── tracing_functions.so ├── level_zero │ └── include │ │ ├── ze_api.h │ │ └── zes_api.h ├── mpi │ ├── bin │ │ ├── hydra_bstrap_proxy │ │ ├── hydra_nameserver │ │ ├── hydra_pmi_proxy │ │ ├── mpicc │ │ ├── mpicxx │ │ ├── mpiexec │ │ ├── mpiexec.hydra │ │ ├── mpigcc │ │ ├── mpigxx │ │ ├── mpiicc │ │ ├── mpiicpc │ │ ├── mpiicpx │ │ ├── mpiicx │ │ └── mpirun │ ├── include │ │ ├── mpi.h │ │ ├── mpicxx.h │ │ └── mpio.h │ ├── lib │ │ ├── libmpi.so │ │ ├── libmpi.so.12 │ │ ├── libmpi.so.12.0 │ │ ├── libmpi.so.12.0.0 │ │ ├── libmpicxx.so │ │ ├── libmpicxx.so.12 │ │ ├── libmpicxx.so.12.0 │ │ ├── libmpicxx.so.12.0.0 │ │ ├── libmpifort.so │ │ ├── libmpifort.so.12 │ │ ├── libmpifort.so.12.0 │ │ └── libmpifort.so.12.0.0 │ ├── licensing │ │ ├── license.txt │ │ └── third-party-programs.txt │ └── opt │ │ └── mpi │ │ └── etc │ │ ├── tuning_clx-ap_ofi.dat │ │ ├── tuning_clx-ap_shm-ofi.dat │ │ ├── tuning_clx-ap_shm.dat │ │ ├── tuning_emr_shm-ofi.dat │ │ ├── tuning_emr_shm-ofi_psm3_100.dat │ │ ├── tuning_emr_shm-ofi_psm3_200.dat │ │ ├── tuning_emr_shm.dat │ │ ├── tuning_generic_ofi.dat │ │ ├── tuning_generic_ofi_mlx_hcoll.dat │ │ ├── tuning_generic_shm-ofi.dat │ │ ├── tuning_generic_shm-ofi_mlx_hcoll.dat │ │ ├── tuning_generic_shm.dat │ │ ├── tuning_gnr_shm-ofi.dat │ │ ├── tuning_gnr_shm.dat │ │ ├── tuning_icx_ofi_mlx.dat │ │ ├── tuning_icx_shm-ofi_efa.dat │ │ ├── tuning_icx_shm-ofi_efa_100_x2.dat │ │ ├── tuning_icx_shm-ofi_mlx.dat │ │ ├── tuning_icx_shm-ofi_mlx_100.dat │ │ ├── tuning_icx_shm-ofi_psm3.dat │ │ ├── tuning_icx_shm-ofi_psm3_200.dat │ │ ├── tuning_icx_shm-ofi_tcp.dat │ │ ├── tuning_icx_shm.dat │ │ ├── tuning_icx_shm_efa.dat │ │ ├── tuning_icx_shm_efa_100_x2.dat │ │ ├── tuning_icx_shm_tcp.dat │ │ ├── tuning_skx_ofi.dat │ │ ├── tuning_skx_ofi_efa.dat │ │ ├── tuning_skx_ofi_psm3.dat │ │ ├── tuning_skx_ofi_tcp-ofi-rxm.dat │ │ ├── tuning_skx_shm-ofi.dat │ │ ├── tuning_skx_shm-ofi_efa.dat │ │ ├── tuning_skx_shm-ofi_psm3.dat │ │ ├── tuning_skx_shm-ofi_tcp-ofi-rxm.dat │ │ ├── tuning_skx_shm-ofi_tcp.dat │ │ ├── tuning_skx_shm.dat │ │ ├── tuning_spr_shm-ofi.dat │ │ ├── tuning_spr_shm-ofi_cxi.dat │ │ ├── tuning_spr_shm-ofi_tcp.dat │ │ ├── tuning_spr_shm.dat │ │ ├── tuning_spr_shm_cxi.dat │ │ ├── tuning_spr_shm_tcp.dat │ │ ├── tuning_srf_shm-ofi.dat │ │ └── tuning_srf_shm.dat ├── ofi │ ├── bin │ │ └── fi_info │ ├── include │ │ └── rdma │ │ │ ├── fabric.h │ │ │ ├── fi_atomic.h │ │ │ ├── fi_cm.h │ │ │ ├── fi_collective.h │ │ │ ├── fi_domain.h │ │ │ ├── fi_endpoint.h │ │ │ ├── fi_eq.h │ │ │ ├── fi_errno.h │ │ │ ├── fi_ext.h │ │ │ ├── fi_rma.h │ │ │ ├── fi_tagged.h │ │ │ ├── fi_trigger.h │ │ │ └── providers │ │ │ ├── fi_log.h │ │ │ ├── fi_peer.h │ │ │ └── fi_prov.h │ └── lib │ │ ├── libfabric.so │ │ ├── libfabric.so.1 │ │ └── prov │ │ ├── libpsm3-fi.so │ │ ├── libpsmx2-fi.so │ │ ├── librxm-fi.so │ │ ├── libshm-fi.so │ │ ├── libtcp-fi.so │ │ ├── libverbs-1.1-fi.so │ │ └── libverbs-1.12-fi.so ├── pmix │ ├── include │ │ ├── pmix.h │ │ ├── pmix_common.h │ │ ├── pmix_deprecated.h │ │ └── pmix_version.h │ └── update_pmix.sh └── umf │ └── include │ ├── umf.h │ └── umf │ ├── base.h │ ├── ipc.h │ ├── memory_pool.h │ ├── memory_pool_ops.h │ ├── memory_provider.h │ ├── memory_provider_gpu.h │ ├── memory_provider_ops.h │ ├── mempolicy.h │ ├── memspace.h │ ├── memtarget.h │ ├── pools │ ├── pool_disjoint.h │ ├── pool_proxy.h │ └── pool_scalable.h │ └── providers │ ├── provider_coarse.h │ ├── provider_cuda.h │ ├── provider_devdax_memory.h │ ├── provider_file_memory.h │ ├── provider_level_zero.h │ └── provider_os_memory.h ├── doc ├── Dockerfile ├── Doxyfile ├── build_doc.md ├── build_doc.sh ├── build_doc_by_docker.sh ├── requirements.txt └── rst │ ├── Makefile │ ├── Readme.txt │ ├── make.bat │ └── source │ ├── _static │ ├── favicons.png │ ├── oneAPI-rgb-rev-100.png │ └── style.css │ ├── _templates │ ├── footer.html │ └── layout.html │ ├── advanced-configuration.rst │ ├── advanced-configuration │ ├── collective-algorithms-selection.rst │ ├── dmabuf.rst │ ├── images │ │ └── unordered_coll.png │ ├── low-precision-datatypes.rst │ ├── operation-caching.rst │ ├── operation-fusion.rst │ └── operation-prioritization.rst │ ├── api.rst │ ├── api │ ├── concepts.rst │ ├── concepts │ │ ├── communicator.rst │ │ ├── context.rst │ │ ├── device.rst │ │ ├── event.rst │ │ ├── kvs.rst │ │ └── stream.rst │ ├── initialization.rst │ ├── operations.rst │ └── operations │ │ ├── collective-operations.rst │ │ ├── collective-operations │ │ ├── allgather.rst │ │ ├── allgatherv.rst │ │ ├── allreduce.rst │ │ ├── alltoall.rst │ │ ├── alltoallv.rst │ │ ├── barrier.rst │ │ ├── broadcast.rst │ │ ├── group-call.rst │ │ ├── reduce-scatter.rst │ │ └── reduce.rst │ │ ├── datatypes.rst │ │ └── point-to-point.rst │ ├── benchmark-guide │ ├── benchmark-point-to-point.rst │ └── benchmark.rst │ ├── conf.py │ ├── env-variables.rst │ ├── general-configuration.rst │ ├── general-configuration │ ├── operation-execution.rst │ └── transport-selection.rst │ ├── index.rst │ ├── introduction.rst │ ├── introduction │ ├── cmake-configuration.rst │ ├── installation.rst │ ├── sample.cpp │ └── sample.rst │ ├── legal.rst │ ├── programming-model.rst │ ├── programming-model │ ├── device-communication.rst │ └── host-communication.rst │ └── release-notes.rst ├── examples ├── CMakeLists.txt ├── benchmark │ ├── CMakeLists.txt │ ├── include │ │ ├── benchmark.hpp │ │ ├── coll.hpp │ │ ├── config.hpp │ │ ├── cpu_coll.hpp │ │ ├── lp.hpp │ │ ├── sycl_coll.hpp │ │ ├── transport.hpp │ │ └── types.hpp │ └── src │ │ ├── allgather │ │ ├── allgather_strategy.hpp │ │ ├── cpu_allgather_coll.hpp │ │ └── sycl_allgather_coll.hpp │ │ ├── allgatherv │ │ ├── allgatherv_strategy.hpp │ │ ├── cpu_allgatherv_coll.hpp │ │ └── sycl_allgatherv_coll.hpp │ │ ├── allreduce │ │ ├── allreduce_strategy.hpp │ │ ├── cpu_allreduce_coll.hpp │ │ └── sycl_allreduce_coll.hpp │ │ ├── alltoall │ │ ├── alltoall_strategy.hpp │ │ ├── cpu_alltoall_coll.hpp │ │ └── sycl_alltoall_coll.hpp │ │ ├── alltoallv │ │ ├── alltoallv_strategy.hpp │ │ ├── cpu_alltoallv_coll.hpp │ │ └── sycl_alltoallv_coll.hpp │ │ ├── bcast │ │ ├── bcast_strategy.hpp │ │ ├── cpu_bcast_coll.hpp │ │ └── sycl_bcast_coll.hpp │ │ ├── benchmark.cpp │ │ ├── declarations.hpp │ │ ├── reduce │ │ ├── cpu_reduce_coll.hpp │ │ ├── reduce_strategy.hpp │ │ └── sycl_reduce_coll.hpp │ │ ├── reduce_scatter │ │ ├── cpu_reduce_scatter_coll.hpp │ │ ├── reduce_scatter_strategy.hpp │ │ └── sycl_reduce_scatter_coll.hpp │ │ └── transport_impl.hpp ├── common │ ├── CMakeLists.txt │ └── version.cpp ├── cpu │ ├── CMakeLists.txt │ ├── cpu_allgather_test.cpp │ ├── cpu_allgatherv_test.cpp │ ├── cpu_allreduce_bf16_test.cpp │ ├── cpu_allreduce_test.cpp │ └── cpu_broadcast_test.cpp ├── external_launcher │ ├── CMakeLists.txt │ ├── external_launcher.cpp │ ├── run.sh │ └── run_binary.sh ├── include │ ├── base.hpp │ ├── base_utils.hpp │ ├── bf16.hpp │ ├── store.hpp │ └── sycl_base.hpp ├── pt2pt │ ├── CMakeLists.txt │ ├── include │ │ ├── pt2pt_base.hpp │ │ ├── pt2pt_transport.hpp │ │ └── types.hpp │ └── src │ │ ├── ccl_bw.cpp │ │ └── ccl_latency.cpp ├── run_new.sh └── sycl │ ├── CMakeLists.txt │ ├── sycl_allgather_test.cpp │ ├── sycl_allgatherv_custom_usm_test.cpp │ ├── sycl_allgatherv_inplace_test.cpp │ ├── sycl_allgatherv_inplace_usm_test.cpp │ ├── sycl_allgatherv_test.cpp │ ├── sycl_allgatherv_usm_comm_split.cpp │ ├── sycl_allgatherv_usm_test.cpp │ ├── sycl_allreduce_inplace_usm_test.cpp │ ├── sycl_allreduce_test.cpp │ ├── sycl_allreduce_usm_comm_split.cpp │ ├── sycl_allreduce_usm_test.cpp │ ├── sycl_alltoall_test.cpp │ ├── sycl_alltoall_usm_test.cpp │ ├── sycl_alltoallv_inplace_usm_test.cpp │ ├── sycl_alltoallv_test.cpp │ ├── sycl_alltoallv_usm_test.cpp │ ├── sycl_bcast_usm_test.cpp │ ├── sycl_broadcast_test.cpp │ ├── sycl_broadcast_usm_test.cpp │ ├── sycl_reduce_inplace_usm_test.cpp │ ├── sycl_reduce_scatter_inplace_usm_test.cpp │ ├── sycl_reduce_scatter_test.cpp │ ├── sycl_reduce_scatter_usm_comm_split.cpp │ ├── sycl_reduce_scatter_usm_test.cpp │ ├── sycl_reduce_test.cpp │ └── sycl_reduce_usm_test.cpp ├── include └── oneapi │ ├── ccl.hpp │ └── ccl │ ├── aliases.hpp │ ├── api_functions.hpp │ ├── coll_attr.hpp │ ├── coll_attr_ids.hpp │ ├── coll_attr_ids_traits.hpp │ ├── comm_attr.hpp │ ├── comm_attr_ids.hpp │ ├── comm_attr_ids_traits.hpp │ ├── comm_split_attr.hpp │ ├── comm_split_attr_ids.hpp │ ├── comm_split_attr_ids_traits.hpp │ ├── communicator.hpp │ ├── config.h │ ├── config.h.in │ ├── context.hpp │ ├── context_attr_ids.hpp │ ├── context_attr_ids_traits.hpp │ ├── datatype_attr.hpp │ ├── datatype_attr_ids.hpp │ ├── datatype_attr_ids_traits.hpp │ ├── device.hpp │ ├── device_attr_ids.hpp │ ├── device_attr_ids_traits.hpp │ ├── device_type_traits.hpp │ ├── device_types.hpp │ ├── environment.hpp │ ├── event.hpp │ ├── exception.hpp │ ├── init_attr.hpp │ ├── init_attr_ids.hpp │ ├── init_attr_ids_traits.hpp │ ├── kvs.hpp │ ├── kvs_attr.hpp │ ├── kvs_attr_ids.hpp │ ├── kvs_attr_ids_traits.hpp │ ├── lp_types.hpp │ ├── native_device_api │ ├── empty │ │ ├── context.hpp │ │ ├── device.hpp │ │ ├── event.hpp │ │ ├── export.hpp │ │ ├── platform.hpp │ │ ├── primitives.hpp │ │ └── queue.hpp │ ├── export_api.hpp │ └── sycl │ │ └── export.hpp │ ├── stream.hpp │ ├── stream_attr_ids.hpp │ ├── stream_attr_ids_traits.hpp │ ├── string.hpp │ ├── type_traits.hpp │ ├── types.hpp │ └── types_policy.hpp ├── man ├── OneCCL.md ├── README.md ├── doxconfig ├── doxy_to_md.py ├── man3 │ └── OneCCL.3 ├── merge_doc.sh └── requirements.txt ├── pkgconfig ├── ccl │ └── cpu │ │ └── lib │ │ └── template.pc └── template.pc ├── src ├── CMakeLists.txt ├── MT │ └── shared_resource.hpp ├── atl │ ├── atl_base_comm.cpp │ ├── atl_base_comm.hpp │ ├── atl_base_transport.cpp │ ├── atl_base_transport.hpp │ ├── atl_def.cpp │ ├── atl_def.h │ ├── mpi │ │ ├── atl_mpi.cpp │ │ ├── atl_mpi.hpp │ │ ├── atl_mpi_comm.cpp │ │ ├── atl_mpi_comm.hpp │ │ ├── atl_mpi_ctx.cpp │ │ └── atl_mpi_ctx.hpp │ ├── ofi │ │ ├── atl_ofi.cpp │ │ ├── atl_ofi.hpp │ │ ├── atl_ofi_comm.cpp │ │ ├── atl_ofi_comm.hpp │ │ ├── atl_ofi_helper.cpp │ │ └── atl_ofi_helper.hpp │ └── util │ │ └── pm │ │ ├── codec │ │ └── pm_rt_codec.h │ │ ├── pm_rt.h │ │ ├── pmi_resizable_rt │ │ ├── pmi_resizable │ │ │ ├── def.h │ │ │ ├── helper.hpp │ │ │ ├── kvs │ │ │ │ ├── ikvs_wrapper.h │ │ │ │ ├── internal_kvs.cpp │ │ │ │ ├── internal_kvs.h │ │ │ │ ├── internal_kvs_server.cpp │ │ │ │ ├── internal_kvs_server.hpp │ │ │ │ ├── kvs_common_attr.hpp │ │ │ │ ├── users_kvs.cpp │ │ │ │ └── users_kvs.h │ │ │ ├── kvs_keeper.cpp │ │ │ ├── kvs_keeper.hpp │ │ │ ├── pmi_listener.hpp │ │ │ └── shift_list.hpp │ │ ├── pmi_resizable_simple.cpp │ │ ├── pmi_resizable_simple.h │ │ ├── pmi_resizable_simple_internal.cpp │ │ └── pmi_resizable_simple_internal.h │ │ └── pmi_rt │ │ ├── pmi │ │ ├── CMakeLists.txt │ │ ├── mpl.h │ │ ├── pmi.h │ │ ├── simple_pmi.c │ │ ├── simple_pmiutil.c │ │ └── simple_pmiutil.h │ │ ├── pmi_rt.c │ │ ├── pmi_simple.cpp │ │ └── pmi_simple.h ├── ccl_api_functions.cpp ├── ccl_api_functions_generators.hpp ├── ccl_app_api_coll_attr.cpp ├── ccl_app_api_comm_attr.cpp ├── ccl_app_api_comm_split_attr.cpp ├── ccl_app_api_datatype_attr.cpp ├── ccl_app_api_event.cpp ├── ccl_app_api_init_attr.cpp ├── ccl_app_api_kvs_attr.cpp ├── ccl_cpp_communicator.cpp ├── ccl_cpp_context.cpp ├── ccl_cpp_device.cpp ├── ccl_cpp_environment.cpp ├── ccl_cpp_kvs.cpp ├── ccl_cpp_stream.cpp ├── ccl_cpp_utils.cpp ├── ccl_empty_attr.cpp ├── ccl_empty_coll_attr.cpp ├── ccl_empty_comm_attr.cpp ├── ccl_empty_comm_split_attr.cpp ├── ccl_empty_init_attr.cpp ├── ccl_empty_kvs_attr.cpp ├── ccl_empty_stream.cpp ├── coll │ ├── algorithms │ │ ├── algorithm_utils.cpp │ │ ├── algorithm_utils.hpp │ │ ├── algorithms.hpp │ │ ├── allgather.cpp │ │ ├── allgatherv │ │ │ ├── allgatherv.cpp │ │ │ └── sycl │ │ │ │ ├── .clang-format │ │ │ │ ├── allgatherv_large_sycl.cpp │ │ │ │ ├── allgatherv_large_sycl_impl.hpp │ │ │ │ ├── allgatherv_medium_sycl.cpp │ │ │ │ ├── allgatherv_medium_sycl.hpp │ │ │ │ ├── allgatherv_ring.hpp │ │ │ │ ├── allgatherv_scaleout_sycl.cpp │ │ │ │ ├── allgatherv_small_sycl.cpp │ │ │ │ ├── allgatherv_small_sycl.hpp │ │ │ │ ├── allgatherv_small_sycl_impl.hpp │ │ │ │ ├── allgatherv_sycl.cpp │ │ │ │ └── allgatherv_sycl.hpp │ │ ├── allreduce │ │ │ ├── allreduce.cpp │ │ │ ├── allreduce_rma.cpp │ │ │ ├── allreduce_rma.hpp │ │ │ └── sycl │ │ │ │ ├── allreduce_large_sycl.cpp │ │ │ │ ├── allreduce_large_sycl.hpp │ │ │ │ ├── allreduce_large_sycl_bf16.cpp │ │ │ │ ├── allreduce_large_sycl_fp16.cpp │ │ │ │ ├── allreduce_large_sycl_fp32.cpp │ │ │ │ ├── allreduce_large_sycl_impl.hpp │ │ │ │ ├── allreduce_large_sycl_int32.cpp │ │ │ │ ├── allreduce_medium_sycl.cpp │ │ │ │ ├── allreduce_medium_sycl.hpp │ │ │ │ ├── allreduce_medium_sycl_bf16.cpp │ │ │ │ ├── allreduce_medium_sycl_fp16.cpp │ │ │ │ ├── allreduce_medium_sycl_fp32.cpp │ │ │ │ ├── allreduce_medium_sycl_int32.cpp │ │ │ │ ├── allreduce_rabenseifner.hpp │ │ │ │ ├── allreduce_ring.hpp │ │ │ │ ├── allreduce_scaleout_sycl.cpp │ │ │ │ ├── allreduce_small_sycl.cpp │ │ │ │ ├── allreduce_small_sycl.hpp │ │ │ │ ├── allreduce_small_sycl_impl.hpp │ │ │ │ ├── allreduce_small_sycl_noesimd.hpp │ │ │ │ ├── allreduce_small_sycl_rw_kernel.hpp │ │ │ │ ├── allreduce_sycl.cpp │ │ │ │ └── allreduce_sycl.hpp │ │ ├── alltoall │ │ │ ├── alltoall.cpp │ │ │ └── sycl │ │ │ │ ├── alltoall_large_sycl.cpp │ │ │ │ ├── alltoall_large_sycl.hpp │ │ │ │ ├── alltoall_large_sycl_impl.hpp │ │ │ │ ├── alltoall_sycl.cpp │ │ │ │ └── alltoall_sycl.hpp │ │ ├── alltoallv.cpp │ │ ├── barrier │ │ │ └── barrier.cpp │ │ ├── broadcast │ │ │ ├── bcast.cpp │ │ │ ├── broadcast.cpp │ │ │ ├── mpi_bcast_invoke.hpp │ │ │ └── sycl │ │ │ │ ├── broadcast_small_sycl.cpp │ │ │ │ ├── broadcast_small_sycl_impl.hpp │ │ │ │ ├── broadcast_sycl.cpp │ │ │ │ └── broadcast_sycl.hpp │ │ ├── double_tree_ops.cpp │ │ ├── recv.cpp │ │ ├── reduce.cpp │ │ ├── reduce_scatter │ │ │ ├── reduce_scatter.cpp │ │ │ └── sycl │ │ │ │ ├── .clang-format │ │ │ │ ├── reduce_scatter_large_sycl.cpp │ │ │ │ ├── reduce_scatter_large_sycl.hpp │ │ │ │ ├── reduce_scatter_large_sycl_bf16.cpp │ │ │ │ ├── reduce_scatter_large_sycl_fp16.cpp │ │ │ │ ├── reduce_scatter_large_sycl_fp32.cpp │ │ │ │ ├── reduce_scatter_large_sycl_impl.hpp │ │ │ │ ├── reduce_scatter_large_sycl_int32.cpp │ │ │ │ ├── reduce_scatter_medium_sycl.cpp │ │ │ │ ├── reduce_scatter_medium_sycl.hpp │ │ │ │ ├── reduce_scatter_ring.hpp │ │ │ │ ├── reduce_scatter_scaleout_sycl.cpp │ │ │ │ ├── reduce_scatter_small_sycl.cpp │ │ │ │ ├── reduce_scatter_small_sycl.hpp │ │ │ │ ├── reduce_scatter_small_sycl_impl.hpp │ │ │ │ ├── reduce_scatter_sycl.cpp │ │ │ │ └── reduce_scatter_sycl.hpp │ │ ├── send.cpp │ │ └── utils │ │ │ ├── sycl_coll_base.cpp │ │ │ ├── sycl_coll_base.hpp │ │ │ ├── sycl_kernels.hpp │ │ │ ├── sycl_pipe_send.cpp │ │ │ ├── sycl_selection.cpp │ │ │ └── sycl_selection.hpp │ ├── attr │ │ ├── ccl_allgather_op_attr.cpp │ │ ├── ccl_allgather_op_attr.hpp │ │ ├── ccl_allgatherv_op_attr.cpp │ │ ├── ccl_allgatherv_op_attr.hpp │ │ ├── ccl_allreduce_op_attr.cpp │ │ ├── ccl_allreduce_op_attr.hpp │ │ ├── ccl_alltoall_op_attr.cpp │ │ ├── ccl_alltoall_op_attr.hpp │ │ ├── ccl_alltoallv_op_attr.cpp │ │ ├── ccl_alltoallv_op_attr.hpp │ │ ├── ccl_attrs.hpp │ │ ├── ccl_barrier_op_attr.cpp │ │ ├── ccl_barrier_op_attr.hpp │ │ ├── ccl_bcast_op_attr.cpp │ │ ├── ccl_bcast_op_attr.hpp │ │ ├── ccl_common_op_attrs.cpp │ │ ├── ccl_common_op_attrs.hpp │ │ ├── ccl_pt2pt_op_attr.cpp │ │ ├── ccl_pt2pt_op_attr.hpp │ │ ├── ccl_reduce_op_attr.cpp │ │ ├── ccl_reduce_op_attr.hpp │ │ ├── ccl_reduce_scatter_op_attr.cpp │ │ └── ccl_reduce_scatter_op_attr.hpp │ ├── coll.cpp │ ├── coll.hpp │ ├── coll_check.cpp │ ├── coll_check.hpp │ ├── coll_param.cpp │ ├── coll_param.hpp │ ├── coll_util.cpp │ ├── coll_util.hpp │ ├── group │ │ ├── group.cpp │ │ └── group.hpp │ └── selection │ │ ├── selection.cpp │ │ ├── selection.hpp │ │ ├── selector.hpp │ │ ├── selector_allgather.cpp │ │ ├── selector_allgatherv.cpp │ │ ├── selector_allreduce.cpp │ │ ├── selector_alltoall.cpp │ │ ├── selector_alltoallv.cpp │ │ ├── selector_barrier.cpp │ │ ├── selector_bcast.cpp │ │ ├── selector_helper.hpp │ │ ├── selector_impl.hpp │ │ ├── selector_recv.cpp │ │ ├── selector_reduce.cpp │ │ ├── selector_reduce_scatter.cpp │ │ ├── selector_send.cpp │ │ └── selector_wrapper.hpp ├── coll_attr_creation_impl.hpp ├── coll_attr_impl.hpp ├── comm │ ├── atl_tag.cpp │ ├── atl_tag.hpp │ ├── comm.cpp │ ├── comm.hpp │ ├── comm_common_attr.hpp │ ├── comm_impl.hpp │ ├── comm_interface.hpp │ ├── comm_selector.cpp │ ├── comm_selector.hpp │ ├── comm_split_common_attr.hpp │ ├── mt_comm.cpp │ ├── stub_comm.cpp │ └── stub_comm.hpp ├── comm_attr_impl.hpp ├── comm_split_attr_impl.hpp ├── common │ ├── api_wrapper │ │ ├── api_wrapper.cpp │ │ ├── api_wrapper.hpp │ │ ├── mpi_api_wrapper.cpp │ │ ├── mpi_api_wrapper.hpp │ │ ├── ofi_api_wrapper.cpp │ │ ├── ofi_api_wrapper.hpp │ │ ├── openmp_wrapper.cpp │ │ ├── openmp_wrapper.hpp │ │ ├── pmix_api_wrapper.cpp │ │ ├── pmix_api_wrapper.hpp │ │ ├── umf_api_wrapper.cpp │ │ ├── umf_api_wrapper.hpp │ │ ├── ze_api_wrapper.cpp │ │ └── ze_api_wrapper.hpp │ ├── context │ │ ├── context.cpp │ │ └── context.hpp │ ├── datatype │ │ ├── datatype.cpp │ │ ├── datatype.hpp │ │ └── datatype_attr.hpp │ ├── device │ │ ├── device.cpp │ │ └── device.hpp │ ├── env │ │ ├── .clang-format │ │ ├── env.cpp │ │ ├── env.hpp │ │ ├── env_parser.cpp │ │ ├── env_parser.hpp │ │ ├── vars.hpp │ │ └── vars_experimental.hpp │ ├── event │ │ ├── ccl_event.cpp │ │ ├── ccl_event.hpp │ │ ├── ccl_event_attr_ids.hpp │ │ ├── ccl_event_attr_ids_traits.hpp │ │ └── impls │ │ │ ├── empty_event.hpp │ │ │ ├── event_impl.hpp │ │ │ ├── host_event.cpp │ │ │ ├── host_event.hpp │ │ │ ├── native_event.cpp │ │ │ ├── native_event.hpp │ │ │ └── stub_event.hpp │ ├── framework │ │ ├── framework.cpp │ │ └── framework.hpp │ ├── global │ │ ├── global.cpp │ │ ├── global.hpp │ │ └── ze │ │ │ ├── ze_data.cpp │ │ │ ├── ze_data.hpp │ │ │ ├── ze_fd_manager.cpp │ │ │ └── ze_fd_manager.hpp │ ├── log │ │ ├── log.cpp │ │ └── log.hpp │ ├── request │ │ ├── request.cpp │ │ └── request.hpp │ ├── stream │ │ ├── stream.cpp │ │ ├── stream.hpp │ │ ├── stream_selector.hpp │ │ └── stream_selector_impl.hpp │ └── utils │ │ ├── buffer.hpp │ │ ├── enums.hpp │ │ ├── exchange_utils.cpp │ │ ├── exchange_utils.hpp │ │ ├── fd_info.cpp │ │ ├── fd_info.hpp │ │ ├── hash.hpp │ │ ├── memcpy.cpp │ │ ├── memcpy.hpp │ │ ├── profile.cpp │ │ ├── profile.hpp │ │ ├── spinlock.cpp │ │ ├── spinlock.hpp │ │ ├── sycl_utils.cpp │ │ ├── sycl_utils.hpp │ │ ├── sync_object.hpp │ │ ├── tree.hpp │ │ ├── tuple.hpp │ │ ├── utils.cpp │ │ ├── utils.hpp │ │ ├── version.cpp │ │ ├── version.hpp │ │ ├── yield.cpp │ │ └── yield.hpp ├── communicator_impl.hpp ├── comp │ ├── bf16 │ │ ├── bf16.cpp │ │ ├── bf16.hpp │ │ ├── bf16_intrisics.cpp │ │ ├── bf16_intrisics.hpp │ │ └── bf16_utils.hpp │ ├── comp.cpp │ ├── comp.hpp │ └── fp16 │ │ ├── fp16.cpp │ │ ├── fp16.hpp │ │ ├── fp16_intrisics.cpp │ │ ├── fp16_intrisics.hpp │ │ └── fp16_utils.hpp ├── context_impl.hpp ├── datatype_attr_impl.hpp ├── device_impl.hpp ├── environment_impl.hpp ├── exec │ ├── exec.cpp │ ├── exec.hpp │ └── thread │ │ ├── base_thread.cpp │ │ ├── base_thread.hpp │ │ ├── listener.cpp │ │ ├── listener.hpp │ │ ├── service_worker.cpp │ │ ├── service_worker.hpp │ │ ├── worker.cpp │ │ └── worker.hpp ├── ext │ ├── CMakeLists.txt │ └── openmp │ │ ├── CMakeLists.txt │ │ └── openmp_ext.cpp ├── fusion │ ├── fusion.cpp │ └── fusion.hpp ├── hwloc │ ├── hwloc_wrapper.cpp │ └── hwloc_wrapper.hpp ├── init_attr_impl.hpp ├── internal_types.hpp ├── kernels │ ├── bf16.h │ ├── common.h │ ├── fp16.h │ ├── kernels.cl │ └── kernels.spv ├── kvs_attr_impl.hpp ├── kvs_impl.hpp ├── native_device_api │ └── sycl │ │ └── export.cpp ├── parallelizer │ ├── parallelizer.cpp │ └── parallelizer.hpp ├── sched │ ├── buffer │ │ ├── buffer_cache.cpp │ │ ├── buffer_cache.hpp │ │ ├── buffer_manager.cpp │ │ └── buffer_manager.hpp │ ├── cache │ │ ├── cache.cpp │ │ ├── cache.hpp │ │ ├── key.cpp │ │ ├── key.hpp │ │ ├── recycle_storage.cpp │ │ └── recycle_storage.hpp │ ├── entry │ │ ├── ack_accept_entry.hpp │ │ ├── ack_report_entry.hpp │ │ ├── coll │ │ │ ├── coll_entry.cpp │ │ │ ├── coll_entry.hpp │ │ │ └── direct │ │ │ │ ├── allgatherv_entry.hpp │ │ │ │ ├── allreduce_entry.hpp │ │ │ │ ├── alltoall_entry.hpp │ │ │ │ ├── alltoallv_entry.hpp │ │ │ │ ├── barrier_entry.hpp │ │ │ │ ├── base_coll_entry.hpp │ │ │ │ ├── bcast_entry.hpp │ │ │ │ ├── reduce_entry.hpp │ │ │ │ └── reduce_scatter_entry.hpp │ │ ├── copy │ │ │ ├── copy_entry.cpp │ │ │ ├── copy_entry.hpp │ │ │ ├── copy_helper.cpp │ │ │ └── copy_helper.hpp │ │ ├── deps_entry.cpp │ │ ├── deps_entry.hpp │ │ ├── deregister_entry.hpp │ │ ├── entry.cpp │ │ ├── entry.hpp │ │ ├── factory │ │ │ ├── chunked_entry_factory.cpp │ │ │ ├── chunked_entry_factory.hpp │ │ │ ├── entry_factory.h │ │ │ └── entry_factory.hpp │ │ ├── function_entry.hpp │ │ ├── postponed_fields.hpp │ │ ├── probe_entry.hpp │ │ ├── recv_copy_entry.cpp │ │ ├── recv_copy_entry.hpp │ │ ├── recv_entry.hpp │ │ ├── recv_reduce_entry.hpp │ │ ├── reduce_local_entry.cpp │ │ ├── reduce_local_entry.hpp │ │ ├── register_entry.hpp │ │ ├── send_entry.hpp │ │ ├── subsched_entry.hpp │ │ ├── sync_entry.hpp │ │ ├── wait_value_entry.hpp │ │ ├── write_entry.hpp │ │ └── ze │ │ │ ├── allreduce │ │ │ ├── ze_a2a_allreduce_entry.cpp │ │ │ ├── ze_a2a_allreduce_entry.hpp │ │ │ ├── ze_onesided_allreduce_entry.cpp │ │ │ └── ze_onesided_allreduce_entry.hpp │ │ │ ├── cache │ │ │ ├── ze_cache.cpp │ │ │ ├── ze_cache.hpp │ │ │ ├── ze_device_cache.cpp │ │ │ └── ze_device_cache.hpp │ │ │ ├── ze_a2a_allgatherv_entry.cpp │ │ │ ├── ze_a2a_allgatherv_entry.hpp │ │ │ ├── ze_a2a_pipeline_reduce_scatter_entry.cpp │ │ │ ├── ze_a2a_pipeline_reduce_scatter_entry.hpp │ │ │ ├── ze_a2a_reduce_scatter_entry.cpp │ │ │ ├── ze_a2a_reduce_scatter_entry.hpp │ │ │ ├── ze_alltoallv_entry.cpp │ │ │ ├── ze_alltoallv_entry.hpp │ │ │ ├── ze_barrier_entry.cpp │ │ │ ├── ze_barrier_entry.hpp │ │ │ ├── ze_base_entry.cpp │ │ │ ├── ze_base_entry.hpp │ │ │ ├── ze_call.cpp │ │ │ ├── ze_call.hpp │ │ │ ├── ze_cmdlist_event_signal_entry.cpp │ │ │ ├── ze_cmdlist_event_signal_entry.hpp │ │ │ ├── ze_cmdlist_timestamp.cpp │ │ │ ├── ze_cmdlist_timestamp.hpp │ │ │ ├── ze_command.cpp │ │ │ ├── ze_command.hpp │ │ │ ├── ze_copy_entry.cpp │ │ │ ├── ze_copy_entry.hpp │ │ │ ├── ze_dummy_entry.cpp │ │ │ ├── ze_dummy_entry.hpp │ │ │ ├── ze_event_signal_entry.cpp │ │ │ ├── ze_event_signal_entry.hpp │ │ │ ├── ze_event_wait_entry.cpp │ │ │ ├── ze_event_wait_entry.hpp │ │ │ ├── ze_execute_cmdlists_entry.hpp │ │ │ ├── ze_handle_exchange_entry.cpp │ │ │ ├── ze_handle_exchange_entry.hpp │ │ │ ├── ze_kernel.cpp │ │ │ ├── ze_kernel.hpp │ │ │ ├── ze_membarrier_entry.cpp │ │ │ ├── ze_membarrier_entry.hpp │ │ │ ├── ze_onesided_reduce_entry.cpp │ │ │ ├── ze_onesided_reduce_entry.hpp │ │ │ ├── ze_primitives.cpp │ │ │ ├── ze_primitives.hpp │ │ │ ├── ze_pt2pt_barrier_entry.cpp │ │ │ ├── ze_pt2pt_barrier_entry.hpp │ │ │ ├── ze_reduce_local_entry.cpp │ │ │ └── ze_reduce_local_entry.hpp │ ├── queue │ │ ├── flow_control.cpp │ │ ├── flow_control.hpp │ │ ├── queue.cpp │ │ ├── queue.hpp │ │ ├── strict_queue.cpp │ │ └── strict_queue.hpp │ ├── sched.cpp │ ├── sched.hpp │ ├── sched_base.cpp │ ├── sched_base.hpp │ ├── sched_group.cpp │ ├── sched_group.hpp │ ├── sched_restart_manager.cpp │ ├── sched_restart_manager.hpp │ ├── sched_timer.cpp │ ├── sched_timer.hpp │ └── ze │ │ ├── ze_event_manager.cpp │ │ ├── ze_event_manager.hpp │ │ ├── ze_handle_manager.cpp │ │ ├── ze_handle_manager.hpp │ │ ├── ze_ipc_event_pool_manager.cpp │ │ ├── ze_ipc_event_pool_manager.hpp │ │ ├── ze_list_manager.cpp │ │ └── ze_list_manager.hpp ├── stream_impl.hpp ├── stub_kvs_impl.cpp ├── stub_kvs_impl.hpp ├── topology │ ├── mt_topo_manager.cpp │ ├── topo_manager.cpp │ └── topo_manager.hpp ├── types_generator_defines.hpp ├── umf │ ├── ipc.cpp │ └── ipc.hpp └── unordered_coll │ ├── unordered_coll.cpp │ └── unordered_coll.hpp ├── tests ├── functional │ ├── CMakeLists.txt │ ├── allgather_test.cpp │ ├── allgatherv_test.cpp │ ├── allreduce_test.cpp │ ├── alltoall_test.cpp │ ├── alltoallv_test.cpp │ ├── bcast_test.cpp │ ├── broadcast_test.cpp │ ├── conf.cpp │ ├── conf.hpp │ ├── lp.cpp │ ├── lp.hpp │ ├── lp_impl.hpp │ ├── reduce_scatter_test.cpp │ ├── reduce_test.cpp │ ├── run.sh │ ├── test.hpp │ ├── test_impl.hpp │ ├── transport.cpp │ ├── transport.hpp │ └── utils.hpp └── googletest-release-1.8.1 │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile.am │ ├── README.md │ └── googletest │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── README.md │ ├── cmake │ ├── Config.cmake.in │ ├── gtest.pc.in │ ├── gtest_main.pc.in │ └── internal_utils.cmake │ ├── include │ └── gtest │ │ ├── gtest-death-test.h │ │ ├── gtest-message.h │ │ ├── gtest-param-test.h │ │ ├── gtest-param-test.h.pump │ │ ├── gtest-printers.h │ │ ├── gtest-spi.h │ │ ├── gtest-test-part.h │ │ ├── gtest-typed-test.h │ │ ├── gtest.h │ │ ├── gtest_pred_impl.h │ │ ├── gtest_prod.h │ │ └── internal │ │ ├── custom │ │ ├── README.md │ │ ├── gtest-port.h │ │ ├── gtest-printers.h │ │ └── gtest.h │ │ ├── gtest-death-test-internal.h │ │ ├── gtest-filepath.h │ │ ├── gtest-internal.h │ │ ├── gtest-linked_ptr.h │ │ ├── gtest-param-util-generated.h │ │ ├── gtest-param-util-generated.h.pump │ │ ├── gtest-param-util.h │ │ ├── gtest-port-arch.h │ │ ├── gtest-port.h │ │ ├── gtest-string.h │ │ ├── gtest-tuple.h │ │ ├── gtest-tuple.h.pump │ │ ├── gtest-type-util.h │ │ └── gtest-type-util.h.pump │ └── src │ ├── gtest-all.cc │ ├── gtest-death-test.cc │ ├── gtest-filepath.cc │ ├── gtest-internal-inl.h │ ├── gtest-port.cc │ ├── gtest-printers.cc │ ├── gtest-test-part.cc │ ├── gtest-typed-test.cc │ ├── gtest.cc │ └── gtest_main.cc └── third-party-programs.txt /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Documentation owners and reviewers 2 | doc/ @Maria1Petrova @ranukund @maciekpac 3 | *.md @Maria1Petrova @maciekpac 4 | man/ @nikitaxgusev @srirajpaul @maciekpac 5 | 6 | # TTP files 7 | third-party* @Maria1Petrova 8 | 9 | # Tests & examples 10 | tests/ @nikitaxgusev @srirajpaul 11 | examples/ @nikitaxgusev @srirajpaul 12 | 13 | # Infrastructure and tools 14 | .github/ @Maria1Petrova @nikitaxgusev 15 | 16 | # Build & dev infrastructure 17 | cmake/ @nikitaxgusev @srirajpaul 18 | 19 | # C++ code 20 | src/ @nikitaxgusev @srirajpaul 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/doc_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request a documentation change 3 | about: Use this template to report documentation issue or request documentation changes 4 | title: '' 5 | labels: 'doc' 6 | assignees: '' 7 | --- 8 | 9 | 10 | # Summary 11 | 12 | Provide a short summary of the request. 13 | 14 | # Request a documentation change 15 | 16 | Provide URL to the documentation that requires changes or github 17 | permalink to the code that should be documented, if the documentation 18 | does not exist. 19 | 20 | # Justification 21 | 22 | Provide justification for why the current documentation requires changes. 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request a feature 3 | about: Use this template to request new functionality 4 | title: '' 5 | labels: 'enhancement' 6 | assignees: '' 7 | --- 8 | 9 | 10 | # Summary 11 | 12 | Provide a short summary of the request. 13 | 14 | # Use case 15 | 16 | Describe the problem to solve. Add a user story. 17 | 18 | If any similar feature exists, describe why a new feature is required. 19 | 20 | # Proposed solution 21 | 22 | Describe the proposed solution and provide a brief justification. 23 | 24 | Include: 25 | 26 | - Description of the expected behavior 27 | - Proposed API/interface changes (if applicable) 28 | - Code samples 29 | 30 | # Justification 31 | 32 | Describe how the feature affects your project/organization. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Ask a question 3 | about: Use this template if no other section is applicable 4 | title: '' 5 | labels: 'question' 6 | assignees: '' 7 | --- 8 | 9 | # Topic 10 | 11 | Briefly state what the question concerns, for triaging purposes. 12 | 13 | Sample topics: 14 | 15 | - Usage 16 | - Development 17 | - Compatibility 18 | 19 | # Context 20 | 21 | Additional information and/or resources that might be relevant to the question. 22 | 23 | # Question 24 | 25 | Ask the question. 26 | -------------------------------------------------------------------------------- /.github/workflows/slack-pr.yaml: -------------------------------------------------------------------------------- 1 | name: Slack PR Notification 2 | on: 3 | # use pull_request_target to run on PRs from forks and have access to secrets 4 | pull_request_target: 5 | types: [labeled] 6 | 7 | env: 8 | SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} 9 | channel: "oneccl" 10 | 11 | permissions: 12 | pull-requests: read 13 | 14 | jobs: 15 | rfc: 16 | name: RFC Notification 17 | runs-on: ubuntu-latest 18 | # Trigger when labeling a PR with "RFC" 19 | if: | 20 | github.event.action == 'labeled' && 21 | contains(toJson(github.event.pull_request.labels.*.name), '"RFC"') 22 | steps: 23 | - name: Notify Slack 24 | uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0 25 | with: 26 | channel-id: ${{ env.channel }} 27 | slack-message: "${{ github.actor }} posted a RFC: ${{ github.event.pull_request.title }}. URL: ${{ github.event.pull_request.html_url }}" 28 | -------------------------------------------------------------------------------- /ccl.map: -------------------------------------------------------------------------------- 1 | { 2 | global: *ccl*; 3 | local: *; 4 | }; 5 | -------------------------------------------------------------------------------- /cmake/FindNUMA.cmake: -------------------------------------------------------------------------------- 1 | # Find the NUMA library and includes 2 | # 3 | # NUMA_INCLUDE_DIR - where to find numa.h 4 | # NUMA_LIBRARIES - list of libraries when using NUMA 5 | # NUMA_FOUND - true if NUMA found 6 | 7 | find_path(NUMA_INCLUDE_DIR 8 | NAMES numa.h numaif.h 9 | HINTS ${NUMA_ROOT_DIR}/include) 10 | 11 | find_library(NUMA_LIBRARIES 12 | NAMES numa 13 | HINTS ${NUMA_ROOT_DIR}/lib) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(NUMA DEFAULT_MSG NUMA_LIBRARIES NUMA_INCLUDE_DIR) 17 | 18 | if (NUMA_FOUND) 19 | message(STATUS "NUMA was found, include_dir: ${NUMA_INCLUDE_DIR}, libraries: ${NUMA_LIBRARIES}") 20 | else() 21 | message(STATUS "NUMA was not found") 22 | endif() 23 | -------------------------------------------------------------------------------- /cmake/SYCL.cmake: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | # Copyright 2019 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | #=============================================================================== 16 | 17 | if(SYCL_cmake_included) 18 | return() 19 | endif() 20 | set(SYCL_cmake_included true) 21 | 22 | find_package(SYCL REQUIRED) 23 | 24 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYCL_FLAGS}") 25 | 26 | include_directories(${SYCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}) 27 | list(APPEND EXTRA_SHARED_LIBS SYCL::SYCL) 28 | 29 | if(CCL_SYCL_INTEL) 30 | # Specify OpenCL version to avoid warnings 31 | add_definitions(-DCL_TARGET_OPENCL_VERSION=220) 32 | endif() 33 | 34 | -------------------------------------------------------------------------------- /cmake/templates/oneCCLConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016-2020 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | set(PACKAGE_VERSION @PROJECT_VERSION@) 17 | 18 | if ("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 19 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 20 | else() 21 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 22 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 23 | set(PACKAGE_VERSION_EXACT TRUE) 24 | endif() 25 | endif() 26 | 27 | -------------------------------------------------------------------------------- /deps/hwloc/lib/libhwloc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/hwloc/lib/libhwloc.a -------------------------------------------------------------------------------- /deps/itt/lib64/libittnotify.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/itt/lib64/libittnotify.a -------------------------------------------------------------------------------- /deps/itt/lib64/tracing_functions.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/itt/lib64/tracing_functions.so -------------------------------------------------------------------------------- /deps/mpi/bin/hydra_bstrap_proxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/bin/hydra_bstrap_proxy -------------------------------------------------------------------------------- /deps/mpi/bin/hydra_nameserver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/bin/hydra_nameserver -------------------------------------------------------------------------------- /deps/mpi/bin/hydra_pmi_proxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/bin/hydra_pmi_proxy -------------------------------------------------------------------------------- /deps/mpi/bin/mpiexec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/bin/mpiexec -------------------------------------------------------------------------------- /deps/mpi/bin/mpiexec.hydra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/bin/mpiexec.hydra -------------------------------------------------------------------------------- /deps/mpi/bin/mpiicc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright Intel Corporation. 4 | # 5 | # This software and the related documents are Intel copyrighted materials, and 6 | # your use of them is governed by the express license under which they were 7 | # provided to you (License). Unless the License provides otherwise, you may 8 | # not use, modify, copy, publish, distribute, disclose or transmit this 9 | # software or the related documents without Intel's prior written permission. 10 | # 11 | # This software and the related documents are provided as is, with no express 12 | # or implied warranties, other than those that are expressly stated in the 13 | # License. 14 | # 15 | 16 | COMPILER="icc" 17 | TARGET_WRAPPER="mpiicx" 18 | user_set_compiler=0 19 | 20 | if [ -z "$1" ] ; then 21 | ${TARGET_WRAPPER} -help 22 | exit 0 23 | fi 24 | 25 | for arg in "$@" ; do 26 | case $arg in 27 | -cc=*) 28 | COMPILER=$(echo $arg | sed -e 's/-cc=//g') 29 | user_set_compiler=1 30 | ;; 31 | esac 32 | done 33 | 34 | if [ -n "$I_MPI_CC" ] || [ -n "$MPICH_CC" ]; then 35 | user_set_compiler=1 36 | fi 37 | 38 | if [ $user_set_compiler -eq 1 ] ; then 39 | ${TARGET_WRAPPER} "$@" 40 | else 41 | ${TARGET_WRAPPER} -cc="${COMPILER}" "$@" 42 | fi 43 | -------------------------------------------------------------------------------- /deps/mpi/bin/mpiicpc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright Intel Corporation. 4 | # 5 | # This software and the related documents are Intel copyrighted materials, and 6 | # your use of them is governed by the express license under which they were 7 | # provided to you (License). Unless the License provides otherwise, you may 8 | # not use, modify, copy, publish, distribute, disclose or transmit this 9 | # software or the related documents without Intel's prior written permission. 10 | # 11 | # This software and the related documents are provided as is, with no express 12 | # or implied warranties, other than those that are expressly stated in the 13 | # License. 14 | # 15 | 16 | COMPILER="icpc" 17 | TARGET_WRAPPER="mpiicpx" 18 | user_set_compiler=0 19 | 20 | if [ -z "$1" ] ; then 21 | ${TARGET_WRAPPER} -help 22 | exit 0 23 | fi 24 | 25 | for arg in "$@" ; do 26 | case $arg in 27 | -cxx=*) 28 | COMPILER=$(echo $arg | sed -e 's/-cxx=//g') 29 | user_set_compiler=1 30 | ;; 31 | esac 32 | done 33 | 34 | if [ -n "$I_MPI_CXX" ] || [ -n "$MPICH_CXX" ]; then 35 | user_set_compiler=1 36 | fi 37 | 38 | if [ $user_set_compiler -eq 1 ] ; then 39 | ${TARGET_WRAPPER} "$@" 40 | else 41 | ${TARGET_WRAPPER} -cxx="${COMPILER}" "$@" 42 | fi 43 | -------------------------------------------------------------------------------- /deps/mpi/lib/libmpi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpi.so -------------------------------------------------------------------------------- /deps/mpi/lib/libmpi.so.12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpi.so.12 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpi.so.12.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpi.so.12.0 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpi.so.12.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpi.so.12.0.0 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpicxx.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpicxx.so -------------------------------------------------------------------------------- /deps/mpi/lib/libmpicxx.so.12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpicxx.so.12 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpicxx.so.12.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpicxx.so.12.0 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpicxx.so.12.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpicxx.so.12.0.0 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpifort.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpifort.so -------------------------------------------------------------------------------- /deps/mpi/lib/libmpifort.so.12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpifort.so.12 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpifort.so.12.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpifort.so.12.0 -------------------------------------------------------------------------------- /deps/mpi/lib/libmpifort.so.12.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/lib/libmpifort.so.12.0.0 -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_clx-ap_ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_clx-ap_ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_clx-ap_shm-ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_clx-ap_shm-ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_clx-ap_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_clx-ap_shm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_emr_shm-ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_emr_shm-ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_emr_shm-ofi_psm3_100.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_emr_shm-ofi_psm3_100.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_emr_shm-ofi_psm3_200.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_emr_shm-ofi_psm3_200.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_emr_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_emr_shm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_generic_ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_generic_ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_generic_ofi_mlx_hcoll.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_generic_ofi_mlx_hcoll.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_generic_shm-ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_generic_shm-ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_generic_shm-ofi_mlx_hcoll.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_generic_shm-ofi_mlx_hcoll.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_generic_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_generic_shm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_gnr_shm-ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_gnr_shm-ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_gnr_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_gnr_shm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_ofi_mlx.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_ofi_mlx.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_efa.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_efa.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_efa_100_x2.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_efa_100_x2.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_mlx.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_mlx.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_mlx_100.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_mlx_100.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_psm3.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_psm3.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_psm3_200.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_psm3_200.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_tcp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm-ofi_tcp.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm_efa.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm_efa.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm_efa_100_x2.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm_efa_100_x2.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_icx_shm_tcp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_icx_shm_tcp.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_ofi_efa.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_ofi_efa.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_ofi_psm3.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_ofi_psm3.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_ofi_tcp-ofi-rxm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_ofi_tcp-ofi-rxm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_efa.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_efa.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_psm3.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_psm3.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_tcp-ofi-rxm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_tcp-ofi-rxm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_tcp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_shm-ofi_tcp.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_skx_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_skx_shm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_spr_shm-ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_spr_shm-ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_spr_shm-ofi_cxi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_spr_shm-ofi_cxi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_spr_shm-ofi_tcp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_spr_shm-ofi_tcp.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_spr_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_spr_shm.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_spr_shm_cxi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_spr_shm_cxi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_spr_shm_tcp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_spr_shm_tcp.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_srf_shm-ofi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_srf_shm-ofi.dat -------------------------------------------------------------------------------- /deps/mpi/opt/mpi/etc/tuning_srf_shm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/mpi/opt/mpi/etc/tuning_srf_shm.dat -------------------------------------------------------------------------------- /deps/ofi/bin/fi_info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/bin/fi_info -------------------------------------------------------------------------------- /deps/ofi/lib/libfabric.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/libfabric.so -------------------------------------------------------------------------------- /deps/ofi/lib/libfabric.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/libfabric.so.1 -------------------------------------------------------------------------------- /deps/ofi/lib/prov/libpsm3-fi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/prov/libpsm3-fi.so -------------------------------------------------------------------------------- /deps/ofi/lib/prov/libpsmx2-fi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/prov/libpsmx2-fi.so -------------------------------------------------------------------------------- /deps/ofi/lib/prov/librxm-fi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/prov/librxm-fi.so -------------------------------------------------------------------------------- /deps/ofi/lib/prov/libshm-fi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/prov/libshm-fi.so -------------------------------------------------------------------------------- /deps/ofi/lib/prov/libtcp-fi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/prov/libtcp-fi.so -------------------------------------------------------------------------------- /deps/ofi/lib/prov/libverbs-1.1-fi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/prov/libverbs-1.1-fi.so -------------------------------------------------------------------------------- /deps/ofi/lib/prov/libverbs-1.12-fi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/deps/ofi/lib/prov/libverbs-1.12-fi.so -------------------------------------------------------------------------------- /deps/pmix/include/pmix_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Mellanox Technologies, Inc. 3 | * All rights reserved. 4 | * Copyright (c) 2018 IBM Corporation. All rights reserved. 5 | * Copyright (c) 2018 Intel, Inc. All rights reserved. 6 | * Copyright (c) 2019 Research Organization for Information Science 7 | * and Technology (RIST). All rights reserved. 8 | * $COPYRIGHT$ 9 | * 10 | * Additional copyrights may follow 11 | * 12 | * $HEADER$ 13 | */ 14 | 15 | 16 | #ifndef PMIx_VERSION_H 17 | #define PMIx_VERSION_H 18 | 19 | /* define PMIx version */ 20 | #define PMIX_VERSION_MAJOR 4L 21 | #define PMIX_VERSION_MINOR 2L 22 | #define PMIX_VERSION_RELEASE 9L 23 | 24 | #define PMIX_NUMERIC_VERSION 0x00040209 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/pmix/update_pmix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2016-2020 Intel Corporation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | REPO=https://github.com/openpmix/openpmix.git 19 | 20 | install_path_root=`pwd` 21 | install_path=`pwd`/_install 22 | 23 | git clone $REPO 24 | pushd ./openpmix 25 | #version sould be clarified and aligned with Borealis maintainer 26 | target_version="v4.2.9" 27 | git checkout ${target_version} 28 | 29 | git submodule update --init --recursive 30 | ./autogen.pl 31 | ./configure --prefix=$install_path 32 | 33 | cp $install_path_root/openpmix/include/pmix.h $install_path_root/include 34 | cp $install_path_root/openpmix/include/pmix_common.h $install_path_root/include 35 | cp $install_path_root/openpmix/include/pmix_deprecated.h $install_path_root/include 36 | cp $install_path_root/openpmix/include/pmix_version.h $install_path_root/include 37 | popd 38 | 39 | git add include 40 | git commit -m "deps: updated pmix to ${target_version}" 41 | 42 | rm -rf $install_path_root/openpmix 43 | -------------------------------------------------------------------------------- /deps/umf/include/umf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2023 Intel Corporation 4 | * 5 | * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. 6 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | * 8 | */ 9 | 10 | #ifndef UMF_UNIFIED_MEMORY_FRAMEWORK_H 11 | #define UMF_UNIFIED_MEMORY_FRAMEWORK_H 1 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /// 23 | /// @brief Increment the usage reference counter and initialize the global state of libumf 24 | /// if the usage reference counter was equal to 0. 25 | /// It must be called just after dlopen() and it is not required in other scenarios. 26 | /// @return 0 on success or -1 on failure. 27 | int umfInit(void); 28 | 29 | /// 30 | /// @brief Decrement the usage reference counter and destroy the global state of libumf 31 | /// if the usage reference counter is equal to 0. 32 | /// It must be called just before dlclose() and it is not required in other scenarios. 33 | void umfTearDown(void); 34 | 35 | /// 36 | /// @brief Get the current version of the UMF headers defined by UMF_VERSION_CURRENT. 37 | int umfGetCurrentVersion(void); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* UMF_UNIFIED_MEMORY_FRAMEWORK_H */ 44 | -------------------------------------------------------------------------------- /deps/umf/include/umf/memory_provider_gpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2023-2024 Intel Corporation 4 | * 5 | * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. 6 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | * 8 | */ 9 | 10 | #ifndef UMF_MEMORY_PROVIDER_GPU_H 11 | #define UMF_MEMORY_PROVIDER_GPU_H 1 12 | 13 | #include 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /// @brief USM memory allocation type 20 | typedef enum umf_usm_memory_type_t { 21 | UMF_MEMORY_TYPE_UNKNOWN = 0, ///< The memory pointed to is of unknown type 22 | UMF_MEMORY_TYPE_HOST, ///< The memory pointed to is a host allocation 23 | UMF_MEMORY_TYPE_DEVICE, ///< The memory pointed to is a device allocation 24 | UMF_MEMORY_TYPE_SHARED, ///< The memory pointed to is a shared ownership allocation 25 | } umf_usm_memory_type_t; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* UMF_MEMORY_PROVIDER_GPU_H */ 32 | -------------------------------------------------------------------------------- /deps/umf/include/umf/pools/pool_proxy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2024 Intel Corporation 4 | * 5 | * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. 6 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | * 8 | */ 9 | 10 | #ifndef UMF_PROXY_MEMORY_POOL_H 11 | #define UMF_PROXY_MEMORY_POOL_H 1 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | umf_memory_pool_ops_t *umfProxyPoolOps(void); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif /* UMF_PROXY_MEMORY_POOL_H */ 28 | -------------------------------------------------------------------------------- /doc/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3 2 | 3 | WORKDIR /app 4 | 5 | COPY requirements.txt requirements.txt 6 | RUN pip3 install -r requirements.txt 7 | 8 | COPY build_doc.sh Doxyfile copyright cclEULA.txt /app/ 9 | 10 | RUN apt-get update && apt-get install -y doxygen 11 | 12 | CMD [ "./build_doc.sh" ] -------------------------------------------------------------------------------- /doc/build_doc.md: -------------------------------------------------------------------------------- 1 | # Documentation Generation 2 | 3 | ## Description ## 4 | 5 | The documentation is written using the restructured text markup language (also referred to as reST) and can be built with Doxygen and Sphinx. 6 | 7 | ## How to generate documentation ## 8 | 9 | Install docker if absent and invoke 10 | 11 | ```bash 12 | doc/build_doc_by_docker.sh 13 | ``` 14 | 15 | Generated documentation can be found in: `doc/rst/build/html` directory. 16 | 17 | ## Configure Doxygen ## 18 | 19 | The Doxygen configuration lives in the `doc/Doxyfile` file. 20 | Please refer to the [Doxygen configuration reference](http://www.doxygen.nl/manual/config.html) for more information. 21 | 22 | 23 | ## Configure Sphinx ## 24 | 25 | You can create and modify Sphinx settings in the `doc/rst/source/conf.py` file. 26 | 27 | For more details, please refer to the [Sphinx configuration reference](https://www.sphinx-doc.org/en/master/usage/configuration.html). 28 | -------------------------------------------------------------------------------- /doc/build_doc_by_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # 3 | # Copyright 2016-2020 Intel Corporation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | cd $( dirname -- "$0"; ) 19 | docker build -t ccldocgen . 20 | docker run -v $(pwd)/rst:/app/rst -v $(pwd)/../include:/include ccldocgen 21 | -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | alabaster==0.7.13 2 | Babel==2.12.1 3 | beautifulsoup4==4.12.2 4 | breathe==4.35.0 5 | certifi>=2024.07.04 6 | charset-normalizer==3.1.0 7 | docutils==0.17.1 8 | idna==3.7 9 | imagesize==1.4.1 10 | importlib-metadata==6.7.0 11 | Jinja2==3.1.6 12 | MarkupSafe==2.1.3 13 | packaging==23.1 14 | pydata-sphinx-theme==0.13.3 15 | Pygments==2.15.1 16 | pyparsing==3.1.0 17 | pytz==2023.3 18 | PyYAML==6.0.2 19 | requests>=2.32.0 20 | snowballstemmer==2.2.0 21 | soupsieve==2.4.1 22 | Sphinx==4.5.0 23 | sphinx-book-theme==1.0.1 24 | sphinx-prompt==1.5.0 25 | sphinx-tabs==3.3.1 26 | sphinxcontrib-applehelp==1.0.4 27 | sphinxcontrib-devhelp==1.0.2 28 | sphinxcontrib-htmlhelp==2.0.1 29 | sphinxcontrib-jsmath==1.0.1 30 | sphinxcontrib-qthelp==1.0.3 31 | sphinxcontrib-serializinghtml==1.1.5 32 | urllib3>=2.2.2 33 | zipp==3.19.1 34 | setuptools==78.1.1 35 | -------------------------------------------------------------------------------- /doc/rst/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = source 8 | BUILDDIR = build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | ditaxml: 15 | $ pip3 install --upgrade --force-reinstall git+https://github.com/intel-sandbox/tools.docs.sphinx2dita@main#egg=sphinx2dita 16 | $ sphinx-build -D extensions=sphinx2dita,sphinx.ext.todo,breathe -b ditaxml source build/ditaxml -d build/doctrees 17 | @echo 18 | @echo "Build finished. The ditaxml files are in $(BUILDDIR)/ditaxml." 19 | 20 | .PHONY: help Makefile 21 | 22 | # Catch-all target: route all unknown targets to Sphinx using the new 23 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 24 | %: Makefile 25 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /doc/rst/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /doc/rst/source/_static/favicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/doc/rst/source/_static/favicons.png -------------------------------------------------------------------------------- /doc/rst/source/_static/oneAPI-rgb-rev-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/doc/rst/source/_static/oneAPI-rgb-rev-100.png -------------------------------------------------------------------------------- /doc/rst/source/_static/style.css: -------------------------------------------------------------------------------- 1 | /* override table width restrictions */ 2 | @media screen and (min-width: 767px) { 3 | 4 | .wy-table-responsive table td { 5 | /* !important prevents the common CSS stylesheets from overriding 6 | this as on RTD they are loaded after this stylesheet */ 7 | 8 | white-space: normal !important; 9 | } 10 | 11 | .wy-table-responsive table{ 12 | width: 100%; 13 | } 14 | } 15 | 16 | 17 | /* make the page width fill the window */ 18 | /*.wy-nav-content { 19 | max-width: none; 20 | } 21 | */ 22 | 23 | .code-block-caption { 24 | color: #000; 25 | font: italic 85%/1 arial,sans-serif; 26 | padding: 1em 0; 27 | text-align: center; 28 | } 29 | 30 | 31 | .collapsible { 32 | margin-left: -10px; 33 | background-color: #f1f1f1; 34 | cursor: pointer; 35 | padding: 18px 18px 18px 10px; 36 | width: 100%; 37 | border: none; 38 | text-align: left; 39 | outline: none; 40 | font-weight: 700; 41 | font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; 42 | } 43 | 44 | code.sig-name.descname { 45 | white-space: initial; 46 | } 47 | 48 | table.optimization-notice td { 49 | white-space: initial; 50 | } 51 | 52 | table.optimization-notice td p:last-child { 53 | text-align: right; 54 | } 55 | 56 | /* 57 | .rst-content tt.literal, .rst-content code.literal, .highlight { 58 | background: #f0f0f0; 59 | } 60 | .rst-content tt.literal, .rst-content code.literal { 61 | color: #000000; 62 | }*/ 63 | -------------------------------------------------------------------------------- /doc/rst/source/_templates/footer.html: -------------------------------------------------------------------------------- 1 | {% extends "!footer.html" %} 2 | 3 | {% block extrafooter %} 4 |
5 |
6 |

7 | For more complete information about compiler optimizations, see our Optimization Notice. 8 |

9 |
10 | {% endblock %} -------------------------------------------------------------------------------- /doc/rst/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | {% block extrahead %} 3 | 4 | 15 | 16 | {% endblock %} -------------------------------------------------------------------------------- /doc/rst/source/advanced-configuration.rst: -------------------------------------------------------------------------------- 1 | Advanced Configuration 2 | ====================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | advanced-configuration/collective-algorithms-selection.rst 8 | advanced-configuration/low-precision-datatypes.rst 9 | advanced-configuration/operation-caching.rst 10 | advanced-configuration/operation-prioritization.rst 11 | advanced-configuration/operation-fusion.rst 12 | advanced-configuration/dmabuf.rst 13 | -------------------------------------------------------------------------------- /doc/rst/source/advanced-configuration/collective-algorithms-selection.rst: -------------------------------------------------------------------------------- 1 | ================================== 2 | Selection of Collective Algorithms 3 | ================================== 4 | 5 | |product_short| supports manual selection of collective algorithms for different message size ranges. 6 | 7 | Refer to :ref:`Collective Algorithms Selection ` section for details. 8 | -------------------------------------------------------------------------------- /doc/rst/source/advanced-configuration/images/unordered_coll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/doc/rst/source/advanced-configuration/images/unordered_coll.png -------------------------------------------------------------------------------- /doc/rst/source/advanced-configuration/low-precision-datatypes.rst: -------------------------------------------------------------------------------- 1 | .. _`bfloat16`: https://en.wikipedia.org/wiki/Bfloat16_floating-point_format 2 | .. _`float16`: https://en.wikipedia.org/wiki/Half-precision_floating-point_format 3 | 4 | ======================= 5 | Low-precision Datatypes 6 | ======================= 7 | 8 | |product_short| provides support for collective operations on low-precision (LP) datatypes (`bfloat16`_ and `float16`_). 9 | 10 | Reduction of LP buffers (for example as phase in ``ccl::allreduce``) includes conversion from LP to FP32 format, reduction of FP32 values and conversion from FP32 to LP format. 11 | 12 | |product_short| utilizes CPU vector instructions for FP32 <-> LP conversion. 13 | 14 | For BF16 <-> FP32 conversion |product_short| provides ``AVX512F`` and ``AVX512_BF16``-based implementations. 15 | ``AVX512F``-based implementation requires GCC 4.9 or higher. ``AVX512_BF16``-based implementation requires GCC 10.0 or higher and GNU binutils 2.33 or higher. 16 | ``AVX512_BF16``-based implementation may provide less accuracy loss after multiple up-down conversions. 17 | 18 | For FP16 <-> FP32 conversion |product_short| provides ``F16C`` and ``AVX512F``-based implementations. 19 | Both implementations require GCC 4.9, Clang 9.0 or higher. 20 | 21 | |product short| utilizes CPU vector instructions for LP numeric operations. 22 | 23 | For FP16 numeric operations (arithmetic, load, store) |product short| provides ``AVX512FP16``-based implementation. 24 | This implementation requires GCC 12.0, Clang 14.0, Intel 2021.4.0 or higher. 25 | 26 | Refer to :ref:`Low-precision datatypes ` for details about relevant environment variables. 27 | -------------------------------------------------------------------------------- /doc/rst/source/advanced-configuration/operation-caching.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Caching of Communication Operations 3 | =================================== 4 | 5 | Communication operations may have expensive initialization phase 6 | (for example, allocation of internal structures and buffers, registration of memory buffers, handshake with peers, and so on). 7 | |product_short| amortizes these overheads by caching operation internal representations and reusing them on the subsequent calls. 8 | 9 | To control this, use operation attribute and set ``true`` value for ``to_cache`` field and unique string (for example, tensor name) for ``match_id`` field. 10 | 11 | Note that: 12 | 13 | - ``match_id`` should be the same for a specific communication operation across all ranks. 14 | - If the same tensor is a part of different communication operations, ``match_id`` should have different values for each of these operations. 15 | -------------------------------------------------------------------------------- /doc/rst/source/advanced-configuration/operation-fusion.rst: -------------------------------------------------------------------------------- 1 | ================================== 2 | Fusion of Communication Operations 3 | ================================== 4 | 5 | In some cases, it may be beneficial to postpone execution of communication operations and execute them all together as a single operation in a batch mode. 6 | This can reduce operation setup overhead and improve interconnect saturation. 7 | 8 | |product_short| provides several knobs to enable and control such optimization: 9 | 10 | - The fusion is enabled by :ref:`CCL_FUSION`. 11 | - The advanced configuration is controlled by: 12 | 13 | * :ref:`CCL_FUSION_BYTES_THRESHOLD ` 14 | * :ref:`CCL_FUSION_COUNT_THRESHOLD ` 15 | * :ref:`CCL_FUSION_CYCLE_MS ` 16 | 17 | .. note:: 18 | For now, this functionality is supported for ``allreduce`` operations only. 19 | -------------------------------------------------------------------------------- /doc/rst/source/advanced-configuration/operation-prioritization.rst: -------------------------------------------------------------------------------- 1 | ========================================== 2 | Prioritization of Communication Operations 3 | ========================================== 4 | 5 | |product_short| supports prioritization of communication operations that controls the order in which individual communication operations are executed. 6 | This allows to postpone execution of non-urgent operations to complete urgent operations earlier, which may be beneficial for many use cases. 7 | 8 | The communication prioritization is controlled by priority value. Note that the priority must be a non-negative number with a higher number standing for a higher priority. 9 | 10 | There are the following prioritization modes: 11 | 12 | - None - default mode when all communication operations have the same priority. 13 | - Direct - you explicitly specify priority using ``priority`` field in operation attribute. 14 | - LIFO (Last In, First Out) - priority is implicitly increased on each operation call. In this case, you do not have to specify priority. 15 | 16 | The prioritization mode is controlled by :ref:`CCL_PRIORITY `. 17 | -------------------------------------------------------------------------------- /doc/rst/source/api.rst: -------------------------------------------------------------------------------- 1 | .. _`error handling`: https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/oneccl/source/spec/error_handling 2 | .. _`generic workflow`: https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/oneccl/source/spec/generic_workflow 3 | 4 | oneCCL API 5 | =========== 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | :glob: 10 | 11 | api/initialization.rst 12 | api/concepts.rst 13 | api/operations.rst 14 | 15 | Generic workflow 16 | **************** 17 | 18 | Refer to |product_short| specification for more details about `generic workflow`_ with |product_short| API. 19 | 20 | Error Handling 21 | ************** 22 | 23 | Refer to |product_short| specification for more details about `error handling`_. -------------------------------------------------------------------------------- /doc/rst/source/api/concepts.rst: -------------------------------------------------------------------------------- 1 | .. _`main concepts`: https://spec.oneapi.com/versions/latest/elements/oneCCL/source/spec/main_objects.html 2 | 3 | oneCCL Concepts 4 | =============== 5 | 6 | Refer to |product_short| specification for more details about |product_short| `main concepts`. 7 | 8 | .. toctree:: 9 | :maxdepth: 1 10 | :glob: 11 | 12 | concepts/* 13 | -------------------------------------------------------------------------------- /doc/rst/source/api/concepts/communicator.rst: -------------------------------------------------------------------------------- 1 | Communicator 2 | *********************** 3 | 4 | .. doxygengroup:: communicator 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/concepts/context.rst: -------------------------------------------------------------------------------- 1 | Context 2 | ******* 3 | 4 | .. doxygengroup:: context 5 | :project: oneccl 6 | :content-only: 7 | :no-link: 8 | -------------------------------------------------------------------------------- /doc/rst/source/api/concepts/device.rst: -------------------------------------------------------------------------------- 1 | Device 2 | *********************** 3 | 4 | .. doxygengroup:: device 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/concepts/event.rst: -------------------------------------------------------------------------------- 1 | Event 2 | *********************** 3 | 4 | .. doxygengroup:: event 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/concepts/kvs.rst: -------------------------------------------------------------------------------- 1 | Key-value Store 2 | *********************** 3 | 4 | .. doxygengroup:: kvs 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/concepts/stream.rst: -------------------------------------------------------------------------------- 1 | Stream 2 | *********************** 3 | 4 | .. doxygengroup:: stream 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/initialization.rst: -------------------------------------------------------------------------------- 1 | Initialization 2 | *********************** 3 | 4 | .. doxygengroup:: init 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations.rst: -------------------------------------------------------------------------------- 1 | .. _`communication operations`: https://spec.oneapi.com/versions/latest/elements/oneCCL/source/spec/operations.html 2 | 3 | Communication Operations 4 | ======================== 5 | 6 | Refer to |product_short| specification for more details about `communication operations`. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | operations/datatypes.rst 12 | operations/collective-operations.rst 13 | operations/point-to-point.rst 14 | -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations.rst: -------------------------------------------------------------------------------- 1 | Collective Operations 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | :glob: 7 | 8 | collective-operations/* 9 | 10 | Operation Attributes 11 | ******************** 12 | 13 | .. doxygengroup:: operation 14 | :project: oneccl 15 | :content-only: 16 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/allgather.rst: -------------------------------------------------------------------------------- 1 | Allgather 2 | ********** 3 | 4 | .. doxygengroup:: allgather 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/allgatherv.rst: -------------------------------------------------------------------------------- 1 | Allgatherv 2 | ********** 3 | 4 | .. doxygengroup:: allgatherv 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/allreduce.rst: -------------------------------------------------------------------------------- 1 | Allreduce 2 | ********* 3 | 4 | .. doxygengroup:: allreduce 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/alltoall.rst: -------------------------------------------------------------------------------- 1 | Alltoall 2 | ******** 3 | 4 | .. doxygengroup:: alltoall 5 | :project: oneccl 6 | :content-only: 7 | :no-link: 8 | -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/alltoallv.rst: -------------------------------------------------------------------------------- 1 | Alltoallv 2 | ********* 3 | 4 | .. doxygengroup:: alltoallv 5 | :project: oneccl 6 | :content-only: 7 | :no-link: 8 | -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/barrier.rst: -------------------------------------------------------------------------------- 1 | Barrier 2 | ******* 3 | 4 | .. doxygengroup:: barrier 5 | :project: oneccl 6 | :content-only: 7 | :no-link: 8 | -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/broadcast.rst: -------------------------------------------------------------------------------- 1 | Broadcast 2 | ********* 3 | 4 | .. doxygengroup:: broadcast 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/group-call.rst: -------------------------------------------------------------------------------- 1 | Group calls 2 | *********** 3 | 4 | .. doxygengroup:: group_calls 5 | :project: oneccl 6 | :content-only: 7 | :no-link: 8 | -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/reduce-scatter.rst: -------------------------------------------------------------------------------- 1 | ReduceScatter 2 | ************* 3 | 4 | .. doxygengroup:: reducescatter 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations/collective-operations/reduce.rst: -------------------------------------------------------------------------------- 1 | Reduce 2 | ****** 3 | 4 | .. doxygengroup:: reduce 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/api/operations/datatypes.rst: -------------------------------------------------------------------------------- 1 | Datatypes 2 | *********************** 3 | 4 | .. doxygengroup:: datatype 5 | :project: oneccl 6 | :content-only: 7 | :no-link: -------------------------------------------------------------------------------- /doc/rst/source/general-configuration.rst: -------------------------------------------------------------------------------- 1 | General Configuration 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | general-configuration/operation-execution.rst 8 | general-configuration/transport-selection.rst -------------------------------------------------------------------------------- /doc/rst/source/general-configuration/transport-selection.rst: -------------------------------------------------------------------------------- 1 | .. _mpi: https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html 2 | 3 | =================== 4 | Transport Selection 5 | =================== 6 | 7 | |product_short| supports two transports for inter-process communication: |mpi|_ and `libfabric* `_. 8 | 9 | The transport selection is controlled by :ref:`CCL_ATL_TRANSPORT `. 10 | 11 | In case of MPI over libfabric implementation (for example, |mpi| 2021) or in case of direct libfabric transport, the selection of specific libfabric provider is controlled by the ``FI_PROVIDER`` environment variable. 12 | -------------------------------------------------------------------------------- /doc/rst/source/index.rst: -------------------------------------------------------------------------------- 1 | 2 | ======================================================= 3 | |product_full| 4 | ======================================================= 5 | 6 | 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | :caption: About 11 | 12 | release-notes.rst 13 | introduction.rst 14 | 15 | .. toctree:: 16 | :maxdepth: 2 17 | :caption: Get Started 18 | 19 | introduction/installation.rst 20 | introduction/sample.rst 21 | introduction/cmake-configuration.rst 22 | 23 | .. toctree:: 24 | :maxdepth: 2 25 | :caption: Developer Guide 26 | 27 | programming-model.rst 28 | general-configuration.rst 29 | advanced-configuration.rst 30 | 31 | .. toctree:: 32 | :maxdepth: 2 33 | :caption: Developer Reference 34 | 35 | api.rst 36 | env-variables.rst 37 | 38 | .. toctree:: 39 | :maxdepth: 2 40 | :caption: Benchmark User Guide 41 | 42 | benchmark-guide/benchmark.rst 43 | benchmark-guide/benchmark-point-to-point.rst 44 | 45 | .. toctree:: 46 | :hidden: 47 | :caption: Notices and Disclaimers 48 | 49 | legal.rst 50 | -------------------------------------------------------------------------------- /doc/rst/source/introduction.rst: -------------------------------------------------------------------------------- 1 | .. _mpi: https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html 2 | 3 | ============ 4 | Introduction 5 | ============ 6 | 7 | |product_full| (|product_short|) provides an efficient implementation of communication patterns used in deep learning. 8 | 9 | |product_short| features include: 10 | 11 | - Built on top of lower-level communication middleware – |mpi|_ and `libfabrics `_. 12 | - Optimized to drive scalability of communication patterns. It supports collectives and point-to-point (send/receive) primitives. 13 | - Works across various interconnects: InfiniBand*, Cornelis Networks*, and Ethernet. 14 | - Provides common API sufficient to support communication workflows within Deep Learning / distributed frameworks (such as `PyTorch* `_, `Horovod* `_). 15 | 16 | |product_short| package comprises the |product_short| Software Development Kit (SDK) and the |mpi| Runtime components. -------------------------------------------------------------------------------- /doc/rst/source/introduction/cmake-configuration.rst: -------------------------------------------------------------------------------- 1 | Use oneCCL package from CMake 2 | ============================= 3 | 4 | ``oneCCLConfig.cmake`` and ``oneCCLConfigVersion.cmake`` are included into oneCCL distribution. 5 | 6 | With these files, you can integrate oneCCL into a user project with the 7 | `find_package `_ command. 8 | Successful invocation of ``find_package(oneCCL )`` creates imported target ``oneCCL`` 9 | that can be passed to the 10 | `target_link_libraries `_ command. 11 | 12 | For example: 13 | 14 | .. code-block:: cmake 15 | 16 | project(Foo) 17 | add_executable(foo foo.cpp) 18 | 19 | # Search for oneCCL 20 | find_package(oneCCL REQUIRED) 21 | 22 | # Connect oneCCL to foo 23 | target_link_libraries(foo oneCCL) 24 | 25 | oneCCLConfig files generation 26 | ***************************** 27 | 28 | To generate oneCCLConfig files for oneCCL package, 29 | use the provided ``cmake/scripts/config_generation.cmake`` file: 30 | 31 | .. code-block:: bash 32 | 33 | cmake [-DOUTPUT_DIR=] -P cmake/script/config_generation.cmake 34 | -------------------------------------------------------------------------------- /doc/rst/source/introduction/sample.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | Build a Sample Application 3 | ========================== 4 | 5 | The sample code below shows how to use |product_short| API to perform allreduce communication for SYCL USM memory. 6 | 7 | .. literalinclude:: sample.cpp 8 | :language: cpp 9 | 10 | 11 | Build the Library 12 | ***************** 13 | 14 | #. Build the library with ``SYCL`` support (only Intel\ |reg|\ oneAPI DPC++/C++ Compiler is supported). 15 | 16 | :: 17 | 18 | cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCOMPUTE_BACKEND=dpcpp 19 | make install 20 | 21 | #. `Set up the library environment `_. 22 | 23 | #. Use the C++ driver with the -fsycl option to build the sample: 24 | 25 | :: 26 | 27 | icpx -o sample sample.cpp -lccl -lmpi -fsycl 28 | 29 | 30 | Run the Sample 31 | ************** 32 | 33 | Intel\ |reg|\ MPI Library is required for running the sample. Make sure that MPI environment is set up. 34 | 35 | To run the sample, use the following command: 36 | 37 | :: 38 | 39 | mpiexec ./sample 40 | 41 | where ```` represents optional mpiexec parameters such as node count, processes per node, hosts, and so on. 42 | 43 | .. note:: Explore the complete list of oneAPI code samples in the `oneAPI Samples Catalog `_. These samples were designed to help you develop, offload, and optimize multiarchitecture applications targeting CPUs, GPUs, and FPGAs. 44 | -------------------------------------------------------------------------------- /doc/rst/source/legal.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | Notices and Disclaimers 3 | ======================= 4 | 5 | Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex​. 6 | 7 | No product or component can be absolutely secure. 8 | 9 | Your costs and results may vary. 10 | 11 | Intel technologies may require enabled hardware, software or service activation. 12 | 13 | |copy| Intel Corporation. 14 | Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. 15 | Other names and brands may be claimed as the property of others. 16 | 17 | No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document. 18 | 19 | The products described may contain design defects or errors known as errata which may cause the product to deviate from published specifications. 20 | Current characterized errata are available on request. 21 | 22 | Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, 23 | fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade. 24 | -------------------------------------------------------------------------------- /doc/rst/source/programming-model.rst: -------------------------------------------------------------------------------- 1 | .. _`oneCCL specification`: https://uxlfoundation.github.io/oneAPI-spec/spec/elements/oneCCL/source/index.html 2 | Programming Model 3 | ================= 4 | 5 | The programming model for oneCCL describes how to: 6 | 7 | * Set up distributed computations. 8 | 9 | * Perform collective communication operations (for example, ALLREDUCE, BROADCAST, ALLGATHER). 10 | 11 | .. seealso:: See `oneCCL specification`_ that oneCCL is based on. 12 | 13 | 14 | oneCCL supports a single rank/process per GPU device. The current implementation does not yet support a single process opening multiple devices. 15 | 16 | 17 | Review the oneCCL `generic workflow `_ in the specification before getting started with the communication operations. 18 | 19 | You can quickly get started with: 20 | 21 | .. toctree:: 22 | :maxdepth: 1 23 | 24 | programming-model/host-communication.rst 25 | programming-model/device-communication.rst 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /doc/rst/source/release-notes.rst: -------------------------------------------------------------------------------- 1 | .. |release_notes| replace:: |product_full| Release Notes 2 | .. _release_notes: https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-collective-communication-library-ccl-release-notes.html 3 | 4 | ============= 5 | Release Notes 6 | ============= 7 | 8 | Refer to |release_notes|_. -------------------------------------------------------------------------------- /examples/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016-2020 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | file(GLOB sources "*.c" "*.cpp") 17 | 18 | link_directories(${EXAMPLES_LIB_DIRS}) 19 | 20 | foreach(src ${sources}) 21 | get_filename_component(executable ${src} NAME_WE) 22 | add_executable(${executable} ${src}) 23 | target_include_directories(${executable} PRIVATE ${EXAMPLES_INC_DIRS}) 24 | target_link_libraries(${executable} PRIVATE ccl) 25 | target_link_libraries(${executable} PRIVATE ${COMPUTE_BACKEND_TARGET_NAME}) 26 | target_link_libraries(${executable} PUBLIC pthread) 27 | target_link_libraries(${executable} PUBLIC rt) 28 | target_link_libraries(${executable} PUBLIC m) 29 | target_link_libraries(${executable} PUBLIC dl) 30 | install(TARGETS ${executable} RUNTIME DESTINATION ${CCL_INSTALL_EXAMPLES}/common OPTIONAL) 31 | endforeach() 32 | -------------------------------------------------------------------------------- /examples/cpu/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016-2020 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | file(GLOB sources "*.c" "*.cpp") 17 | 18 | link_directories(${EXAMPLES_LIB_DIRS}) 19 | 20 | foreach(src ${sources}) 21 | get_filename_component(executable ${src} NAME_WE) 22 | add_executable(${executable} ${src}) 23 | target_include_directories(${executable} PRIVATE ${EXAMPLES_INC_DIRS}) 24 | target_link_libraries(${executable} PRIVATE ccl) 25 | target_link_libraries(${executable} PUBLIC rt) 26 | target_link_libraries(${executable} PUBLIC m) 27 | target_link_libraries(${executable} PUBLIC dl) 28 | target_link_libraries(${executable} PUBLIC pthread) 29 | target_link_libraries(${executable} PUBLIC stdc++) 30 | target_link_libraries(${executable} PUBLIC -L${I_MPI_ROOT}/lib/release/) 31 | target_link_libraries(${executable} PUBLIC mpi) 32 | target_link_libraries(${executable} PUBLIC ${COMPUTE_BACKEND_TARGET_NAME}) 33 | install(TARGETS ${executable} RUNTIME DESTINATION ${CCL_INSTALL_EXAMPLES}/cpu OPTIONAL) 34 | endforeach() 35 | 36 | -------------------------------------------------------------------------------- /examples/sycl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016-2020 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | file(GLOB sources "*.c" "*.cpp") 17 | 18 | set(CMAKE_CXX_STANDARD 17) 19 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 20 | 21 | link_directories(${EXAMPLES_LIB_DIRS}) 22 | 23 | foreach(src ${sources}) 24 | get_filename_component(executable ${src} NAME_WE) 25 | add_executable(${executable} ${src}) 26 | target_include_directories(${executable} PRIVATE ${EXAMPLES_INC_DIRS}) 27 | target_link_libraries(${executable} PUBLIC rt) 28 | target_link_libraries(${executable} PUBLIC m) 29 | target_link_libraries(${executable} PRIVATE ccl) 30 | target_link_libraries(${executable} PUBLIC -L${I_MPI_ROOT}/lib/release/) 31 | target_link_libraries(${executable} PUBLIC mpi) 32 | target_link_libraries(${executable} PRIVATE ${COMPUTE_BACKEND_TARGET_NAME}) 33 | install(TARGETS ${executable} RUNTIME DESTINATION ${CCL_INSTALL_EXAMPLES}/sycl OPTIONAL) 34 | endforeach() 35 | -------------------------------------------------------------------------------- /include/oneapi/ccl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "oneapi/ccl/types.hpp" 19 | #include "oneapi/ccl/environment.hpp" 20 | #include "oneapi/ccl/api_functions.hpp" 21 | 22 | namespace ccl {} 23 | namespace oneapi { 24 | namespace ccl = ::ccl; 25 | } 26 | -------------------------------------------------------------------------------- /include/oneapi/ccl/comm_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | enum class comm_attr_id : int { 27 | version, 28 | }; 29 | 30 | } // namespace v1 31 | 32 | using v1::comm_attr_id; 33 | 34 | } // namespace ccl 35 | -------------------------------------------------------------------------------- /include/oneapi/ccl/comm_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | template <> 27 | struct ccl_api_type_attr_traits { 28 | using type = ccl::library_version; 29 | using return_type = type; 30 | }; 31 | 32 | } // namespace detail 33 | 34 | } // namespace ccl 35 | -------------------------------------------------------------------------------- /include/oneapi/ccl/comm_split_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | enum class comm_split_attr_id : int { 27 | version, 28 | 29 | color, 30 | group, 31 | }; 32 | 33 | enum class split_group : int { 34 | cluster, 35 | }; 36 | 37 | } // namespace v1 38 | 39 | using v1::comm_split_attr_id; 40 | using v1::split_group; 41 | 42 | } // namespace ccl 43 | -------------------------------------------------------------------------------- /include/oneapi/ccl/comm_split_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | template <> 27 | struct ccl_api_type_attr_traits { 28 | using type = ccl::library_version; 29 | }; 30 | 31 | template <> 32 | struct ccl_api_type_attr_traits { 33 | using type = int; 34 | }; 35 | 36 | template <> 37 | struct ccl_api_type_attr_traits { 38 | using type = split_group; 39 | }; 40 | 41 | } // namespace detail 42 | 43 | } // namespace ccl 44 | -------------------------------------------------------------------------------- /include/oneapi/ccl/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CCL_FORCEINLINE inline __attribute__((always_inline)) 4 | #define CCL_FORCENOINLINE __attribute__((noinline)) 5 | 6 | #if (__GNUC__ >= 6) || defined(__clang__) 7 | # define CCL_DEPRECATED_ENUM_FIELD __attribute__((deprecated)) 8 | #else 9 | # define CCL_DEPRECATED_ENUM_FIELD 10 | #endif 11 | 12 | #if defined(__GNUC__) 13 | # define CCL_DEPRECATED __attribute__((deprecated)) 14 | #else 15 | # define CCL_DEPRECATED 16 | #endif 17 | 18 | /* All symbols shall be internal unless marked as CCL_API */ 19 | #ifdef __linux__ 20 | # if __GNUC__ >= 4 21 | # define CCL_HELPER_DLL_EXPORT __attribute__ ((visibility ("default"))) 22 | # else 23 | # define CCL_HELPER_DLL_EXPORT 24 | # endif 25 | #else 26 | #error "unexpected OS" 27 | #endif 28 | 29 | #define CCL_API CCL_HELPER_DLL_EXPORT 30 | 31 | #define ONECCL_SPEC_VERSION "1.0" 32 | 33 | #define CCL_MAJOR_VERSION 2021 34 | #define CCL_MINOR_VERSION 15 35 | #define CCL_UPDATE_VERSION 2 36 | #define CCL_PRODUCT_STATUS "Gold" 37 | #define CCL_PRODUCT_BUILD_DATE "2025-05-22T 03:58:44Z" 38 | #define CCL_PRODUCT_FULL "Gold-2021.15.2 2025-05-22T 03:58:44Z (master/9bd0c7a)" 39 | 40 | #if defined(SYCL_LANGUAGE_VERSION) && defined (__INTEL_LLVM_COMPILER) 41 | #define CCL_ENABLE_SYCL 42 | #define CCL_ENABLE_ZE 43 | #endif 44 | -------------------------------------------------------------------------------- /include/oneapi/ccl/config.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CCL_FORCEINLINE inline __attribute__((always_inline)) 4 | #define CCL_FORCENOINLINE __attribute__((noinline)) 5 | 6 | #if (__GNUC__ >= 6) || defined(__clang__) 7 | # define CCL_DEPRECATED_ENUM_FIELD __attribute__((deprecated)) 8 | #else 9 | # define CCL_DEPRECATED_ENUM_FIELD 10 | #endif 11 | 12 | #if defined(__GNUC__) 13 | # define CCL_DEPRECATED __attribute__((deprecated)) 14 | #else 15 | # define CCL_DEPRECATED 16 | #endif 17 | 18 | /* All symbols shall be internal unless marked as CCL_API */ 19 | #ifdef __linux__ 20 | # if __GNUC__ >= 4 21 | # define CCL_HELPER_DLL_EXPORT __attribute__ ((visibility ("default"))) 22 | # else 23 | # define CCL_HELPER_DLL_EXPORT 24 | # endif 25 | #else 26 | #error "unexpected OS" 27 | #endif 28 | 29 | #define CCL_API CCL_HELPER_DLL_EXPORT 30 | 31 | #define ONECCL_SPEC_VERSION "1.0" 32 | 33 | #define CCL_MAJOR_VERSION @CCL_MAJOR_VERSION@ 34 | #define CCL_MINOR_VERSION @CCL_MINOR_VERSION@ 35 | #define CCL_UPDATE_VERSION @CCL_UPDATE_VERSION@ 36 | #cmakedefine CCL_PRODUCT_STATUS "@CCL_PRODUCT_STATUS@" 37 | #cmakedefine CCL_PRODUCT_BUILD_DATE "@CCL_PRODUCT_BUILD_DATE@" 38 | #cmakedefine CCL_PRODUCT_FULL "@CCL_PRODUCT_FULL@" 39 | 40 | #if defined(SYCL_LANGUAGE_VERSION) && defined (__INTEL_LLVM_COMPILER) 41 | #define CCL_ENABLE_SYCL 42 | #define CCL_ENABLE_ZE 43 | #endif 44 | -------------------------------------------------------------------------------- /include/oneapi/ccl/context_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | /** 27 | * Context attribute ids 28 | */ 29 | enum class context_attr_id : int { 30 | version, 31 | cl_backend, 32 | native_handle, 33 | }; 34 | 35 | } // namespace v1 36 | 37 | using v1::context_attr_id; 38 | 39 | } // namespace ccl 40 | -------------------------------------------------------------------------------- /include/oneapi/ccl/context_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | /** 27 | * Traits for context attributes specializations 28 | */ 29 | template <> 30 | struct ccl_api_type_attr_traits { 31 | using type = library_version; 32 | using return_type = type; 33 | }; 34 | 35 | template <> 36 | struct ccl_api_type_attr_traits { 37 | using type = cl_backend_type; 38 | using return_type = type; 39 | }; 40 | 41 | template <> 42 | struct ccl_api_type_attr_traits { 43 | using type = typename unified_context_type::ccl_native_t; 44 | using return_type = type; 45 | }; 46 | 47 | } // namespace detail 48 | 49 | } // namespace ccl 50 | -------------------------------------------------------------------------------- /include/oneapi/ccl/datatype_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | enum class datatype_attr_id : int { 27 | version, 28 | 29 | size, 30 | }; 31 | 32 | } // namespace v1 33 | 34 | using v1::datatype_attr_id; 35 | 36 | } // namespace ccl 37 | -------------------------------------------------------------------------------- /include/oneapi/ccl/datatype_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | template <> 27 | struct ccl_api_type_attr_traits { 28 | using type = ccl::library_version; 29 | using return_type = type; 30 | }; 31 | 32 | template <> 33 | struct ccl_api_type_attr_traits { 34 | using type = size_t; 35 | using return_type = type; 36 | }; 37 | 38 | } // namespace detail 39 | 40 | } // namespace ccl 41 | -------------------------------------------------------------------------------- /include/oneapi/ccl/device_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | /** 27 | * Device attribute ids 28 | */ 29 | enum class device_attr_id : int { 30 | version, 31 | cl_backend, 32 | native_handle, 33 | }; 34 | 35 | } // namespace v1 36 | 37 | using v1::device_attr_id; 38 | 39 | } // namespace ccl 40 | -------------------------------------------------------------------------------- /include/oneapi/ccl/device_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | /** 27 | * Traits for device attributes specializations 28 | */ 29 | template <> 30 | struct ccl_api_type_attr_traits { 31 | using type = library_version; 32 | using return_type = type; 33 | }; 34 | 35 | template <> 36 | struct ccl_api_type_attr_traits { 37 | using type = cl_backend_type; 38 | using return_type = type; 39 | }; 40 | 41 | template <> 42 | struct ccl_api_type_attr_traits { 43 | using type = typename unified_device_type::ccl_native_t; 44 | using return_type = type; 45 | }; 46 | 47 | } // namespace detail 48 | 49 | } // namespace ccl 50 | -------------------------------------------------------------------------------- /include/oneapi/ccl/init_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | enum class init_attr_id : int { 27 | version, 28 | }; 29 | 30 | } // namespace v1 31 | 32 | using v1::init_attr_id; 33 | 34 | } // namespace ccl 35 | -------------------------------------------------------------------------------- /include/oneapi/ccl/init_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | template <> 27 | struct ccl_api_type_attr_traits { 28 | using type = ccl::library_version; 29 | using return_type = type; 30 | }; 31 | 32 | } // namespace detail 33 | 34 | } // namespace ccl 35 | -------------------------------------------------------------------------------- /include/oneapi/ccl/kvs_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | enum class kvs_attr_id : int { 27 | version, 28 | 29 | ip_port, 30 | }; 31 | 32 | } // namespace v1 33 | 34 | using v1::kvs_attr_id; 35 | 36 | } // namespace ccl 37 | -------------------------------------------------------------------------------- /include/oneapi/ccl/kvs_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | template <> 27 | struct ccl_api_type_attr_traits { 28 | using type = ccl::library_version; 29 | using return_type = type; 30 | }; 31 | 32 | template <> 33 | struct ccl_api_type_attr_traits { 34 | using type = ccl::string_class; 35 | using return_type = type; 36 | }; 37 | 38 | } // namespace detail 39 | 40 | } // namespace ccl 41 | -------------------------------------------------------------------------------- /include/oneapi/ccl/native_device_api/empty/context.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | namespace native { 19 | struct ccl_context {}; 20 | } // namespace native 21 | -------------------------------------------------------------------------------- /include/oneapi/ccl/native_device_api/empty/device.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/native_device_api/empty/primitives.hpp" 18 | 19 | namespace native { 20 | struct ccl_device { 21 | using device_event = ccl_device_event; 22 | using device_queue = ccl_device_queue; 23 | }; 24 | } // namespace native 25 | -------------------------------------------------------------------------------- /include/oneapi/ccl/native_device_api/empty/event.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | namespace native { 18 | 19 | struct ccl_device_queue {}; 20 | } // namespace native 21 | -------------------------------------------------------------------------------- /include/oneapi/ccl/native_device_api/empty/platform.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | namespace native { 19 | struct ccl_device_platform {}; 20 | } // namespace native 21 | -------------------------------------------------------------------------------- /include/oneapi/ccl/native_device_api/empty/primitives.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | namespace native { 18 | 19 | struct ccl_device_event {}; 20 | struct ccl_device_queue {}; 21 | } // namespace native 22 | -------------------------------------------------------------------------------- /include/oneapi/ccl/native_device_api/empty/queue.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | namespace native { 18 | 19 | struct ccl_device_queue {}; 20 | } // namespace native 21 | -------------------------------------------------------------------------------- /include/oneapi/ccl/native_device_api/export_api.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/config.h" 18 | 19 | #if defined(CCL_ENABLE_ZE) || defined(CCL_ENABLE_SYCL) 20 | #include "sycl/export.hpp" 21 | #else 22 | #include "empty/export.hpp" 23 | #endif 24 | 25 | #ifndef CL_BACKEND_TYPE 26 | #error "Unsupported CL_BACKEND_TYPE. Available backends are: dpcpp_sycl, l0 " 27 | #endif 28 | 29 | namespace ccl { 30 | using backend_traits = backend_info; 31 | using unified_device_type = generic_device_type; 32 | using unified_context_type = generic_context_type; 33 | using unified_platform_type = generic_platform_type; 34 | using unified_stream_type = generic_stream_type; 35 | using unified_event_type = generic_event_type; 36 | } // namespace ccl 37 | -------------------------------------------------------------------------------- /include/oneapi/ccl/stream_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | class ccl_stream; 23 | namespace ccl { 24 | 25 | namespace v1 { 26 | 27 | /** 28 | * Stream attribute ids 29 | */ 30 | enum class stream_attr_id : int { 31 | version, 32 | 33 | native_handle, 34 | }; 35 | 36 | } // namespace v1 37 | 38 | using v1::stream_attr_id; 39 | 40 | } // namespace ccl 41 | -------------------------------------------------------------------------------- /include/oneapi/ccl/stream_attr_ids_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifndef CCL_PRODUCT_FULL 19 | #error "Do not include this file directly. Please include 'ccl.hpp'" 20 | #endif 21 | 22 | namespace ccl { 23 | 24 | namespace detail { 25 | 26 | /** 27 | * Traits for stream attributes specializations 28 | */ 29 | template <> 30 | struct ccl_api_type_attr_traits { 31 | using type = ccl::library_version; 32 | using return_type = type; 33 | }; 34 | 35 | template <> 36 | struct ccl_api_type_attr_traits { 37 | using type = typename unified_stream_type::ccl_native_t; 38 | using handle_t = typename unified_stream_type::handle_t; 39 | using return_type = type; 40 | }; 41 | 42 | } // namespace detail 43 | 44 | } // namespace ccl 45 | -------------------------------------------------------------------------------- /man/README.md: -------------------------------------------------------------------------------- 1 | # How to generate documentation: 2 | 3 | ## Environment preparation 4 | 5 | 1. Make sure the following packages are installed: 6 | - doxygen 7 | - python3 8 | 2. Install python deps: `python3 -m pip install -r requirements.txt` 9 | 10 | ## Doc generation 11 | 12 | 1. Generate docs by calling `./merge_doc.sh` 13 | 2. The following files should be re-generated: 14 | - man3/OneCCL.3 15 | - OneCCL.md 16 | -------------------------------------------------------------------------------- /man/doxconfig: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Intel® oneAPI Collective Communications Library" 2 | PROJECT_NUMBER = "2021.15.2" 3 | 4 | INPUT = ../src/common/env/vars.hpp ../src/common/env/vars_experimental.hpp 5 | 6 | GENERATE_MAN = YES 7 | MAN_OUTPUT=../man 8 | 9 | PREDEFINED = "CCL_ENABLE_SYCL" \ 10 | "CCL_ENABLE_DRM" 11 | 12 | GENERATE_HTML = NO 13 | GENERATE_LATEX = NO 14 | GENERATE_XML = YES 15 | -------------------------------------------------------------------------------- /man/requirements.txt: -------------------------------------------------------------------------------- 1 | defusedxml==0.7.1 2 | -------------------------------------------------------------------------------- /pkgconfig/ccl/cpu/lib/template.pc: -------------------------------------------------------------------------------- 1 | 2 | prefix=${pcfiledir}/../../../../../ 3 | exec_prefix=${prefix} 4 | libdir=${exec_prefix}/lib/ccl/cpu/lib 5 | includedir=${prefix}/include 6 | 7 | Name: oneAPI Collective Communications Library (oneCCL) 8 | Description: oneCCL provides an efficient implementation of communication patterns used in deep learning. 9 | URL: https://github.com/oneapi-src/oneCCL 10 | Version: CCL_SUBSTITUTE_OFFICIAL_VERSION 11 | Requires: impi 12 | Libs: -L${libdir} -lccl 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /pkgconfig/template.pc: -------------------------------------------------------------------------------- 1 | prefix=${pcfiledir}/../../ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib/ 4 | includedir=${prefix}/include/ 5 | 6 | Name: oneAPI Collective Communications Library (oneCCL) 7 | Description: oneCCL provides an efficient implementation of communication patterns used in deep learning. 8 | URL: https://github.com/oneapi-src/oneCCL 9 | Version: CCL_SUBSTITUTE_OFFICIAL_VERSION 10 | Requires: impi 11 | Libs: -L${libdir} -lccl -lsycl 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /src/atl/atl_base_transport.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "atl/atl_base_transport.hpp" 17 | 18 | constexpr int atl_comm_id_storage::invalid_comm_id; 19 | -------------------------------------------------------------------------------- /src/atl/util/pm/pmi_resizable_rt/pmi_resizable/pmi_listener.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #ifndef LISTENER_H_INCLUDED 17 | #define LISTENER_H_INCLUDED 18 | 19 | #include "helper.hpp" 20 | 21 | class pmi_listener { 22 | public: 23 | kvs_status_t send_notification(int sig, std::shared_ptr h); 24 | 25 | void set_applied_count(int count); 26 | 27 | kvs_status_t run_listener(std::shared_ptr h); 28 | 29 | private: 30 | kvs_status_t collect_sock_addr(std::shared_ptr h); 31 | kvs_status_t clean_listener(std::shared_ptr h); 32 | }; 33 | #endif 34 | -------------------------------------------------------------------------------- /src/atl/util/pm/pmi_resizable_rt/pmi_resizable/shift_list.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | typedef enum change_type { 18 | CH_T_SHIFT = 0, 19 | CH_T_DEAD = 1, 20 | CH_T_NEW = 2, 21 | CH_T_UPDATE = 3, 22 | } change_type_t; 23 | 24 | typedef struct shift_rank { 25 | int old_rank; 26 | int new_rank; 27 | change_type_t type; 28 | } shift_rank_t; 29 | -------------------------------------------------------------------------------- /src/ccl_empty_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "oneapi/ccl/types.hpp" 17 | #include "common/utils/version.hpp" 18 | 19 | namespace ccl { 20 | 21 | namespace v1 { 22 | 23 | library_version ccl_empty_attr::version = utils::get_library_version(); 24 | 25 | template 26 | attr ccl_empty_attr::create_empty() { 27 | return attr{ ccl_empty_attr::version }; 28 | } 29 | 30 | } // namespace v1 31 | 32 | } // namespace ccl 33 | -------------------------------------------------------------------------------- /src/ccl_empty_comm_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "oneapi/ccl/types.hpp" 17 | #include "oneapi/ccl/aliases.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/type_traits.hpp" 20 | 21 | #include "oneapi/ccl/comm_attr_ids.hpp" 22 | #include "oneapi/ccl/comm_attr_ids_traits.hpp" 23 | #include "oneapi/ccl/comm_attr.hpp" 24 | 25 | namespace ccl { 26 | 27 | namespace v1 { 28 | 29 | template 30 | CCL_API attr ccl_empty_attr::create_empty() { 31 | return attr{ ccl_empty_attr::version }; 32 | } 33 | 34 | CCL_API comm_attr default_comm_attr = ccl_empty_attr::create_empty(); 35 | 36 | } // namespace v1 37 | 38 | } // namespace ccl 39 | -------------------------------------------------------------------------------- /src/ccl_empty_comm_split_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "oneapi/ccl/types.hpp" 17 | #include "oneapi/ccl/aliases.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/type_traits.hpp" 20 | 21 | #include "oneapi/ccl/comm_split_attr_ids.hpp" 22 | #include "oneapi/ccl/comm_split_attr_ids_traits.hpp" 23 | #include "oneapi/ccl/comm_split_attr.hpp" 24 | 25 | namespace ccl { 26 | 27 | namespace v1 { 28 | 29 | template 30 | CCL_API attr ccl_empty_attr::create_empty() { 31 | return attr{ ccl_empty_attr::version }; 32 | } 33 | 34 | CCL_API comm_split_attr default_comm_split_attr = ccl_empty_attr::create_empty(); 35 | 36 | } // namespace v1 37 | 38 | } // namespace ccl 39 | -------------------------------------------------------------------------------- /src/ccl_empty_init_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "oneapi/ccl/types.hpp" 17 | #include "oneapi/ccl/aliases.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/type_traits.hpp" 20 | 21 | #include "oneapi/ccl/init_attr_ids.hpp" 22 | #include "oneapi/ccl/init_attr_ids_traits.hpp" 23 | #include "oneapi/ccl/init_attr.hpp" 24 | 25 | namespace ccl { 26 | 27 | namespace v1 { 28 | 29 | template 30 | CCL_API attr ccl_empty_attr::create_empty() { 31 | return attr{ ccl_empty_attr::version }; 32 | } 33 | 34 | CCL_API init_attr default_init_attr = ccl_empty_attr::create_empty(); 35 | 36 | } // namespace v1 37 | 38 | } // namespace ccl 39 | -------------------------------------------------------------------------------- /src/ccl_empty_kvs_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "oneapi/ccl/types.hpp" 17 | #include "oneapi/ccl/aliases.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/type_traits.hpp" 20 | 21 | #include "oneapi/ccl/kvs_attr_ids.hpp" 22 | #include "oneapi/ccl/kvs_attr_ids_traits.hpp" 23 | #include "oneapi/ccl/kvs_attr.hpp" 24 | 25 | namespace ccl { 26 | 27 | namespace v1 { 28 | 29 | template 30 | CCL_API attr ccl_empty_attr::create_empty() { 31 | return attr{ ccl_empty_attr::version }; 32 | } 33 | 34 | CCL_API kvs_attr default_kvs_attr = ccl_empty_attr::create_empty(); 35 | 36 | } // namespace v1 37 | 38 | } // namespace ccl 39 | -------------------------------------------------------------------------------- /src/ccl_empty_stream.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "oneapi/ccl/types.hpp" 17 | #include "oneapi/ccl/aliases.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/type_traits.hpp" 20 | 21 | #include "oneapi/ccl/stream_attr_ids.hpp" 22 | #include "oneapi/ccl/stream_attr_ids_traits.hpp" 23 | #include "oneapi/ccl/stream.hpp" 24 | 25 | // Core file with PIMPL implementation 26 | //#include "stream_impl.hpp" 27 | 28 | namespace ccl { 29 | 30 | namespace v1 { 31 | 32 | template 33 | CCL_API attr ccl_empty_attr::create_empty() { 34 | return attr{ ccl_empty_attr::version }; 35 | } 36 | 37 | CCL_API stream default_stream = ccl_empty_attr::create_empty(); 38 | 39 | } // namespace v1 40 | 41 | } // namespace ccl 42 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/allreduce_rma.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | typedef struct { 19 | int wait_dst; 20 | 21 | int src_peer; 22 | int dst_peer; 23 | 24 | volatile uint64_t sync_flag; // src side will write here the index of iteration it completed 25 | atl_mr_t* sync_flag_mr; 26 | 27 | uint64_t* sync_flags; // pre-computed values (iteration indexes) to be written to dst side 28 | atl_mr_t* sync_flags_mr; 29 | 30 | volatile uint64_t 31 | dst_ready_flag; // dst side will write here '1' to indicate it is ready for write ops 32 | atl_mr_t* dst_ready_flag_mr; 33 | 34 | uint64_t dst_ready_value; 35 | atl_mr_t* dst_ready_value_mr; 36 | 37 | atl_mr_t remote_sync_flag_mr; 38 | atl_mr_t remote_dst_ready_flag_mr; 39 | 40 | atl_mr_t* send_buf_mr; 41 | atl_mr_t* recv_buf_mr; 42 | atl_mr_t* tmp_buf_mr; 43 | 44 | atl_mr_t remote_rs_dst_buf_mr; 45 | atl_mr_t remote_recv_buf_mr; 46 | 47 | } ccl_rma_ring_allreduce_handler; 48 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_large_sycl_bf16.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_large_sycl.hpp" 17 | 18 | sycl_allreduce_large ar_large_bf16; 19 | 20 | ALLREDUCE_LARGE_API(bf16); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_large_sycl_fp16.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_large_sycl.hpp" 17 | 18 | sycl_allreduce_large ar_large_fp16; 19 | 20 | ALLREDUCE_LARGE_API(fp16); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_large_sycl_fp32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_large_sycl.hpp" 17 | 18 | sycl_allreduce_large ar_large_fp32; 19 | 20 | ALLREDUCE_LARGE_API(fp32); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_large_sycl_int32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_large_sycl.hpp" 17 | 18 | sycl_allreduce_large ar_large_int32; 19 | 20 | ALLREDUCE_LARGE_API(int32); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_medium_sycl_bf16.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_medium_sycl.hpp" 17 | 18 | sycl_allreduce_medium ar_medium_bf16; 19 | 20 | ALLREDUCE_MEDIUM_API(bf16); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_medium_sycl_fp16.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_medium_sycl.hpp" 17 | 18 | sycl_allreduce_medium ar_medium_fp16; 19 | 20 | ALLREDUCE_MEDIUM_API(fp16); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_medium_sycl_fp32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_medium_sycl.hpp" 17 | 18 | sycl_allreduce_medium ar_medium_fp32; 19 | 20 | ALLREDUCE_MEDIUM_API(fp32); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/allreduce/sycl/allreduce_medium_sycl_int32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/allreduce/sycl/allreduce_medium_sycl.hpp" 17 | 18 | sycl_allreduce_medium ar_medium_int32; 19 | 20 | ALLREDUCE_MEDIUM_API(int32); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/alltoall/alltoall.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/algorithms.hpp" 17 | #include "sched/entry/factory/entry_factory.hpp" 18 | 19 | ccl::status ccl_coll_build_direct_alltoall(ccl_sched* sched, 20 | ccl_buffer send_buf, 21 | ccl_buffer recv_buf, 22 | size_t count, 23 | const ccl_datatype& dtype, 24 | ccl_comm* comm) { 25 | LOG_DEBUG("build direct alltoall"); 26 | 27 | entry_factory::create(sched, send_buf, recv_buf, count, dtype, comm); 28 | return ccl::status::success; 29 | } 30 | -------------------------------------------------------------------------------- /src/coll/algorithms/alltoall/sycl/alltoall_large_sycl.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/src/coll/algorithms/alltoall/sycl/alltoall_large_sycl.hpp -------------------------------------------------------------------------------- /src/coll/algorithms/broadcast/sycl/broadcast_small_sycl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/broadcast/sycl/broadcast_small_sycl_impl.hpp" 17 | 18 | ccl::event broadcast_small(const void* send_buf, 19 | void* recv_buf, 20 | size_t count, 21 | ccl::datatype dtype, 22 | int root, 23 | ccl_comm* comm, 24 | ccl_stream* global_stream, 25 | const ccl::vector_class& deps) { 26 | LOG_DEBUG("invoking broadcast_small"); 27 | coll_init(comm, global_stream); 28 | 29 | auto lambda = [&]() { 30 | return broadcast_small_impl( 31 | send_buf, recv_buf, count, dtype, root, comm, global_stream, deps); 32 | }; 33 | 34 | return invoke_collective(lambda, comm, dtype); 35 | } 36 | -------------------------------------------------------------------------------- /src/coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl_bf16.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl.hpp" 17 | 18 | sycl_reduce_scatter_large rs_large_bf16; 19 | 20 | REDUCE_SCATTER_LARGE_API(bf16); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl_fp16.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl.hpp" 17 | 18 | sycl_reduce_scatter_large rs_large_fp16; 19 | 20 | REDUCE_SCATTER_LARGE_API(fp16); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl_fp32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl.hpp" 17 | 18 | sycl_reduce_scatter_large rs_large_fp32; 19 | 20 | REDUCE_SCATTER_LARGE_API(fp32); 21 | -------------------------------------------------------------------------------- /src/coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl_int32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/algorithms/reduce_scatter/sycl/reduce_scatter_large_sycl.hpp" 17 | 18 | sycl_reduce_scatter_large rs_large_int32; 19 | 20 | REDUCE_SCATTER_LARGE_API(int32); 21 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_allgather_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_allgather_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_allgather_attr_impl_t::ccl_allgather_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | } // namespace ccl 24 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_allgather_op_attr.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/coll_attr_ids.hpp" 20 | #include "oneapi/ccl/coll_attr_ids_traits.hpp" 21 | #include "coll/attr/ccl_common_op_attrs.hpp" 22 | namespace ccl { 23 | 24 | class ccl_allgather_attr_impl_t : public ccl_operation_attr_impl_t { 25 | public: 26 | using base_t = ccl_operation_attr_impl_t; 27 | 28 | ccl_allgather_attr_impl_t( 29 | const typename detail::ccl_api_type_attr_traits::type& version); 31 | 32 | private: 33 | }; 34 | } // namespace ccl 35 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_allgatherv_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_allgatherv_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_allgatherv_attr_impl_t::ccl_allgatherv_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | } // namespace ccl 24 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_allgatherv_op_attr.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/coll_attr_ids.hpp" 20 | #include "oneapi/ccl/coll_attr_ids_traits.hpp" 21 | #include "coll/attr/ccl_common_op_attrs.hpp" 22 | namespace ccl { 23 | 24 | class ccl_allgatherv_attr_impl_t : public ccl_operation_attr_impl_t { 25 | public: 26 | using base_t = ccl_operation_attr_impl_t; 27 | 28 | ccl_allgatherv_attr_impl_t( 29 | const typename detail::ccl_api_type_attr_traits::type& version); 31 | 32 | private: 33 | }; 34 | } // namespace ccl 35 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_allreduce_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_allreduce_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_allreduce_attr_impl_t::ccl_allreduce_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | 24 | typename ccl_allreduce_attr_impl_t::reduction_fn_traits_t::return_type 25 | ccl_allreduce_attr_impl_t::set_attribute_value(typename reduction_fn_traits_t::type val, 26 | const reduction_fn_traits_t& t) { 27 | auto old = reduction_fn_val.get(); 28 | reduction_fn_val = typename reduction_fn_traits_t::return_type{ val }; 29 | return typename reduction_fn_traits_t::return_type{ old }; 30 | } 31 | 32 | const typename ccl_allreduce_attr_impl_t::reduction_fn_traits_t::return_type& 33 | ccl_allreduce_attr_impl_t::get_attribute_value(const reduction_fn_traits_t& id) const { 34 | return reduction_fn_val; 35 | } 36 | } // namespace ccl 37 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_alltoall_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_alltoall_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_alltoall_attr_impl_t::ccl_alltoall_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | } // namespace ccl 24 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_alltoall_op_attr.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/coll_attr_ids.hpp" 20 | #include "oneapi/ccl/coll_attr_ids_traits.hpp" 21 | #include "coll/attr/ccl_common_op_attrs.hpp" 22 | namespace ccl { 23 | 24 | class ccl_alltoall_attr_impl_t : public ccl_operation_attr_impl_t { 25 | public: 26 | using base_t = ccl_operation_attr_impl_t; 27 | 28 | ccl_alltoall_attr_impl_t( 29 | const typename detail::ccl_api_type_attr_traits::type& version); 31 | }; 32 | 33 | } // namespace ccl 34 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_alltoallv_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_alltoallv_op_attr.hpp" 17 | namespace ccl { 18 | 19 | ccl_alltoallv_attr_impl_t::ccl_alltoallv_attr_impl_t( 20 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 21 | : base_t(version) {} 22 | } // namespace ccl 23 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_alltoallv_op_attr.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/coll_attr_ids.hpp" 20 | #include "oneapi/ccl/coll_attr_ids_traits.hpp" 21 | #include "coll/attr/ccl_common_op_attrs.hpp" 22 | namespace ccl { 23 | 24 | class ccl_alltoallv_attr_impl_t : public ccl_operation_attr_impl_t { 25 | public: 26 | using base_t = ccl_operation_attr_impl_t; 27 | 28 | ccl_alltoallv_attr_impl_t( 29 | const typename detail::ccl_api_type_attr_traits::type& version); 31 | }; 32 | 33 | } // namespace ccl 34 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_attrs.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "coll/attr/ccl_common_op_attrs.hpp" 18 | #include "coll/attr/ccl_allgather_op_attr.hpp" 19 | #include "coll/attr/ccl_allgatherv_op_attr.hpp" 20 | #include "coll/attr/ccl_allreduce_op_attr.hpp" 21 | #include "coll/attr/ccl_alltoall_op_attr.hpp" 22 | #include "coll/attr/ccl_alltoallv_op_attr.hpp" 23 | #include "coll/attr/ccl_barrier_op_attr.hpp" 24 | #include "coll/attr/ccl_bcast_op_attr.hpp" 25 | #include "coll/attr/ccl_pt2pt_op_attr.hpp" 26 | #include "coll/attr/ccl_reduce_op_attr.hpp" 27 | #include "coll/attr/ccl_reduce_scatter_op_attr.hpp" 28 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_barrier_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_barrier_op_attr.hpp" 17 | 18 | namespace ccl { 19 | /** 20 | * Definition 21 | */ 22 | ccl_barrier_attr_impl_t::ccl_barrier_attr_impl_t( 23 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 24 | : base_t(version) {} 25 | } // namespace ccl 26 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_barrier_op_attr.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/coll_attr_ids.hpp" 20 | #include "oneapi/ccl/coll_attr_ids_traits.hpp" 21 | #include "coll/attr/ccl_common_op_attrs.hpp" 22 | 23 | namespace ccl { 24 | class ccl_barrier_attr_impl_t : public ccl_operation_attr_impl_t { 25 | public: 26 | using base_t = ccl_operation_attr_impl_t; 27 | 28 | ccl_barrier_attr_impl_t( 29 | const typename detail::ccl_api_type_attr_traits::type& version); 31 | }; 32 | } // namespace ccl 33 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_bcast_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_bcast_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_broadcast_attr_impl_t::ccl_broadcast_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | 24 | } // namespace ccl 25 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_bcast_op_attr.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "oneapi/ccl/coll_attr_ids.hpp" 20 | #include "oneapi/ccl/coll_attr_ids_traits.hpp" 21 | #include "coll/attr/ccl_common_op_attrs.hpp" 22 | namespace ccl { 23 | 24 | class ccl_broadcast_attr_impl_t : public ccl_operation_attr_impl_t { 25 | public: 26 | using base_t = ccl_operation_attr_impl_t; 27 | 28 | ccl_broadcast_attr_impl_t( 29 | const typename detail::ccl_api_type_attr_traits::type& version); 31 | }; 32 | 33 | } // namespace ccl 34 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_pt2pt_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_pt2pt_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_pt2pt_attr_impl_t::ccl_pt2pt_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | 24 | typename ccl_pt2pt_attr_impl_t::group_id_traits_t::return_type 25 | ccl_pt2pt_attr_impl_t::set_attribute_value(typename group_id_traits_t::type val, 26 | const group_id_traits_t& t) { 27 | auto old = group_id; 28 | std::swap(group_id, val); 29 | return old; 30 | } 31 | 32 | const typename ccl_pt2pt_attr_impl_t::group_id_traits_t::return_type& 33 | ccl_pt2pt_attr_impl_t::get_attribute_value(const group_id_traits_t& id) const { 34 | return group_id; 35 | } 36 | } // namespace ccl 37 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_reduce_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_reduce_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_reduce_attr_impl_t::ccl_reduce_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | 24 | typename ccl_reduce_attr_impl_t::reduction_fn_traits_t::return_type 25 | ccl_reduce_attr_impl_t::set_attribute_value(typename reduction_fn_traits_t::type val, 26 | const reduction_fn_traits_t& t) { 27 | auto old = reduction_fn_val; 28 | reduction_fn_val = typename reduction_fn_traits_t::return_type{ val }; 29 | return typename reduction_fn_traits_t::return_type{ old }; 30 | } 31 | 32 | const typename ccl_reduce_attr_impl_t::reduction_fn_traits_t::return_type& 33 | ccl_reduce_attr_impl_t::get_attribute_value(const reduction_fn_traits_t& id) const { 34 | return reduction_fn_val; 35 | } 36 | } // namespace ccl 37 | -------------------------------------------------------------------------------- /src/coll/attr/ccl_reduce_scatter_op_attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "coll/attr/ccl_reduce_scatter_op_attr.hpp" 17 | 18 | namespace ccl { 19 | 20 | ccl_reduce_scatter_attr_impl_t::ccl_reduce_scatter_attr_impl_t( 21 | const typename ccl_operation_attr_impl_t::version_traits_t::type& version) 22 | : base_t(version) {} 23 | 24 | typename ccl_reduce_scatter_attr_impl_t::reduction_fn_traits_t::return_type 25 | ccl_reduce_scatter_attr_impl_t::set_attribute_value(typename reduction_fn_traits_t::type val, 26 | const reduction_fn_traits_t& t) { 27 | auto old = reduction_fn_val; 28 | reduction_fn_val = typename reduction_fn_traits_t::return_type{ val }; 29 | return typename reduction_fn_traits_t::return_type{ old }; 30 | } 31 | 32 | const typename ccl_reduce_scatter_attr_impl_t::reduction_fn_traits_t::return_type& 33 | ccl_reduce_scatter_attr_impl_t::get_attribute_value(const reduction_fn_traits_t& id) const { 34 | return reduction_fn_val; 35 | } 36 | } // namespace ccl 37 | -------------------------------------------------------------------------------- /src/coll/coll_check.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "coll/coll_param.hpp" 19 | 20 | #ifdef CCL_ENABLE_SYCL 21 | #include 22 | #endif // CCL_ENABLE_SYCL 23 | 24 | #ifdef CCL_ENABLE_SYCL 25 | void ccl_check_usm_pointers(const std::vector& ptrs, 26 | const sycl::device& dev, 27 | const sycl::context& ctx); 28 | #endif // CCL_ENABLE_SYCL 29 | 30 | void ccl_coll_validate_user_input(const ccl_coll_param& param, const ccl_coll_attr& attr); 31 | -------------------------------------------------------------------------------- /src/coll/group/group.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "coll/algorithms/algorithm_utils.hpp" 19 | #include "common/env/env.hpp" 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | class group_impl { 28 | public: 29 | static void start(); 30 | static void end(); 31 | static void add_operation(ccl_coll_type ctype, std::function operation); 32 | 33 | static thread_local bool is_group_active; 34 | static thread_local bool first_group_op; 35 | static thread_local std::vector>> 36 | operation_storage; 37 | 38 | private: 39 | static std::mutex group_mutex; 40 | }; 41 | -------------------------------------------------------------------------------- /src/coll_attr_creation_impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/coll_attr.hpp" 19 | #include "coll/attr/ccl_attrs.hpp" 20 | #include "common/utils/version.hpp" 21 | 22 | namespace ccl { 23 | 24 | namespace v1 { 25 | 26 | /* TODO temporary function for UT compilation: would be part of ccl::detail::environment in final*/ 27 | template 28 | coll_attribute_type create_coll_attr(attr_val_type&&... avs) { 29 | auto version = utils::get_library_version(); 30 | auto coll_attr = coll_attribute_type(version); 31 | 32 | int expander[]{ (coll_attr.template set(avs.val()), 0)... }; 33 | (void)expander; 34 | return coll_attr; 35 | } 36 | 37 | } // namespace v1 38 | 39 | } // namespace ccl 40 | -------------------------------------------------------------------------------- /src/comm_attr_impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/comm_attr.hpp" 19 | 20 | namespace ccl { 21 | 22 | namespace v1 { 23 | 24 | /** 25 | * comm_attr attributes definition 26 | */ 27 | template 28 | CCL_API Value comm_attr::set(const Value& v) { 29 | return get_impl()->set_attribute_value( 30 | v, detail::ccl_api_type_attr_traits{}); 31 | } 32 | 33 | template 34 | CCL_API const typename detail::ccl_api_type_attr_traits::type& 35 | comm_attr::get() const { 36 | return get_impl()->get_attribute_value( 37 | detail::ccl_api_type_attr_traits{}); 38 | } 39 | 40 | template 41 | CCL_API bool comm_attr::is_valid() const noexcept { 42 | return get_impl()->is_valid(); 43 | } 44 | 45 | } // namespace v1 46 | 47 | } // namespace ccl 48 | -------------------------------------------------------------------------------- /src/comm_split_attr_impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/comm_split_attr.hpp" 19 | 20 | namespace ccl { 21 | 22 | namespace v1 { 23 | 24 | /** 25 | * comm_split_attr attributes definition 26 | */ 27 | template 28 | CCL_API Value comm_split_attr::set(const Value& v) { 29 | return get_impl()->set_attribute_value( 30 | v, detail::ccl_api_type_attr_traits{}); 31 | } 32 | 33 | template 34 | CCL_API const typename detail::ccl_api_type_attr_traits::type& 35 | comm_split_attr::get() const { 36 | return get_impl()->get_attribute_value( 37 | detail::ccl_api_type_attr_traits{}); 38 | } 39 | 40 | template 41 | CCL_API bool comm_split_attr::is_valid() const noexcept { 42 | return get_impl()->is_valid(); 43 | } 44 | 45 | } // namespace v1 46 | 47 | } // namespace ccl 48 | -------------------------------------------------------------------------------- /src/common/event/ccl_event_attr_ids.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | class ccl_event; 19 | namespace ccl { 20 | /** 21 | * Event attribute ids 22 | */ 23 | enum class event_attr_id : int { 24 | version, 25 | 26 | native_handle, 27 | context, 28 | 29 | command_type, 30 | command_execution_status, 31 | 32 | last_value 33 | }; 34 | 35 | } // namespace ccl 36 | -------------------------------------------------------------------------------- /src/common/event/impls/empty_event.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "common/event/impls/event_impl.hpp" 20 | 21 | namespace ccl { 22 | 23 | // empty default event, used by default constructed ccl event 24 | class empty_event_impl final : public event_impl { 25 | public: 26 | empty_event_impl() = default; 27 | 28 | void wait() override {} 29 | 30 | bool test() override { 31 | return true; 32 | } 33 | 34 | bool cancel() override { 35 | return true; 36 | } 37 | 38 | event::native_t& get_native() override { 39 | throw ccl::exception(std::string(__FUNCTION__) + " - no native event for empty event"); 40 | } 41 | 42 | ~empty_event_impl() override = default; 43 | }; 44 | 45 | } // namespace ccl 46 | -------------------------------------------------------------------------------- /src/common/event/impls/event_impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "oneapi/ccl/native_device_api/export_api.hpp" 19 | #include "oneapi/ccl/event.hpp" 20 | 21 | namespace ccl { 22 | 23 | class event_impl { 24 | public: 25 | virtual void wait() = 0; 26 | virtual bool test() = 0; 27 | virtual bool cancel() = 0; 28 | virtual event::native_t& get_native() = 0; 29 | virtual ~event_impl() = default; 30 | }; 31 | 32 | } // namespace ccl 33 | -------------------------------------------------------------------------------- /src/common/event/impls/native_event.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/types_policy.hpp" 19 | #include "common/event/impls/event_impl.hpp" 20 | #include "common/event/ccl_event.hpp" 21 | 22 | namespace ccl { 23 | 24 | // event which wraps SYCL event to pass it to our API as a parameter 25 | class native_event_impl final : public event_impl { 26 | public: 27 | explicit native_event_impl(std::unique_ptr ev); 28 | ~native_event_impl() override = default; 29 | 30 | void wait() override; 31 | bool test() override; 32 | bool cancel() override; 33 | event::native_t& get_native() override; 34 | 35 | private: 36 | std::unique_ptr ev = nullptr; 37 | bool completed = false; 38 | }; 39 | 40 | } // namespace ccl 41 | -------------------------------------------------------------------------------- /src/common/event/impls/stub_event.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "oneapi/ccl/types.hpp" 19 | #include "oneapi/ccl/types_policy.hpp" 20 | #include "common/event/impls/event_impl.hpp" 21 | 22 | namespace ccl { 23 | 24 | // event returned by stub backend 25 | class stub_event_impl final : public event_impl { 26 | public: 27 | stub_event_impl() = default; 28 | 29 | void wait() override {} 30 | 31 | bool test() override { 32 | return true; 33 | } 34 | 35 | bool cancel() override { 36 | return true; 37 | } 38 | 39 | event::native_t& get_native() override { 40 | throw ccl::exception(std::string(__FUNCTION__) + " - no native event for stub event"); 41 | } 42 | 43 | ~stub_event_impl() override = default; 44 | }; 45 | 46 | } // namespace ccl 47 | -------------------------------------------------------------------------------- /src/common/framework/framework.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "common/framework/framework.hpp" 17 | 18 | ccl_horovod_init_function horovod_init_function = nullptr; 19 | 20 | std::map ccl_framework_type_names = { 21 | std::make_pair(ccl_framework_none, "none"), 22 | std::make_pair(ccl_framework_horovod, "horovod") 23 | }; 24 | -------------------------------------------------------------------------------- /src/common/framework/framework.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include 19 | #include 20 | 21 | typedef int (*ccl_horovod_init_function)(const int*, int); 22 | extern ccl_horovod_init_function horovod_init_function; 23 | static constexpr const char* horovod_init_function_name = "horovod_init"; 24 | 25 | enum ccl_framework_type { 26 | ccl_framework_none, 27 | ccl_framework_horovod, 28 | 29 | ccl_framework_last_value 30 | }; 31 | 32 | extern std::map ccl_framework_type_names; 33 | -------------------------------------------------------------------------------- /src/common/utils/fd_info.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | namespace ccl { 23 | namespace utils { 24 | 25 | struct fd_info { 26 | size_t open_fd_count; 27 | size_t max_fd_count; 28 | }; 29 | 30 | std::string to_string(const fd_info& info); 31 | 32 | fd_info get_fd_info(); 33 | 34 | } // namespace utils 35 | } // namespace ccl 36 | -------------------------------------------------------------------------------- /src/common/utils/memcpy.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include 19 | 20 | namespace ccl { 21 | 22 | void memcpy(void* dst, const void* src, size_t size); 23 | void memcpy_nontemporal(void* dst, const void* src, size_t size) 24 | #if CCL_AVX_TARGET_ATTRIBUTES 25 | __attribute__((target("avx2"))) 26 | #endif // CCL_AVX_TARGET_ATTRIBUTES 27 | ; 28 | 29 | } // namespace ccl 30 | -------------------------------------------------------------------------------- /src/common/utils/spinlock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "common/global/global.hpp" 17 | #include "common/utils/spinlock.hpp" 18 | #include "common/utils/yield.hpp" 19 | 20 | ccl_spinlock::ccl_spinlock() { 21 | flag.clear(); 22 | } 23 | 24 | void ccl_spinlock::lock() { 25 | size_t spin_count = ccl::global_data::env().spin_count; 26 | while (flag.test_and_set(std::memory_order_acquire)) { 27 | spin_count--; 28 | if (!spin_count) { 29 | ccl_yield(ccl::global_data::env().yield_type); 30 | spin_count = 1; 31 | } 32 | } 33 | } 34 | bool ccl_spinlock::try_lock() { 35 | return !flag.test_and_set(std::memory_order_acquire); 36 | } 37 | void ccl_spinlock::unlock() { 38 | flag.clear(std::memory_order_release); 39 | } 40 | -------------------------------------------------------------------------------- /src/common/utils/spinlock.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include 19 | #include 20 | #include "oneapi/ccl/config.h" 21 | 22 | class ccl_spinlock { 23 | public: 24 | ccl_spinlock(); 25 | ccl_spinlock(const ccl_spinlock&) = delete; 26 | ~ccl_spinlock() = default; 27 | 28 | ccl_spinlock& operator=(const ccl_spinlock& src) = delete; 29 | 30 | CCL_API void lock(); 31 | CCL_API bool try_lock(); 32 | CCL_API void unlock(); 33 | 34 | private: 35 | std::atomic_flag flag; 36 | }; 37 | -------------------------------------------------------------------------------- /src/common/utils/sync_object.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "common/log/log.hpp" 19 | 20 | #include 21 | 22 | class sync_object { 23 | public: 24 | explicit sync_object(size_t count) : initial_cnt(count), sync(count) { 25 | CCL_ASSERT(initial_cnt > 0, "count must be greater than 0"); 26 | } 27 | 28 | void visit() { 29 | auto cnt = sync.fetch_sub(1, std::memory_order_release); 30 | CCL_ASSERT(cnt <= initial_cnt, "invalid count ", cnt); 31 | } 32 | 33 | void reset() { 34 | sync.store(initial_cnt, std::memory_order_release); 35 | } 36 | 37 | size_t value() const { 38 | return sync.load(std::memory_order_acquire); 39 | } 40 | 41 | private: 42 | size_t initial_cnt{}; 43 | std::atomic_size_t sync{}; 44 | }; 45 | -------------------------------------------------------------------------------- /src/common/utils/version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "oneapi/ccl/config.h" 17 | #include "oneapi/ccl/types.hpp" 18 | #include "common/utils/version.hpp" 19 | #include "oneapi/ccl/native_device_api/export_api.hpp" 20 | 21 | namespace ccl { 22 | namespace utils { 23 | 24 | ccl::library_version get_library_version() { 25 | ccl::library_version version = { CCL_MAJOR_VERSION, CCL_MINOR_VERSION, 26 | CCL_UPDATE_VERSION, CCL_PRODUCT_STATUS, 27 | CCL_PRODUCT_BUILD_DATE, CCL_PRODUCT_FULL, 28 | ccl::backend_traits::name() }; 29 | 30 | return version; 31 | } 32 | 33 | } // namespace utils 34 | } // namespace ccl 35 | -------------------------------------------------------------------------------- /src/common/utils/version.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "oneapi/ccl/types.hpp" 19 | 20 | namespace ccl { 21 | namespace utils { 22 | 23 | ccl::library_version get_library_version(); 24 | 25 | } // namespace utils 26 | } // namespace ccl 27 | -------------------------------------------------------------------------------- /src/common/utils/yield.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "common/log/log.hpp" 17 | #include "common/utils/yield.hpp" 18 | 19 | std::map ccl_yield_type_names = { 20 | std::make_pair(ccl_yield_none, "none"), 21 | std::make_pair(ccl_yield_pause, "pause"), 22 | std::make_pair(ccl_yield_sleep, "sleep"), 23 | std::make_pair(ccl_yield_sched_yield, "sched_yield") 24 | }; 25 | 26 | void ccl_yield(ccl_yield_type yield_type) { 27 | struct timespec sleep_time; 28 | 29 | switch (yield_type) { 30 | case ccl_yield_none: break; 31 | case ccl_yield_pause: _mm_pause(); break; 32 | case ccl_yield_sleep: 33 | sleep_time.tv_sec = 0; 34 | sleep_time.tv_nsec = 0; 35 | nanosleep(&sleep_time, nullptr); 36 | break; 37 | case ccl_yield_sched_yield: sched_yield(); break; 38 | default: break; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/common/utils/yield.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | enum ccl_yield_type { 25 | ccl_yield_none, 26 | ccl_yield_pause, 27 | ccl_yield_sleep, 28 | ccl_yield_sched_yield, 29 | 30 | ccl_yield_last_value 31 | }; 32 | 33 | void ccl_yield(ccl_yield_type yield_type); 34 | 35 | extern std::map ccl_yield_type_names; 36 | -------------------------------------------------------------------------------- /src/comp/bf16/bf16_intrisics.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "comp/bf16/bf16_intrisics.hpp" 17 | 18 | #ifdef CCL_BF16_COMPILER 19 | 20 | BF16_TARGET_ATTRIBUTE_BWF __m512 bf16_sum_wrap(__m512 a, __m512 b) { 21 | return _mm512_add_ps(a, b); 22 | } 23 | 24 | BF16_TARGET_ATTRIBUTE_BWF __m512 bf16_prod_wrap(__m512 a, __m512 b) { 25 | return _mm512_mul_ps(a, b); 26 | } 27 | 28 | BF16_TARGET_ATTRIBUTE_BWF __m512 bf16_min_wrap(__m512 a, __m512 b) { 29 | return _mm512_min_ps(a, b); 30 | } 31 | 32 | BF16_TARGET_ATTRIBUTE_BWF __m512 bf16_max_wrap(__m512 a, __m512 b) { 33 | return _mm512_max_ps(a, b); 34 | } 35 | 36 | BF16_TARGET_ATTRIBUTE_BWF __m512 bf16_reduce(__m512 a, __m512 b, ccl_bf16_reduction_func_ptr op) { 37 | return (*op)(a, b); 38 | } 39 | 40 | #endif // CCL_BF16_COMPILER 41 | -------------------------------------------------------------------------------- /src/comp/fp16/fp16.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "oneapi/ccl/types.hpp" 19 | 20 | #ifdef CCL_FP16_TARGET_ATTRIBUTES 21 | void ccl_fp16_reduce(const void* in_buf, 22 | size_t in_cnt, 23 | void* inout_buf, 24 | size_t* out_cnt, 25 | ccl::reduction reduction_op); 26 | __attribute__((target("f16c"))) void ccl_convert_fp32_to_fp16(const void* src, void* dst); 27 | __attribute__((target("f16c"))) void ccl_convert_fp16_to_fp32(const void* src, void* dst); 28 | #else // CCL_FP16_TARGET_ATTRIBUTES 29 | void ccl_fp16_reduce(const void* in_buf, 30 | size_t in_cnt, 31 | void* inout_buf, 32 | size_t* out_cnt, 33 | ccl::reduction reduction_op); 34 | void ccl_convert_fp32_to_fp16(const void* src, void* dst); 35 | void ccl_convert_fp16_to_fp32(const void* src, void* dst); 36 | #endif // CCL_FP16_TARGET_ATTRIBUTES 37 | -------------------------------------------------------------------------------- /src/datatype_attr_impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/datatype_attr.hpp" 19 | 20 | namespace ccl { 21 | 22 | namespace v1 { 23 | 24 | /** 25 | * datatype_attr attributes definition 26 | */ 27 | template 28 | CCL_API Value datatype_attr::set(const Value& v) { 29 | return get_impl()->set_attribute_value( 30 | v, detail::ccl_api_type_attr_traits{}); 31 | } 32 | 33 | template 34 | CCL_API const typename detail::ccl_api_type_attr_traits::return_type& 35 | datatype_attr::get() const { 36 | return get_impl()->get_attribute_value( 37 | detail::ccl_api_type_attr_traits{}); 38 | } 39 | 40 | } // namespace v1 41 | 42 | } // namespace ccl 43 | -------------------------------------------------------------------------------- /src/exec/thread/listener.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | // TODO: Rework to support listener 19 | 20 | #include "exec/thread/base_thread.hpp" 21 | 22 | //class ccl_listener : public ccl_base_thread { 23 | //public: 24 | // ccl_listener(); 25 | // 26 | // ccl_listener(const ccl_listener&) = delete; 27 | // ccl_listener(ccl_listener&&) = delete; 28 | // 29 | // ccl_listener& operator=(const ccl_listener&) = delete; 30 | // ccl_listener& operator=(ccl_listener&&) = delete; 31 | // 32 | // virtual ~ccl_listener() = default; 33 | // 34 | // virtual void* get_this() override { 35 | // return static_cast(this); 36 | // }; 37 | // 38 | // virtual const std::string& name() const override { 39 | // static const std::string name("listener"); 40 | // return name; 41 | // }; 42 | //}; 43 | -------------------------------------------------------------------------------- /src/exec/thread/service_worker.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "exec/thread/service_worker.hpp" 17 | 18 | ccl_service_worker::ccl_service_worker(size_t idx, 19 | std::unique_ptr data_queue, 20 | ccl_fusion_manager& fusion_manager) 21 | : ccl_worker(idx, std::move(data_queue)), 22 | fusion_manager(fusion_manager) {} 23 | 24 | ccl_service_worker::~ccl_service_worker() { 25 | fusion_manager.reset(); 26 | } 27 | 28 | ccl::status ccl_service_worker::do_work(size_t& processed_count) { 29 | fusion_manager.execute(); 30 | return ccl_worker::do_work(processed_count); 31 | } 32 | 33 | bool ccl_service_worker::can_reset() { 34 | /* skip ATL processing since it may be already destroyed */ 35 | /* make only local processing */ 36 | process_atl = false; 37 | 38 | size_t processed_count; 39 | do_work(processed_count); 40 | return fusion_manager.can_reset(); 41 | } 42 | -------------------------------------------------------------------------------- /src/exec/thread/service_worker.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "exec/thread/worker.hpp" 19 | #include "fusion/fusion.hpp" 20 | #include "internal_types.hpp" 21 | 22 | class ccl_service_worker : public ccl_worker { 23 | public: 24 | ccl_service_worker(size_t idx, 25 | std::unique_ptr data_queue, 26 | ccl_fusion_manager& fusion_manager); 27 | ~ccl_service_worker(); 28 | 29 | ccl_service_worker(const ccl_service_worker& other) = delete; 30 | ccl_service_worker& operator=(const ccl_service_worker& other) = delete; 31 | 32 | ccl::status do_work(size_t& processed_count) override; 33 | 34 | bool can_reset() override; 35 | 36 | private: 37 | ccl_fusion_manager& fusion_manager; 38 | }; 39 | -------------------------------------------------------------------------------- /src/ext/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016-2020 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | if (ENABLE_OMP) 17 | find_package(OpenMP) 18 | if (OPENMP_FOUND) 19 | add_subdirectory(openmp) 20 | endif() 21 | endif (ENABLE_OMP) 22 | -------------------------------------------------------------------------------- /src/ext/openmp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016-2020 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | add_library(ccl_openmp SHARED openmp_ext.cpp) 17 | 18 | target_include_directories(ccl_openmp PUBLIC ${SRC_INCLUDE_DIRS}) 19 | target_link_libraries(ccl_openmp PUBLIC OpenMP::OpenMP_CXX ccl) 20 | 21 | set_target_properties(ccl_openmp PROPERTIES VERSION 0) 22 | set_target_properties(ccl_openmp PROPERTIES SOVERSION 0.1) 23 | 24 | install(TARGETS ccl_openmp LIBRARY DESTINATION ${CCL_INSTALL_LIB} OPTIONAL) 25 | -------------------------------------------------------------------------------- /src/internal_types.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "oneapi/ccl/types.hpp" 19 | 20 | namespace ccl { 21 | 22 | enum class group_split_type : int { 23 | cluster, 24 | 25 | last_value 26 | }; 27 | 28 | // TODO: refactor core code and remove this enum? 29 | enum status : int { 30 | success = 0, 31 | out_of_resource, 32 | invalid_arguments, 33 | runtime_error, 34 | blocked_due_to_resize, 35 | 36 | last_value 37 | }; 38 | 39 | } // namespace ccl 40 | -------------------------------------------------------------------------------- /src/kernels/kernels.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneCCL/59bf59375b840c007e02bf1e8d3109a88547cb76/src/kernels/kernels.spv -------------------------------------------------------------------------------- /src/kvs_attr_impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include "oneapi/ccl/types.hpp" 18 | #include "oneapi/ccl/kvs_attr.hpp" 19 | 20 | namespace ccl { 21 | 22 | namespace v1 { 23 | 24 | /** 25 | * kvs_attr attributes definition 26 | */ 27 | template 28 | CCL_API Value kvs_attr::set(const Value& v) { 29 | return get_impl()->set_attribute_value(v, 30 | detail::ccl_api_type_attr_traits{}); 31 | } 32 | 33 | template 34 | CCL_API const typename detail::ccl_api_type_attr_traits::type& kvs_attr::get() 35 | const { 36 | return get_impl()->get_attribute_value(detail::ccl_api_type_attr_traits{}); 37 | } 38 | 39 | template 40 | CCL_API bool kvs_attr::is_valid() const noexcept { 41 | return get_impl()->is_valid(); 42 | } 43 | 44 | } // namespace v1 45 | 46 | } // namespace ccl 47 | -------------------------------------------------------------------------------- /src/sched/entry/coll/direct/base_coll_entry.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "sched/entry/entry.hpp" 19 | #include "sched/queue/queue.hpp" 20 | 21 | class base_coll_entry : public sched_entry { 22 | public: 23 | base_coll_entry() = delete; 24 | base_coll_entry(ccl_sched* sched) : sched_entry(sched) { 25 | sched->strict_order = true; 26 | } 27 | 28 | bool is_strict_order_satisfied() override { 29 | return (status == ccl_sched_entry_status_started || is_completed()); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /src/sched/entry/deps_entry.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef CCL_ENABLE_SYCL 4 | #include "common/utils/sycl_utils.hpp" 5 | #endif // CCL_ENABLE_SYCL 6 | 7 | #ifdef CCL_ENABLE_ITT 8 | #include "sched/sched_timer.hpp" 9 | #endif // CCL_ENABLE_ITT 10 | 11 | #include "sched/entry/entry.hpp" 12 | 13 | class deps_entry : public sched_entry { 14 | public: 15 | static constexpr const char* class_name() noexcept { 16 | return "DEPS"; 17 | } 18 | 19 | deps_entry() = delete; 20 | deps_entry(ccl_sched* sched) 21 | : sched_entry(sched, false /*is_barrier*/, false /*is_coll*/, true /*is_deps*/) {} 22 | 23 | void start() override; 24 | 25 | void update() override; 26 | 27 | const char* name() const override { 28 | return class_name(); 29 | } 30 | 31 | #if defined(CCL_ENABLE_SYCL) && defined(CCL_ENABLE_ZE) 32 | ze_event_handle_t out_event{ nullptr }; 33 | #endif // CCL_ENABLE_SYCL && CCL_ENABLE_ZE 34 | 35 | protected: 36 | void dump_detail(std::stringstream& str) const override; 37 | }; 38 | -------------------------------------------------------------------------------- /src/sched/entry/function_entry.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "sched/entry/entry.hpp" 19 | 20 | class function_entry : public sched_entry { 21 | public: 22 | static constexpr const char* class_name() noexcept { 23 | return "FUNCTION"; 24 | } 25 | 26 | function_entry() = delete; 27 | function_entry(ccl_sched* sched, ccl_sched_entry_function_t fn, const void* ctx) 28 | : sched_entry(sched), 29 | fn(fn), 30 | ctx(ctx) {} 31 | 32 | void start() override { 33 | fn(ctx); 34 | status = ccl_sched_entry_status_complete; 35 | } 36 | 37 | const char* name() const override { 38 | return "FUNCTION"; 39 | } 40 | 41 | protected: 42 | void dump_detail(std::stringstream& str) const override { 43 | ccl_logger::format(str, "fn ", (void*)(fn), ", ctx ", ctx, "\n"); 44 | } 45 | 46 | private: 47 | ccl_sched_entry_function_t fn; 48 | const void* ctx; 49 | }; 50 | -------------------------------------------------------------------------------- /src/sched/entry/ze/ze_cmdlist_event_signal_entry.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "sched/entry/ze/ze_base_entry.hpp" 19 | 20 | class ze_cmdlist_event_signal_entry : public ze_base_entry { 21 | public: 22 | static constexpr const char* class_name() noexcept { 23 | return "ZE_CMDLIST_EVENT_SIGNAL_ENTRY"; 24 | } 25 | 26 | const char* name() const noexcept override { 27 | return class_name(); 28 | } 29 | 30 | ze_cmdlist_event_signal_entry() = delete; 31 | explicit ze_cmdlist_event_signal_entry(ccl_sched* sched, 32 | ccl_comm* comm, 33 | ze_event_handle_t signal_event, 34 | const std::vector& wait_events); 35 | 36 | void init_ze_hook() override; 37 | 38 | private: 39 | ze_event_handle_t signal_event{}; 40 | }; 41 | -------------------------------------------------------------------------------- /src/sched/entry/ze/ze_cmdlist_timestamp.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "sched/entry/ze/ze_base_entry.hpp" 19 | 20 | class ze_cmdlist_timestamp : public ze_base_entry { 21 | private: 22 | std::string text{}; 23 | 24 | public: 25 | static constexpr const char* class_name() noexcept { 26 | return "ZE_CMDLIST_TIMESTAMP"; 27 | } 28 | 29 | const char* name() const noexcept override { 30 | return class_name(); 31 | } 32 | 33 | ze_cmdlist_timestamp() = delete; 34 | explicit ze_cmdlist_timestamp(ccl_sched* sched, 35 | ccl_comm* comm, 36 | std::string text, 37 | const std::vector& wait_events); 38 | 39 | void init_ze_hook() override; 40 | }; 41 | -------------------------------------------------------------------------------- /src/sched/entry/ze/ze_dummy_entry.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #include "common/api_wrapper/ze_api_wrapper.hpp" 17 | #include "sched/entry/ze/ze_dummy_entry.hpp" 18 | #include "sched/entry/ze/ze_base_entry.hpp" 19 | 20 | ze_dummy_entry::ze_dummy_entry(ccl_sched* sched, const std::vector& wait_events) 21 | : ze_base_entry(sched, wait_events, nullptr /*comm*/, 1 /*add_event_count*/) { 22 | CCL_THROW_IF_NOT(sched, "no sched"); 23 | } 24 | 25 | void ze_dummy_entry::update() { 26 | ZE_CALL(zeEventHostSignal, (ze_base_entry::entry_event)); 27 | ze_base_entry::update(); 28 | } 29 | 30 | std::string ze_dummy_entry::name_ext() const { 31 | return name(); 32 | } 33 | -------------------------------------------------------------------------------- /src/sched/entry/ze/ze_dummy_entry.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "sched/entry/factory/entry_factory.hpp" 19 | 20 | class ze_dummy_entry : public ze_base_entry { 21 | public: 22 | static constexpr const char* class_name() noexcept { 23 | return "ZE_DUMMY"; 24 | } 25 | 26 | const char* name() const override { 27 | return class_name(); 28 | } 29 | 30 | virtual std::string name_ext() const override; 31 | 32 | void update() override; 33 | 34 | explicit ze_dummy_entry(ccl_sched* sched, 35 | const std::vector& wait_events = {}); 36 | }; 37 | -------------------------------------------------------------------------------- /src/sched/entry/ze/ze_event_wait_entry.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "sched/entry/entry.hpp" 19 | #include "sched/sched.hpp" 20 | 21 | class ze_event_wait_entry : public sched_entry { 22 | public: 23 | static constexpr const char* class_name() noexcept { 24 | return "ZE_EVENT_WAIT"; 25 | } 26 | 27 | const char* name() const override { 28 | return class_name(); 29 | } 30 | 31 | explicit ze_event_wait_entry(ccl_sched* sched, std::vector wait_events); 32 | 33 | void start() override; 34 | void update() override; 35 | 36 | private: 37 | std::list wait_events; 38 | 39 | bool check_event_status(ze_event_handle_t event) const; 40 | }; 41 | -------------------------------------------------------------------------------- /src/sched/entry/ze/ze_pt2pt_barrier_entry.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "sched/entry/entry.hpp" 19 | #include "sched/entry/ze/ze_base_entry.hpp" 20 | 21 | class ze_pt2pt_barrier_entry : public sched_entry { 22 | public: 23 | static constexpr const char* class_name() noexcept { 24 | return "ZE_PT2PT_BARRIER"; 25 | } 26 | 27 | const char* name() const override { 28 | return class_name(); 29 | } 30 | 31 | virtual std::string name_ext() const override; 32 | 33 | explicit ze_pt2pt_barrier_entry(ccl_sched* sched, ccl_comm* comm, int peer_rank); 34 | 35 | void start() override; 36 | void update() override; 37 | 38 | private: 39 | ccl_comm* comm; 40 | int peer_rank; 41 | }; 42 | -------------------------------------------------------------------------------- /src/sched/queue/flow_control.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | #include 18 | 19 | namespace ccl { 20 | 21 | #define CCL_MAX_FLOW_CREDITS 1024 22 | 23 | class flow_control { 24 | public: 25 | flow_control(); 26 | flow_control(const flow_control &other) = delete; 27 | flow_control &operator=(const flow_control &other) = delete; 28 | ~flow_control(); 29 | 30 | void set_max_credits(size_t value); 31 | size_t get_max_credits() const; 32 | size_t get_credits() const; 33 | bool take_credit(); 34 | void return_credit(); 35 | 36 | private: 37 | size_t max_credits; 38 | size_t min_credits; 39 | size_t credits; 40 | }; 41 | 42 | } // namespace ccl 43 | -------------------------------------------------------------------------------- /src/stub_kvs_impl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-2020 Intel Corporation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #ifdef CCL_ENABLE_STUB_BACKEND 19 | 20 | #include "oneapi/ccl/types.hpp" 21 | #include "oneapi/ccl/aliases.hpp" 22 | 23 | #include "oneapi/ccl/type_traits.hpp" 24 | #include "oneapi/ccl/types_policy.hpp" 25 | 26 | #include "oneapi/ccl/kvs_attr_ids.hpp" 27 | #include "oneapi/ccl/kvs_attr_ids_traits.hpp" 28 | #include "oneapi/ccl/kvs_attr.hpp" 29 | 30 | #include "common/global/global.hpp" 31 | 32 | #include "kvs_impl.hpp" 33 | 34 | namespace ccl { 35 | 36 | class stub_kvs_impl : public base_kvs_impl { 37 | public: 38 | stub_kvs_impl(); 39 | stub_kvs_impl(const kvs::address_type& addr); 40 | 41 | int get_id() const; 42 | }; 43 | 44 | } // namespace ccl 45 | 46 | #endif // CCL_ENABLE_STUB_BACKEND 47 | -------------------------------------------------------------------------------- /tests/googletest-release-1.8.1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | set(GOOGLETEST_VERSION 1.9.0) 4 | 5 | option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" OFF) 6 | 7 | add_subdirectory(googletest) 8 | -------------------------------------------------------------------------------- /tests/googletest-release-1.8.1/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /tests/googletest-release-1.8.1/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | ACLOCAL_AMFLAGS = -I m4 3 | 4 | AUTOMAKE_OPTIONS = foreign 5 | 6 | # Build . before src so that our all-local and clean-local hooks kicks in at 7 | # the right time. 8 | SUBDIRS = googletest googlemock 9 | 10 | EXTRA_DIST = \ 11 | BUILD.bazel \ 12 | CMakeLists.txt \ 13 | README.md \ 14 | WORKSPACE 15 | -------------------------------------------------------------------------------- /tests/googletest-release-1.8.1/googletest/cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | include(CMakeFindDependencyMacro) 3 | if (@GTEST_HAS_PTHREAD@) 4 | set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) 5 | find_dependency(Threads) 6 | endif() 7 | 8 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") 9 | check_required_components("@project_name@") 10 | -------------------------------------------------------------------------------- /tests/googletest-release-1.8.1/googletest/cmake/gtest.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest 5 | Description: GoogleTest (without main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@ 9 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ 10 | -------------------------------------------------------------------------------- /tests/googletest-release-1.8.1/googletest/cmake/gtest_main.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest_main 5 | Description: GoogleTest (with main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gtest 9 | Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ 11 | --------------------------------------------------------------------------------