From c565d873c40c9e540168e4e61ef049e86f9521c8 Mon Sep 17 00:00:00 2001 From: Ligang Long Date: Wed, 4 Dec 2024 01:20:29 +0000 Subject: [PATCH] #14245: fix some pybind issue that didn't pass the new parameter in python --- .../interleaved_to_sharded_pybind.cpp | 16 ++++++++++++---- .../sharded_to_interleaved_pybind.cpp | 5 +++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ttnn/cpp/ttnn/operations/data_movement/sharded/interleaved_to_sharded/interleaved_to_sharded_pybind.cpp b/ttnn/cpp/ttnn/operations/data_movement/sharded/interleaved_to_sharded/interleaved_to_sharded_pybind.cpp index ec2cd531d35..0480306f7e8 100644 --- a/ttnn/cpp/ttnn/operations/data_movement/sharded/interleaved_to_sharded/interleaved_to_sharded_pybind.cpp +++ b/ttnn/cpp/ttnn/operations/data_movement/sharded/interleaved_to_sharded/interleaved_to_sharded_pybind.cpp @@ -30,8 +30,16 @@ void bind_interleaved_to_sharded( tt::tt_metal::ShardOrientation shard_orientation, const std::optional& output_dtype, uint8_t queue_id, - const bool keep_l1_aligned) -> ttnn::Tensor { - return self(queue_id, input_tensor, grid, shard_shape, shard_scheme, shard_orientation, output_dtype); + const std::optional& keep_l1_aligned) -> ttnn::Tensor { + return self( + queue_id, + input_tensor, + grid, + shard_shape, + shard_scheme, + shard_orientation, + output_dtype, + keep_l1_aligned); }, py::arg("input_tensor").noconvert(), py::arg("grid"), @@ -50,8 +58,8 @@ void bind_interleaved_to_sharded( const MemoryConfig& sharded_memory_config, const std::optional& output_dtype, uint8_t queue_id, - const bool keep_l1_aligned) -> ttnn::Tensor { - return self(queue_id, input_tensor, sharded_memory_config, output_dtype); + const std::optional& keep_l1_aligned) -> ttnn::Tensor { + return self(queue_id, input_tensor, sharded_memory_config, output_dtype, keep_l1_aligned); }, py::arg("input_tensor").noconvert(), py::arg("sharded_memory_config"), diff --git a/ttnn/cpp/ttnn/operations/data_movement/sharded/sharded_to_interleaved/sharded_to_interleaved_pybind.cpp b/ttnn/cpp/ttnn/operations/data_movement/sharded/sharded_to_interleaved/sharded_to_interleaved_pybind.cpp index dcca836db3d..ee08a332a75 100644 --- a/ttnn/cpp/ttnn/operations/data_movement/sharded/sharded_to_interleaved/sharded_to_interleaved_pybind.cpp +++ b/ttnn/cpp/ttnn/operations/data_movement/sharded/sharded_to_interleaved/sharded_to_interleaved_pybind.cpp @@ -28,12 +28,13 @@ void bind_sharded_to_interleaved( const std::optional& memory_config, const std::optional& output_dtype, uint8_t queue_id, - const bool is_l1_aligned) -> ttnn::Tensor { + const std::optional& is_l1_aligned) -> ttnn::Tensor { return self( queue_id, input_tensor, memory_config.value_or(operation::DEFAULT_OUTPUT_MEMORY_CONFIG), - output_dtype); + output_dtype, + is_l1_aligned); }, py::arg("input_tensor").noconvert(), py::arg("memory_config") = std::nullopt,