From b8f902a5da37659440e494135d1ff2be691dcf3a Mon Sep 17 00:00:00 2001 From: marty1885 Date: Fri, 15 Nov 2024 14:11:11 +0800 Subject: [PATCH] revert reshape optimizations --- ggml/src/ggml-metalium/README.md | 2 ++ ggml/src/ggml-metalium/ggml-metalium.cpp | 10 ++-------- 2 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 ggml/src/ggml-metalium/README.md diff --git a/ggml/src/ggml-metalium/README.md b/ggml/src/ggml-metalium/README.md new file mode 100644 index 0000000000000..d7fb8273cf31a --- /dev/null +++ b/ggml/src/ggml-metalium/README.md @@ -0,0 +1,2 @@ +# ggml-metalium + diff --git a/ggml/src/ggml-metalium/ggml-metalium.cpp b/ggml/src/ggml-metalium/ggml-metalium.cpp index 524a0ddba9353..4fc55bd140a87 100644 --- a/ggml/src/ggml-metalium/ggml-metalium.cpp +++ b/ggml/src/ggml-metalium/ggml-metalium.cpp @@ -627,14 +627,8 @@ static std::shared_ptr realize_ggml_view_impl(const ggml_t ttnn::SimpleShape start{0, 0, 0, offset_elements}; auto dst_volume = ggml_nelements(tensor); ttnn::SimpleShape end({1, 1, 1, uint32_t(dst_volume) + offset_elements}); - tt::tt_metal::Tensor res; - if(offset_elements == 0) { - res = reshape_tt_tensor_into_ggml(*parent, tensor); - } - else { - auto t = ttnn::untilize(*parent).cpu().unpad(start, end); - res = reshape_host_tt_tensor_into_ggml(t, parent->device(), tensor); - } + auto t = ttnn::untilize(*parent).cpu().unpad(start, end); + res = reshape_host_tt_tensor_into_ggml(t, parent->device(), tensor); } // The fast path, this is what TTNN is designed for else if(dst_size[0] % tt::constants::TILE_WIDTH == 0 && dst_size[1] % tt::constants::TILE_HEIGHT == 0 &&