Skip to content

Commit 0266c33

Browse files
Add cu129_torch28 (#19)
1 parent 876a93e commit 0266c33

File tree

44 files changed

+269
-684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+269
-684
lines changed

ATTRIBUTIONS.md

Lines changed: 78 additions & 632 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Index URLs:
66

77
* [all](https://nvidia-cosmos.github.io/cosmos-dependencies/v1.2.0/simple)
88
* [cu126_torch29](https://nvidia-cosmos.github.io/cosmos-dependencies/v1.2.0/cu126_torch29/simple)
9+
* [cu128_torch29](https://nvidia-cosmos.github.io/cosmos-dependencies/v1.2.0/cu128_torch29/simple)
10+
* [cu129_torch28](https://nvidia-cosmos.github.io/cosmos-dependencies/v1.2.0/cu129_torch28/simple)
911
* [cu130_torch29](https://nvidia-cosmos.github.io/cosmos-dependencies/v1.2.0/cu126_torch29/simple)
1012

1113
## Setup
File renamed without changes.

assets/cu129_torch28.txt

Whitespace-only changes.

assets/cu130_torch29.txt

Whitespace-only changes.

bin/_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ uv pip install "torch==${TORCH_VERSION}.*" --index-url "https://download.pytorch
5151

5252
# Set build environment variables
5353
eval "$(python -c "
54-
import torch
55-
print(f'export _GLIBCXX_USE_CXX11_ABI={1 if torch.compiled_with_cxx11_abi() else 0}')
54+
from cosmos_dependencies.build import build_env
55+
build_env()
5656
")"
5757

5858
# Configure ccache

cosmos_dependencies/build.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
import torch
17+
18+
19+
def _parse_torch_cuda_arch(name: str) -> tuple[int, int]:
20+
"""Parse CUDA architecture from a string of the form sm_<major><minor>."""
21+
name = name.removeprefix("sm_")
22+
major = int(name[:-1])
23+
minor = int(name[-1])
24+
return major, minor
25+
26+
27+
def _get_torch_cuda_arch_list() -> list[tuple[int, int]]:
28+
"""Get the list of CUDA architectures supported by PyTorch."""
29+
arch_list = torch.cuda.get_arch_list()
30+
return [_parse_torch_cuda_arch(x) for x in arch_list if x.startswith("sm_")]
31+
32+
33+
def build_env() -> None:
34+
"""Print the build environment variables."""
35+
_GLIBCXX_USE_CXX11_ABI = 1 if torch.compiled_with_cxx11_abi() else 0
36+
print(f"export _GLIBCXX_USE_CXX11_ABI={_GLIBCXX_USE_CXX11_ABI}")
37+
TORCH_CUDA_ARCH_LIST = ";".join([f"{major}.{minor}" for major, minor in _get_torch_cuda_arch_list()])
38+
print(f"export TORCH_CUDA_ARCH_LIST='{TORCH_CUDA_ARCH_LIST}'")

cosmos_dependencies/build_test.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
from cosmos_dependencies.build import _parse_torch_cuda_arch, build_env
17+
18+
19+
def test_parse_torch_cuda_arch():
20+
assert _parse_torch_cuda_arch("sm_80") == (8, 0)
21+
assert _parse_torch_cuda_arch("sm_86") == (8, 6)
22+
assert _parse_torch_cuda_arch("sm_120") == (12, 0)
23+
24+
25+
def test_print_build_env():
26+
build_env()

docs/v1.2.0/cu128_torch27/simple/apex/index.html

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v1.2.0/cu128_torch29/simple/apex/index.html

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)