Skip to content

Commit 5893f99

Browse files
DevmatePyre Botfacebook-github-bot
authored andcommitted
fbcode/spdl/tests/cuda/nvjpeg_decode_test.py (#1355)
Summary: Pull Request resolved: #1355 Differential Revision: D101346101
1 parent 125f3a0 commit 5893f99

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/cuda/nvjpeg_decode_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7+
# pyre-strict
8+
79
import unittest
810
from random import randbytes
911

@@ -13,7 +15,7 @@
1315

1416
from ..fixture import FFMPEG_CLI, get_sample, get_samples
1517

16-
DEFAULT_CUDA = 0
18+
DEFAULT_CUDA: int = 0
1719

1820

1921
if not spdl.io.utils.built_with_nvjpeg():
@@ -26,7 +28,7 @@ def test_decode_pix_fmt(self) -> None:
2628
cmd = f"{FFMPEG_CLI} -hide_banner -y -f lavfi -i testsrc -frames:v 1 sample.jpg"
2729
sample = get_sample(cmd)
2830

29-
def _test(data, pix_fmt):
31+
def _test(data: str, pix_fmt: str) -> torch.Tensor:
3032
buffer = spdl.io.decode_image_nvjpeg(
3133
data,
3234
device_config=spdl.io.cuda_config(device_index=DEFAULT_CUDA),

0 commit comments

Comments
 (0)