Skip to content

Commit f267591

Browse files
committed
Revert "[torchcodec] Improve GPU benchmark (#157)"
This reverts commit 2722288.
1 parent e0af147 commit f267591

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
@@ -5,16 +5,16 @@
55
import torch.utils.benchmark as benchmark
66

77
import torchcodec
8-
import torchvision.transforms.v2.functional as F
8+
from torchvision.transforms import Resize
99

1010
RESIZED_WIDTH = 256
1111
RESIZED_HEIGHT = 256
1212

1313

1414
def transfer_and_resize_frame(frame, resize_device_string):
15-
# This should be a no-op if the frame is already on the target device.
15+
# This should be a no-op if the frame is already on the GPU.
1616
frame = frame.to(resize_device_string)
17-
frame = F.resize(frame, (RESIZED_HEIGHT, RESIZED_WIDTH))
17+
frame = Resize((RESIZED_HEIGHT, RESIZED_WIDTH))(frame)
1818
return frame
1919

2020

@@ -129,8 +129,8 @@ def main():
129129
"resize_device_string": resize_device_string,
130130
},
131131
label=label,
132-
description=f"video={os.path.basename(video_path)}",
133-
sub_label=f"D={decode_label} R={resize_label}",
132+
sub_label=f"video={os.path.basename(video_path)}",
133+
description=f"D={decode_label},R={resize_label}",
134134
).blocked_autorange()
135135
results.append(t)
136136
compare = benchmark.Compare(results)

0 commit comments

Comments
 (0)