From fd488f5a973fe13016abac09c4bdc8284accbca4 Mon Sep 17 00:00:00 2001 From: Sean Nijjar Date: Wed, 25 Sep 2024 19:50:09 -0400 Subject: [PATCH] #0: move Layout enum to device accessible location (#13118) --- ttnn/cpp/ttnn/tensor/enum_types.hpp | 11 +++++++++++ ttnn/cpp/ttnn/tensor/types.hpp | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 ttnn/cpp/ttnn/tensor/enum_types.hpp diff --git a/ttnn/cpp/ttnn/tensor/enum_types.hpp b/ttnn/cpp/ttnn/tensor/enum_types.hpp new file mode 100644 index 00000000000..9f9b0738e4c --- /dev/null +++ b/ttnn/cpp/ttnn/tensor/enum_types.hpp @@ -0,0 +1,11 @@ +// SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC +// +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +namespace tt::tt_metal { + +enum class Layout { ROW_MAJOR = 0, TILE = 1, INVALID = 2 }; + +} // namespace tt::tt_metal diff --git a/ttnn/cpp/ttnn/tensor/types.hpp b/ttnn/cpp/ttnn/tensor/types.hpp index 45544510e5a..84e9a97b291 100644 --- a/ttnn/cpp/ttnn/tensor/types.hpp +++ b/ttnn/cpp/ttnn/tensor/types.hpp @@ -17,6 +17,7 @@ #include "tt_metal/tt_stl/concepts.hpp" #include "tt_metal/tt_stl/reflection.hpp" #include "ttnn/tensor/host_buffer/types.hpp" +#include "ttnn/cpp/ttnn/tensor/enum_types.hpp" namespace tt { @@ -24,8 +25,6 @@ namespace tt_metal { static constexpr std::uint8_t VERSION_ID = 3; -enum class Layout { ROW_MAJOR = 0, TILE = 1, INVALID = 2 }; - enum class DataType { BFLOAT16 = 0, FLOAT32 = 1,