From 8aab5e27604971238de824266616a74302a390f8 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Fri, 14 Feb 2020 07:21:09 +0100 Subject: [PATCH 01/28] Vendors libjpeg-turbo 2.0.4 --- .gitmodules | 3 +++ third_party/libjpeg-turbo | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 third_party/libjpeg-turbo diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..dac99d261c2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "third_party/libjpeg-turbo"] + path = third_party/libjpeg-turbo + url = https://github.com/libjpeg-turbo/libjpeg-turbo diff --git a/third_party/libjpeg-turbo b/third_party/libjpeg-turbo new file mode 160000 index 00000000000..166e34213e4 --- /dev/null +++ b/third_party/libjpeg-turbo @@ -0,0 +1 @@ +Subproject commit 166e34213e4f4e2363ce058a7bcc69fd03e38b76 From d5e8f4e71e26b5d6c6d4f48a6be66dc164e07521 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sat, 15 Feb 2020 15:43:57 +0100 Subject: [PATCH 02/28] Adds jpeg reading capability on linux - Ship libjpegturbo.so with the package --- .circleci/config.yml | 17 +++++- .circleci/config.yml.in | 17 +++++- .travis.yml | 4 +- CMakeLists.txt | 5 ++ setup.py | 55 +++++++++++++++++-- test/test_image.py | 59 +++++++++++++++++++++ torchvision/csrc/cpu/image/readjpeg_cpu.cpp | 37 +++++++++++++ torchvision/csrc/cpu/image/readjpeg_cpu.h | 5 ++ torchvision/csrc/image.h | 3 ++ torchvision/csrc/vision.cpp | 6 +++ torchvision/io/image.py | 47 ++++++++++++++++ 11 files changed, 244 insertions(+), 11 deletions(-) create mode 100644 test/test_image.py create mode 100644 torchvision/csrc/cpu/image/readjpeg_cpu.cpp create mode 100644 torchvision/csrc/cpu/image/readjpeg_cpu.h create mode 100644 torchvision/csrc/image.h create mode 100644 torchvision/io/image.py diff --git a/.circleci/config.yml b/.circleci/config.yml index 364cdd5f0b9..9668b59915f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,6 +21,9 @@ commands: description: "checkout merge branch" steps: - checkout + - run: + name: initialize submodules + command: git submodule update --init --recursive # - run: # name: Checkout merge branch # command: | @@ -83,7 +86,9 @@ jobs: resource_class: 2xlarge+ steps: - checkout_merge - - run: packaging/build_wheel.sh + - run: + command: packaging/build_wheel.sh + no_output_timeout: 30m - store_artifacts: path: dist - persist_to_workspace: @@ -98,7 +103,10 @@ jobs: resource_class: 2xlarge+ steps: - checkout_merge - - run: packaging/build_conda.sh + - run: + command: packaging/build_conda.sh + no_output_timeout: 30m + - store_artifacts: path: /opt/conda/conda-bld/linux-64 - persist_to_workspace: @@ -167,6 +175,7 @@ jobs: - run: name: Build and run tests + no_output_timeout: 30m command: | set -e @@ -191,6 +200,7 @@ jobs: conda activate base conda install -yq conda-build "conda-package-handling!=1.5.0" bash packaging/build_conda.sh + no_output_timeout: 30m shell: powershell.exe - store_test_results: path: build_results/ @@ -207,6 +217,7 @@ jobs: conda activate base conda install -yq conda-build "conda-package-handling!=1.5.0" bash packaging/build_conda.sh + no_output_timeout: 30m shell: powershell.exe binary_macos_wheel: @@ -219,6 +230,7 @@ jobs: # Cannot easily deduplicate this as source'ing activate # will set environment variables which we need to propagate # to build_wheel.sh + no_output_timeout: 30m command: | curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh sh conda.sh -b @@ -238,6 +250,7 @@ jobs: steps: - checkout_merge - run: + no_output_timeout: 30m command: | curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh sh conda.sh -b diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index de5ec111684..6517daaca37 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -21,6 +21,9 @@ commands: description: "checkout merge branch" steps: - checkout + - run: + name: initialize submodules + command: git submodule update --init --recursive # - run: # name: Checkout merge branch # command: | @@ -83,7 +86,9 @@ jobs: resource_class: 2xlarge+ steps: - checkout_merge - - run: packaging/build_wheel.sh + - run: + command: packaging/build_wheel.sh + no_output_timeout: 30m - store_artifacts: path: dist - persist_to_workspace: @@ -98,7 +103,10 @@ jobs: resource_class: 2xlarge+ steps: - checkout_merge - - run: packaging/build_conda.sh + - run: + command: packaging/build_conda.sh + no_output_timeout: 30m + - store_artifacts: path: /opt/conda/conda-bld/linux-64 - persist_to_workspace: @@ -167,6 +175,7 @@ jobs: - run: name: Build and run tests + no_output_timeout: 30m command: | set -e @@ -191,6 +200,7 @@ jobs: conda activate base conda install -yq conda-build "conda-package-handling!=1.5.0" bash packaging/build_conda.sh + no_output_timeout: 30m shell: powershell.exe - store_test_results: path: build_results/ @@ -207,6 +217,7 @@ jobs: conda activate base conda install -yq conda-build "conda-package-handling!=1.5.0" bash packaging/build_conda.sh + no_output_timeout: 30m shell: powershell.exe binary_macos_wheel: @@ -219,6 +230,7 @@ jobs: # Cannot easily deduplicate this as source'ing activate # will set environment variables which we need to propagate # to build_wheel.sh + no_output_timeout: 30m command: | curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh sh conda.sh -b @@ -238,6 +250,7 @@ jobs: steps: - checkout_merge - run: + no_output_timeout: 30m command: | curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh sh conda.sh -b diff --git a/.travis.yml b/.travis.yml index 1b6ecb7a65b..51b518833ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,8 +67,8 @@ install: cd - script: - - pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH -k 'not TestVideoReader and not TestVideoTransforms' test - - pytest test/test_hub.py + - travis_wait 60 pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH -k 'not TestVideoReader and not TestVideoTransforms' test + - travis_wait 60 pytest test/test_hub.py after_success: # Necessary to run coverage combine to rewrite paths from diff --git a/CMakeLists.txt b/CMakeLists.txt index fcedf41e5ab..6fe38652b25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,13 @@ if(WITH_CUDA) endif() find_package(Python3 COMPONENTS Development) + find_package(Torch REQUIRED) +if(Unix) + add_subdirectory("third_party/libjpeg-turbo") +endif() + file(GLOB HEADERS torchvision/csrc/*.h) file(GLOB OPERATOR_SOURCES torchvision/csrc/cpu/*.h torchvision/csrc/cpu/*.cpp torchvision/csrc/*.cpp) if(WITH_CUDA) diff --git a/setup.py b/setup.py index 71d420573ed..563290e4074 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,7 @@ import subprocess import distutils.command.clean import distutils.spawn +import multiprocessing import glob import shutil @@ -83,9 +84,20 @@ def get_extensions(): main_file = glob.glob(os.path.join(extensions_dir, '*.cpp')) source_cpu = glob.glob(os.path.join(extensions_dir, 'cpu', '*.cpp')) + source_image_cpu = glob.glob(os.path.join(extensions_dir, 'cpu', 'image', '*.cpp')) source_cuda = glob.glob(os.path.join(extensions_dir, 'cuda', '*.cu')) sources = main_file + source_cpu + + libraries = [] + extra_compile_args = {} + third_party_search_directories = [] + + if sys.platform.startswith('linux'): + sources = sources + source_image_cpu + libraries.append('turbojpeg') + third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo")) + extension = CppExtension compile_cpp_tests = os.getenv('WITH_CPP_MODELS_TEST', '0') == '1' @@ -94,6 +106,7 @@ def get_extensions(): models_dir = os.path.join(this_dir, 'torchvision', 'csrc', 'models') test_file = glob.glob(os.path.join(test_dir, '*.cpp')) source_models = glob.glob(os.path.join(models_dir, '*.cpp')) + extra_compile_args.setdefault('cxx', []) test_file = [os.path.join(test_dir, s) for s in test_file] source_models = [os.path.join(models_dir, s) for s in source_models] @@ -142,10 +155,13 @@ def get_extensions(): extension( 'torchvision._C', sources, - include_dirs=include_dirs, + libraries=libraries, + library_dirs=third_party_search_directories, + include_dirs=include_dirs + third_party_search_directories, define_macros=define_macros, extra_compile_args=extra_compile_args, - ) + runtime_library_dirs=["lib"] + ) ] if compile_cpp_tests: ext_modules.append( @@ -197,6 +213,35 @@ def run(self): distutils.command.clean.clean.run(self) +def throw_of_failure(command): + ret = os.system(command) + if ret != 0: + raise Exception("{} failed".format(command)) + + +def build_deps(): + this_dir = os.path.dirname(os.path.abspath(__file__)) + if sys.platform.startswith('linux'): + cpu_count = multiprocessing.cpu_count() + os.chdir("third_party/libjpeg-turbo/") + throw_of_failure('cmake .') + throw_of_failure("cmake --build . -- -j {}".format(cpu_count)) + os.chdir(this_dir) + + +def build_ext_with_dependencies(self): + build_deps() + return BuildExtension.with_options(no_python_abi_suffix=True)(self) + + +data_files = [] +if sys.platform.startswith('linux'): + data_files = [ + ('torchvision/lib', [ + 'third_party/libjpeg-turbo/libturbojpeg.so.0', + 'third_party/libjpeg-turbo/libturbojpeg.so']) + ] + setup( # Metadata name=package_name, @@ -218,7 +263,7 @@ def run(self): }, ext_modules=get_extensions(), cmdclass={ - 'build_ext': BuildExtension.with_options(no_python_abi_suffix=True), + 'build_ext': build_ext_with_dependencies, 'clean': clean, - } -) + }, + data_files=data_files) diff --git a/test/test_image.py b/test/test_image.py new file mode 100644 index 00000000000..0ec39905486 --- /dev/null +++ b/test/test_image.py @@ -0,0 +1,59 @@ +import os +import unittest +import sys + +import torch +import torchvision +if sys.platform.startswith('linux'): + from torchvision.io.image import read_jpeg, decode_jpeg + from turbojpeg import TurboJPEG, TJPF_RGB +import numpy as np + + +IMAGE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets") + + +def get_images(directory, img_ext): + assert os.path.isdir(directory) + for root, _, files in os.walk(directory): + for fl in files: + _, ext = os.path.splitext(fl) + if ext == img_ext: + yield os.path.join(root, fl) + + +def read_with_pyturbojpeg(img_path): + jpeg = TurboJPEG() + for img_path in get_images(IMAGE_DIR, ".jpg"): + with open(img_path, 'rb') as f: + return torch.from_numpy(jpeg.decode(f.read(), pixel_format=TJPF_RGB)) + + +class ImageTester(unittest.TestCase): + @unittest.skipUnless(sys.platform.startswith("linux"), "Support only available on linux for now.") + def test_read_jpeg(self): + for img_path in get_images(IMAGE_DIR, ".jpg"): + img_tjpeg = read_with_pyturbojpeg(img_path) + img_ljpeg = read_jpeg(img_path) + self.assertTrue(torch.equal(img_ljpeg, img_tjpeg)) + + @unittest.skipUnless(sys.platform.startswith("linux"), "Support only available on linux for now.") + def test_decode_jpeg(self): + for img_path in get_images(IMAGE_DIR, ".jpg"): + img_tjpeg = read_with_pyturbojpeg(img_path) + size = os.path.getsize(img_path) + img_ljpeg = decode_jpeg(torch.from_file(img_path, dtype=torch.uint8, size=size)) + self.assertTrue(torch.equal(img_ljpeg, img_tjpeg)) + + with self.assertRaisesRegex(ValueError, "Expected a non empty 1-dimensional tensor."): + decode_jpeg(torch.empty((100, 1), dtype=torch.uint8)) + + with self.assertRaisesRegex(ValueError, "Expected a torch.uint8 tensor."): + decode_jpeg(torch.empty((100, ), dtype=torch.float16)) + + with self.assertRaisesRegex(ValueError, "Invalid jpeg input."): + decode_jpeg(torch.empty((100), dtype=torch.uint8)) + + +if __name__ == '__main__': + unittest.main() diff --git a/torchvision/csrc/cpu/image/readjpeg_cpu.cpp b/torchvision/csrc/cpu/image/readjpeg_cpu.cpp new file mode 100644 index 00000000000..ec2a14ee8e6 --- /dev/null +++ b/torchvision/csrc/cpu/image/readjpeg_cpu.cpp @@ -0,0 +1,37 @@ +#include "readjpeg_cpu.h" + +#include +#include +#include + +torch::Tensor decodeJPEG(const torch::Tensor& data) { + + tjhandle tjInstance = tjInitDecompress(); + if (tjInstance == NULL) { + TORCH_CHECK(false, "libjpeg-turbo decompression initialization failed."); + } + + auto datap = data.accessor().data(); + + int width, height; + + if (tjDecompressHeader(tjInstance, datap, data.numel(), &width, &height) < 0) { + tjDestroy(tjInstance); + TORCH_CHECK(false, "Error while reading jpeg headers"); + } + auto tensor = + torch::empty({int64_t(height), int64_t(width), int64_t(3)}, torch::kU8); + + auto ptr = tensor.accessor().data(); + + int pixelFormat = TJPF_RGB; + + auto ret = tjDecompress2(tjInstance, datap, data.numel(), ptr, width, 0, height, + pixelFormat, NULL); + if(ret != 0){ + tjDestroy(tjInstance); + TORCH_CHECK(false, "decompressing JPEG image"); + } + + return tensor; +} diff --git a/torchvision/csrc/cpu/image/readjpeg_cpu.h b/torchvision/csrc/cpu/image/readjpeg_cpu.h new file mode 100644 index 00000000000..40404df29b5 --- /dev/null +++ b/torchvision/csrc/cpu/image/readjpeg_cpu.h @@ -0,0 +1,5 @@ +#pragma once + +#include + +torch::Tensor decodeJPEG(const torch::Tensor& data); diff --git a/torchvision/csrc/image.h b/torchvision/csrc/image.h new file mode 100644 index 00000000000..85669fbdc75 --- /dev/null +++ b/torchvision/csrc/image.h @@ -0,0 +1,3 @@ +#pragma once + +#include "cpu/image/readjpeg_cpu.h" diff --git a/torchvision/csrc/vision.cpp b/torchvision/csrc/vision.cpp index ed8d4134831..1eb517641ac 100644 --- a/torchvision/csrc/vision.cpp +++ b/torchvision/csrc/vision.cpp @@ -11,6 +11,9 @@ #include "ROIAlign.h" #include "ROIPool.h" #include "empty_tensor_op.h" +#ifdef __linux__ +#include "image.h" +#endif #include "nms.h" // If we are in a Windows environment, we need to define @@ -49,4 +52,7 @@ static auto registry = .op("torchvision::ps_roi_align", &ps_roi_align) .op("torchvision::ps_roi_pool", &ps_roi_pool) .op("torchvision::deform_conv2d", &deform_conv2d) +#ifdef __linux__ + .op("torchvision::decode_jpeg", &decodeJPEG) +#endif .op("torchvision::_cuda_version", &_cuda_version); diff --git a/torchvision/io/image.py b/torchvision/io/image.py new file mode 100644 index 00000000000..73baea3ca9c --- /dev/null +++ b/torchvision/io/image.py @@ -0,0 +1,47 @@ +import torch +from torch import nn, Tensor +import os + + +def decode_jpeg(input): + # type: (Tensor) -> Tensor + """ + Decodes a JPEG image into a 3 dimensional RGB Tensor. + The values of the output tensor are uint8 between 0 and 255. + Arguments: + input (Tensor[1]): a one dimensional int8 tensor containing + the raw bytes of the JPEG image. + Returns: + output (Tensor[image_width, image_height, 3]) + """ + if not isinstance(input, torch.Tensor) or len(input) == 0 or input.ndim != 1: + raise ValueError("Expected a non empty 1-dimensional tensor.") + + if not input.dtype == torch.uint8: + raise ValueError("Expected a torch.uint8 tensor.") + + try: + output = torch.ops.torchvision.decode_jpeg(input) + except RuntimeError: + raise ValueError("Invalid jpeg input.") + return output + + +def read_jpeg(path): + # type: (str) -> Tensor + """ + Reads a JPEG image into a 3 dimensional RGB Tensor. + The values of the output tensor are uint8 between 0 and 255. + Arguments: + path (str): path of the JPEG image. + Returns: + output (Tensor[image_width, image_height, 3]) + """ + if not os.path.isfile(path): + raise ValueError("Expected a valid file path.") + + size = os.path.getsize(path) + if size == 0: + raise ValueError("Expected a non empty file.") + data = torch.from_file(path, dtype=torch.uint8, size=size) + return decode_jpeg(data) From ab07703e9c77dfd31b185fb6e8ef29125a992be8 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Mon, 24 Feb 2020 07:16:38 +0100 Subject: [PATCH 03/28] Improve jpeg testing strategy. --- test/test_image.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/test_image.py b/test/test_image.py index 0ec39905486..ac90c76f4fe 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -35,7 +35,9 @@ def test_read_jpeg(self): for img_path in get_images(IMAGE_DIR, ".jpg"): img_tjpeg = read_with_pyturbojpeg(img_path) img_ljpeg = read_jpeg(img_path) - self.assertTrue(torch.equal(img_ljpeg, img_tjpeg)) + + err = torch.abs(img_ljpeg.flatten().float() - img_tjpeg.flatten().float()).sum().float() / (img_ljpeg.shape[0] * img_ljpeg.shape[1] * img_ljpeg.shape[2] * 255) + self.assertLessEqual(err, 1e-2) @unittest.skipUnless(sys.platform.startswith("linux"), "Support only available on linux for now.") def test_decode_jpeg(self): @@ -43,7 +45,10 @@ def test_decode_jpeg(self): img_tjpeg = read_with_pyturbojpeg(img_path) size = os.path.getsize(img_path) img_ljpeg = decode_jpeg(torch.from_file(img_path, dtype=torch.uint8, size=size)) - self.assertTrue(torch.equal(img_ljpeg, img_tjpeg)) + + err = torch.abs(img_ljpeg.flatten().float() - img_tjpeg.flatten().float()).sum().float() / (img_ljpeg.shape[0] * img_ljpeg.shape[1] * img_ljpeg.shape[2] * 255) + + self.assertLessEqual(err, 1e-2) with self.assertRaisesRegex(ValueError, "Expected a non empty 1-dimensional tensor."): decode_jpeg(torch.empty((100, 1), dtype=torch.uint8)) From db586c185ffb7185a09441c70524ce6f7f073d40 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 15:40:02 +0100 Subject: [PATCH 04/28] fix dynamic linking --- packaging/torchvision/meta.yaml | 3 ++- setup.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index a97bc429e32..cf60a657f87 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -7,7 +7,8 @@ source: requirements: build: - - {{ compiler('c') }} # [win] + - {{ compiler('c') }} + - {{ compiler('cxx') }} host: - python diff --git a/setup.py b/setup.py index 563290e4074..955679ce8aa 100644 --- a/setup.py +++ b/setup.py @@ -92,11 +92,13 @@ def get_extensions(): libraries = [] extra_compile_args = {} third_party_search_directories = [] + runtime_library_dirs = [] if sys.platform.startswith('linux'): sources = sources + source_image_cpu libraries.append('turbojpeg') third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo")) + runtime_library_dirs = ['lib'] extension = CppExtension @@ -160,8 +162,8 @@ def get_extensions(): include_dirs=include_dirs + third_party_search_directories, define_macros=define_macros, extra_compile_args=extra_compile_args, - runtime_library_dirs=["lib"] - ) + runtime_library_dirs=runtime_library_dirs + ) ] if compile_cpp_tests: ext_modules.append( From 6228f72640865df452c6c070d65da4b2d565ecbf Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 15:56:37 +0100 Subject: [PATCH 05/28] Change library location --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 955679ce8aa..f360555b728 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def get_extensions(): sources = sources + source_image_cpu libraries.append('turbojpeg') third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo")) - runtime_library_dirs = ['lib'] + runtime_library_dirs = ['.'] extension = CppExtension @@ -239,7 +239,7 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): data_files = [ - ('torchvision/lib', [ + ('torchvision', [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From f8307f4b8af2b96d1fe6f317f0b9c0677b8bd0fd Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 16:07:29 +0100 Subject: [PATCH 06/28] Fix Tests --- test/test_image.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/test_image.py b/test/test_image.py index ac90c76f4fe..1d4e7eabb4e 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -6,7 +6,7 @@ import torchvision if sys.platform.startswith('linux'): from torchvision.io.image import read_jpeg, decode_jpeg - from turbojpeg import TurboJPEG, TJPF_RGB + from PIL import Image import numpy as np @@ -22,31 +22,24 @@ def get_images(directory, img_ext): yield os.path.join(root, fl) -def read_with_pyturbojpeg(img_path): - jpeg = TurboJPEG() - for img_path in get_images(IMAGE_DIR, ".jpg"): - with open(img_path, 'rb') as f: - return torch.from_numpy(jpeg.decode(f.read(), pixel_format=TJPF_RGB)) - - class ImageTester(unittest.TestCase): @unittest.skipUnless(sys.platform.startswith("linux"), "Support only available on linux for now.") def test_read_jpeg(self): for img_path in get_images(IMAGE_DIR, ".jpg"): - img_tjpeg = read_with_pyturbojpeg(img_path) + img_pil = torch.from_numpy(np.array(Image.open(img_path))) img_ljpeg = read_jpeg(img_path) - err = torch.abs(img_ljpeg.flatten().float() - img_tjpeg.flatten().float()).sum().float() / (img_ljpeg.shape[0] * img_ljpeg.shape[1] * img_ljpeg.shape[2] * 255) + err = torch.abs(img_ljpeg.flatten().float() - img_pil.flatten().float()).sum().float() / (img_ljpeg.shape[0] * img_ljpeg.shape[1] * img_ljpeg.shape[2] * 255) self.assertLessEqual(err, 1e-2) @unittest.skipUnless(sys.platform.startswith("linux"), "Support only available on linux for now.") def test_decode_jpeg(self): for img_path in get_images(IMAGE_DIR, ".jpg"): - img_tjpeg = read_with_pyturbojpeg(img_path) + img_pil = torch.from_numpy(np.array(Image.open(img_path))) size = os.path.getsize(img_path) img_ljpeg = decode_jpeg(torch.from_file(img_path, dtype=torch.uint8, size=size)) - err = torch.abs(img_ljpeg.flatten().float() - img_tjpeg.flatten().float()).sum().float() / (img_ljpeg.shape[0] * img_ljpeg.shape[1] * img_ljpeg.shape[2] * 255) + err = torch.abs(img_ljpeg.flatten().float() - img_pil.flatten().float()).sum().float() / (img_ljpeg.shape[0] * img_ljpeg.shape[1] * img_ljpeg.shape[2] * 255) self.assertLessEqual(err, 1e-2) From 9eaa1c31d6da8b9efd091a958839c00f16d5e7c4 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 17:25:53 +0100 Subject: [PATCH 07/28] Add's whitelist_dso options for libjpeg-turbo --- packaging/torchvision/meta.yaml | 10 ++++++++-- setup.py | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index cf60a657f87..57d8a9053cc 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -7,8 +7,8 @@ source: requirements: build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} host: - python @@ -34,6 +34,12 @@ build: - NVCC_FLAGS features: {{ environ.get('CONDA_CPUONLY_FEATURE') }} + rpaths: + - lib + missing_dso_withelist: + - lib/libturbojpeg.so.0 # [linux] + - lib/libturbojpeg.so # [linux] + test: imports: diff --git a/setup.py b/setup.py index f360555b728..f5eab7adf0a 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def get_extensions(): sources = sources + source_image_cpu libraries.append('turbojpeg') third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo")) - runtime_library_dirs = ['.'] + runtime_library_dirs = ['lib'] extension = CppExtension @@ -226,7 +226,7 @@ def build_deps(): if sys.platform.startswith('linux'): cpu_count = multiprocessing.cpu_count() os.chdir("third_party/libjpeg-turbo/") - throw_of_failure('cmake .') + throw_of_failure('cmake -DENABLE_STATIC=OFF -DREQUIRE_SIMD=TRUE .') throw_of_failure("cmake --build . -- -j {}".format(cpu_count)) os.chdir(this_dir) @@ -239,7 +239,7 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): data_files = [ - ('torchvision', [ + ('torchvision/lib', [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From ccda5d3a8359cfa029d8a19a827bdf9b1c07837b Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 17:30:57 +0100 Subject: [PATCH 08/28] Install nasm compiler in conda --- packaging/build_conda.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index 9ec011d7d75..882f6160bf3 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -11,4 +11,5 @@ setup_conda_pytorch_constraint setup_conda_cudatoolkit_constraint setup_visual_studio_constraint setup_junit_results_folder +conda install -c anaconda nasm conda build $CONDA_CHANNEL_FLAGS -c defaults -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision From 757b36718fdfd3a8628365f3bb3ce7275f911342 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 17:37:48 +0100 Subject: [PATCH 09/28] Install nasm in travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 51b518833ea..5642874dd7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,7 @@ before_install: - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r + - sudo apt-get install -y nasm - conda config --set always_yes yes --set changeps1 no # Useful for debugging any issues with conda - conda info -a From 8fd4c9287560dee91dce6876ca79a1d0ca42a293 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:03:24 +0100 Subject: [PATCH 10/28] fix nasm install --- packaging/build_conda.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index 882f6160bf3..94b1ca82224 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -11,5 +11,5 @@ setup_conda_pytorch_constraint setup_conda_cudatoolkit_constraint setup_visual_studio_constraint setup_junit_results_folder -conda install -c anaconda nasm +conda install -c anaconda -yq nasm conda build $CONDA_CHANNEL_FLAGS -c defaults -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision From 6c78a05d90ae0f3ee30c70fddde473f1c9dcae0f Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:08:54 +0100 Subject: [PATCH 11/28] Update meta.yml --- packaging/torchvision/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 57d8a9053cc..377ca48c3f7 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -37,8 +37,8 @@ build: rpaths: - lib missing_dso_withelist: - - lib/libturbojpeg.so.0 # [linux] - - lib/libturbojpeg.so # [linux] + - */libturbojpeg.so.0 # [linux] + - */libturbojpeg.so # [linux] test: From b17c1f8051555eb30e3bc61e6d4af79b74ad8376 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:10:30 +0100 Subject: [PATCH 12/28] update meta.yml --- packaging/torchvision/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 377ca48c3f7..27c6d862f3d 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -37,8 +37,8 @@ build: rpaths: - lib missing_dso_withelist: - - */libturbojpeg.so.0 # [linux] - - */libturbojpeg.so # [linux] + - '*/libturbojpeg.so.0' # [linux] + - '*/libturbojpeg.so' # [linux] test: From 954f747483cf436b3fe0dc7936099a06243d1895 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:33:50 +0100 Subject: [PATCH 13/28] trying to accomodate conda --- setup.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index f5eab7adf0a..d4d57f95a1e 100644 --- a/setup.py +++ b/setup.py @@ -238,11 +238,19 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): - data_files = [ - ('torchvision/lib', [ - 'third_party/libjpeg-turbo/libturbojpeg.so.0', - 'third_party/libjpeg-turbo/libturbojpeg.so']) - ] + if 'PREFIX' in os.environ: + py_minor = sys.version_info.micro + data_files = [ + ('$PREFIX/lib/python3.{}/site-packages/torchvision/lib'.format(py_minor), [ + 'third_party/libjpeg-turbo/libturbojpeg.so.0', + 'third_party/libjpeg-turbo/libturbojpeg.so']) + ] + else: + data_files = [ + ('torchvision/lib', [ + 'third_party/libjpeg-turbo/libturbojpeg.so.0', + 'third_party/libjpeg-turbo/libturbojpeg.so']) + ] setup( # Metadata From e296312b884e856c59eb4acf30ca0cbf852c3928 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:35:01 +0100 Subject: [PATCH 14/28] Accomodate conda --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d4d57f95a1e..9513a0950eb 100644 --- a/setup.py +++ b/setup.py @@ -241,7 +241,7 @@ def build_ext_with_dependencies(self): if 'PREFIX' in os.environ: py_minor = sys.version_info.micro data_files = [ - ('$PREFIX/lib/python3.{}/site-packages/torchvision/lib'.format(py_minor), [ + ('lib/python3.{}/site-packages/torchvision/lib'.format(py_minor), [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From bcc6a5918d9883bce520f928b5b66ce314c0fa9a Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:44:07 +0100 Subject: [PATCH 15/28] Correction version of python version --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9513a0950eb..1da13c8c253 100644 --- a/setup.py +++ b/setup.py @@ -238,10 +238,10 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): - if 'PREFIX' in os.environ: - py_minor = sys.version_info.micro + if 'PREFIX' in os.environ and 'PYTHON_VERSION' in os.environ: + py_minor = os.environ['PYTHON_VERSION'] data_files = [ - ('lib/python3.{}/site-packages/torchvision/lib'.format(py_minor), [ + ('lib/python{}/site-packages/torchvision/lib'.format(py_minor), [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From 57b197f9e7aaae0d8cf83e83fc78822989113fb0 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:53:38 +0100 Subject: [PATCH 16/28] attempt conda build --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1da13c8c253..214aa0a5420 100644 --- a/setup.py +++ b/setup.py @@ -238,7 +238,7 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): - if 'PREFIX' in os.environ and 'PYTHON_VERSION' in os.environ: + if os.environ.get('BUILD_TYPE', "") == "CONDA": py_minor = os.environ['PYTHON_VERSION'] data_files = [ ('lib/python{}/site-packages/torchvision/lib'.format(py_minor), [ From ff39772046db3fe897596fb5aec6b19f94ce2ce1 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 21:59:17 +0100 Subject: [PATCH 17/28] again conda --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 214aa0a5420..18cc0183c72 100644 --- a/setup.py +++ b/setup.py @@ -238,7 +238,7 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): - if os.environ.get('BUILD_TYPE', "") == "CONDA": + if os.environ.get('BUILD_TYPE', "") == "conda": py_minor = os.environ['PYTHON_VERSION'] data_files = [ ('lib/python{}/site-packages/torchvision/lib'.format(py_minor), [ From 16fcb4ed3a7365468b7e07c3e75565064a4b77cb Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 22:09:33 +0100 Subject: [PATCH 18/28] Hardcoding to understand what's happening --- setup.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/setup.py b/setup.py index 18cc0183c72..8be821e6b57 100644 --- a/setup.py +++ b/setup.py @@ -238,19 +238,19 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): - if os.environ.get('BUILD_TYPE', "") == "conda": - py_minor = os.environ['PYTHON_VERSION'] - data_files = [ - ('lib/python{}/site-packages/torchvision/lib'.format(py_minor), [ - 'third_party/libjpeg-turbo/libturbojpeg.so.0', - 'third_party/libjpeg-turbo/libturbojpeg.so']) - ] - else: - data_files = [ - ('torchvision/lib', [ - 'third_party/libjpeg-turbo/libturbojpeg.so.0', - 'third_party/libjpeg-turbo/libturbojpeg.so']) - ] +#if os.environ.get('BUILD_TYPE', "") == "conda": + py_minor = os.environ['PYTHON_VERSION'] + data_files = [ + ('lib/python3.7/site-packages/torchvision/lib'.format(py_minor), [ + 'third_party/libjpeg-turbo/libturbojpeg.so.0', + 'third_party/libjpeg-turbo/libturbojpeg.so']) + ] + # else: + # data_files = [ + # ('torchvision/lib', [ + # 'third_party/libjpeg-turbo/libturbojpeg.so.0', + # 'third_party/libjpeg-turbo/libturbojpeg.so']) + # ] setup( # Metadata From 9fdf05019ad3254bbb7905d8eb275b424f50fcc6 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 22:13:34 +0100 Subject: [PATCH 19/28] fix conda --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8be821e6b57..754798406f3 100644 --- a/setup.py +++ b/setup.py @@ -239,9 +239,8 @@ def build_ext_with_dependencies(self): data_files = [] if sys.platform.startswith('linux'): #if os.environ.get('BUILD_TYPE', "") == "conda": - py_minor = os.environ['PYTHON_VERSION'] data_files = [ - ('lib/python3.7/site-packages/torchvision/lib'.format(py_minor), [ + ('lib/python3.7/site-packages/torchvision/lib', [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From 37f5a0d44d0d6081a693c6b6d1727e9d17385bcb Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 22:22:05 +0100 Subject: [PATCH 20/28] update glob in meta.yml --- packaging/torchvision/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 27c6d862f3d..6626a7f51ee 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -37,8 +37,8 @@ build: rpaths: - lib missing_dso_withelist: - - '*/libturbojpeg.so.0' # [linux] - - '*/libturbojpeg.so' # [linux] + - '**/libturbojpeg.so.0' # [linux] + - '**/libturbojpeg.so' # [linux] test: From f76ffba9bbb5813b485c4b615cc2f6c85548bbaf Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 22:23:22 +0100 Subject: [PATCH 21/28] update missing_dso --- packaging/torchvision/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 6626a7f51ee..30a93239f56 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -37,8 +37,8 @@ build: rpaths: - lib missing_dso_withelist: - - '**/libturbojpeg.so.0' # [linux] - - '**/libturbojpeg.so' # [linux] + - '$RPATH/libturbojpeg.so.0' # [linux] + - '$RPATH/libturbojpeg.so' # [linux] test: From faf5f7a21b43aa8e8f7a559a16a847865dcffea7 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 22:25:40 +0100 Subject: [PATCH 22/28] Deactivates pipelines --- .circleci/config.yml | 795 +--------------------------------------- .circleci/regenerate.py | 9 +- setup.py | 2 +- 3 files changed, 7 insertions(+), 799 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9668b59915f..379a3617f39 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -314,182 +314,10 @@ workflows: build: jobs: - circleci_consistency - - binary_linux_wheel: - cu_version: cpu - name: binary_linux_wheel_py3.5_cpu - python_version: '3.5' - - binary_linux_wheel: - cu_version: cu92 - name: binary_linux_wheel_py3.5_cu92 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_wheel: - cu_version: cu100 - name: binary_linux_wheel_py3.5_cu100 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_wheel: - cu_version: cu101 - name: binary_linux_wheel_py3.5_cu101 - python_version: '3.5' - - binary_linux_wheel: - cu_version: cpu - name: binary_linux_wheel_py3.6_cpu - python_version: '3.6' - - binary_linux_wheel: - cu_version: cu92 - name: binary_linux_wheel_py3.6_cu92 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_wheel: - cu_version: cu100 - name: binary_linux_wheel_py3.6_cu100 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_wheel: - cu_version: cu101 - name: binary_linux_wheel_py3.6_cu101 - python_version: '3.6' - - binary_linux_wheel: - cu_version: cpu - name: binary_linux_wheel_py3.7_cpu - python_version: '3.7' - - binary_linux_wheel: - cu_version: cu92 - name: binary_linux_wheel_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_wheel: - cu_version: cu100 - name: binary_linux_wheel_py3.7_cu100 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_wheel: - cu_version: cu101 - name: binary_linux_wheel_py3.7_cu101 - python_version: '3.7' - - binary_linux_wheel: - cu_version: cpu - name: binary_linux_wheel_py3.8_cpu - python_version: '3.8' - - binary_linux_wheel: - cu_version: cu92 - name: binary_linux_wheel_py3.8_cu92 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_wheel: - cu_version: cu100 - name: binary_linux_wheel_py3.8_cu100 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_wheel: - cu_version: cu101 - name: binary_linux_wheel_py3.8_cu101 - python_version: '3.8' - - binary_macos_wheel: - cu_version: cpu - name: binary_macos_wheel_py3.5_cpu - python_version: '3.5' - - binary_macos_wheel: - cu_version: cpu - name: binary_macos_wheel_py3.6_cpu - python_version: '3.6' - - binary_macos_wheel: - cu_version: cpu - name: binary_macos_wheel_py3.7_cpu - python_version: '3.7' - - binary_macos_wheel: - cu_version: cpu - name: binary_macos_wheel_py3.8_cpu - python_version: '3.8' - binary_linux_conda: cu_version: cpu name: binary_linux_conda_py3.5_cpu python_version: '3.5' - - binary_linux_conda: - cu_version: cu92 - name: binary_linux_conda_py3.5_cu92 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: - cu_version: cu100 - name: binary_linux_conda_py3.5_cu100 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_conda: - cu_version: cu101 - name: binary_linux_conda_py3.5_cu101 - python_version: '3.5' - - binary_linux_conda: - cu_version: cpu - name: binary_linux_conda_py3.6_cpu - python_version: '3.6' - - binary_linux_conda: - cu_version: cu92 - name: binary_linux_conda_py3.6_cu92 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: - cu_version: cu100 - name: binary_linux_conda_py3.6_cu100 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_conda: - cu_version: cu101 - name: binary_linux_conda_py3.6_cu101 - python_version: '3.6' - - binary_linux_conda: - cu_version: cpu - name: binary_linux_conda_py3.7_cpu - python_version: '3.7' - - binary_linux_conda: - cu_version: cu92 - name: binary_linux_conda_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: - cu_version: cu100 - name: binary_linux_conda_py3.7_cu100 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_conda: - cu_version: cu101 - name: binary_linux_conda_py3.7_cu101 - python_version: '3.7' - - binary_linux_conda: - cu_version: cpu - name: binary_linux_conda_py3.8_cpu - python_version: '3.8' - - binary_linux_conda: - cu_version: cu92 - name: binary_linux_conda_py3.8_cu92 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: - cu_version: cu100 - name: binary_linux_conda_py3.8_cu100 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_linux_conda: - cu_version: cu101 - name: binary_linux_conda_py3.8_cu101 - python_version: '3.8' - - binary_macos_conda: - cu_version: cpu - name: binary_macos_conda_py3.5_cpu - python_version: '3.5' - - binary_macos_conda: - cu_version: cpu - name: binary_macos_conda_py3.6_cpu - python_version: '3.6' - - binary_macos_conda: - cu_version: cpu - name: binary_macos_conda_py3.7_cpu - python_version: '3.7' - - binary_macos_conda: - cu_version: cpu - name: binary_macos_conda_py3.8_cpu - python_version: '3.8' - binary_linux_conda_cuda: name: torchvision_linux_py3.7_cu100 python_version: "3.7" @@ -506,334 +334,6 @@ workflows: nightly: jobs: - circleci_consistency - - binary_linux_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cpu - python_version: '3.5' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cpu_upload - requires: - - nightly_binary_linux_wheel_py3.5_cpu - subfolder: cpu/ - - binary_linux_wheel: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cu92 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cu92_upload - requires: - - nightly_binary_linux_wheel_py3.5_cu92 - subfolder: cu92/ - - binary_linux_wheel: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cu100 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cu100_upload - requires: - - nightly_binary_linux_wheel_py3.5_cu100 - subfolder: cu100/ - - binary_linux_wheel: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cu101 - python_version: '3.5' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.5_cu101_upload - requires: - - nightly_binary_linux_wheel_py3.5_cu101 - subfolder: cu101/ - - binary_linux_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cpu - python_version: '3.6' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cpu_upload - requires: - - nightly_binary_linux_wheel_py3.6_cpu - subfolder: cpu/ - - binary_linux_wheel: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cu92 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cu92_upload - requires: - - nightly_binary_linux_wheel_py3.6_cu92 - subfolder: cu92/ - - binary_linux_wheel: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cu100 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cu100_upload - requires: - - nightly_binary_linux_wheel_py3.6_cu100 - subfolder: cu100/ - - binary_linux_wheel: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cu101 - python_version: '3.6' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.6_cu101_upload - requires: - - nightly_binary_linux_wheel_py3.6_cu101 - subfolder: cu101/ - - binary_linux_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cpu - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cpu_upload - requires: - - nightly_binary_linux_wheel_py3.7_cpu - subfolder: cpu/ - - binary_linux_wheel: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cu92_upload - requires: - - nightly_binary_linux_wheel_py3.7_cu92 - subfolder: cu92/ - - binary_linux_wheel: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cu100 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cu100_upload - requires: - - nightly_binary_linux_wheel_py3.7_cu100 - subfolder: cu100/ - - binary_linux_wheel: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cu101 - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.7_cu101_upload - requires: - - nightly_binary_linux_wheel_py3.7_cu101 - subfolder: cu101/ - - binary_linux_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cpu - python_version: '3.8' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cpu_upload - requires: - - nightly_binary_linux_wheel_py3.8_cpu - subfolder: cpu/ - - binary_linux_wheel: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cu92 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cu92_upload - requires: - - nightly_binary_linux_wheel_py3.8_cu92 - subfolder: cu92/ - - binary_linux_wheel: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cu100 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cu100_upload - requires: - - nightly_binary_linux_wheel_py3.8_cu100 - subfolder: cu100/ - - binary_linux_wheel: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cu101 - python_version: '3.8' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_wheel_py3.8_cu101_upload - requires: - - nightly_binary_linux_wheel_py3.8_cu101 - subfolder: cu101/ - - binary_macos_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.5_cpu - python_version: '3.5' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.5_cpu_upload - requires: - - nightly_binary_macos_wheel_py3.5_cpu - subfolder: '' - - binary_macos_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.6_cpu - python_version: '3.6' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.6_cpu_upload - requires: - - nightly_binary_macos_wheel_py3.6_cpu - subfolder: '' - - binary_macos_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.7_cpu - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.7_cpu_upload - requires: - - nightly_binary_macos_wheel_py3.7_cpu - subfolder: '' - - binary_macos_wheel: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.8_cpu - python_version: '3.8' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_wheel_py3.8_cpu_upload - requires: - - nightly_binary_macos_wheel_py3.8_cpu - subfolder: '' - binary_linux_conda: cu_version: cpu filters: @@ -848,297 +348,4 @@ workflows: only: nightly name: nightly_binary_linux_conda_py3.5_cpu_upload requires: - - nightly_binary_linux_conda_py3.5_cpu - - binary_linux_conda: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_cu92 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_cu92_upload - requires: - - nightly_binary_linux_conda_py3.5_cu92 - - binary_linux_conda: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_cu100 - python_version: '3.5' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_cu100_upload - requires: - - nightly_binary_linux_conda_py3.5_cu100 - - binary_linux_conda: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_cu101 - python_version: '3.5' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.5_cu101_upload - requires: - - nightly_binary_linux_conda_py3.5_cu101 - - binary_linux_conda: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cpu - python_version: '3.6' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cpu_upload - requires: - - nightly_binary_linux_conda_py3.6_cpu - - binary_linux_conda: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cu92 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cu92_upload - requires: - - nightly_binary_linux_conda_py3.6_cu92 - - binary_linux_conda: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cu100 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cu100_upload - requires: - - nightly_binary_linux_conda_py3.6_cu100 - - binary_linux_conda: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cu101 - python_version: '3.6' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.6_cu101_upload - requires: - - nightly_binary_linux_conda_py3.6_cu101 - - binary_linux_conda: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cpu - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cpu_upload - requires: - - nightly_binary_linux_conda_py3.7_cpu - - binary_linux_conda: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cu92_upload - requires: - - nightly_binary_linux_conda_py3.7_cu92 - - binary_linux_conda: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cu100 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cu100_upload - requires: - - nightly_binary_linux_conda_py3.7_cu100 - - binary_linux_conda: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cu101 - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.7_cu101_upload - requires: - - nightly_binary_linux_conda_py3.7_cu101 - - binary_linux_conda: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cpu - python_version: '3.8' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cpu_upload - requires: - - nightly_binary_linux_conda_py3.8_cpu - - binary_linux_conda: - cu_version: cu92 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cu92 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cu92_upload - requires: - - nightly_binary_linux_conda_py3.8_cu92 - - binary_linux_conda: - cu_version: cu100 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cu100 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda100 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cu100_upload - requires: - - nightly_binary_linux_conda_py3.8_cu100 - - binary_linux_conda: - cu_version: cu101 - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cu101 - python_version: '3.8' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_linux_conda_py3.8_cu101_upload - requires: - - nightly_binary_linux_conda_py3.8_cu101 - - binary_macos_conda: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.5_cpu - python_version: '3.5' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.5_cpu_upload - requires: - - nightly_binary_macos_conda_py3.5_cpu - - binary_macos_conda: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.6_cpu - python_version: '3.6' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.6_cpu_upload - requires: - - nightly_binary_macos_conda_py3.6_cpu - - binary_macos_conda: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.7_cpu - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.7_cpu_upload - requires: - - nightly_binary_macos_conda_py3.7_cpu - - binary_macos_conda: - cu_version: cpu - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.8_cpu - python_version: '3.8' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - name: nightly_binary_macos_conda_py3.8_cpu_upload - requires: - - nightly_binary_macos_conda_py3.8_cpu \ No newline at end of file + - nightly_binary_linux_conda_py3.5_cpu \ No newline at end of file diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 8931dfd2dc6..e4029ec7a5b 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -21,10 +21,11 @@ def workflows(prefix='', filter_branch=None, upload=False, indentation=6): w = [] - for btype in ["wheel", "conda"]: - for os_type in ["linux", "macos"]: - for python_version in ["3.5", "3.6", "3.7", "3.8"]: - for cu_version in (["cpu", "cu92", "cu100", "cu101"] if os_type == "linux" else ["cpu"]): + for btype in ["conda"]: + for os_type in ["linux"]:# , "macos"]: + for python_version in ["3.5"]:# , "3.6", "3.7", "3.8"]: + # for cu_version in (["cpu", "cu92", "cu100", "cu101"] if os_type == "linux" else ["cpu"]): + for cu_version in ["cpu"]: for unicode in ([False, True] if btype == "wheel" and python_version == "2.7" else [False]): w += workflow_pair( btype, os_type, python_version, cu_version, diff --git a/setup.py b/setup.py index 754798406f3..290567c50bf 100644 --- a/setup.py +++ b/setup.py @@ -240,7 +240,7 @@ def build_ext_with_dependencies(self): if sys.platform.startswith('linux'): #if os.environ.get('BUILD_TYPE', "") == "conda": data_files = [ - ('lib/python3.7/site-packages/torchvision/lib', [ + ('lib/python3.5/site-packages/torchvision/lib', [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From 534068ba07607d8430da381e1f6c04981f02f600 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 22:33:05 +0100 Subject: [PATCH 23/28] Update rpath for conda --- packaging/torchvision/meta.yaml | 3 +-- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 30a93239f56..b0ebba87f64 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -37,8 +37,7 @@ build: rpaths: - lib missing_dso_withelist: - - '$RPATH/libturbojpeg.so.0' # [linux] - - '$RPATH/libturbojpeg.so' # [linux] + - '*' test: diff --git a/setup.py b/setup.py index 290567c50bf..14385662969 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def get_extensions(): sources = sources + source_image_cpu libraries.append('turbojpeg') third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo")) - runtime_library_dirs = ['lib'] + runtime_library_dirs = ['$PREFIX/lib/python3.5/site-packages/torchvision/lib'] extension = CppExtension @@ -240,7 +240,7 @@ def build_ext_with_dependencies(self): if sys.platform.startswith('linux'): #if os.environ.get('BUILD_TYPE', "") == "conda": data_files = [ - ('lib/python3.5/site-packages/torchvision/lib', [ + ('$PREFIX/lib/python3.5/site-packages/torchvision/lib', [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From 6a0ff239a62ca9eb33aeeb859c13806ab9f972e0 Mon Sep 17 00:00:00 2001 From: Ryad ZENINE Date: Sun, 8 Mar 2020 22:41:58 +0100 Subject: [PATCH 24/28] Attemps withouth rpaths for extension --- packaging/torchvision/meta.yaml | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index b0ebba87f64..00a1fd623cd 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -35,7 +35,7 @@ build: features: {{ environ.get('CONDA_CPUONLY_FEATURE') }} rpaths: - - lib + - lib/ missing_dso_withelist: - '*' diff --git a/setup.py b/setup.py index 14385662969..097bab2e307 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def get_extensions(): sources = sources + source_image_cpu libraries.append('turbojpeg') third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo")) - runtime_library_dirs = ['$PREFIX/lib/python3.5/site-packages/torchvision/lib'] + # runtime_library_dirs = ['$PREFIX/lib/python3.5/site-packages/torchvision/lib'] extension = CppExtension @@ -240,7 +240,7 @@ def build_ext_with_dependencies(self): if sys.platform.startswith('linux'): #if os.environ.get('BUILD_TYPE', "") == "conda": data_files = [ - ('$PREFIX/lib/python3.5/site-packages/torchvision/lib', [ + ('lib/python3.5/site-packages/torchvision/lib', [ 'third_party/libjpeg-turbo/libturbojpeg.so.0', 'third_party/libjpeg-turbo/libturbojpeg.so']) ] From b9a3313fc4b18a8d253a4497483c004918cb45a0 Mon Sep 17 00:00:00 2001 From: Ryad Zenine <45363862+r-zenine@users.noreply.github.com> Date: Mon, 9 Mar 2020 06:58:03 +0100 Subject: [PATCH 25/28] whitelist '**/libturbojpeg.so.0' --- packaging/torchvision/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 00a1fd623cd..8928e2c7e97 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -37,7 +37,7 @@ build: rpaths: - lib/ missing_dso_withelist: - - '*' + - '**/libturbojpeg.so.0' test: From 6b89bbdf8cf8c5e702a500bd2ac5095fe827b8ef Mon Sep 17 00:00:00 2001 From: Ryad Zenine <45363862+r-zenine@users.noreply.github.com> Date: Mon, 9 Mar 2020 07:04:57 +0100 Subject: [PATCH 26/28] Update meta.yaml --- packaging/torchvision/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 8928e2c7e97..b624b150073 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -34,6 +34,7 @@ build: - NVCC_FLAGS features: {{ environ.get('CONDA_CPUONLY_FEATURE') }} + binary_relocation: False rpaths: - lib/ missing_dso_withelist: From a8f89c58537bd58e0f93c92267e7db9916014fda Mon Sep 17 00:00:00 2001 From: Ryad Zenine <45363862+r-zenine@users.noreply.github.com> Date: Mon, 9 Mar 2020 07:05:32 +0100 Subject: [PATCH 27/28] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 097bab2e307..290567c50bf 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def get_extensions(): sources = sources + source_image_cpu libraries.append('turbojpeg') third_party_search_directories.append(os.path.join(cwd, "third_party/libjpeg-turbo")) - # runtime_library_dirs = ['$PREFIX/lib/python3.5/site-packages/torchvision/lib'] + runtime_library_dirs = ['lib'] extension = CppExtension From adbbe466ac4ef7b139eb77be6be2b38981d36753 Mon Sep 17 00:00:00 2001 From: Ryad Zenine <45363862+r-zenine@users.noreply.github.com> Date: Mon, 9 Mar 2020 07:23:01 +0100 Subject: [PATCH 28/28] Reset compiler configuration --- packaging/torchvision/meta.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index b624b150073..03242cece89 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -7,8 +7,7 @@ source: requirements: build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} + - {{ compiler('c') }} # [win] host: - python