Skip to content

Commit

Permalink
#9486: Move kernel files into kernels directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Aswinmcw committed Jul 22, 2024
1 parent a4ac4e7 commit 2a3b558
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 1,273 deletions.
16 changes: 16 additions & 0 deletions ttnn/cpp/ttnn/operations/ccl/all_gather/all_gather_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@

#pragma once

<<<<<<< HEAD
<<<<<<< HEAD:ttnn/cpp/ttnn/operations/ccl/all_gather/all_gather_op.hpp
#include "ttnn/operations/ccl/all_gather/device/all_gather_op.hpp"
=======
#include "ttnn/operations/ccl/line_all_gather/device/line_all_gather_op.hpp"
>>>>>>> 60a6703d2e... #9486: Move CCL kernel files to TTNN:ttnn/cpp/ttnn/operations/ccl/line_all_gather/device/ccl_line_all_gather_op.hpp
=======
#include "ttnn/operations/ccl/all_gather/device/all_gather_op.hpp"
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory
#include "ttnn/cpp/ttnn/multi_device.hpp"

namespace ttnn {
namespace operations {
namespace ccl {

<<<<<<< HEAD
<<<<<<< HEAD:ttnn/cpp/ttnn/operations/ccl/all_gather/all_gather_op.hpp
struct ExecuteAllGather {

Expand All @@ -30,6 +35,9 @@ struct ExecuteAllGather {
=======
>>>>>>> 60a6703d2e... #9486: Move CCL kernel files to TTNN:ttnn/cpp/ttnn/operations/ccl/line_all_gather/device/ccl_line_all_gather_op.hpp
struct ExecuteLineAllGather {
=======
struct ExecuteAllGather {
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory
static inline const std::array<TensorSchema, 1> input_tensor_schemas() {
return {ttnn::TensorSchema{
2,
Expand All @@ -52,13 +60,21 @@ struct ExecuteLineAllGather {
const uint32_t dim,
const uint32_t num_links = 1,
const std::optional<ttnn::MemoryConfig>& memory_config = std::nullopt) {
<<<<<<< HEAD
return ttnn::operations::ccl::line_all_gather(input_tensor, dim, num_links, memory_config);
=======
return ttnn::operations::ccl::all_gather(input_tensor, dim, num_links, memory_config);
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory
}
};

} // namespace ccl
} // namespace operations

<<<<<<< HEAD
constexpr auto line_all_gather = ttnn::register_operation<ttnn::operations::ccl::ExecuteLineAllGather>("ttnn::line_all_gather");
=======
constexpr auto all_gather = ttnn::register_operation<ttnn::operations::ccl::ExecuteAllGather>("ttnn::all_gather");
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory

} // namespace ttnn
22 changes: 22 additions & 0 deletions ttnn/cpp/ttnn/operations/ccl/all_gather/all_gather_pybind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,39 @@
#include <pybind11/stl.h>

#include "ttnn/cpp/pybind11/decorators.hpp"
<<<<<<< HEAD
<<<<<<< HEAD:ttnn/cpp/ttnn/operations/ccl/all_gather/all_gather_pybind.hpp
#include "ttnn/operations/ccl/all_gather/all_gather_op.hpp"
=======
#include "ttnn/operations/ccl/line_all_gather/device/ccl_line_all_gather_op.hpp"
>>>>>>> 60a6703d2e... #9486: Move CCL kernel files to TTNN:ttnn/cpp/ttnn/operations/ccl/line_all_gather/ccl_line_all_gather_pybind.hpp
=======
#include "ttnn/operations/ccl/all_gather/all_gather_op.hpp"
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory
#include "ttnn/types.hpp"

namespace py = pybind11;

namespace ttnn {
namespace operations {
<<<<<<< HEAD
namespace ccl_line_all_gather {
=======
namespace ccl {
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory

namespace detail {

template <typename ccl_operation_t>
<<<<<<< HEAD
<<<<<<< HEAD:ttnn/cpp/ttnn/operations/ccl/all_gather/all_gather_pybind.hpp
void bind_all_gather(py::module& module, const ccl_operation_t& operation, const char* doc) {
=======
void bind_ccl_line_all_gather(py::module& module, const ccl_operation_t& operation, const char* doc) {
>>>>>>> 60a6703d2e... #9486: Move CCL kernel files to TTNN:ttnn/cpp/ttnn/operations/ccl/line_all_gather/ccl_line_all_gather_pybind.hpp
=======
void bind_all_gather(py::module& module, const ccl_operation_t& operation, const char* doc) {
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory
bind_registered_operation(
module,
operation,
Expand All @@ -51,8 +63,12 @@ void bind_ccl_line_all_gather(py::module& module, const ccl_operation_t& operati
} // namespace detail


<<<<<<< HEAD
<<<<<<< HEAD:ttnn/cpp/ttnn/operations/ccl/all_gather/all_gather_pybind.hpp
void py_bind_all_gather(py::module& module) {
=======
void py_module_all_gather(py::module& module) {
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory
detail::bind_all_gather(
module,
ttnn::all_gather,
Expand All @@ -74,6 +90,7 @@ void py_bind_all_gather(py::module& module) {
>>> output = ttnn.all_gather(tensor, dim=0)
)doc");
<<<<<<< HEAD
=======
void py_module(py::module& module) {
>>>>>>> 60a6703d2e... #9486: Move CCL kernel files to TTNN:ttnn/cpp/ttnn/operations/ccl/line_all_gather/ccl_line_all_gather_pybind.hpp
Expand Down Expand Up @@ -102,5 +119,10 @@ void py_module(py::module& module) {
}

} // namespace ccl_line_all_gather
=======
}

} // namespace ccl
>>>>>>> af98ddace6... #9486: Move kernel files into kernels directory
} // namespace operations
} // namespace ttnn
72 changes: 0 additions & 72 deletions ttnn/cpp/ttnn/operations/ccl/all_gather/ccl_all_gather_pybind.hpp

This file was deleted.

This file was deleted.

Empty file.
Loading

0 comments on commit 2a3b558

Please sign in to comment.