Skip to content

Commit fcb86bd

Browse files
committed
pin bump with better architecture
Pull Request resolved: #15016 This diff bump torch pin to 1004. also expose cuda version into torch_pin.py for better update if needed; ghstack-source-id: 315575273 @exported-using-ghexport Differential Revision: [D84280496](https://our.internmc.facebook.com/intern/diff/D84280496/)
1 parent 7533df6 commit fcb86bd

File tree

5 files changed

+63
-25
lines changed

5 files changed

+63
-25
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
53a2908a10f414a2f85caa06703a26a40e873869
1+
cf9d09490c7f6685ec68d5db3acf2e0d73c54d00

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import sys
2525
from typing import Any
2626

27-
import pytorch_sphinx_theme2 # type: ignore[import-untyped]
27+
import pytorch_sphinx_theme2 # type: ignore[import-not-found]
2828

2929
# To let us import ./custom_directives.py
3030
sys.path.insert(0, os.path.abspath("."))

install_requirements.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,12 @@
1212

1313
from install_utils import determine_torch_url, is_intel_mac_os, python_is_compatible
1414

15-
from torch_pin import NIGHTLY_VERSION, TORCH_VERSION
15+
from torch_pin import NIGHTLY_VERSION, SUPPORTED_CUDA_VERSIONS, TORCH_VERSION
1616

1717
# The pip repository that hosts nightly torch packages.
1818
# This will be dynamically set based on CUDA availability and CUDA backend enabled/disabled.
1919
TORCH_NIGHTLY_URL_BASE = "https://download.pytorch.org/whl/nightly"
2020

21-
# Supported CUDA versions - modify this to add/remove supported versions
22-
# Format: tuple of (major, minor) version numbers
23-
SUPPORTED_CUDA_VERSIONS = (
24-
(12, 6),
25-
(12, 8),
26-
(13, 0),
27-
)
28-
29-
# Since ExecuTorch often uses main-branch features of pytorch, only the nightly
30-
# pip versions will have the required features.
31-
#
32-
# NOTE: If a newly-fetched version of the executorch repo changes the value of
33-
# NIGHTLY_VERSION, you should re-run this script to install the necessary
34-
# package versions.
35-
#
36-
# NOTE: If you're changing, make the corresponding change in .ci/docker/ci_commit_pins/pytorch.txt
37-
# by picking the hash from the same date in https://hud.pytorch.org/hud/pytorch/pytorch/nightly/
38-
#
39-
# NOTE: If you're changing, make the corresponding supported CUDA versions in
40-
# SUPPORTED_CUDA_VERSIONS above if needed.
41-
4221

4322
def install_requirements(use_pytorch_nightly):
4423
# Skip pip install on Intel macOS if using nightly.

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ static inline int C10_WARP_SIZE_INTERNAL() {
359359
// Those platforms do not support assert()
360360
#define CUDA_KERNEL_ASSERT(cond)
361361
#define CUDA_KERNEL_ASSERT_MSG(cond, msg)
362+
#define CUDA_KERNEL_ASSERT_PRINTF(cond, msg, ...)
362363
#define SYCL_KERNEL_ASSERT(cond)
363364
#elif defined(_MSC_VER)
364365
#if defined(NDEBUG)
@@ -396,6 +397,26 @@ __host__ __device__
396397
static_cast<unsigned>(__LINE__)), \
397398
0); \
398399
}
400+
#define CUDA_KERNEL_ASSERT_PRINTF(cond, msg, ...) \
401+
if (C10_UNLIKELY(!(cond))) { \
402+
(void)(printf( \
403+
"[CUDA_KERNEL_ASSERT] " __FILE__ ":" C10_STRINGIZE( \
404+
__LINE__) ": %s: block: [%d,%d,%d], thread: [%d,%d,%d]: " \
405+
"Assertion failed: `" #cond "`: " msg "\n", \
406+
__func__, \
407+
blockIdx.x, \
408+
blockIdx.y, \
409+
blockIdx.z, \
410+
threadIdx.x, \
411+
threadIdx.y, \
412+
threadIdx.z, \
413+
##__VA_ARGS__)); \
414+
(void)(_wassert( \
415+
_CRT_WIDE(#cond), \
416+
_CRT_WIDE(__FILE__), \
417+
static_cast<unsigned>(__LINE__)), \
418+
0); \
419+
}
399420
#define SYCL_KERNEL_ASSERT(cond) \
400421
if (C10_UNLIKELY(!(cond))) { \
401422
(void)(_wassert( \
@@ -455,6 +476,10 @@ __host__ __device__
455476
if C10_UNLIKELY (!(cond)) { \
456477
abort(); \
457478
}
479+
#define CUDA_KERNEL_ASSERT_PRINTF(cond, msg, ...) \
480+
if C10_UNLIKELY (!(cond)) { \
481+
abort(); \
482+
}
458483
#define SYCL_KERNEL_ASSERT(cond) \
459484
if C10_UNLIKELY (!(cond)) { \
460485
abort(); \
@@ -470,6 +495,23 @@ __host__ __device__
470495
__assert_fail( \
471496
msg, __FILE__, static_cast<unsigned int>(__LINE__), __func__); \
472497
}
498+
#define CUDA_KERNEL_ASSERT_PRINTF(cond, msg, ...) \
499+
if (C10_UNLIKELY(!(cond))) { \
500+
printf( \
501+
"[CUDA_KERNEL_ASSERT] " __FILE__ ":" C10_STRINGIZE( \
502+
__LINE__) ": %s: block: [%d,%d,%d], thread: [%d,%d,%d]: " \
503+
"Assertion failed: `" #cond "`: " msg "\n", \
504+
__func__, \
505+
blockIdx.x, \
506+
blockIdx.y, \
507+
blockIdx.z, \
508+
threadIdx.x, \
509+
threadIdx.y, \
510+
threadIdx.z, \
511+
##__VA_ARGS__); \
512+
__assert_fail( \
513+
#cond, __FILE__, static_cast<unsigned int>(__LINE__), __func__); \
514+
}
473515
#define SYCL_KERNEL_ASSERT(cond) \
474516
if (C10_UNLIKELY(!(cond))) { \
475517
__assert_fail( \

torch_pin.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1+
# Since ExecuTorch often uses main-branch features of pytorch, only the nightly
2+
# pip versions will have the required features.
3+
#
4+
# NOTE: If a newly-fetched version of the executorch repo changes the value of
5+
# NIGHTLY_VERSION, you should re-run install_executorch.sh script to install the necessary
6+
# package versions.
7+
#
8+
# NOTE: If you're changing, make the corresponding change in .ci/docker/ci_commit_pins/pytorch.txt
9+
# by picking the hash from the same date in https://hud.pytorch.org/hud/pytorch/pytorch/nightly/
10+
#
11+
# NOTE: If you're changing, make the corresponding supported CUDA versions in
12+
# SUPPORTED_CUDA_VERSIONS above if needed.
113
TORCH_VERSION = "2.10.0"
2-
NIGHTLY_VERSION = "dev20251003"
14+
NIGHTLY_VERSION = "dev20251004"
15+
SUPPORTED_CUDA_VERSIONS = (
16+
(12, 6),
17+
(12, 8),
18+
(13, 0),
19+
)

0 commit comments

Comments
 (0)