Skip to content

Commit 9cb31c9

Browse files
committed
Merge branch 'main' of github.com:pytorch/torchcodec into avio
2 parents 29866fc + b4619d7 commit 9cb31c9

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

.github/workflows/cpp_tests.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
# TODO put back 6.1.1. See
23-
# https://github.com/pytorch/torchcodec/issues/518
24-
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '7.0.1']
22+
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
2523
steps:
2624
- name: Check out repo
2725
uses: actions/checkout@v3
2826
- name: Setup conda env
29-
uses: conda-incubator/setup-miniconda@v2
27+
uses: conda-incubator/setup-miniconda@v3
3028
with:
3129
auto-update-conda: true
32-
miniconda-version: "latest"
30+
# Using miniforge instead of miniconda ensures that the default
31+
# conda channel is conda-forge instead of main/default. This ensures
32+
# ABI consistency between dependencies:
33+
# https://conda-forge.org/docs/user/transitioning_from_defaults/
34+
miniforge-version: latest
3335
activate-environment: test
3436
python-version: '3.12'
3537
- name: Update pip

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ The following table indicates the compatibility between versions of
136136
| `torchcodec` | `torch` | Python |
137137
| ------------------ | ------------------ | ------------------- |
138138
| `main` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.13` |
139+
| `0.3` | `2.7` | `>=3.9`, `<=3.13` |
139140
| `0.2` | `2.6` | `>=3.9`, `<=3.13` |
140141
| `0.1` | `2.5` | `>=3.9`, `<=3.12` |
141142
| `0.0.3` | `2.4` | `>=3.8`, `<=3.12` |
@@ -210,15 +211,6 @@ encoded with libx264 and yuv420p pixel format. All decoders, except for TorchVis
210211
For TorchCodec, the "approx" label means that it was using [approximate mode](https://pytorch.org/torchcodec/stable/generated_examples/approximate_mode.html)
211212
for seeking.
212213

213-
## Planned future work
214-
215-
We are actively working on the following features:
216-
217-
- [Audio decoding](https://github.com/pytorch/torchcodec/issues/85)
218-
219-
Let us know if you have any feature requests by [opening an
220-
issue](https://github.com/pytorch/torchcodec/issues/new?assignees=&labels=&projects=&template=feature-request.yml)!
221-
222214
## Contributing
223215

224216
We welcome contributions to TorchCodec! Please see our [contributing

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ def _build_all_extensions_with_cmake(self):
112112
torch_dir = Path(torch.utils.cmake_prefix_path) / "Torch"
113113
cmake_build_type = os.environ.get("CMAKE_BUILD_TYPE", "Release")
114114
enable_cuda = os.environ.get("ENABLE_CUDA", "")
115+
torchcodec_disable_compile_warning_as_error = os.environ.get(
116+
"TORCHCODEC_DISABLE_COMPILE_WARNING_AS_ERROR", "OFF"
117+
)
115118
python_version = sys.version_info
116119
cmake_args = [
117120
f"-DCMAKE_INSTALL_PREFIX={self._install_prefix}",
@@ -120,6 +123,7 @@ def _build_all_extensions_with_cmake(self):
120123
f"-DCMAKE_BUILD_TYPE={cmake_build_type}",
121124
f"-DPYTHON_VERSION={python_version.major}.{python_version.minor}",
122125
f"-DENABLE_CUDA={enable_cuda}",
126+
f"-DTORCHCODEC_DISABLE_COMPILE_WARNING_AS_ERROR={torchcodec_disable_compile_warning_as_error}",
123127
]
124128

125129
Path(self.build_temp).mkdir(parents=True, exist_ok=True)

src/torchcodec/_core/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ find_package(pybind11 REQUIRED)
88
find_package(Torch REQUIRED)
99
find_package(Python3 ${PYTHON_VERSION} EXACT COMPONENTS Development)
1010

11-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Werror ${TORCH_CXX_FLAGS}")
11+
if(DEFINED TORCHCODEC_DISABLE_COMPILE_WARNING_AS_ERROR AND TORCHCODEC_DISABLE_COMPILE_WARNING_AS_ERROR)
12+
set(TORCHCODEC_WERROR_OPTION "")
13+
else()
14+
set(TORCHCODEC_WERROR_OPTION "-Werror")
15+
endif()
16+
17+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic ${TORCHCODEC_WERROR_OPTION} ${TORCH_CXX_FLAGS}")
1218

1319
function(make_torchcodec_sublibrary
1420
library_name
@@ -149,7 +155,7 @@ function(make_torchcodec_libraries
149155
target_link_options(
150156
${pybind_ops_library_name}
151157
PUBLIC
152-
"-undefined dynamic_lookup"
158+
"LINKER:-undefined,dynamic_lookup"
153159
)
154160

155161
# Install all libraries.

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0a0
1+
0.4.0a0

0 commit comments

Comments
 (0)