diff --git a/ttnn/CMakeLists.txt b/ttnn/CMakeLists.txt index 723bf1d48330..66bab5cacbf1 100644 --- a/ttnn/CMakeLists.txt +++ b/ttnn/CMakeLists.txt @@ -12,34 +12,7 @@ set(ALL_TTNN_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/graph/graph_processor.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/graph/graph_trace_utils.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/graph/graph_pybind.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/erisc_datamover_builder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/all_gather/all_gather.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/all_gather/all_gather_pybind.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/all_gather/device/all_gather_op.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/all_gather/device/multi_core/all_gather_op_multi_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/experimental/ccl/all_gather_matmul/all_gather_matmul.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/experimental/ccl/all_gather_matmul/all_gather_matmul_pybind.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/experimental/ccl/all_gather_matmul/device/all_gather_matmul_op.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/experimental/ccl/all_gather_matmul/device/multi_core/all_gather_matmul_op_multi_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/experimental/ccl/all_reduce/all_reduce.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/experimental/ccl/all_reduce/all_reduce_pybind.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/experimental/ccl/all_reduce/device/all_reduce_op.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/ccl_op_fusion.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/ccl_common.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/ccl_host_datastructures.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/common/types/ccl_types_args_emitters.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/common/uops/ccl_command.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/reduce_scatter/device/host/reduce_scatter_full_worker_grid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/reduce_scatter/device/reduce_scatter_op.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/reduce_scatter/reduce_scatter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/reduce_scatter/reduce_scatter_pybind.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/core/compute_kernel/compute_kernel_config.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/reduce_scatter/host/reduce_scatter_worker_builder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/reduce_scatter/host/reduce_scatter_common.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/barrier/device/host/barrier_full_worker_grid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/barrier/device/barrier_op.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/barrier/barrier.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl/barrier/barrier_pybind.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/conv/conv2d/conv2d.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/conv/conv2d/conv2d_utils.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/conv/conv2d/conv2d_pybind.cpp @@ -612,9 +585,11 @@ endforeach() ### Setup TTNN as a shared library with optional Python bindings add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/tensor) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cpp/ttnn/operations/ccl) add_subdirectory(cpp/ttnn/deprecated) set(TTNN_FINAL_SRC ${TTNN_SRC} + ${CCL_TTNN_SRCS} ${QUEUE_SRCS} ${TENSOR_SRCS} ${TT_DNN_SRCS} diff --git a/ttnn/cpp/ttnn/operations/ccl/CMakeLists.txt b/ttnn/cpp/ttnn/operations/ccl/CMakeLists.txt new file mode 100644 index 000000000000..65fe305c2150 --- /dev/null +++ b/ttnn/cpp/ttnn/operations/ccl/CMakeLists.txt @@ -0,0 +1,34 @@ +set(CCL_TTNN_SRCS + # Common + ${CMAKE_CURRENT_SOURCE_DIR}/erisc_datamover_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ccl_op_fusion.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ccl_common.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ccl_host_datastructures.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/types/ccl_types_args_emitters.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/uops/ccl_command.cpp + # CCL Ops + ${CMAKE_CURRENT_SOURCE_DIR}/all_gather/all_gather.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/all_gather/all_gather_pybind.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/all_gather/device/all_gather_op.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/all_gather/device/multi_core/all_gather_op_multi_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter/device/host/reduce_scatter_full_worker_grid.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter/device/reduce_scatter_op.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter/reduce_scatter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter/reduce_scatter_pybind.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter/host/reduce_scatter_worker_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter/host/reduce_scatter_common.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/barrier/device/host/barrier_full_worker_grid.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/barrier/device/barrier_op.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/barrier/barrier.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/barrier/barrier_pybind.cpp + #Experimental + ${CMAKE_CURRENT_SOURCE_DIR}/../experimental/ccl/all_gather_matmul/all_gather_matmul.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../experimental/ccl/all_gather_matmul/all_gather_matmul_pybind.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../experimental/ccl/all_gather_matmul/device/all_gather_matmul_op.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../experimental/ccl/all_gather_matmul/device/multi_core/all_gather_matmul_op_multi_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../experimental/ccl/all_reduce/all_reduce.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../experimental/ccl/all_reduce/all_reduce_pybind.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../experimental/ccl/all_reduce/device/all_reduce_op.cpp + CACHE INTERNAL + "CCL sources to reuse in ttnn build" +)