Skip to content

Conversation

@cdzhan
Copy link
Contributor

@cdzhan cdzhan commented Mar 20, 2024

Fix #8339. The png_structp and j_decompress_ptr are defined in png.h and jpeglib.h and there seems no need to define fetch_jpeg_exif_orientation when libraries are not found?

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 20, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8342

Note: Links to docs will display an error until the docs builds have been completed.

❌ 8 New Failures, 6 Unrelated Failures

As of commit f691d53 with merge base d868be9 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@cdzhan
Copy link
Contributor Author

cdzhan commented Mar 20, 2024

Copy link
Contributor

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @cdzhan, lgtm

The png_structp and j_decompress_ptr are defined in png.h and jpeglib.h and there seems no need to define fetch_jpeg_exif_orientation when libraries are not found?

Yes, we can allow not to define these functions when jpeg/png are not found such that for example decode_jpeg
function will be defined by

#if !JPEG_FOUND
torch::Tensor decode_jpeg(
const torch::Tensor& data,
ImageReadMode mode,
bool apply_exif_orientation) {
TORCH_CHECK(
false, "decode_jpeg: torchvision not compiled with libjpeg support");
}
#else

@vfdev-5 vfdev-5 merged commit 480eec2 into pytorch:main Mar 21, 2024
@github-actions
Copy link

Hey @vfdev-5!

You merged this PR, but no labels were added.
The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

@vfdev-5 vfdev-5 added the bug label Mar 21, 2024
@cdzhan cdzhan deleted the cdzhan-patch-1 branch March 22, 2024 00:08
pruthvistony pushed a commit to ROCm/vision that referenced this pull request May 4, 2024
facebook-github-bot pushed a commit that referenced this pull request May 8, 2024
Summary: Co-authored-by: vfdev <vfdev.5@gmail.com> Reviewed By: vmoens Differential Revision: D57099457 fbshipit-source-id: c6b60c9f830231941bea954df925aa6ed1f0c4c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment