Skip to content

Commit 8b42130

Browse files
committed
up
1 parent 417f99b commit 8b42130

File tree

5 files changed

+6
-19
lines changed

5 files changed

+6
-19
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a0a8eca01a88b01f517559fd3cf565a58c134805
1+
60333de85dec845d6a0e651764c16a730a27828d

runtime/core/portable_type/c10/c10/util/llvmMathExtras.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ constexpr inline bool isShiftedInt(int64_t x) {
370370
template <unsigned N>
371371
constexpr inline std::enable_if_t<(N < 64), bool> isUInt(uint64_t X) {
372372
static_assert(N > 0, "isUInt<0> doesn't make sense");
373-
return X < (UINT64_C(1) << N);
373+
return X < (UINT64_C(1) << (N));
374374
}
375375
template <unsigned N>
376376
constexpr inline std::enable_if_t<N >= 64, bool> isUInt(uint64_t /*X*/) {

runtime/core/portable_type/c10/torch/headeronly/macros/Macros.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef C10_MACROS_MACROS_H_
22
#define C10_MACROS_MACROS_H_
3-
4-
#ifdef __cplusplus
53
#include <cassert>
6-
#else
7-
#include <assert.h>
8-
#endif
94

105
/* Main entry for torch/headeronly/macros (used to be c10/macros).
116
*
@@ -144,8 +139,6 @@
144139

145140
#define C10_RESTRICT __restrict
146141

147-
#ifdef __cplusplus
148-
149142
// Simply define the namespace, in case a dependent library want to refer to
150143
// the c10 namespace but not any nontrivial files.
151144
namespace c10 {}
@@ -183,8 +176,6 @@ namespace at::xpu {
183176
using namespace c10::xpu;
184177
} // namespace at::xpu
185178

186-
#endif // __cplusplus
187-
188179
// C10_LIKELY/C10_UNLIKELY
189180
//
190181
// These macros provide parentheses, so you can use these macros as:
@@ -245,11 +236,7 @@ using namespace c10::xpu;
245236

246237
#define C10_ERASE C10_ALWAYS_INLINE C10_ATTR_VISIBILITY_HIDDEN
247238

248-
#ifdef __cplusplus
249239
#include <cstdint>
250-
#else
251-
#include <stdint.h>
252-
#endif
253240

254241
#ifdef __HIPCC__
255242
// Unlike CUDA, HIP requires a HIP header to be included for __host__ to work.
@@ -480,7 +467,7 @@ __host__ __device__
480467
// a non-negligible performance impact even if the assert condition is
481468
// never triggered. We choose to use abort() instead which will still
482469
// terminate the application but without a more useful error message.
483-
#if !defined(C10_USE_ROCM_KERNEL_ASSERT) && defined(USE_ROCM)
470+
#if !defined(C10_USE_ROCM_KERNEL_ASSERT) and defined(USE_ROCM)
484471
#define CUDA_KERNEL_ASSERT(cond) \
485472
if C10_UNLIKELY (!(cond)) { \
486473
abort(); \
@@ -530,7 +517,7 @@ __host__ __device__
530517
__assert_fail( \
531518
#cond, __FILE__, static_cast<unsigned int>(__LINE__), __func__); \
532519
}
533-
#endif // C10_USE_ROCM_KERNEL_ASSERT && USE_ROCM
520+
#endif // C10_USE_ROCM_KERNEL_ASSERT and USE_ROCM
534521
#endif // __APPLE__
535522

536523
// Compile-time switch to control how assertions are logged inside CUDA kernels.

runtime/core/portable_type/c10/torch/headeronly/util/TypeSafeSignMath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ template <typename Limit, typename T>
7979
inline constexpr bool greater_than_max(const T& x) {
8080
constexpr bool can_overflow =
8181
std::numeric_limits<T>::digits > std::numeric_limits<Limit>::digits;
82-
return can_overflow && x > std::numeric_limits<Limit>::max();
82+
return can_overflow && x > (std::numeric_limits<Limit>::max)();
8383
}
8484

8585
#ifdef __GNUC__

torch_pin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
TORCH_VERSION = "2.10.0"
2-
NIGHTLY_VERSION = "dev20251104"
2+
NIGHTLY_VERSION = "dev20251101"

0 commit comments

Comments
 (0)