diff --git a/xla/tsl/framework/type_traits.h b/xla/tsl/framework/type_traits.h index 31c8fe56a78faa..bb43632b3667f4 100644 --- a/xla/tsl/framework/type_traits.h +++ b/xla/tsl/framework/type_traits.h @@ -98,17 +98,22 @@ class numeric_limits : public numeric_limits {}; template <> class numeric_limits : public numeric_limits {}; -// Specialize is_signed for quantized types. +// Templates from are not permitted to be specialized by users, +// and doing so may be ignored or cause an error. As a transitional measure, +// since tensorflow was specializing is_signed for some time, poison uses by +// specializing with an empty struct (missing the `value` member). +// +// TODO(b/392034954): Delete these invalid specializations. template <> -struct is_signed : public is_signed {}; +struct is_signed {}; template <> -struct is_signed : public is_signed {}; +struct is_signed {}; template <> -struct is_signed : public is_signed {}; +struct is_signed {}; template <> -struct is_signed : public is_signed {}; +struct is_signed {}; template <> -struct is_signed : public is_signed {}; +struct is_signed {}; } // namespace std