Skip to content

Commit a964447

Browse files
committed
Fidx GPU benchmark
1 parent 7143f15 commit a964447

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

benchmarks/decoders/gpu_benchmark.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ def decode_full_video(video_path, decode_device_string, resize_device_string):
2929
num_threads = None
3030
if "cuda" in decode_device_string:
3131
num_threads = 1
32-
width = None
33-
height = None
32+
33+
resize_spec = ""
3434
if "native" in resize_device_string:
35-
width = RESIZED_WIDTH
36-
height = RESIZED_HEIGHT
35+
resize_spec = f"resize, {RESIZED_HEIGHT}, {RESIZED_WIDTH}"
36+
3737
torchcodec._core._add_video_stream(
3838
decoder,
3939
stream_index=-1,
4040
device=decode_device_string,
4141
num_threads=num_threads,
42-
transform_specs=f"resize, {height}, {width}",
42+
transform_specs=resize_spec,
4343
)
4444

4545
start_time = time.time()

0 commit comments

Comments
 (0)