From b309929a63056382dd77a29c96d3bf8894e2ec40 Mon Sep 17 00:00:00 2001 From: Mouliraj Elamurugan Date: Sat, 1 Mar 2025 09:32:28 +0530 Subject: [PATCH] Revert "#17687: Add data_type checker" (#18503) Reverts tenstorrent/tt-metal#17828 Post-commit : https://github.com/tenstorrent/tt-metal/actions/runs/13592890232 --- .../ttnn/operations/eltwise/binary/binary.cpp | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/ttnn/cpp/ttnn/operations/eltwise/binary/binary.cpp b/ttnn/cpp/ttnn/operations/eltwise/binary/binary.cpp index 61ec0a4311d..fb6033d77eb 100644 --- a/ttnn/cpp/ttnn/operations/eltwise/binary/binary.cpp +++ b/ttnn/cpp/ttnn/operations/eltwise/binary/binary.cpp @@ -22,25 +22,6 @@ constexpr bool is_associative(BinaryOpType op) { op == BinaryOpType::LOGADDEXP2 || op == BinaryOpType::LOGICAL_XOR; } -constexpr bool is_dtype_supported(BinaryOpType op, DataType dtype) { - switch (op) { - case BinaryOpType::ADD: - case BinaryOpType::SUB: - return ( - dtype == DataType::FLOAT32 || dtype == DataType::BFLOAT16 || dtype == DataType::BFLOAT8_B || - dtype == DataType::BFLOAT4_B || dtype == DataType::INT32); - case BinaryOpType::BITWISE_XOR: - case BinaryOpType::BITWISE_AND: - case BinaryOpType::BITWISE_OR: - case BinaryOpType::LEFT_SHIFT: - case BinaryOpType::RIGHT_SHIFT: return dtype == DataType::INT32; - default: - return ( - dtype == DataType::FLOAT32 || dtype == DataType::BFLOAT16 || dtype == DataType::BFLOAT8_B || - dtype == DataType::BFLOAT4_B); - } -} - // Tensor - Scalar inline Tensor binary_impl( QueueId queue_id, @@ -127,10 +108,7 @@ template auto preprocess_inputs(const Tensor& input_tensor_a_arg, const Tensor& input_tensor_b_arg) { Tensor input_tensor_a = input_tensor_a_arg; Tensor input_tensor_b = input_tensor_b_arg; - DataType a_dtype = input_tensor_a.get_dtype(); - DataType b_dtype = input_tensor_b.get_dtype(); - TT_FATAL(is_dtype_supported(binary_op_type, a_dtype), "Unsupported data type {}", a_dtype); - TT_FATAL(is_dtype_supported(binary_op_type, b_dtype), "Unsupported data type {}", b_dtype); + // TODO: #7731 (Remove calls to repeat ) auto repeat_smaller = [](const auto& first, auto& second) { const auto& first_shape = first.get_logical_shape();