Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/unittest/linux/scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Do not install PyTorch and torchvision here, otherwise they also get cached.

set -e
set -ex

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
Expand Down Expand Up @@ -42,4 +42,4 @@ if [[ "${PYTHON_VERSION}" = "3.9" ]]; then
fi

conda install -y -c pytorch "ffmpeg${FFMPEG_PIN}"
conda env update --file "${this_dir}/environment.yml" --prune
conda env update --file "${this_dir}/environment.yml" --prune -vvv
4 changes: 2 additions & 2 deletions .circleci/unittest/windows/scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Do not install PyTorch and torchvision here, otherwise they also get cached.

set -e
set -ex

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
Expand Down Expand Up @@ -36,4 +36,4 @@ conda activate "${env_dir}"

# 3. Install Conda dependencies
printf "* Installing dependencies (except PyTorch)\n"
conda env update --file "${this_dir}/environment.yml" --prune
conda env update --file "${this_dir}/environment.yml" --prune -vvv
18 changes: 18 additions & 0 deletions torchvision/csrc/io/image/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,21 @@ static auto registry = torch::RegisterOperators()

} // namespace image
} // namespace vision

#ifdef JPEG_FOUND
#include <jpeglib.h>
#endif

namespace vision {
int64_t jpeg_version() {
#ifdef JPEG_FOUND
return JPEG_LIB_VERSION;
#else
return -1;
#endif
}

TORCH_LIBRARY_FRAGMENT(torchvision, m) {
m.def("_jpeg_version", &jpeg_version);
}
} // namespace vision