Skip to content

Added torchvision 0.28.0 - #8751

Open
sid226 wants to merge 2 commits into
ppc64le:masterfrom
sid226:sid226_torchvision
Open

Added torchvision 0.28.0#8751
sid226 wants to merge 2 commits into
ppc64le:masterfrom
sid226:sid226_torchvision

Conversation

@sid226

@sid226 sid226 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • Have you checked and followed all the points mention in the CONTRIBUTING.MD
  • Have you validated script on UBI 9 container
  • Did you run the script(s) on fresh container with set -e option enabled and observe success ?
  • Did you have Legal approvals for patch files ?

# ---------------------------------------------------------------------------
# Build numpy 2.5.0 from source (Meson-python + system openblas-devel)
# ---------------------------------------------------------------------------
NUMPY_VERSION=2.5.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numpy can be installed via pip command no need to build from source. Refer to other Rt26.1 buildscripts.

"package_name": "torchvision",
"github_url": "https://github.com/pytorch/vision",
"version": "v0.24.1",
"version": "0.28.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the version everywhere in the script to use the correct tag: v0.28.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sid226 , update version to 0.29.0 . As latest version published on pypi recently

Comment on lines +172 to +214
if ! python3.14 - <<'PYEOF'
import sys
import torch
import torchvision
import torchvision.transforms as T
import numpy as np
from PIL import Image

print(f"torch version : {torch.__version__}")
print(f"torchvision version : {torchvision.__version__}")

# Basic transform pipeline
img = Image.fromarray(np.zeros((64, 64, 3), dtype=np.uint8))
transform = T.Compose([
T.Resize((32, 32)),
T.ToTensor(),
T.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]),
])
tensor = transform(img)
assert tensor.shape == (3, 32, 32), f"Unexpected shape: {tensor.shape}"
print("PASS transform pipeline")

# ops: nms
boxes = torch.tensor([[0.0, 0.0, 1.0, 1.0], [0.1, 0.1, 1.1, 1.1]])
scores = torch.tensor([0.9, 0.8])
keep = torchvision.ops.nms(boxes, scores, iou_threshold=0.5)
assert len(keep) >= 1, "nms returned no boxes"
print("PASS torchvision.ops.nms")

print("\nAll tests passed.")
sys.exit(0)
PYEOF
then
echo "------------------$PACKAGE_NAME:Install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"
exit 2
else
echo "------------------$PACKAGE_NAME:Install_&_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi

@prathamesh-ibm prathamesh-ibm Sep 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please run package's own test suite instead of just performing basic validation?

Refer: https://github.com/ppc64le/build-scripts/blob/master/t/torchvision/torchvision_0.26.0_ubi_9.6.sh#L633-L644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants