From a08c1dc775a9fc3e69f8d24dacb6e0cff4626462 Mon Sep 17 00:00:00 2001 From: avoraTT Date: Tue, 10 Sep 2024 14:16:47 -0700 Subject: [PATCH] #0: Clean up args for advance_worker_global_page_interleaved. --- .../kernels/dataflow/worker_ring_gather_utils.hpp | 10 +++++----- .../ccl/shared_with_host/hetergeneous_data_structs.hpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ttnn/cpp/ttnn/operations/ccl/all_gather/device/kernels/dataflow/worker_ring_gather_utils.hpp b/ttnn/cpp/ttnn/operations/ccl/all_gather/device/kernels/dataflow/worker_ring_gather_utils.hpp index 14adf8b71cc..25a15318841 100644 --- a/ttnn/cpp/ttnn/operations/ccl/all_gather/device/kernels/dataflow/worker_ring_gather_utils.hpp +++ b/ttnn/cpp/ttnn/operations/ccl/all_gather/device/kernels/dataflow/worker_ring_gather_utils.hpp @@ -472,7 +472,7 @@ FORCE_INLINE void read_wrapped_chunk_from_output_tensor( /* * num_pages - i: check if we are outside the number of pages remaining * contig_pages_: check if we are outside the max number of contig pages we can read in a row in a bank - * contig_edge_of_tensor_slice: check if we are outside the edge of the tensor slice (in which case, we wrap around if aren't at the end) + * contig_edge_of_tensor_slice: check if we are outside the edge of the tensor slice (in which case, we wrap around if we aren't at the end) */ uint32_t flattened_offset_worker_slice = offset_worker_slice.x + (offset_worker_slice.y * tensor_slice_shape.x); uint32_t contig_edge_of_tensor_slice = tensor_slice_shape.x - ((flattened_offset_worker_slice + offset_into_worker_slice) % tensor_slice_shape.x); @@ -490,8 +490,8 @@ FORCE_INLINE void read_wrapped_chunk_from_output_tensor( worker_slice_shape, tensor_slice_shape, tensor_shape, - last_page_of_worker, - contig_pages + contig_pages, + last_page_of_worker ); #endif @@ -558,8 +558,8 @@ FORCE_INLINE void write_wrapped_chunk( worker_slice_shape, tensor_slice_shape, tensor_shape, - last_page_of_worker, - contig_pages + contig_pages, + last_page_of_worker ); #endif l1_read_addr += page_size * contig_pages; diff --git a/ttnn/cpp/ttnn/operations/ccl/shared_with_host/hetergeneous_data_structs.hpp b/ttnn/cpp/ttnn/operations/ccl/shared_with_host/hetergeneous_data_structs.hpp index 770b2bb40cc..fd61e355c83 100644 --- a/ttnn/cpp/ttnn/operations/ccl/shared_with_host/hetergeneous_data_structs.hpp +++ b/ttnn/cpp/ttnn/operations/ccl/shared_with_host/hetergeneous_data_structs.hpp @@ -127,8 +127,8 @@ inline void advance_worker_global_page_interleaved ( coord_t const &tensor_shape, // full tensor shape - bool &last_page_of_worker, - const uint32_t stride=1 + const uint32_t stride, + bool &last_page_of_worker ) { uint32_t prev_offset_into_worker_slice = offset_into_worker_slice;