Skip to content

Commit

Permalink
replace nice concept with nasty SFINAE cuz utils.h doesn't use c++20 :(
Browse files Browse the repository at this point in the history
  • Loading branch information
vwellsTT committed Mar 7, 2025
1 parent a92929d commit 2d9a490
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/include/tt/runtime/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef TT_RUNTIME_UTILS_H
#define TT_RUNTIME_UTILS_H

#include <concepts>
#include <memory>
#include <type_traits>

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcovered-switch-default"
Expand Down Expand Up @@ -45,7 +45,7 @@ inline std::uint32_t dataTypeElementSize(::tt::target::DataType dataType) {
}
}

template <std::integral T>
template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
inline std::vector<T> calculateStride(const std::vector<T> &shape) {
assert(!shape.empty());
std::vector<T> stride(shape.size(), 1);
Expand Down

0 comments on commit 2d9a490

Please sign in to comment.