Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation error when there is no libjpeg #8342

Merged
merged 2 commits into from
Mar 21, 2024

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?

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

cc @NicolasHug

Copy link
Collaborator

@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
48 of 62 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Main branch build failing with gcc 11.4.0
3 participants