Skip to content

Commit 7844bca

Browse files
committed
Revert "improve smoke test"
This reverts commit 6b9db82.
1 parent 355410b commit 7844bca

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/smoke_test.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
"""Run smoke tests"""
22

3+
import os
34
import sys
45
from pathlib import Path
56

67
import torch
8+
import torch.nn as nn
79
import torchvision
8-
from torchvision.io import decode_jpeg, read_file, read_image
10+
from torchvision.io import read_image
911
from torchvision.models import resnet50, ResNet50_Weights
1012

1113
SCRIPT_DIR = Path(__file__).parent
@@ -27,13 +29,6 @@ def smoke_test_torchvision_read_decode() -> None:
2729
raise RuntimeError(f"Unexpected shape of img_png: {img_png.shape}")
2830

2931

30-
def smoke_test_torchvision_decode_jpeg_cuda():
31-
img_jpg_data = read_file(str(SCRIPT_DIR / "assets" / "encode_jpeg" / "grace_hopper_517x606.jpg"))
32-
img_jpg = decode_jpeg(img_jpg_data, device="cuda")
33-
if img_jpg.ndim != 3 or img_jpg.numel() < 100:
34-
raise RuntimeError(f"Unexpected shape of img_jpg: {img_jpg.shape}")
35-
36-
3732
def smoke_test_compile() -> None:
3833
try:
3934
model = resnet50().cuda()
@@ -82,7 +77,6 @@ def main() -> None:
8277
smoke_test_torchvision_read_decode()
8378
smoke_test_torchvision_resnet50_classify()
8479
if torch.cuda.is_available():
85-
smoke_test_torchvision_decode_jpeg_cuda()
8680
smoke_test_torchvision_resnet50_classify("cuda")
8781
smoke_test_compile()
8882

0 commit comments

Comments
 (0)