Skip to content

Commit db86ec3

Browse files
committed
Extra jitify patches, for CUDA 13. May not be the ideal solution
1 parent 449c0a5 commit db86ec3

1 file changed

Lines changed: 86 additions & 0 deletions

File tree

cmake/dependencies/patches/jitify2-pr-146.patch

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,3 +1139,89 @@ index 03a08cc..a03f2c5 100644
11391139
--
11401140
2.34.1
11411141

1142+
From 366da2f04063008b3dc8f8119d5b8a0845c84ae7 Mon Sep 17 00:00:00 2001
1143+
From: Peter Heywood <[email protected]>
1144+
Date: Wed, 1 Oct 2025 09:52:12 +0100
1145+
Subject: [PATCH 1/2] CUDA 13 / CCCL3 incompatible redefinition fix. This may
1146+
not be the correct fix
1147+
1148+
---
1149+
jitify2.hpp | 16 ++++++++--------
1150+
1 file changed, 8 insertions(+), 8 deletions(-)
1151+
1152+
diff --git a/jitify2.hpp b/jitify2.hpp
1153+
index c2ad6fd..6fd93ae 100644
1154+
--- a/jitify2.hpp
1155+
+++ b/jitify2.hpp
1156+
@@ -5649,14 +5649,14 @@ static const char* const jitsafe_header_stdint_h = R"(
1157+
#define UINT16_MAX USHRT_MAX
1158+
#define UINT32_MAX UINT_MAX
1159+
#define UINT64_MAX ULLONG_MAX
1160+
-#define INTPTR_MIN LONG_MIN
1161+
-#define INTMAX_MIN LLONG_MIN
1162+
-#define INTPTR_MAX LONG_MAX
1163+
-#define INTMAX_MAX LLONG_MAX
1164+
-#define UINTPTR_MAX ULONG_MAX
1165+
-#define UINTMAX_MAX ULLONG_MAX
1166+
-#define PTRDIFF_MIN INTPTR_MIN
1167+
-#define PTRDIFF_MAX INTPTR_MAX
1168+
+#define INTPTR_MIN INT64_MIN
1169+
+#define INTMAX_MIN INT64_MIN
1170+
+#define INTPTR_MAX INT64_MAX
1171+
+#define INTMAX_MAX INT64_MAX
1172+
+#define UINTPTR_MAX UINT64_MAX
1173+
+#define UINTMAX_MAX UINT64_MAX
1174+
+#define PTRDIFF_MIN INT64_MIN
1175+
+#define PTRDIFF_MAX INT64_MAX
1176+
#define SIZE_MAX UINT64_MAX
1177+
#define _JITIFY_WCHAR_T_IS_UNSIGNED ((wchar_t)-1 >= 0)
1178+
#define WCHAR_MIN \
1179+
--
1180+
2.33.0.windows.2
1181+
1182+
1183+
From 3917d4036024587a056ca96080b658a98f8cb9da Mon Sep 17 00:00:00 2001
1184+
From: Basit Ayantunde <[email protected]>
1185+
Date: Thu, 25 Sep 2025 12:38:15 +0100
1186+
Subject: [PATCH 2/2] fix narrowing conversion
1187+
1188+
---
1189+
jitify2.hpp | 12 ++++++------
1190+
1 file changed, 6 insertions(+), 6 deletions(-)
1191+
1192+
diff --git a/jitify2.hpp b/jitify2.hpp
1193+
index 6fd93ae..1da69d9 100644
1194+
--- a/jitify2.hpp
1195+
+++ b/jitify2.hpp
1196+
@@ -6130,23 +6130,23 @@ struct numeric_limits<bool>
1197+
: public __jitify_detail::IntegerLimits<bool, false, true, 1> {};
1198+
template <>
1199+
struct numeric_limits<char>
1200+
- : public __jitify_detail::IntegerLimits<char, CHAR_MIN, CHAR_MAX> {};
1201+
+ : public __jitify_detail::IntegerLimits<char, static_cast<char>(CHAR_MIN), static_cast<char>(CHAR_MAX)> {};
1202+
template <>
1203+
struct numeric_limits<signed char>
1204+
- : public __jitify_detail::IntegerLimits<signed char, SCHAR_MIN, SCHAR_MAX> {
1205+
+ : public __jitify_detail::IntegerLimits<signed char, static_cast<signed char>(SCHAR_MIN), static_cast<signed char>(SCHAR_MAX)> {
1206+
};
1207+
template <>
1208+
struct numeric_limits<unsigned char>
1209+
- : public __jitify_detail::IntegerLimits<unsigned char, 0, UCHAR_MAX> {};
1210+
+ : public __jitify_detail::IntegerLimits<unsigned char, 0, static_cast<unsigned char>(UCHAR_MAX)> {};
1211+
template <>
1212+
struct numeric_limits<wchar_t>
1213+
- : public __jitify_detail::IntegerLimits<wchar_t, WCHAR_MIN, WCHAR_MAX> {};
1214+
+ : public __jitify_detail::IntegerLimits<wchar_t, static_cast<wchar_t>(WCHAR_MIN), static_cast<wchar_t>(WCHAR_MAX)> {};
1215+
template <>
1216+
struct numeric_limits<short>
1217+
- : public __jitify_detail::IntegerLimits<short, SHRT_MIN, SHRT_MAX> {};
1218+
+ : public __jitify_detail::IntegerLimits<short, static_cast<short>(SHRT_MIN), static_cast<short>(SHRT_MAX)> {};
1219+
template <>
1220+
struct numeric_limits<unsigned short>
1221+
- : public __jitify_detail::IntegerLimits<unsigned short, 0, USHRT_MAX> {};
1222+
+ : public __jitify_detail::IntegerLimits<unsigned short, 0, static_cast<unsigned short>(USHRT_MAX)> {};
1223+
template <>
1224+
struct numeric_limits<int>
1225+
: public __jitify_detail::IntegerLimits<int, INT_MIN, INT_MAX> {};
1226+
--
1227+
2.33.0.windows.2

0 commit comments

Comments
 (0)