From 33e6ef508b72f5157277162ef7192582b1200882 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Mon, 14 Jun 2021 14:30:10 +0300 Subject: [PATCH 01/28] jetson 1.8 --- opt/build/onnxruntime/Dockerfile.jetson | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 opt/build/onnxruntime/Dockerfile.jetson diff --git a/opt/build/onnxruntime/Dockerfile.jetson b/opt/build/onnxruntime/Dockerfile.jetson new file mode 100755 index 000000000..eb2df3a48 --- /dev/null +++ b/opt/build/onnxruntime/Dockerfile.jetson @@ -0,0 +1,48 @@ +# BUILD redisfab/onnxruntime-${ARCH}-${OSNICK}:$(ONNXRUNTIME_VER) + +# stretch|bionic|buster +ARG OSNICK=buster + +# arm32v7|arm64v8 +ARG ARCH=jetson + +#---------------------------------------------------------------------------------------------- +ARG OS=nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base as builder + +FROM ${OS} as builder + +ARG ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime +ARG ONNXRUNTIME_VER=1.8.0 + +RUN apt-get -qq update +RUN apt-get -qq install -y curl wget tar git patch build-essential \ + build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ + python3.6 python3-pip python3-dev python3-numpy +RUN pip3 install --upgrade pip setuptools wheel + +RUN wget -q https://github.com/Kitware/CMake/releases/download/v3.19.7/cmake-3.19.7-Linux-aarch64.tar.gz -O /tmp/cmake.tgz +WORKDIR /tmp +RUN tar -zxpf /tmp/cmake.tgz +RUN mv /tmp/cmake*/bin/* /usr/bin +RUN mv /tmp/cmake-*/share/cmake* /usr/share/ + +RUN rm /usr/bin/python3 +RUN ln -s /usr/bin/python3.6 /usr/bin/python3 + +ENV LANG=en_US.UTF-8 +RUN apt-get install -y locales && \ + sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=$LANG +WORKDIR /build +ARG BUILDTYPE=Release +ARG BUILDARGS="--config ${BUILDTYPE} --parallel" +RUN git clone --single-branch --branch v${ONNXRUNTIME_VER} ${ONNXRUNTIME_REPO} onnxruntime +WORKDIR /build/onnxruntime +RUN git fetch --recurse-submodules +RUN ./build.sh ${BUILDARGS} --update --build +RUN ./build.sh ${BUILDARGS} --build_shared_lib +# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel +ADD ./pack.sh /build +WORKDIR /build +RUN ./pack.sh ${ONNXRUNTIME_VER} ${ARCH} From b101e59076e3c1b109775aeb55988b1116d4d5a1 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Jun 2021 10:17:57 +0300 Subject: [PATCH 02/28] 1.8 in the Makefile --- opt/build/onnxruntime/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index 1faaabae9..031d069cd 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -1,7 +1,7 @@ ROOT=. -VERSION ?= 1.7.1 +VERSION ?= 1.8 OSNICK ?= buster #---------------------------------------------------------------------------------------------- From be2a69d5580bb4bf2ca8eb3a317cdf20ee707796 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Jun 2021 14:12:55 +0300 Subject: [PATCH 03/28] starting single use --- opt/build/backends.rules | 29 + opt/build/onnxruntime/.gitignore | 1 + opt/build/onnxruntime/Dockerfile.arm | 53 -- opt/build/onnxruntime/Dockerfile.arm7 | 47 -- opt/build/onnxruntime/Dockerfile.x64 | 45 -- opt/build/onnxruntime/Makefile | 270 ++++--- .../{Dockerfile.jetson => dockerfile.tmpl} | 47 +- opt/build/onnxruntime/ort-0.4.0-werror.patch | 758 ----------------- opt/build/onnxruntime/werror.patch | 759 ------------------ opt/readies | 2 +- 10 files changed, 194 insertions(+), 1817 deletions(-) create mode 100644 opt/build/backends.rules create mode 100644 opt/build/onnxruntime/.gitignore delete mode 100755 opt/build/onnxruntime/Dockerfile.arm delete mode 100755 opt/build/onnxruntime/Dockerfile.arm7 delete mode 100755 opt/build/onnxruntime/Dockerfile.x64 rename opt/build/onnxruntime/{Dockerfile.jetson => dockerfile.tmpl} (61%) delete mode 100755 opt/build/onnxruntime/ort-0.4.0-werror.patch delete mode 100755 opt/build/onnxruntime/werror.patch diff --git a/opt/build/backends.rules b/opt/build/backends.rules new file mode 100644 index 000000000..4a77683aa --- /dev/null +++ b/opt/build/backends.rules @@ -0,0 +1,29 @@ +# default is x64 +ARCH=$(shell ${READIES}/bin/platform --arch) +REDIS_CMAKE_ARCH=x86_64 + +# jetson +ifeq ($(shell test -e /usr/share/doc/nvidia-l4t-jetson-io && echo -n yes),yes) +ARCH=jetson +REDIS_CMAKE_ARCH=aarch64 +else +endif + +export REDIS_CMAKE_ARCH + +DEFAULT_DOCKER_TAG=${DOCKER_ORG}/${PRODUCT}:buildsystem + +build: + REDIS_ARCH=${ARCH} \ + ${READIES}/bin/dockerwrapper \ + -d ${CURDIR}/Dockerfile \ + -t ${DEFAULT_DOCKER_TAG} \ + -e REDIS \ + -g \ + -D "${DOCKER_OPTS}" \ + ${DOCKER_ARGS} +# docker create --cidfile ${PRODUCT}.${ARCH}.cid ${DEFAULT_DOCKER_TAG} +# docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(1)-$(VERSION).tgz . + +publish: + @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read diff --git a/opt/build/onnxruntime/.gitignore b/opt/build/onnxruntime/.gitignore new file mode 100644 index 000000000..94143827e --- /dev/null +++ b/opt/build/onnxruntime/.gitignore @@ -0,0 +1 @@ +Dockerfile diff --git a/opt/build/onnxruntime/Dockerfile.arm b/opt/build/onnxruntime/Dockerfile.arm deleted file mode 100755 index 979b3e852..000000000 --- a/opt/build/onnxruntime/Dockerfile.arm +++ /dev/null @@ -1,53 +0,0 @@ -# BUILD redisfab/onnxruntime-${ARCH}-${OSNICK}:$(ONNXRUNTIME_VER) - -# stretch|bionic|buster -ARG OSNICK=buster - -# arm32v7|arm64v8 -ARG ARCH=arm64v8 - -#---------------------------------------------------------------------------------------------- -FROM redisfab/${ARCH}-xbuild:${OSNICK} as builder - -ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime -ARG ONNXRUNTIME_VER=1.0.0 -ARG ARCH_FLAG="--arm64" - -RUN [ "cross-build-start" ] - -RUN apt-get -qq update -RUN apt-get -qq install -y curl wget tar git patch -RUN apt-get -qq install -y build-essential cmake -RUN apt-get -qq install -y libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev - -RUN apt-get -q install -y python3 python3-pip python3-dev -RUN pip3 install --upgrade pip setuptools wheel -# RUN pip3 install numpy -RUN apt-get -q install -y python3-numpy - -WORKDIR /build - -ADD ./*.patch /build/ -ADD ./pack.sh /build/ - -ARG BUILDTYPE=MinSizeRel -ARG BUILDARGS="--config ${BUILDTYPE} ${ARCH_FLAG} --parallel" - -RUN set -e ;\ - git clone --single-branch --branch rel-${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime ;\ - cd onnxruntime ;\ - git checkout "rel-${ONNXRUNTIME_VER}" - -RUN set -e ;\ - cd onnxruntime ;\ - patch -p1 -i ../werror.patch - -RUN set -e ;\ - cd onnxruntime ;\ - ./build.sh ${BUILDARGS} --update --build ;\ - ./build.sh ${BUILDARGS} --build_shared_lib -# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel - -RUN ./pack.sh ${ONNXRUNTIME_VER} - -RUN [ "cross-build-end" ] diff --git a/opt/build/onnxruntime/Dockerfile.arm7 b/opt/build/onnxruntime/Dockerfile.arm7 deleted file mode 100755 index 4cfea0af0..000000000 --- a/opt/build/onnxruntime/Dockerfile.arm7 +++ /dev/null @@ -1,47 +0,0 @@ -FROM balenalib/raspberrypi3-python:latest-stretch-build - -ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime -ARG ONNXRUNTIME_BRANCH=rel-1.0.0 -ARG ONNXRUNTIME_VER=1.0.0 -ARG ARCH_FLAG="--arm" -ARG ARCH=arm64v7 - -RUN [ "cross-build-start" ] - -RUN set -e ;\ - apt-get -qq update \; - apt-get -q install -y - git tar wget curl \ - build-essential cmake \ - python3 python3-pip python3-dev \ - libcurl4-openssl-dev libssl-dev libatlas-base-dev - -RUN pip3 install --upgrade pip setuptools wheel -RUN pip3 install numpy - -WORKDIR /build - -ADD ./*.patch /build/ -ADD ./pack.sh /build/ - -ARG BUILDTYPE=MinSizeRel -ARG BUILDARGS="--config ${BUILDTYPE} ${ARM_FLAG} --parallel" - -RUN set -e ;\ - git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime ;\ - cd onnxruntime ;\ - git checkout "rel-${ONNXRUNTIME_VER}" - -RUN set -e ;\ - cd onnxruntime ;\ - patch -p1 -i ../werrror.patch - -RUN set -e ;\ - cd onnxruntime ;\ - ./build.sh ${BUILDARGS} --update --build ;\ - ./build.sh ${BUILDARGS} --build_shared_lib -# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel - -RUN ./pack.sh ${ONNXRUNTIME_VER} - -RUN [ "cross-build-end" ] diff --git a/opt/build/onnxruntime/Dockerfile.x64 b/opt/build/onnxruntime/Dockerfile.x64 deleted file mode 100755 index 8bbff41fb..000000000 --- a/opt/build/onnxruntime/Dockerfile.x64 +++ /dev/null @@ -1,45 +0,0 @@ -# BUILD redisfab/onnxruntime-x64-${OS}:$(ONNXRUNTIME_VER) -ARG OS=ubuntu:16.04 -#---------------------------------------------------------------------------------------------- -FROM ${OS} -ARG ONNXRUNTIME_REPO=https://github.com/RedisAI/onnxruntime -ARG ONNXRUNTIME_VER=1.7.1 -ARG ARCH=x64 - -RUN apt-get -qq update -RUN apt-get install -y software-properties-common -RUN add-apt-repository ppa:deadsnakes/ppa -RUN apt-get -qq update - -RUN apt-get -qq install -y python3.6 curl wget tar git \ - build-essential \ - libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ - python3 python3-pip python3-dev python3-numpy -RUN wget -q https://github.com/Kitware/CMake/releases/download/v3.19.7/cmake-3.19.7-Linux-x86_64.tar.gz -O /tmp/cmake.tgz -WORKDIR /tmp -RUN tar -zxpf /tmp/cmake.tgz -RUN mv /tmp/cmake*/bin/* /usr/bin -RUN mv /tmp/cmake-*/share/cmake* /usr/share/ - -RUN rm /usr/bin/python3 -RUN ln -s /usr/bin/python3.6 /usr/bin/python3 - -RUN pip3 install --upgrade pip setuptools wheel - -ENV LANG=en_US.UTF-8 -RUN apt-get install -y locales && \ - sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \ - dpkg-reconfigure --frontend=noninteractive locales && \ - update-locale LANG=$LANG -WORKDIR /build -ARG BUILDTYPE=Release -ARG BUILDARGS="--config ${BUILDTYPE} --parallel" -RUN git clone --single-branch --branch rel-${ONNXRUNTIME_VER} ${ONNXRUNTIME_REPO} onnxruntime -WORKDIR /build/onnxruntime -RUN git fetch --recurse-submodules -RUN ./build.sh ${BUILDARGS} --update --build -RUN ./build.sh ${BUILDARGS} --build_shared_lib -# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel -ADD ./pack.sh /build -WORKDIR /build -RUN ./pack.sh ${ONNXRUNTIME_VER} ${ARCH} diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index 031d069cd..c9a15bde4 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -1,134 +1,144 @@ +export REDIS_ONNX_VERSION = 1.8.0 +export REDIS_ONNX_REPO = https://github.com/microsoft/onnxruntime -ROOT=. - -VERSION ?= 1.8 +PRODUCT=onnxruntime +DOCKER_ORG=redislabs OSNICK ?= buster -#---------------------------------------------------------------------------------------------- - -S3_URL=redismodules/onnxruntime - -STEM=onnxruntime-linux - -KEEP ?= 1 - -DOCKER_OS.bionic=ubuntu:bionic -DOCKER_OS.stretch=debian:stretch-slim -DOCKER_OS.buster=debian:buster-slim -DOCKER_OS=$(DOCKER_OS.$(OSNICK)) - -#---------------------------------------------------------------------------------------------- - -define targets # (1=OP, 2=op) -$(1)_TARGETS := -$(1)_TARGETS += $(if $(findstring $(X64),1),$(2)_x64) -$(1)_TARGETS += $(if $(findstring $(ARM7),1),$(2)_arm32v7) -$(1)_TARGETS += $(if $(findstring $(ARM8),1),$(2)_arm64v8) - -$(1)_TARGETS += $$(if $$(strip $$($(1)_TARGETS)),,$(2)_x64 $(2)_arm32v7 $(2)_arm64v8) -endef - -$(eval $(call targets,BUILD,build)) -$(eval $(call targets,PUBLISH,publish)) - -#---------------------------------------------------------------------------------------------- -# arch=x64|arm32v7|arm64v8 -# tar_arch=x86_64|arm|arm64 - -define build_x64 # (1=arch, 2=tar-arch) -IID_$(1)=$(1)_$(VERSION).iid -CID_$(1)=$(1)_$(VERSION).cid - -build_x64: - @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-x64:$(VERSION) -f Dockerfile.x64 \ - --build-arg OS=$(DOCKER_OS) $(ROOT) - @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` - @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-x64-$(VERSION).tgz . - -.PHONY: build_x64 -endef - -define build_x64-gpu # (1=arch, 2=tar-arch) -IID_$(1)=$(1)_$(VERSION).iid -CID_$(1)=$(1)_$(VERSION).cid - -build_x64-gpu: - @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-$(1):$(VERSION) -f Dockerfile.x64-gpu \ - --build-arg OS=$(DOCKER_OS) $(ROOT) - @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` - @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(1)-$(VERSION).tgz . - -.PHONY: build_x64 -endef - -define build_arm # (1=arch, 2=tar-arch) -IID_$(1)=$(1)_$(VERSION).iid -CID_$(1)=$(1)_$(VERSION).cid - -build_$(1): - @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-$(1):$(VERSION) -f Dockerfile.arm \ - --build-arg ARCH=$(1) --build-arg ARCH_FLAG=--$(2) $(ROOT) - @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` - @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(2)-$(VERSION).tgz . -ifneq ($(KEEP),1) - # @rm $$(IID_$(1)) $$(CID_$(1)) -endif - -.PHONY: build_$(1) -endef - -#---------------------------------------------------------------------------------------------- - -define publish_x64 # (1=arch, 2=tar-arch) -publish_x64: - @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read - -.PHONY: publish_x64 -endef - -define publish_x64-gpu # (1=arch, 2=tar-arch) -publish_x64-gpu: - @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read - -.PHONY: publish_x64-gpu -endef - -define publish_arm # (1=arch, 2=tar-arch) -publish_$(1): - @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read -ifneq ($(KEEP),1) - # @rm $(STEM)-$(2)-$(VERSION).tgz -endif - -.PHONY: publish_$(1) -endef - -#---------------------------------------------------------------------------------------------- - -all: build publish - -build: $(BUILD_TARGETS) - -$(eval $(call build_x64,x64,x86_64)) -$(eval $(call build_x64-gpu,x64-gpu,x86_64-gpu)) -$(eval $(call build_arm,arm64v8,arm64)) -$(eval $(call build_arm,arm32v7,arm)) - -ifneq ($(filter publish,$(MAKECMDGOALS)),) -ifeq ($(wildcard $(HOME)/.aws/credentials),) -$(error Please run 'aws configure' and provide it with access credentials) -endif -endif - -publish: $(PUBLISH_TARGETS) - -$(eval $(call publish_x64,x64,x64)) -$(eval $(call publish_x64-gpu,x64-gpu,x64-gpu)) -$(eval $(call publish_arm,arm64v8,arm64)) -$(eval $(call publish_arm,arm32v7,arm)) - - -help: - @echo "make [build|publish] [X64=1|ARM7=1|ARM8=1]" +ROOT=. -.PHONY: all build publish help +READIES=${ROOT}/../../readies + +include ../backends.rules + +#VERSION ?= 1.8 +#OSNICK ?= buster +# +##---------------------------------------------------------------------------------------------- +# +#S3_URL=redismodules/onnxruntime +# +#STEM=onnxruntime-linux +# +#KEEP ?= 1 +# +#DOCKER_OS.bionic=ubuntu:bionic +#DOCKER_OS.stretch=debian:stretch-slim +#DOCKER_OS.buster=debian:buster-slim +#DOCKER_OS=$(DOCKER_OS.$(OSNICK)) +# +##---------------------------------------------------------------------------------------------- +# +#define targets # (1=OP, 2=op) +#$(1)_TARGETS := +#$(1)_TARGETS += $(if $(findstring $(X64),1),$(2)_x64) +#$(1)_TARGETS += $(if $(findstring $(ARM7),1),$(2)_arm32v7) +#$(1)_TARGETS += $(if $(findstring $(ARM8),1),$(2)_arm64v8) +# +#$(1)_TARGETS += $$(if $$(strip $$($(1)_TARGETS)),,$(2)_x64 $(2)_arm32v7 $(2)_arm64v8) +#endef +# +#$(eval $(call targets,BUILD,build)) +#$(eval $(call targets,PUBLISH,publish)) +# +##---------------------------------------------------------------------------------------------- +## arch=x64|arm32v7|arm64v8 +## tar_arch=x86_64|arm|arm64 +# +#define build_x64 # (1=arch, 2=tar-arch) +#IID_$(1)=$(1)_$(VERSION).iid +#CID_$(1)=$(1)_$(VERSION).cid +# +#build_x64: +# @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-x64:$(VERSION) -f Dockerfile.x64 \ +# --build-arg OS=$(DOCKER_OS) $(ROOT) +# @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` +# @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-x64-$(VERSION).tgz . +# +#.PHONY: build_x64 +#endef +# +#define build_x64-gpu # (1=arch, 2=tar-arch) +#IID_$(1)=$(1)_$(VERSION).iid +#CID_$(1)=$(1)_$(VERSION).cid +# +#build_x64-gpu: +# @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-$(1):$(VERSION) -f Dockerfile.x64-gpu \ +# --build-arg OS=$(DOCKER_OS) $(ROOT) +# @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` +# @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(1)-$(VERSION).tgz . +# +#.PHONY: build_x64 +#endef +# +#define build_arm # (1=arch, 2=tar-arch) +#IID_$(1)=$(1)_$(VERSION).iid +#CID_$(1)=$(1)_$(VERSION).cid +# +#build_$(1): +# @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-$(1):$(VERSION) -f Dockerfile.arm \ +# --build-arg ARCH=$(1) --build-arg ARCH_FLAG=--$(2) $(ROOT) +# @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` +# @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(2)-$(VERSION).tgz . +#ifneq ($(KEEP),1) +# # @rm $$(IID_$(1)) $$(CID_$(1)) +#endif +# +#.PHONY: build_$(1) +#endef +# +##---------------------------------------------------------------------------------------------- +# +#define publish_x64 # (1=arch, 2=tar-arch) +#publish_x64: +# @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read +# +#.PHONY: publish_x64 +#endef +# +#define publish_x64-gpu # (1=arch, 2=tar-arch) +#publish_x64-gpu: +# @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read +# +#.PHONY: publish_x64-gpu +#endef +# +#define publish_arm # (1=arch, 2=tar-arch) +#publish_$(1): +# @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read +#ifneq ($(KEEP),1) +# # @rm $(STEM)-$(2)-$(VERSION).tgz +#endif +# +#.PHONY: publish_$(1) +#endef +# +##---------------------------------------------------------------------------------------------- +# +#all: build publish +# +#build: $(BUILD_TARGETS) +# +#$(eval $(call build_x64,x64,x86_64)) +#$(eval $(call build_x64-gpu,x64-gpu,x86_64-gpu)) +#$(eval $(call build_arm,arm64v8,arm64)) +#$(eval $(call build_arm,arm32v7,arm)) +# +#ifneq ($(filter publish,$(MAKECMDGOALS)),) +#ifeq ($(wildcard $(HOME)/.aws/credentials),) +#$(error Please run 'aws configure' and provide it with access credentials) +#endif +#endif +# +#publish: $(PUBLISH_TARGETS) +# +#$(eval $(call publish_x64,x64,x64)) +#$(eval $(call publish_x64-gpu,x64-gpu,x64-gpu)) +#$(eval $(call publish_arm,arm64v8,arm64)) +#$(eval $(call publish_arm,arm32v7,arm)) +# +# +#help: +# @echo "make [build|publish] [X64=1|ARM7=1|ARM8=1]" +# +#.PHONY: all build publish help diff --git a/opt/build/onnxruntime/Dockerfile.jetson b/opt/build/onnxruntime/dockerfile.tmpl similarity index 61% rename from opt/build/onnxruntime/Dockerfile.jetson rename to opt/build/onnxruntime/dockerfile.tmpl index eb2df3a48..cf9eca012 100755 --- a/opt/build/onnxruntime/Dockerfile.jetson +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -1,39 +1,37 @@ -# BUILD redisfab/onnxruntime-${ARCH}-${OSNICK}:$(ONNXRUNTIME_VER) - -# stretch|bionic|buster -ARG OSNICK=buster - -# arm32v7|arm64v8 -ARG ARCH=jetson - #---------------------------------------------------------------------------------------------- -ARG OS=nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base as builder +{% if REDIS_ARCH == 'x64' %} +FROM ubuntu:bionic +{% elif REDIS_ARCH == 'jetson' %} +FROM nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base +{% endif %} -FROM ${OS} as builder - -ARG ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime -ARG ONNXRUNTIME_VER=1.8.0 +ARG ONNXRUNTIME_REPO={{REDIS_ONNX_REPO}} +ARG ONNXRUNTIME_VER={{REDIS_ONNX_VERSION}} RUN apt-get -qq update -RUN apt-get -qq install -y curl wget tar git patch build-essential \ +RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ - python3.6 python3-pip python3-dev python3-numpy -RUN pip3 install --upgrade pip setuptools wheel - -RUN wget -q https://github.com/Kitware/CMake/releases/download/v3.19.7/cmake-3.19.7-Linux-aarch64.tar.gz -O /tmp/cmake.tgz -WORKDIR /tmp -RUN tar -zxpf /tmp/cmake.tgz -RUN mv /tmp/cmake*/bin/* /usr/bin -RUN mv /tmp/cmake-*/share/cmake* /usr/share/ + python3.6 python3-pip python3-dev python3-numpy RUN rm /usr/bin/python3 RUN ln -s /usr/bin/python3.6 /usr/bin/python3 +RUN python3 -m pip install --upgrade pip setuptools wheel ENV LANG=en_US.UTF-8 RUN apt-get install -y locales && \ sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \ dpkg-reconfigure --frontend=noninteractive locales && \ update-locale LANG=$LANG + +{% set cmake_version = "3.19.7" %} +RUN wget -q https://github.com/Kitware/CMake/releases/download/v{{cmake_version}}/cmake-{{cmake_version}}-Linux-{{REDIS_CMAKE_ARCH}}.tar.gz -O /tmp/cmake.tgz + +WORKDIR /tmp +RUN tar -zxpf /tmp/cmake.tgz +RUN mv /tmp/cmake*/bin/* /usr/bin +RUN mv /tmp/cmake-*/share/cmake* /usr/share/ + +# build WORKDIR /build ARG BUILDTYPE=Release ARG BUILDARGS="--config ${BUILDTYPE} --parallel" @@ -42,7 +40,8 @@ WORKDIR /build/onnxruntime RUN git fetch --recurse-submodules RUN ./build.sh ${BUILDARGS} --update --build RUN ./build.sh ${BUILDARGS} --build_shared_lib -# RUN ./build.sh ${BUILDARGS} --enable_pybind --build_wheel + +# package ADD ./pack.sh /build WORKDIR /build -RUN ./pack.sh ${ONNXRUNTIME_VER} ${ARCH} +RUN ./pack.sh {{REDIS_ONNX_VERSION}} {{REDIS_ARCH}} diff --git a/opt/build/onnxruntime/ort-0.4.0-werror.patch b/opt/build/onnxruntime/ort-0.4.0-werror.patch deleted file mode 100755 index be5eb10b7..000000000 --- a/opt/build/onnxruntime/ort-0.4.0-werror.patch +++ /dev/null @@ -1,758 +0,0 @@ -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 96c89fe..f59edea 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -411,8 +411,8 @@ else() - - if(onnxruntime_DEV_MODE) - if(NOT onnxruntime_USE_TVM) -- string(APPEND CMAKE_CXX_FLAGS " -Werror") -- string(APPEND CMAKE_C_FLAGS " -Werror") -+# string(APPEND CMAKE_CXX_FLAGS " -Werror") -+# string(APPEND CMAKE_C_FLAGS " -Werror") - endif() - endif() - check_cxx_compiler_flag(-Wunused-but-set-variable HAS_UNUSED_BUT_SET_VARIABLE) -Submodule cmake/external/eigen contains modified content -diff --git a/cmake/external/eigen/CMakeLists.txt b/cmake/external/eigen/CMakeLists.txt -index 76e083314..a515736cd 100644 ---- a/cmake/external/eigen/CMakeLists.txt -+++ b/cmake/external/eigen/CMakeLists.txt -@@ -151,10 +151,10 @@ if(NOT MSVC) - - # clang outputs some warnings for unknown flags that are not caught by check_cxx_compiler_flag - # adding -Werror turns such warnings into errors -- check_cxx_compiler_flag("-Werror" COMPILER_SUPPORT_WERROR) -- if(COMPILER_SUPPORT_WERROR) -- set(CMAKE_REQUIRED_FLAGS "-Werror") -- endif() -+# check_cxx_compiler_flag("-Werror" COMPILER_SUPPORT_WERROR) -+# if(COMPILER_SUPPORT_WERROR) -+# set(CMAKE_REQUIRED_FLAGS "-Werror") -+# endif() - ei_add_cxx_compiler_flag("-pedantic") - ei_add_cxx_compiler_flag("-Wall") - ei_add_cxx_compiler_flag("-Wextra") -Submodule cmake/external/googletest contains modified content -diff --git a/cmake/external/googletest/googletest/cmake/internal_utils.cmake b/cmake/external/googletest/googletest/cmake/internal_utils.cmake -index 6448918f..38e1a864 100644 ---- a/cmake/external/googletest/googletest/cmake/internal_utils.cmake -+++ b/cmake/external/googletest/googletest/cmake/internal_utils.cmake -@@ -94,7 +94,7 @@ macro(config_compiler_and_linker) - set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0") - set(cxx_no_rtti_flags "-GR-") - elseif (CMAKE_COMPILER_IS_GNUCXX) -- set(cxx_base_flags "-Wall -Wshadow -Werror") -+ set(cxx_base_flags "-Wall -Wshadow") - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0) - set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else") - endif() -diff --git a/cmake/external/googletest/googletest/xcode/Config/General.xcconfig b/cmake/external/googletest/googletest/xcode/Config/General.xcconfig -index f23e3222..ac07337f 100644 ---- a/cmake/external/googletest/googletest/xcode/Config/General.xcconfig -+++ b/cmake/external/googletest/googletest/xcode/Config/General.xcconfig -@@ -17,7 +17,7 @@ ZERO_LINK = NO - PREBINDING = NO - - // Strictest warning policy --WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow -+WARNING_CFLAGS = -Wall -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow - - // Work around Xcode bugs by using external strip. See: - // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html -Submodule cmake/external/gsl contains modified content -diff --git a/cmake/external/gsl/tests/CMakeLists.txt b/cmake/external/gsl/tests/CMakeLists.txt -index 0e08d77..a4d103d 100644 ---- a/cmake/external/gsl/tests/CMakeLists.txt -+++ b/cmake/external/gsl/tests/CMakeLists.txt -@@ -41,7 +41,7 @@ target_compile_options(gsl_tests_config INTERFACE - -Wcast-align - -Wconversion - -Wctor-dtor-privacy -- -Werror -+# -Werror - -Wextra - -Wno-missing-braces - -Wnon-virtual-dtor -@@ -129,7 +129,7 @@ target_compile_options(gsl_tests_config_noexcept INTERFACE - -Wcast-align - -Wconversion - -Wctor-dtor-privacy -- -Werror -+# -Werror - -Wextra - -Wno-missing-braces - -Wnon-virtual-dtor -Submodule cmake/external/nsync contains modified content -diff --git a/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile b/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile -index d7b138b..d76d43f 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile -@@ -2,7 +2,7 @@ - # use futex directly. - CC=g++ - PLATFORM_CPPFLAGS=-DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread --PLATFORM_CFLAGS=-std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/c++11/src/per_thread_waiter.cc ../../platform/c++11/src/yield.cc ../../platform/c++11/src/time_rep_timespec.cc ../../platform/c++11/src/nsync_panic.cc -diff --git a/cmake/external/nsync/builds/aarch64.linux.clang/Makefile b/cmake/external/nsync/builds/aarch64.linux.clang/Makefile -index 291b3db..961aea1 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.clang/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.clang/Makefile -@@ -1,6 +1,6 @@ - CC=clang - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.g++/Makefile b/cmake/external/nsync/builds/aarch64.linux.g++/Makefile -index d4f0528..d1e2f24 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.g++/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.g++/Makefile -@@ -1,6 +1,6 @@ - CC=g++ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/linux -I../../platform/c++11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -x c++ -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile -index d5e168e..3218ce0 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile -index 6251fed..238dd54 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile -@@ -1,7 +1,7 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread --PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic -+PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic - PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -c++=-std=c++11 -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile -index 10d1104..21a2f43 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_C11 -I../../platform/c11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile -index 5352904..a428b34 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile -index 79a4f6d..c642bde 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_sem_t.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile -index 7dbeb25..487fc55 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile b/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile -index 3cd81a1..bb88607 100644 ---- a/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile -+++ b/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/arm -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - PLATFORM_LIBS=-lrt - MKDEP=${CC} -M -diff --git a/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile b/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile -index 009cd01..f058b7f 100644 ---- a/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile -+++ b/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/arm -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - PLATFORM_LIBS=-lrt - MKDEP=${CC} -M -diff --git a/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile b/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile -index d7b138b..d76d43f 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile -@@ -2,7 +2,7 @@ - # use futex directly. - CC=g++ - PLATFORM_CPPFLAGS=-DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread --PLATFORM_CFLAGS=-std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/c++11/src/per_thread_waiter.cc ../../platform/c++11/src/yield.cc ../../platform/c++11/src/time_rep_timespec.cc ../../platform/c++11/src/nsync_panic.cc -diff --git a/cmake/external/nsync/builds/x86_64.linux.clang/Makefile b/cmake/external/nsync/builds/x86_64.linux.clang/Makefile -index dc16f1f..dfa2bfb 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.clang/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.clang/Makefile -@@ -1,6 +1,6 @@ - CC=clang - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.g++/Makefile b/cmake/external/nsync/builds/x86_64.linux.g++/Makefile -index 990e1e4..a55a5db 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.g++/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.g++/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/linux -I../../platform/c++11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -x c++ -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile -index 870772e..26df437 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile -index 6dad2b7..e98d035 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile -@@ -1,7 +1,7 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread --PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic -+PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic - PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -c++=-std=c++11 -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile -index a7c98a1..395e8c9 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_C11 -I../../platform/c11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile -index 035c19f..3ba36e3 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile -index 040611c..394abf7 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_sem_t.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile -index 4bfa290..0174802 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile b/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile -index 347c2ce..6e70f0f 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile -@@ -1,6 +1,6 @@ - # Force the use of old gcc atomics. - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc_old -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile b/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile -index 732265f..f986e91 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile -@@ -1,6 +1,6 @@ - CC=tcc - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/tcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -+PLATFORM_CFLAGS=-Wall - PLATFORM_LDFLAGS=-pthread - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -diff --git a/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile b/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile -index 4142416..2b552ae 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile -@@ -1,7 +1,7 @@ - CC=clang++ - # Some versions of MacOS (such as Sierra) require _DARWIN_C_SOURCE to include , , and (!) - PLATFORM_CPPFLAGS=-DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -D_DARWIN_C_SOURCE -I../../platform/c++11 -I../../platform/gcc -I../../platform/macos -I../../platform/posix -pthread --PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -x c++ -M -std=c++11 - # Currently, MacOS's C++11 implementation is incomplete, and does not support -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile -index bf15b64..1122bb1 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile -@@ -1,7 +1,7 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/macos -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread --PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic -+PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic - PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -c++=-std=c++11 -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile -index 653f99a..eb925bb 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -DNSYNC_ATOMIC_C11 -I../../platform/c11 -I../../platform/macos -I../../platform/clang -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/clock_gettime.c ../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile -index 04943e3..cf8fc7f 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/macos -I../../platform/clang -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -Wno-deprecated-declarations -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -Wno-deprecated-declarations - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/clock_gettime.c ../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang/Makefile -index 2b36b8d..c02e528 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/macos -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/clock_gettime.c ../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile b/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile -index adce5dc..e90f92e 100644 ---- a/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile -+++ b/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/netbsd -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile b/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile -index d8d7247..aa46d8e 100644 ---- a/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/netbsd -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile b/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile -index 8d9b035..ded5309 100644 ---- a/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc_no_tls -I../../platform/gcc -I../../platform/openbsd -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/tools/mkmakefile.sh b/cmake/external/nsync/tools/mkmakefile.sh -index 365b34b..962962a 100644 ---- a/cmake/external/nsync/tools/mkmakefile.sh -+++ b/cmake/external/nsync/tools/mkmakefile.sh -@@ -281,11 +281,11 @@ makefile=` - esac - case "$cc_type.$cplusplus" in - gcc.) echo "PLATFORM_CPPFLAGS=$atomic_ind$cppflags" -- echo "PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic" -+ echo "PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - case "$atomics" in -- c++11) echo "PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic" -+ c++11) echo "PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic" - echo "PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc" - echo "MKDEP_DEPEND=mkdep" - echo 'MKDEP=./mkdep ${CC} -E -c++=-std=c++11' -@@ -299,11 +299,11 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - clang.) echo "PLATFORM_CPPFLAGS=$atomic_ind$cppflags" -- echo "PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration" -+ echo "PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - case "$atomics" in -- c++11) echo "PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic" -+ c++11) echo "PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic" - echo "PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc" - echo "MKDEP_DEPEND=mkdep" - echo 'MKDEP=./mkdep ${CC} -E -c++=-std=c++11' -@@ -317,7 +317,7 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - gcc.c++) echo "PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/c++11 $cppflags" -- echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic" -+ echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - echo 'MKDEP=${CC} -M -x c++ -std=c++11' -@@ -328,7 +328,7 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - clang.c++) echo "PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/c++11 $cppflags" -- echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -Wno-unneeded-internal-declaration" -+ echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic -Wno-unneeded-internal-declaration" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - echo 'MKDEP=${CC} -M -x c++ -std=c++11' -@@ -339,7 +339,7 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - tcc.) echo "PLATFORM_CPPFLAGS=$atomic_ind$cppflags" -- echo "PLATFORM_CFLAGS=-Werror -Wall" -+ echo "PLATFORM_CFLAGS=-Wall" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - echo "MKDEP_DEPEND=mkdep" -Submodule cmake/external/onnx contains modified content -diff --git a/cmake/external/onnx/CMakeLists.txt b/cmake/external/onnx/CMakeLists.txt -index 195b0486..1c903bdf 100644 ---- a/cmake/external/onnx/CMakeLists.txt -+++ b/cmake/external/onnx/CMakeLists.txt -@@ -485,7 +485,7 @@ elseif(APPLE) - else() - target_compile_options(onnx PRIVATE -Wall -Wextra) - if(${ONNX_WERROR}) -- target_compile_options(onnx PRIVATE -Werror) -+# target_compile_options(onnx PRIVATE -Werror) - endif() - endif() - -Submodule third_party/benchmark contains modified content -diff --git a/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py b/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py -index 5649ddc..4ccbcde 100644 ---- a/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py -+++ b/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py -@@ -6,7 +6,6 @@ import ycm_core - # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. - flags = [ - '-Wall', --'-Werror', - '-pedantic-errors', - '-std=c++0x', - '-fno-strict-aliasing', -diff --git a/cmake/external/onnx/third_party/benchmark/CMakeLists.txt b/cmake/external/onnx/third_party/benchmark/CMakeLists.txt -index b1c1d3d..2d1f2b1 100644 ---- a/cmake/external/onnx/third_party/benchmark/CMakeLists.txt -+++ b/cmake/external/onnx/third_party/benchmark/CMakeLists.txt -@@ -133,9 +133,9 @@ else() - - add_cxx_compiler_flag(-Wextra) - add_cxx_compiler_flag(-Wshadow) -- add_cxx_compiler_flag(-Werror RELEASE) -- add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -- add_cxx_compiler_flag(-Werror MINSIZEREL) -+# add_cxx_compiler_flag(-Werror RELEASE) -+# add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -+# add_cxx_compiler_flag(-Werror MINSIZEREL) - add_cxx_compiler_flag(-pedantic) - add_cxx_compiler_flag(-pedantic-errors) - add_cxx_compiler_flag(-Wshorten-64-to-32) -diff --git a/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake b/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -index d0d2099..0ebedc9 100644 ---- a/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -+++ b/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -@@ -68,7 +68,7 @@ function(check_cxx_warning_flag FLAG) - set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") - # Add -Werror to ensure the compiler generates an error if the warning flag - # doesn't exist. -- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror ${FLAG}") -+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}") - check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG}) - set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQUIRED_FLAGS}") - endfunction() -Submodule third_party/pybind11 contains modified content -diff --git a/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt b/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt -index df77d43..63cebdb 100644 ---- a/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt -+++ b/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt -@@ -129,7 +129,7 @@ function(pybind11_enable_warnings target_name) - if(MSVC) - target_compile_options(${target_name} PRIVATE /WX) - else() -- target_compile_options(${target_name} PRIVATE -Werror) -+# target_compile_options(${target_name} PRIVATE -Werror) - endif() - endif() - endfunction() -Submodule cmake/external/onnx-tensorrt contains modified content -Submodule third_party/onnx contains modified content -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt b/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt -index e64dfcec..776429d0 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt -@@ -473,7 +473,7 @@ elseif(APPLE) - else() - target_compile_options(onnx PRIVATE -Wall -Wextra) - if(${ONNX_WERROR}) -- target_compile_options(onnx PRIVATE -Werror) -+# target_compile_options(onnx PRIVATE -Werror) - endif() - endif() - -Submodule third_party/benchmark contains modified content -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py -index 5649ddc..4ccbcde 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py -@@ -6,7 +6,6 @@ import ycm_core - # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. - flags = [ - '-Wall', --'-Werror', - '-pedantic-errors', - '-std=c++0x', - '-fno-strict-aliasing', -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt -index b1c1d3d..2d1f2b1 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt -@@ -133,9 +133,9 @@ else() - - add_cxx_compiler_flag(-Wextra) - add_cxx_compiler_flag(-Wshadow) -- add_cxx_compiler_flag(-Werror RELEASE) -- add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -- add_cxx_compiler_flag(-Werror MINSIZEREL) -+# add_cxx_compiler_flag(-Werror RELEASE) -+# add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -+# add_cxx_compiler_flag(-Werror MINSIZEREL) - add_cxx_compiler_flag(-pedantic) - add_cxx_compiler_flag(-pedantic-errors) - add_cxx_compiler_flag(-Wshorten-64-to-32) -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -index d0d2099..0ebedc9 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -@@ -68,7 +68,7 @@ function(check_cxx_warning_flag FLAG) - set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") - # Add -Werror to ensure the compiler generates an error if the warning flag - # doesn't exist. -- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror ${FLAG}") -+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}") - check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG}) - set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQUIRED_FLAGS}") - endfunction() -Submodule third_party/pybind11 contains modified content -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt -index df77d43..63cebdb 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt -@@ -129,7 +129,7 @@ function(pybind11_enable_warnings target_name) - if(MSVC) - target_compile_options(${target_name} PRIVATE /WX) - else() -- target_compile_options(${target_name} PRIVATE -Werror) -+# target_compile_options(${target_name} PRIVATE -Werror) - endif() - endif() - endfunction() -Submodule cmake/external/protobuf contains modified content -diff --git a/cmake/external/protobuf/m4/ax_pthread.m4 b/cmake/external/protobuf/m4/ax_pthread.m4 -index d218d1af..d479c164 100644 ---- a/cmake/external/protobuf/m4/ax_pthread.m4 -+++ b/cmake/external/protobuf/m4/ax_pthread.m4 -@@ -299,7 +299,7 @@ if test "x$ax_pthread_clang" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) -- CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" -+ CFLAGS="-Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [ac_link="$ax_pthread_2step_ac_link" -diff --git a/cmake/external/protobuf/python/setup.py b/cmake/external/protobuf/python/setup.py -index a9df075e..e8d22dd4 100755 ---- a/cmake/external/protobuf/python/setup.py -+++ b/cmake/external/protobuf/python/setup.py -@@ -208,7 +208,7 @@ if __name__ == '__main__': - extra_compile_args.append('-std=c++11') - - if warnings_as_errors in sys.argv: -- extra_compile_args.append('-Werror') -+# extra_compile_args.append('-Werror') - sys.argv.remove(warnings_as_errors) - - # C++ implementation extension -diff --git a/cmake/external/protobuf/src/Makefile.am b/cmake/external/protobuf/src/Makefile.am -index 4bb77452..c95d46b7 100644 ---- a/cmake/external/protobuf/src/Makefile.am -+++ b/cmake/external/protobuf/src/Makefile.am -@@ -876,7 +876,7 @@ no_warning_test.cc: - - no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la - no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \ -- -Wall -Wextra -Werror -Wno-unused-parameter -+ -Wall -Wextra -Wno-unused-parameter - nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) - - TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ -Submodule third_party/benchmark contains modified content -diff --git a/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py b/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py -index 8619435..07141d3 100644 ---- a/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py -+++ b/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py -@@ -6,7 +6,6 @@ import ycm_core - # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. - flags = [ - '-Wall', --'-Werror', - '-pendantic-errors', - '-std=c++0x', - '-fno-strict-aliasing', -diff --git a/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt b/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt -index f7f1566..8e11602 100644 ---- a/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt -+++ b/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt -@@ -84,9 +84,9 @@ else() - - add_cxx_compiler_flag(-Wextra) - add_cxx_compiler_flag(-Wshadow) -- add_cxx_compiler_flag(-Werror RELEASE) -- add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -- add_cxx_compiler_flag(-Werror MINSIZEREL) -+# add_cxx_compiler_flag(-Werror RELEASE) -+# add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -+# add_cxx_compiler_flag(-Werror MINSIZEREL) - add_cxx_compiler_flag(-pedantic) - add_cxx_compiler_flag(-pedantic-errors) - add_cxx_compiler_flag(-Wshorten-64-to-32) -Submodule cmake/external/tvm contains modified content -diff --git a/cmake/external/tvm/Jenkinsfile b/cmake/external/tvm/Jenkinsfile -index f63e7d0f..33048562 100644 ---- a/cmake/external/tvm/Jenkinsfile -+++ b/cmake/external/tvm/Jenkinsfile -@@ -100,7 +100,6 @@ stage('Build') { - echo set\\(USE_GRAPH_RUNTIME_DEBUG ON\\) >> config.cmake - echo set\\(USE_BLAS openblas\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-gpu', 'build', '-j2') - pack_lib('gpu', tvm_multilib) -@@ -114,7 +113,6 @@ stage('Build') { - echo set\\(USE_VULKAN ON\\) >> config.cmake - echo set\\(USE_GRAPH_RUNTIME_DEBUG ON\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER clang-6.0\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-gpu', 'build2', '-j2') - } -@@ -132,7 +130,6 @@ stage('Build') { - echo set\\(USE_GRAPH_RUNTIME_DEBUG ON\\) >> config.cmake - echo set\\(USE_LLVM llvm-config-4.0\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-cpu', 'build', '-j2') - pack_lib('cpu', tvm_lib) -@@ -157,7 +154,6 @@ stage('Build') { - echo set\\(USE_GRAPH_RUNTIME_DEBUG ON\\) >> config.cmake - echo set\\(USE_LLVM llvm-config-5.0\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-i386', 'build', '-j2') - pack_lib('i386', tvm_multilib) -diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py -index 7449970d8..316668eee 100755 ---- a/tools/ci_build/build.py -+++ b/tools/ci_build/build.py -@@ -739,7 +739,7 @@ def main(): - if (args.build): - build_targets(cmake_path, build_dir, configs, args.parallel) - -- if args.test : -+ if False and args.test : - run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs, - args.enable_pybind if not args.skip_onnx_tests else False, - args.use_tvm, args.use_tensorrt, args.use_ngraph) diff --git a/opt/build/onnxruntime/werror.patch b/opt/build/onnxruntime/werror.patch deleted file mode 100755 index ce22c419f..000000000 --- a/opt/build/onnxruntime/werror.patch +++ /dev/null @@ -1,759 +0,0 @@ -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index f6252b9..613b47d 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -427,8 +427,8 @@ else() - string(APPEND CMAKE_C_FLAGS " -Wall -Wextra -ffunction-sections -fdata-sections") - - if(onnxruntime_DEV_MODE) -- string(APPEND CMAKE_CXX_FLAGS " -Werror") -- string(APPEND CMAKE_C_FLAGS " -Werror") -+# string(APPEND CMAKE_CXX_FLAGS " -Werror") -+# string(APPEND CMAKE_C_FLAGS " -Werror") - endif() - check_cxx_compiler_flag(-Wunused-but-set-variable HAS_UNUSED_BUT_SET_VARIABLE) - check_cxx_compiler_flag(-Wunused-parameter HAS_UNUSED_PARAMETER) -Submodule cmake/external/eigen contains modified content -diff --git a/cmake/external/eigen/CMakeLists.txt b/cmake/external/eigen/CMakeLists.txt -index 76e083314..a515736cd 100644 ---- a/cmake/external/eigen/CMakeLists.txt -+++ b/cmake/external/eigen/CMakeLists.txt -@@ -151,10 +151,10 @@ if(NOT MSVC) - - # clang outputs some warnings for unknown flags that are not caught by check_cxx_compiler_flag - # adding -Werror turns such warnings into errors -- check_cxx_compiler_flag("-Werror" COMPILER_SUPPORT_WERROR) -- if(COMPILER_SUPPORT_WERROR) -- set(CMAKE_REQUIRED_FLAGS "-Werror") -- endif() -+# check_cxx_compiler_flag("-Werror" COMPILER_SUPPORT_WERROR) -+# if(COMPILER_SUPPORT_WERROR) -+# set(CMAKE_REQUIRED_FLAGS "-Werror") -+# endif() - ei_add_cxx_compiler_flag("-pedantic") - ei_add_cxx_compiler_flag("-Wall") - ei_add_cxx_compiler_flag("-Wextra") -Submodule cmake/external/googletest contains modified content -diff --git a/cmake/external/googletest/googletest/cmake/internal_utils.cmake b/cmake/external/googletest/googletest/cmake/internal_utils.cmake -index 6448918f..38e1a864 100644 ---- a/cmake/external/googletest/googletest/cmake/internal_utils.cmake -+++ b/cmake/external/googletest/googletest/cmake/internal_utils.cmake -@@ -94,7 +94,7 @@ macro(config_compiler_and_linker) - set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0") - set(cxx_no_rtti_flags "-GR-") - elseif (CMAKE_COMPILER_IS_GNUCXX) -- set(cxx_base_flags "-Wall -Wshadow -Werror") -+ set(cxx_base_flags "-Wall -Wshadow") - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0) - set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else") - endif() -diff --git a/cmake/external/googletest/googletest/xcode/Config/General.xcconfig b/cmake/external/googletest/googletest/xcode/Config/General.xcconfig -index f23e3222..ac07337f 100644 ---- a/cmake/external/googletest/googletest/xcode/Config/General.xcconfig -+++ b/cmake/external/googletest/googletest/xcode/Config/General.xcconfig -@@ -17,7 +17,7 @@ ZERO_LINK = NO - PREBINDING = NO - - // Strictest warning policy --WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow -+WARNING_CFLAGS = -Wall -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow - - // Work around Xcode bugs by using external strip. See: - // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html -Submodule cmake/external/gsl contains modified content -diff --git a/cmake/external/gsl/tests/CMakeLists.txt b/cmake/external/gsl/tests/CMakeLists.txt -index 0e08d77..a4d103d 100644 ---- a/cmake/external/gsl/tests/CMakeLists.txt -+++ b/cmake/external/gsl/tests/CMakeLists.txt -@@ -41,7 +41,7 @@ target_compile_options(gsl_tests_config INTERFACE - -Wcast-align - -Wconversion - -Wctor-dtor-privacy -- -Werror -+# -Werror - -Wextra - -Wno-missing-braces - -Wnon-virtual-dtor -@@ -129,7 +129,7 @@ target_compile_options(gsl_tests_config_noexcept INTERFACE - -Wcast-align - -Wconversion - -Wctor-dtor-privacy -- -Werror -+# -Werror - -Wextra - -Wno-missing-braces - -Wnon-virtual-dtor -Submodule cmake/external/nsync contains modified content -diff --git a/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile b/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile -index d7b138b..d76d43f 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.c++11/Makefile -@@ -2,7 +2,7 @@ - # use futex directly. - CC=g++ - PLATFORM_CPPFLAGS=-DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread --PLATFORM_CFLAGS=-std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/c++11/src/per_thread_waiter.cc ../../platform/c++11/src/yield.cc ../../platform/c++11/src/time_rep_timespec.cc ../../platform/c++11/src/nsync_panic.cc -diff --git a/cmake/external/nsync/builds/aarch64.linux.clang/Makefile b/cmake/external/nsync/builds/aarch64.linux.clang/Makefile -index 291b3db..961aea1 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.clang/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.clang/Makefile -@@ -1,6 +1,6 @@ - CC=clang - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.g++/Makefile b/cmake/external/nsync/builds/aarch64.linux.g++/Makefile -index d4f0528..d1e2f24 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.g++/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.g++/Makefile -@@ -1,6 +1,6 @@ - CC=g++ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/linux -I../../platform/c++11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -x c++ -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile -index d5e168e..3218ce0 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-asm/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile -index 6251fed..238dd54 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c++11/Makefile -@@ -1,7 +1,7 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread --PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic -+PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic - PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -c++=-std=c++11 -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile -index 10d1104..21a2f43 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.atm-c11/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_C11 -I../../platform/c11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile -index 5352904..a428b34 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-mutex/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile -index 79a4f6d..c642bde 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc.sem-sem_t/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_sem_t.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile b/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile -index 7dbeb25..487fc55 100644 ---- a/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile -+++ b/cmake/external/nsync/builds/aarch64.linux.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/aarch64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile b/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile -index 3cd81a1..bb88607 100644 ---- a/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile -+++ b/cmake/external/nsync/builds/arm.linux.gcc.atm-asm.lrt/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/arm -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - PLATFORM_LIBS=-lrt - MKDEP=${CC} -M -diff --git a/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile b/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile -index 009cd01..f058b7f 100644 ---- a/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile -+++ b/cmake/external/nsync/builds/arm.linux.gcc.lrt/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/arm -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - PLATFORM_LIBS=-lrt - MKDEP=${CC} -M -diff --git a/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile b/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile -index d7b138b..d76d43f 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.c++11/Makefile -@@ -2,7 +2,7 @@ - # use futex directly. - CC=g++ - PLATFORM_CPPFLAGS=-DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread --PLATFORM_CFLAGS=-std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/c++11/src/per_thread_waiter.cc ../../platform/c++11/src/yield.cc ../../platform/c++11/src/time_rep_timespec.cc ../../platform/c++11/src/nsync_panic.cc -diff --git a/cmake/external/nsync/builds/x86_64.linux.clang/Makefile b/cmake/external/nsync/builds/x86_64.linux.clang/Makefile -index dc16f1f..dfa2bfb 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.clang/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.clang/Makefile -@@ -1,6 +1,6 @@ - CC=clang - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.g++/Makefile b/cmake/external/nsync/builds/x86_64.linux.g++/Makefile -index 990e1e4..a55a5db 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.g++/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.g++/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/linux -I../../platform/c++11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M -x c++ -std=c++11 - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile -index 870772e..26df437 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-asm/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile -index 6dad2b7..e98d035 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c++11/Makefile -@@ -1,7 +1,7 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread --PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic -+PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic - PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -c++=-std=c++11 -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile -index a7c98a1..395e8c9 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.atm-c11/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_C11 -I../../platform/c11 -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile -index 035c19f..3ba36e3 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-mutex/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile -index 040611c..394abf7 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc.sem-sem_t/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_sem_t.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile b/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile -index 4bfa290..0174802 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile b/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile -index 347c2ce..6e70f0f 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.old_gcc/Makefile -@@ -1,6 +1,6 @@ - # Force the use of old gcc atomics. - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc_old -I../../platform/gcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/linux/src/nsync_semaphore_futex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile b/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile -index 732265f..f986e91 100644 ---- a/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.linux.tcc/Makefile -@@ -1,6 +1,6 @@ - CC=tcc - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/tcc -I../../platform/linux -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -+PLATFORM_CFLAGS=-Wall - PLATFORM_LDFLAGS=-pthread - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -diff --git a/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile b/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile -index 4142416..2b552ae 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.c++11/Makefile -@@ -1,7 +1,7 @@ - CC=clang++ - # Some versions of MacOS (such as Sierra) require _DARWIN_C_SOURCE to include , , and (!) - PLATFORM_CPPFLAGS=-DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -D_DARWIN_C_SOURCE -I../../platform/c++11 -I../../platform/gcc -I../../platform/macos -I../../platform/posix -pthread --PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -+PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -x c++ -M -std=c++11 - # Currently, MacOS's C++11 implementation is incomplete, and does not support -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile -index bf15b64..1122bb1 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c++11/Makefile -@@ -1,7 +1,7 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/macos -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread --PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic -+PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic - PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc - MKDEP_DEPEND=mkdep - MKDEP=./mkdep ${CC} -E -c++=-std=c++11 -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile -index 653f99a..eb925bb 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang.atm-c11/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -DNSYNC_ATOMIC_C11 -I../../platform/c11 -I../../platform/macos -I../../platform/clang -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/clock_gettime.c ../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile -index 04943e3..cf8fc7f 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang.atm-os/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/macos -I../../platform/clang -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -Wno-deprecated-declarations -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -Wno-deprecated-declarations - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/clock_gettime.c ../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.macos.clang/Makefile b/cmake/external/nsync/builds/x86_64.macos.clang/Makefile -index 2b36b8d..c02e528 100644 ---- a/cmake/external/nsync/builds/x86_64.macos.clang/Makefile -+++ b/cmake/external/nsync/builds/x86_64.macos.clang/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/clang -I../../platform/macos -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/clock_gettime.c ../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile b/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile -index adce5dc..e90f92e 100644 ---- a/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile -+++ b/cmake/external/nsync/builds/x86_64.netbsd.gcc.atm-asm/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-I../../platform/atomic_ind -D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/netbsd -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile b/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile -index d8d7247..aa46d8e 100644 ---- a/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.netbsd.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc -I../../platform/netbsd -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile b/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile -index 8d9b035..ded5309 100644 ---- a/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile -+++ b/cmake/external/nsync/builds/x86_64.openbsd.gcc/Makefile -@@ -1,5 +1,5 @@ - PLATFORM_CPPFLAGS=-D_POSIX_C_SOURCE=200809L -I../../platform/gcc_no_tls -I../../platform/gcc -I../../platform/openbsd -I../../platform/x86_64 -I../../platform/posix -pthread --PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -+PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic - PLATFORM_LDFLAGS=-pthread - MKDEP=${CC} -M - PLATFORM_C=../../platform/posix/src/nsync_semaphore_mutex.c ../../platform/posix/src/per_thread_waiter.c ../../platform/posix/src/yield.c ../../platform/posix/src/time_rep.c ../../platform/posix/src/nsync_panic.c -diff --git a/cmake/external/nsync/tools/mkmakefile.sh b/cmake/external/nsync/tools/mkmakefile.sh -index 365b34b..962962a 100644 ---- a/cmake/external/nsync/tools/mkmakefile.sh -+++ b/cmake/external/nsync/tools/mkmakefile.sh -@@ -281,11 +281,11 @@ makefile=` - esac - case "$cc_type.$cplusplus" in - gcc.) echo "PLATFORM_CPPFLAGS=$atomic_ind$cppflags" -- echo "PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic" -+ echo "PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - case "$atomics" in -- c++11) echo "PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic" -+ c++11) echo "PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic" - echo "PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc" - echo "MKDEP_DEPEND=mkdep" - echo 'MKDEP=./mkdep ${CC} -E -c++=-std=c++11' -@@ -299,11 +299,11 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - clang.) echo "PLATFORM_CPPFLAGS=$atomic_ind$cppflags" -- echo "PLATFORM_CFLAGS=-Werror -Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration" -+ echo "PLATFORM_CFLAGS=-Wall -Wextra -ansi -pedantic -Wno-unneeded-internal-declaration" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - case "$atomics" in -- c++11) echo "PLATFORM_CXXFLAGS=-Werror -Wall -Wextra -std=c++11 -pedantic" -+ c++11) echo "PLATFORM_CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic" - echo "PLATFORM_CXX=../../platform/c_from_c++11/src/nsync_atm_c++.cc" - echo "MKDEP_DEPEND=mkdep" - echo 'MKDEP=./mkdep ${CC} -E -c++=-std=c++11' -@@ -317,7 +317,7 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - gcc.c++) echo "PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/c++11 $cppflags" -- echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic" -+ echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - echo 'MKDEP=${CC} -M -x c++ -std=c++11' -@@ -328,7 +328,7 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - clang.c++) echo "PLATFORM_CPPFLAGS=-DNSYNC_ATOMIC_CPP11 -I../../platform/c++11 $cppflags" -- echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Werror -Wall -Wextra -pedantic -Wno-unneeded-internal-declaration" -+ echo "PLATFORM_CFLAGS=-x c++ -std=c++11 -Wall -Wextra -pedantic -Wno-unneeded-internal-declaration" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - echo 'MKDEP=${CC} -M -x c++ -std=c++11' -@@ -339,7 +339,7 @@ makefile=` - echo "TEST_PLATFORM_OBJS=$test_platform_o" - ;; - tcc.) echo "PLATFORM_CPPFLAGS=$atomic_ind$cppflags" -- echo "PLATFORM_CFLAGS=-Werror -Wall" -+ echo "PLATFORM_CFLAGS=-Wall" - case "$ldflags" in ?*) echo "PLATFORM_LDFLAGS=$ldflags";; esac - case "$libs" in ?*) echo "PLATFORM_LIBS=$libs";; esac - echo "MKDEP_DEPEND=mkdep" -Submodule cmake/external/onnx contains modified content -diff --git a/cmake/external/onnx/CMakeLists.txt b/cmake/external/onnx/CMakeLists.txt -index 195b0486..1c903bdf 100644 ---- a/cmake/external/onnx/CMakeLists.txt -+++ b/cmake/external/onnx/CMakeLists.txt -@@ -485,7 +485,7 @@ elseif(APPLE) - else() - target_compile_options(onnx PRIVATE -Wall -Wextra) - if(${ONNX_WERROR}) -- target_compile_options(onnx PRIVATE -Werror) -+# target_compile_options(onnx PRIVATE -Werror) - endif() - endif() - -Submodule third_party/benchmark contains modified content -diff --git a/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py b/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py -index 5649ddc..4ccbcde 100644 ---- a/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py -+++ b/cmake/external/onnx/third_party/benchmark/.ycm_extra_conf.py -@@ -6,7 +6,6 @@ import ycm_core - # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. - flags = [ - '-Wall', --'-Werror', - '-pedantic-errors', - '-std=c++0x', - '-fno-strict-aliasing', -diff --git a/cmake/external/onnx/third_party/benchmark/CMakeLists.txt b/cmake/external/onnx/third_party/benchmark/CMakeLists.txt -index b1c1d3d..2d1f2b1 100644 ---- a/cmake/external/onnx/third_party/benchmark/CMakeLists.txt -+++ b/cmake/external/onnx/third_party/benchmark/CMakeLists.txt -@@ -133,9 +133,9 @@ else() - - add_cxx_compiler_flag(-Wextra) - add_cxx_compiler_flag(-Wshadow) -- add_cxx_compiler_flag(-Werror RELEASE) -- add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -- add_cxx_compiler_flag(-Werror MINSIZEREL) -+# add_cxx_compiler_flag(-Werror RELEASE) -+# add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -+# add_cxx_compiler_flag(-Werror MINSIZEREL) - add_cxx_compiler_flag(-pedantic) - add_cxx_compiler_flag(-pedantic-errors) - add_cxx_compiler_flag(-Wshorten-64-to-32) -diff --git a/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake b/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -index d0d2099..0ebedc9 100644 ---- a/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -+++ b/cmake/external/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -@@ -68,7 +68,7 @@ function(check_cxx_warning_flag FLAG) - set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") - # Add -Werror to ensure the compiler generates an error if the warning flag - # doesn't exist. -- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror ${FLAG}") -+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}") - check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG}) - set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQUIRED_FLAGS}") - endfunction() -Submodule third_party/pybind11 contains modified content -diff --git a/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt b/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt -index df77d43..63cebdb 100644 ---- a/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt -+++ b/cmake/external/onnx/third_party/pybind11/tests/CMakeLists.txt -@@ -129,7 +129,7 @@ function(pybind11_enable_warnings target_name) - if(MSVC) - target_compile_options(${target_name} PRIVATE /WX) - else() -- target_compile_options(${target_name} PRIVATE -Werror) -+# target_compile_options(${target_name} PRIVATE -Werror) - endif() - endif() - endfunction() -Submodule cmake/external/onnx-tensorrt contains modified content -Submodule third_party/onnx contains modified content -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt b/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt -index e64dfcec..776429d0 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/CMakeLists.txt -@@ -473,7 +473,7 @@ elseif(APPLE) - else() - target_compile_options(onnx PRIVATE -Wall -Wextra) - if(${ONNX_WERROR}) -- target_compile_options(onnx PRIVATE -Werror) -+# target_compile_options(onnx PRIVATE -Werror) - endif() - endif() - -Submodule third_party/benchmark contains modified content -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py -index 5649ddc..4ccbcde 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/.ycm_extra_conf.py -@@ -6,7 +6,6 @@ import ycm_core - # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. - flags = [ - '-Wall', --'-Werror', - '-pedantic-errors', - '-std=c++0x', - '-fno-strict-aliasing', -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt -index b1c1d3d..2d1f2b1 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/CMakeLists.txt -@@ -133,9 +133,9 @@ else() - - add_cxx_compiler_flag(-Wextra) - add_cxx_compiler_flag(-Wshadow) -- add_cxx_compiler_flag(-Werror RELEASE) -- add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -- add_cxx_compiler_flag(-Werror MINSIZEREL) -+# add_cxx_compiler_flag(-Werror RELEASE) -+# add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -+# add_cxx_compiler_flag(-Werror MINSIZEREL) - add_cxx_compiler_flag(-pedantic) - add_cxx_compiler_flag(-pedantic-errors) - add_cxx_compiler_flag(-Wshorten-64-to-32) -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -index d0d2099..0ebedc9 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake -@@ -68,7 +68,7 @@ function(check_cxx_warning_flag FLAG) - set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") - # Add -Werror to ensure the compiler generates an error if the warning flag - # doesn't exist. -- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror ${FLAG}") -+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}") - check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG}) - set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQUIRED_FLAGS}") - endfunction() -Submodule third_party/pybind11 contains modified content -diff --git a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt -index df77d43..63cebdb 100644 ---- a/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt -+++ b/cmake/external/onnx-tensorrt/third_party/onnx/third_party/pybind11/tests/CMakeLists.txt -@@ -129,7 +129,7 @@ function(pybind11_enable_warnings target_name) - if(MSVC) - target_compile_options(${target_name} PRIVATE /WX) - else() -- target_compile_options(${target_name} PRIVATE -Werror) -+# target_compile_options(${target_name} PRIVATE -Werror) - endif() - endif() - endfunction() -Submodule cmake/external/protobuf contains modified content -diff --git a/cmake/external/protobuf/m4/ax_pthread.m4 b/cmake/external/protobuf/m4/ax_pthread.m4 -index d218d1af7..d479c1648 100644 ---- a/cmake/external/protobuf/m4/ax_pthread.m4 -+++ b/cmake/external/protobuf/m4/ax_pthread.m4 -@@ -299,7 +299,7 @@ if test "x$ax_pthread_clang" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) -- CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" -+ CFLAGS="-Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [ac_link="$ax_pthread_2step_ac_link" -diff --git a/cmake/external/protobuf/python/setup.py b/cmake/external/protobuf/python/setup.py -index a9df075e7..e8d22dd4e 100755 ---- a/cmake/external/protobuf/python/setup.py -+++ b/cmake/external/protobuf/python/setup.py -@@ -208,7 +208,7 @@ if __name__ == '__main__': - extra_compile_args.append('-std=c++11') - - if warnings_as_errors in sys.argv: -- extra_compile_args.append('-Werror') -+# extra_compile_args.append('-Werror') - sys.argv.remove(warnings_as_errors) - - # C++ implementation extension -diff --git a/cmake/external/protobuf/src/Makefile.am b/cmake/external/protobuf/src/Makefile.am -index 4bb77452f..c95d46b71 100644 ---- a/cmake/external/protobuf/src/Makefile.am -+++ b/cmake/external/protobuf/src/Makefile.am -@@ -876,7 +876,7 @@ no_warning_test.cc: - - no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la - no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \ -- -Wall -Wextra -Werror -Wno-unused-parameter -+ -Wall -Wextra -Wno-unused-parameter - nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) - - TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ -Submodule third_party/benchmark contains modified content -diff --git a/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py b/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py -index 8619435..07141d3 100644 ---- a/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py -+++ b/cmake/external/protobuf/third_party/benchmark/.ycm_extra_conf.py -@@ -6,7 +6,6 @@ import ycm_core - # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. - flags = [ - '-Wall', --'-Werror', - '-pendantic-errors', - '-std=c++0x', - '-fno-strict-aliasing', -diff --git a/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt b/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt -index f7f1566..8e11602 100644 ---- a/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt -+++ b/cmake/external/protobuf/third_party/benchmark/CMakeLists.txt -@@ -84,9 +84,9 @@ else() - - add_cxx_compiler_flag(-Wextra) - add_cxx_compiler_flag(-Wshadow) -- add_cxx_compiler_flag(-Werror RELEASE) -- add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -- add_cxx_compiler_flag(-Werror MINSIZEREL) -+# add_cxx_compiler_flag(-Werror RELEASE) -+# add_cxx_compiler_flag(-Werror RELWITHDEBINFO) -+# add_cxx_compiler_flag(-Werror MINSIZEREL) - add_cxx_compiler_flag(-pedantic) - add_cxx_compiler_flag(-pedantic-errors) - add_cxx_compiler_flag(-Wshorten-64-to-32) -Submodule cmake/external/tvm contains untracked content -Submodule cmake/external/tvm contains modified content -diff --git a/cmake/external/tvm/Jenkinsfile b/cmake/external/tvm/Jenkinsfile -index 608f9ca8..b6e38952 100644 ---- a/cmake/external/tvm/Jenkinsfile -+++ b/cmake/external/tvm/Jenkinsfile -@@ -101,7 +101,6 @@ stage('Build') { - echo set\\(USE_ANTLR ON\\) >> config.cmake - echo set\\(USE_BLAS openblas\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-gpu', 'build', '-j2') - pack_lib('gpu', tvm_multilib) -@@ -115,7 +114,6 @@ stage('Build') { - echo set\\(USE_VULKAN ON\\) >> config.cmake - echo set\\(USE_GRAPH_RUNTIME_DEBUG ON\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER clang-6.0\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-gpu', 'build2', '-j2') - } -@@ -136,7 +134,6 @@ stage('Build') { - echo set\\(NNPACK_PATH /NNPACK/build/\\) >> config.cmake - echo set\\(USE_ANTLR ON\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-cpu', 'build', '-j2') - pack_lib('cpu', tvm_lib) -@@ -164,7 +161,6 @@ stage('Build') { - echo set\\(USE_GRAPH_RUNTIME_DEBUG ON\\) >> config.cmake - echo set\\(USE_LLVM llvm-config-5.0\\) >> config.cmake - echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake -- echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake - """ - make('tvmai/ci-i386', 'build', '-j2') - pack_lib('i386', tvm_multilib) -diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py -index 9da8b5d002..0a365d03c9 100755 ---- a/tools/ci_build/build.py -+++ b/tools/ci_build/build.py -@@ -902,7 +902,7 @@ def main(): - if (args.build): - build_targets(cmake_path, build_dir, configs, args.parallel) - -- if args.test : -+ if False and args.test : - run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs, - args.enable_pybind and not args.skip_onnx_tests, - args.use_tvm, args.use_tensorrt, args.use_ngraph) diff --git a/opt/readies b/opt/readies index 75459c614..8759303e5 160000 --- a/opt/readies +++ b/opt/readies @@ -1 +1 @@ -Subproject commit 75459c6142ac01ff82fa7b4646d9d574d177fa3d +Subproject commit 8759303e553884f98251758f5929d928e7d487cd From ddb21118c50d35bf6199326e63c021ae0641bf58 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Jun 2021 15:46:13 +0300 Subject: [PATCH 04/28] splitting a backend --- opt/build/backends.rules | 23 +++++++++++++++++------ opt/build/onnxruntime/.gitignore | 1 + opt/build/onnxruntime/Makefile | 2 +- opt/build/onnxruntime/dockerfile.tmpl | 17 ++++++++++++++--- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/opt/build/backends.rules b/opt/build/backends.rules index 4a77683aa..8dc3eaa8e 100644 --- a/opt/build/backends.rules +++ b/opt/build/backends.rules @@ -1,5 +1,6 @@ # default is x64 ARCH=$(shell ${READIES}/bin/platform --arch) +OS=$(shell ${READIES}/bin/platform --os) REDIS_CMAKE_ARCH=x86_64 # jetson @@ -8,22 +9,32 @@ ARCH=jetson REDIS_CMAKE_ARCH=aarch64 else endif - export REDIS_CMAKE_ARCH -DEFAULT_DOCKER_TAG=${DOCKER_ORG}/${PRODUCT}:buildsystem + +# override if necessary in top-level make files +DEFAULT_DOCKER_TAG=${DOCKER_ORG}/${PRODUCT}:build +BACKEND_NAME=${PRODUCT}-${OS}-${ARCH}-${VERSION}.tgz +CIDFILE=${PRODUCT}.${ARCH}.cid + +ifeq ($(GPU),1) +REDIS_GPU=1 +export REDIS_GPU +endif + +S3_URL=redismodules/${PRODUCT} build: + @rm -f ${BACKEND_NAME} *.cid REDIS_ARCH=${ARCH} \ ${READIES}/bin/dockerwrapper \ -d ${CURDIR}/Dockerfile \ -t ${DEFAULT_DOCKER_TAG} \ -e REDIS \ - -g \ -D "${DOCKER_OPTS}" \ ${DOCKER_ARGS} -# docker create --cidfile ${PRODUCT}.${ARCH}.cid ${DEFAULT_DOCKER_TAG} -# docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(1)-$(VERSION).tgz . + docker create --cidfile ${CIDFILE} ${DEFAULT_DOCKER_TAG} + docker cp `cat ${CIDFILE}`:/build/${BACKEND_NAME} . publish: - @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read + @aws s3 cp ${BACKEND_NAME} s3://$(S3_URL)/ --acl public-read diff --git a/opt/build/onnxruntime/.gitignore b/opt/build/onnxruntime/.gitignore index 94143827e..ce84fec50 100644 --- a/opt/build/onnxruntime/.gitignore +++ b/opt/build/onnxruntime/.gitignore @@ -1 +1,2 @@ Dockerfile +onnxruntime.x64.cid diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index c9a15bde4..ab8a7d4af 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -3,7 +3,7 @@ export REDIS_ONNX_REPO = https://github.com/microsoft/onnxruntime PRODUCT=onnxruntime DOCKER_ORG=redislabs -OSNICK ?= buster +VERSION=${REDIS_ONNX_VERSION} ROOT=. diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index cf9eca012..c22768746 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -1,6 +1,11 @@ #---------------------------------------------------------------------------------------------- {% if REDIS_ARCH == 'x64' %} +FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04 +{% if REDIS_GPU is defined %} +{% else %} FROM ubuntu:bionic +{% endif %} + {% elif REDIS_ARCH == 'jetson' %} FROM nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base {% endif %} @@ -33,13 +38,19 @@ RUN mv /tmp/cmake-*/share/cmake* /usr/share/ # build WORKDIR /build +{% if REDIS_GPU is defined %} +ARG BUILDTYPE=MinSizeRel +ARG BUILDARGS="--use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda" +{% else %} ARG BUILDTYPE=Release +ARG BUILDARGS +{% endif %} + ARG BUILDARGS="--config ${BUILDTYPE} --parallel" RUN git clone --single-branch --branch v${ONNXRUNTIME_VER} ${ONNXRUNTIME_REPO} onnxruntime WORKDIR /build/onnxruntime -RUN git fetch --recurse-submodules -RUN ./build.sh ${BUILDARGS} --update --build -RUN ./build.sh ${BUILDARGS} --build_shared_lib +RUN git fetch --recurse-submodules -j4 +RUN ./build.sh --config ${BUILDTYPE} ${BUILDARGS} --update --build --build_shared_lib --parallel # package ADD ./pack.sh /build From 68fdfc7f076478040ab3f95f368f466fb942b1fb Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Jun 2021 17:08:19 +0300 Subject: [PATCH 05/28] onnx 1.8 64-bit linux, 64-bit linux with gpu, and jetson --- docs/developer-backends.md | 48 ++++++++++ docs/developer.md | 2 + opt/build/backends.rules | 11 ++- opt/build/onnxruntime/Makefile | 132 -------------------------- opt/build/onnxruntime/dockerfile.tmpl | 2 +- opt/build/onnxruntime/pack.sh | 18 +++- 6 files changed, 73 insertions(+), 140 deletions(-) create mode 100644 docs/developer-backends.md diff --git a/docs/developer-backends.md b/docs/developer-backends.md new file mode 100644 index 000000000..26fcff676 --- /dev/null +++ b/docs/developer-backends.md @@ -0,0 +1,48 @@ +# RedisAI Development Backends + +This document describes how a backend for RedisAI can be built, from this repository. It highlights the supported compilation devices on a per-backend basis, and highlights the tools and commands required. Unless indicated otherwise, a backend is compiled in a docker, which is responsible for the configuration and installation of all tools required for a given backend on a per-platform basis. + +To follow these instructions, this repository must be cloned with all of its submodules (i.e *git clone --recursive https://github.com/RedisLabsModules/redisai*) + +GNU Make is used as a runner for the dockerfile generator. Python is the language used for the generator script, and jinja is the templating library used to create the docker file from the template. + +## Tools + +Buiding the backends requires installation of the following tools: + +1. gnu make +1. python (3.0 or higher) +1. docker +1. jinja2 jinja is used to generate the platform dockerfile from a *dockerfile.tmpl* that can be found in the directory of a given backend listed below. + +On ubuntu bionic these can be installed by running: + +* sudo apt install python3 python3-dev make docker +* pip install --user jinja + +------- + +## Backends + +### onnxruntime + +**Compilation target devices:** + +1. x86\_64 bit linux systems + +1. x86\_64 bit linux systems with a GPU + +1. jetson devices + +**Directory:** opt/build/onnxruntime + +**Build options:** + +1. To build run *make* + +1. To build with GPU support on x86\_64 run *make GPU=1* + +1. Should you want to build multiple targets from a shared directory, run *make DOCKER_SUFFIX=* on your target system. For example, if building on an arm and x64 workload, from a shared directory run: + * On x86: make DOCKER\_SUFFIX=x86\_64 + + * On arm: make DOCKER\_SUFFIX=arm diff --git a/docs/developer.md b/docs/developer.md index 31455b335..989b74785 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -169,6 +169,8 @@ sudo ./opt/system-setup.py To compile RedisAI, run *make -C opt*, from the root of the repository. +Build the backends is described in [this document](developer-backends.md). + ### Testing **Running Tests** diff --git a/opt/build/backends.rules b/opt/build/backends.rules index 8dc3eaa8e..32def3ced 100644 --- a/opt/build/backends.rules +++ b/opt/build/backends.rules @@ -14,21 +14,28 @@ export REDIS_CMAKE_ARCH # override if necessary in top-level make files DEFAULT_DOCKER_TAG=${DOCKER_ORG}/${PRODUCT}:build -BACKEND_NAME=${PRODUCT}-${OS}-${ARCH}-${VERSION}.tgz CIDFILE=${PRODUCT}.${ARCH}.cid ifeq ($(GPU),1) REDIS_GPU=1 +VARIANT=gpu +CIDFILE=${PRODUCT}.${ARCH}.cid export REDIS_GPU endif +ifeq ($(VARIANT),) +BACKEND_NAME=${PRODUCT}-${OS}-${ARCH}-${VERSION}.tgz +else +BACKEND_NAME=${PRODUCT}-${OS}-${ARCH}-${VARIANT}-${VERSION}.tgz +endif + S3_URL=redismodules/${PRODUCT} build: @rm -f ${BACKEND_NAME} *.cid REDIS_ARCH=${ARCH} \ ${READIES}/bin/dockerwrapper \ - -d ${CURDIR}/Dockerfile \ + -d ${CURDIR}/Dockerfile${DOCKER_SUFFIX} \ -t ${DEFAULT_DOCKER_TAG} \ -e REDIS \ -D "${DOCKER_OPTS}" \ diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index ab8a7d4af..de5134006 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -10,135 +10,3 @@ ROOT=. READIES=${ROOT}/../../readies include ../backends.rules - -#VERSION ?= 1.8 -#OSNICK ?= buster -# -##---------------------------------------------------------------------------------------------- -# -#S3_URL=redismodules/onnxruntime -# -#STEM=onnxruntime-linux -# -#KEEP ?= 1 -# -#DOCKER_OS.bionic=ubuntu:bionic -#DOCKER_OS.stretch=debian:stretch-slim -#DOCKER_OS.buster=debian:buster-slim -#DOCKER_OS=$(DOCKER_OS.$(OSNICK)) -# -##---------------------------------------------------------------------------------------------- -# -#define targets # (1=OP, 2=op) -#$(1)_TARGETS := -#$(1)_TARGETS += $(if $(findstring $(X64),1),$(2)_x64) -#$(1)_TARGETS += $(if $(findstring $(ARM7),1),$(2)_arm32v7) -#$(1)_TARGETS += $(if $(findstring $(ARM8),1),$(2)_arm64v8) -# -#$(1)_TARGETS += $$(if $$(strip $$($(1)_TARGETS)),,$(2)_x64 $(2)_arm32v7 $(2)_arm64v8) -#endef -# -#$(eval $(call targets,BUILD,build)) -#$(eval $(call targets,PUBLISH,publish)) -# -##---------------------------------------------------------------------------------------------- -## arch=x64|arm32v7|arm64v8 -## tar_arch=x86_64|arm|arm64 -# -#define build_x64 # (1=arch, 2=tar-arch) -#IID_$(1)=$(1)_$(VERSION).iid -#CID_$(1)=$(1)_$(VERSION).cid -# -#build_x64: -# @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-x64:$(VERSION) -f Dockerfile.x64 \ -# --build-arg OS=$(DOCKER_OS) $(ROOT) -# @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` -# @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-x64-$(VERSION).tgz . -# -#.PHONY: build_x64 -#endef -# -#define build_x64-gpu # (1=arch, 2=tar-arch) -#IID_$(1)=$(1)_$(VERSION).iid -#CID_$(1)=$(1)_$(VERSION).cid -# -#build_x64-gpu: -# @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-$(1):$(VERSION) -f Dockerfile.x64-gpu \ -# --build-arg OS=$(DOCKER_OS) $(ROOT) -# @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` -# @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(1)-$(VERSION).tgz . -# -#.PHONY: build_x64 -#endef -# -#define build_arm # (1=arch, 2=tar-arch) -#IID_$(1)=$(1)_$(VERSION).iid -#CID_$(1)=$(1)_$(VERSION).cid -# -#build_$(1): -# @docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-$(1):$(VERSION) -f Dockerfile.arm \ -# --build-arg ARCH=$(1) --build-arg ARCH_FLAG=--$(2) $(ROOT) -# @docker create --cidfile $$(CID_$(1)) `cat $$(IID_$(1))` -# @docker cp `cat $$(CID_$(1))`:/build/$(STEM)-$(2)-$(VERSION).tgz . -#ifneq ($(KEEP),1) -# # @rm $$(IID_$(1)) $$(CID_$(1)) -#endif -# -#.PHONY: build_$(1) -#endef -# -##---------------------------------------------------------------------------------------------- -# -#define publish_x64 # (1=arch, 2=tar-arch) -#publish_x64: -# @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read -# -#.PHONY: publish_x64 -#endef -# -#define publish_x64-gpu # (1=arch, 2=tar-arch) -#publish_x64-gpu: -# @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read -# -#.PHONY: publish_x64-gpu -#endef -# -#define publish_arm # (1=arch, 2=tar-arch) -#publish_$(1): -# @aws s3 cp $(STEM)-$(2)-$(VERSION).tgz s3://$(S3_URL)/ --acl public-read -#ifneq ($(KEEP),1) -# # @rm $(STEM)-$(2)-$(VERSION).tgz -#endif -# -#.PHONY: publish_$(1) -#endef -# -##---------------------------------------------------------------------------------------------- -# -#all: build publish -# -#build: $(BUILD_TARGETS) -# -#$(eval $(call build_x64,x64,x86_64)) -#$(eval $(call build_x64-gpu,x64-gpu,x86_64-gpu)) -#$(eval $(call build_arm,arm64v8,arm64)) -#$(eval $(call build_arm,arm32v7,arm)) -# -#ifneq ($(filter publish,$(MAKECMDGOALS)),) -#ifeq ($(wildcard $(HOME)/.aws/credentials),) -#$(error Please run 'aws configure' and provide it with access credentials) -#endif -#endif -# -#publish: $(PUBLISH_TARGETS) -# -#$(eval $(call publish_x64,x64,x64)) -#$(eval $(call publish_x64-gpu,x64-gpu,x64-gpu)) -#$(eval $(call publish_arm,arm64v8,arm64)) -#$(eval $(call publish_arm,arm32v7,arm)) -# -# -#help: -# @echo "make [build|publish] [X64=1|ARM7=1|ARM8=1]" -# -#.PHONY: all build publish help diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index c22768746..07a0cd94c 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -55,4 +55,4 @@ RUN ./build.sh --config ${BUILDTYPE} ${BUILDARGS} --update --build --build_share # package ADD ./pack.sh /build WORKDIR /build -RUN ./pack.sh {{REDIS_ONNX_VERSION}} {{REDIS_ARCH}} +RUN ./pack.sh {{REDIS_ONNX_VERSION}} {{REDIS_ARCH}} ${BUILDTYPE} linux {% if REDIS_GPU is defined %} gpu {% endif %} diff --git a/opt/build/onnxruntime/pack.sh b/opt/build/onnxruntime/pack.sh index ba3705a2c..93f82d1fc 100755 --- a/opt/build/onnxruntime/pack.sh +++ b/opt/build/onnxruntime/pack.sh @@ -1,11 +1,19 @@ #!/bin/bash set -e -VER="$1" -PLATFORM="$2" +VER="$1" # 1.8.0 +PLATFORM="$2" # x64|jetson +BUILDTYPE="$3" # Release +BASEOS="$4" # linux (mac future?) +VARIANT="$5" # if set (gpu) + +target=onnxruntime-${BASEOS}-${PLATFORM}-${VER} +if [ ! -z "${VARIANT}" ]; then + target=onnxruntime-${BASEOS}-${PLATFORM}-${VARIANT}-${VER} +fi mkdir -p pack/include pack/lib -cp onnxruntime/build/Linux/Release/libonnxruntime.so.${VER} pack/lib/ +cp onnxruntime/build/Linux/$BUILDTYPE/libonnxruntime.so.${VER} pack/lib/ cp onnxruntime/docs/C_API_Guidelines.md pack/ cp onnxruntime/LICENSE pack/ cp onnxruntime/README.md pack/ @@ -19,5 +27,5 @@ cp onnxruntime/include/onnxruntime/core/providers/cuda/cuda_provider_factory.h p cd pack/lib/ ln -s libonnxruntime.so.${VER} libonnxruntime.so cd ../.. -mv pack onnxruntime-linux-${PLATFORM}-${VER} -tar czf onnxruntime-linux-${PLATFORM}-${VER}.tgz onnxruntime-linux-${PLATFORM}-${VER}/ +mv pack ${target} +tar czf ${target}.tgz ${target}/ From 1136450b006ef545603eea34520405848f9885d6 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 16 Jun 2021 14:04:19 +0300 Subject: [PATCH 06/28] split up onnx to use docker library parts --- opt/build/backends.rules | 1 + opt/build/dockerparts/apt.yml | 16 ++++++++++++++++ opt/build/dockerparts/cmake.yml | 9 +++++++++ opt/build/onnxruntime/dockerfile.tmpl | 25 +++---------------------- 4 files changed, 29 insertions(+), 22 deletions(-) create mode 100644 opt/build/dockerparts/apt.yml create mode 100644 opt/build/dockerparts/cmake.yml diff --git a/opt/build/backends.rules b/opt/build/backends.rules index 32def3ced..f9ac74bb7 100644 --- a/opt/build/backends.rules +++ b/opt/build/backends.rules @@ -37,6 +37,7 @@ build: ${READIES}/bin/dockerwrapper \ -d ${CURDIR}/Dockerfile${DOCKER_SUFFIX} \ -t ${DEFAULT_DOCKER_TAG} \ + -S ../dockerparts \ -e REDIS \ -D "${DOCKER_OPTS}" \ ${DOCKER_ARGS} diff --git a/opt/build/dockerparts/apt.yml b/opt/build/dockerparts/apt.yml new file mode 100644 index 000000000..3a363e7fb --- /dev/null +++ b/opt/build/dockerparts/apt.yml @@ -0,0 +1,16 @@ +RUN apt-get -qq update +RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ + build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ + python3.6 python3-pip python3-dev python3-numpy + +RUN rm /usr/bin/python3 +RUN ln -s /usr/bin/python3.6 /usr/bin/python3 +RUN python3 -m pip install --upgrade pip setuptools wheel + +ENV LANG=en_US.UTF-8 +RUN apt-get install -y locales && \ + sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=$LANG + + diff --git a/opt/build/dockerparts/cmake.yml b/opt/build/dockerparts/cmake.yml new file mode 100644 index 000000000..91f9a807f --- /dev/null +++ b/opt/build/dockerparts/cmake.yml @@ -0,0 +1,9 @@ +{% set cmake_version = "3.19.7" %} +RUN wget -q https://github.com/Kitware/CMake/releases/download/v{{cmake_version}}/cmake-{{cmake_version}}-Linux-{{REDIS_CMAKE_ARCH}}.tar.gz -O /tmp/cmake.tgz + +WORKDIR /tmp +RUN tar -zxpf /tmp/cmake.tgz +RUN mv /tmp/cmake*/bin/* /usr/bin +RUN mv /tmp/cmake-*/share/cmake* /usr/share/ + + diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index 07a0cd94c..2c19bb2f4 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -1,7 +1,7 @@ #---------------------------------------------------------------------------------------------- {% if REDIS_ARCH == 'x64' %} -FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04 {% if REDIS_GPU is defined %} +FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04 {% else %} FROM ubuntu:bionic {% endif %} @@ -13,28 +13,9 @@ FROM nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base ARG ONNXRUNTIME_REPO={{REDIS_ONNX_REPO}} ARG ONNXRUNTIME_VER={{REDIS_ONNX_VERSION}} -RUN apt-get -qq update -RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ - build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ - python3.6 python3-pip python3-dev python3-numpy - -RUN rm /usr/bin/python3 -RUN ln -s /usr/bin/python3.6 /usr/bin/python3 -RUN python3 -m pip install --upgrade pip setuptools wheel - -ENV LANG=en_US.UTF-8 -RUN apt-get install -y locales && \ - sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \ - dpkg-reconfigure --frontend=noninteractive locales && \ - update-locale LANG=$LANG - -{% set cmake_version = "3.19.7" %} -RUN wget -q https://github.com/Kitware/CMake/releases/download/v{{cmake_version}}/cmake-{{cmake_version}}-Linux-{{REDIS_CMAKE_ARCH}}.tar.gz -O /tmp/cmake.tgz +{% include 'apt.yml' %} -WORKDIR /tmp -RUN tar -zxpf /tmp/cmake.tgz -RUN mv /tmp/cmake*/bin/* /usr/bin -RUN mv /tmp/cmake-*/share/cmake* /usr/share/ +{% include 'cmake.yml' %} # build WORKDIR /build From fffa1ea7f485a47fa1ec8f62e14898326e40ad53 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Thu, 17 Jun 2021 12:55:57 +0300 Subject: [PATCH 07/28] pr comments --- opt/build/backends.rules | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opt/build/backends.rules b/opt/build/backends.rules index f9ac74bb7..8881c8439 100644 --- a/opt/build/backends.rules +++ b/opt/build/backends.rules @@ -7,11 +7,10 @@ REDIS_CMAKE_ARCH=x86_64 ifeq ($(shell test -e /usr/share/doc/nvidia-l4t-jetson-io && echo -n yes),yes) ARCH=jetson REDIS_CMAKE_ARCH=aarch64 -else +GPU=1 endif export REDIS_CMAKE_ARCH - # override if necessary in top-level make files DEFAULT_DOCKER_TAG=${DOCKER_ORG}/${PRODUCT}:build CIDFILE=${PRODUCT}.${ARCH}.cid @@ -19,7 +18,7 @@ CIDFILE=${PRODUCT}.${ARCH}.cid ifeq ($(GPU),1) REDIS_GPU=1 VARIANT=gpu -CIDFILE=${PRODUCT}.${ARCH}.cid +CIDFILE=${PRODUCT}.${ARCH}.gpu.cid # this way we can build from the same tree across platforms export REDIS_GPU endif From bbfde5b406efefc7c68e8859baba03a00756f661 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Thu, 17 Jun 2021 12:59:23 +0300 Subject: [PATCH 08/28] pr comments --- opt/build/onnxruntime/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index de5134006..aa8de57e0 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -1,5 +1,8 @@ -export REDIS_ONNX_VERSION = 1.8.0 -export REDIS_ONNX_REPO = https://github.com/microsoft/onnxruntime +REDIS_ONNX_VERSION?=1.8.0 +REDIS_ONNX_REPO?=https://github.com/microsoft/onnxruntime + +export REDIS_ONNX_VERSION +export REDIS_ONNX_REPO PRODUCT=onnxruntime DOCKER_ORG=redislabs From 144411944f9271562c396e056e5a41b26851d1cb Mon Sep 17 00:00:00 2001 From: alon Date: Tue, 5 Oct 2021 12:18:03 +0300 Subject: [PATCH 09/28] WIP --- opt/build/dockerparts/apt.yml | 4 +--- opt/build/onnxruntime/Makefile | 2 +- opt/build/onnxruntime/dockerfile.tmpl | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/opt/build/dockerparts/apt.yml b/opt/build/dockerparts/apt.yml index 3a363e7fb..9415c7f2e 100644 --- a/opt/build/dockerparts/apt.yml +++ b/opt/build/dockerparts/apt.yml @@ -1,10 +1,8 @@ RUN apt-get -qq update RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ - python3.6 python3-pip python3-dev python3-numpy + python3 python3-pip python3-dev python3-numpy -RUN rm /usr/bin/python3 -RUN ln -s /usr/bin/python3.6 /usr/bin/python3 RUN python3 -m pip install --upgrade pip setuptools wheel ENV LANG=en_US.UTF-8 diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index aa8de57e0..912bfaa81 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -1,4 +1,4 @@ -REDIS_ONNX_VERSION?=1.8.0 +REDIS_ONNX_VERSION?=1.9.0 REDIS_ONNX_REPO?=https://github.com/microsoft/onnxruntime export REDIS_ONNX_VERSION diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index 2c19bb2f4..ffbc1b636 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -1,9 +1,9 @@ #---------------------------------------------------------------------------------------------- {% if REDIS_ARCH == 'x64' %} {% if REDIS_GPU is defined %} -FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04 +FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu16.04 {% else %} -FROM ubuntu:bionic +FROM ubuntu:xenial {% endif %} {% elif REDIS_ARCH == 'jetson' %} @@ -30,7 +30,7 @@ ARG BUILDARGS ARG BUILDARGS="--config ${BUILDTYPE} --parallel" RUN git clone --single-branch --branch v${ONNXRUNTIME_VER} ${ONNXRUNTIME_REPO} onnxruntime WORKDIR /build/onnxruntime -RUN git fetch --recurse-submodules -j4 +RUN git fetch --recurse-submodules RUN ./build.sh --config ${BUILDTYPE} ${BUILDARGS} --update --build --build_shared_lib --parallel # package From c56aa854e9cdfe92f1af6c90fb6be9704427d5c4 Mon Sep 17 00:00:00 2001 From: alon Date: Tue, 5 Oct 2021 12:36:50 +0300 Subject: [PATCH 10/28] remove temporarily the custom allocator support --- src/backends/onnxruntime.c | 5 +- tests/flow/tests_onnx.py | 109 ------------------------------------- 2 files changed, 1 insertion(+), 113 deletions(-) diff --git a/src/backends/onnxruntime.c b/src/backends/onnxruntime.c index f6145ebef..ed3a41efc 100644 --- a/src/backends/onnxruntime.c +++ b/src/backends/onnxruntime.c @@ -1,5 +1,4 @@ #define REDISMODULE_MAIN -#include #include "backends/util.h" #include #include @@ -391,9 +390,7 @@ RAI_Model *RAI_ModelCreateORT(RAI_Backend backend, const char *devicestr, RAI_Mo // models inputs and outputs names (for both models that run on CPU and GPU) if (env == NULL) { ONNX_VALIDATE_STATUS(ort->CreateEnv(ORT_LOGGING_LEVEL_WARNING, "test", &env)) - ONNX_VALIDATE_STATUS(ort->CreateCustomDeviceAllocator( - ORT_API_VERSION, AllocatorAlloc, AllocatorFree, AllocatorInfo, &global_allocator)) - ONNX_VALIDATE_STATUS(ort->RegisterCustomDeviceAllocator(env, global_allocator)) + ONNX_VALIDATE_STATUS(ort->GetAllocatorWithDefaultOptions(&global_allocator)); } ONNX_VALIDATE_STATUS(ort->CreateSessionOptions(&session_options)) diff --git a/tests/flow/tests_onnx.py b/tests/flow/tests_onnx.py index 1fd83d27b..73abd85f4 100644 --- a/tests/flow/tests_onnx.py +++ b/tests/flow/tests_onnx.py @@ -363,115 +363,6 @@ def test_parallelism(): env.assertEqual(load_time_config["ai_intra_op_parallelism"], "2") -def test_onnx_use_custom_allocator(env): - if not TEST_ONNX: - env.debugPrint("skipping {} since TEST_ONNX=0".format(sys._getframe().f_code.co_name), force=True) - return - - con = get_connection(env, '{1}') - model_pb = load_file_content('mul_1.onnx') - - # Expect using the allocator during model set for allocating the model, its input name and output name: - # overall 3 allocations. The model raw size is 130B ,and the names are 2B each. In practice we allocate - # more than 134B as Redis allocator will use additional memory for its internal management and for the - # 64-Byte alignment. When the test runs with valgrind, redis will use malloc for the allocations - # (hence will not use additional memory). - ret = con.execute_command('AI.MODELSTORE', 'm{1}', 'ONNX', 'CPU', 'BLOB', model_pb) - env.assertEqual(ret, b'OK') - backends_info = get_info_section(con, 'backends_info') - - # Expect using at least 130+63+(size of an address) + 2*(2+63+(size of an address)) bytes. - model_allocation_bytes_used = int(backends_info["ai_onnxruntime_memory"]) - env.assertTrue(model_allocation_bytes_used > 334) - env.assertEqual(int(backends_info["ai_onnxruntime_memory_access_num"]), 3) - con.execute_command('AI.TENSORSET', 'a_mul{1}', 'FLOAT', 3, 2, 'VALUES', 1.0, 2.0, 3.0, 4.0, 5.0, 6.0) - - # Running the model should access the allocator 6 times: allocating+freeing input+output names, - # and allocating+freeing the output as OrtValue. - con.execute_command('AI.MODELEXECUTE', 'm{1}', 'INPUTS', 1, 'a_mul{1}', 'OUTPUTS', 1, 'b{1}') - values = con.execute_command('AI.TENSORGET', 'b{1}', 'VALUES') - env.assertEqual(values, [b'1', b'4', b'9', b'16', b'25', b'36']) - backends_info = get_info_section(con, 'backends_info') - env.assertEqual(int(backends_info["ai_onnxruntime_memory_access_num"]), 9) - env.assertEqual(int(backends_info["ai_onnxruntime_memory"]), model_allocation_bytes_used) - - # Expect using the allocator free function 3 times: when releasing the model, input name and output name. - con.execute_command('AI.MODELDEL', 'm{1}') - env.assertFalse(con.execute_command('EXISTS', 'm{1}')) - backends_info = get_info_section(con, 'backends_info') - env.assertEqual(int(backends_info["ai_onnxruntime_memory"]), 0) - env.assertEqual(int(backends_info["ai_onnxruntime_memory_access_num"]), 12) - - # test the use of Redis allocator in model run op. - model_pb = load_file_content('mnist.onnx') - sample_raw = load_file_content('one.raw') - - ret = con.execute_command('AI.MODELSTORE', 'm{1}', 'ONNX', 'CPU', 'BLOB', model_pb) - env.assertEqual(ret, b'OK') - con.execute_command('AI.TENSORSET', 'a{1}', 'FLOAT', 1, 1, 28, 28, 'BLOB', sample_raw) - - # Expect 18 allocator's access from onnx during the run (in addition to the allocations that were made while - # creating the model). - backends_info = get_info_section(con, 'backends_info') - allocator_access_num_before = backends_info["ai_onnxruntime_memory_access_num"] - con.execute_command('AI.MODELEXECUTE', 'm{1}', 'INPUTS', 1, 'a{1}', 'OUTPUTS', 1, 'b{1}') - backends_info = get_info_section(con, 'backends_info') - allocator_access_num_after = backends_info["ai_onnxruntime_memory_access_num"] - env.assertEqual(int(allocator_access_num_after) - int(allocator_access_num_before), 18) - - values = con.execute_command('AI.TENSORGET', 'b{1}', 'VALUES') - argmax = max(range(len(values)), key=lambda i: values[i]) - env.assertEqual(argmax, 1) - - -def test_onnx_use_custom_allocator_with_GPU(env): - if not TEST_ONNX: - env.debugPrint("skipping {} since TEST_ONNX=0".format(sys._getframe().f_code.co_name), force=True) - return - if DEVICE == 'CPU': - env.debugPrint("skipping {} since this test if for GPU only".format(sys._getframe().f_code.co_name), force=True) - return - - con = get_connection(env, '{1}') - model_pb = load_file_content('mul_1.onnx') - - # Expect using the allocator during model set for allocating the model, its input name and output name: - # overall 3 allocations. The model raw size is 130B ,and the names are 2B each. In practice we allocate - # more than 134B as Redis allocator will use additional memory for its internal management and for the - # 64-Byte alignment. When the test runs with valgrind, redis will use malloc for the allocations. - ret = con.execute_command('AI.MODELSTORE', 'm_gpu{1}', 'ONNX', DEVICE, 'BLOB', model_pb) - env.assertEqual(ret, b'OK') - - # but for GPU, expect using the allocator only for allocating input and output names (not the model itself). - ret = con.execute_command('AI.MODELSTORE', 'm_cpu{1}', 'ONNX', 'CPU', 'BLOB', model_pb) - env.assertEqual(ret, b'OK') - backends_info = get_info_section(con, 'backends_info') - - # Expect using at least 130+63+(size of an address) + 4*(2+63+(size of an address)) bytes. - model_allocation_bytes_used = int(backends_info["ai_onnxruntime_memory"]) - env.assertTrue(model_allocation_bytes_used > 472) - env.assertTrue(model_allocation_bytes_used < 705) - env.assertEqual(int(backends_info["ai_onnxruntime_memory_access_num"]), 5) - - # Make sure that allocator is not used for running and freeing the GPU model, except for - # the input and output names allocations (and deallocations). - con.execute_command('AI.TENSORSET', 'a{1}', 'FLOAT', 3, 2, 'VALUES', 1.0, 2.0, 3.0, 4.0, 5.0, 6.0) - con.execute_command('AI.MODELEXECUTE', 'm_gpu{1}', 'INPUTS', 1, 'a{1}', 'OUTPUTS', 1, 'b{1}') - values = con.execute_command('AI.TENSORGET', 'b{1}', 'VALUES') - env.assertEqual(values, [b'1', b'4', b'9', b'16', b'25', b'36']) - # Expect that memory usage didn't change, and for another 4 accesses to the allocator (input and output names - # allocation and free) - backends_info = get_info_section(con, 'backends_info') - env.assertEqual(int(backends_info["ai_onnxruntime_memory"]), model_allocation_bytes_used) - env.assertEqual(int(backends_info["ai_onnxruntime_memory_access_num"]), 9) - - # Expect only 2 more accesses in delete - for deallocating input and output names - con.execute_command('AI.MODELDEL', 'm_gpu{1}') - env.assertFalse(con.execute_command('EXISTS', 'm_gpu{1}')) - backends_info = get_info_section(con, 'backends_info') - env.assertEqual(int(backends_info["ai_onnxruntime_memory_access_num"]), 11) - - class TestOnnxKillSwitch: def __init__(self): From d1c5e804acb4a9b98c3ccc22f5be5af77ed27f0a Mon Sep 17 00:00:00 2001 From: Chayim Kirshen Date: Tue, 5 Oct 2021 10:42:32 +0000 Subject: [PATCH 11/28] xenial onnx 1.9 build using the template --- opt/build/backends.rules | 1 + opt/build/dockerparts/apt.yml | 15 +++++++++++++-- opt/build/onnxruntime/Makefile | 1 + opt/build/onnxruntime/dockerfile.tmpl | 18 +++++++++--------- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/opt/build/backends.rules b/opt/build/backends.rules index 8881c8439..faa655fce 100644 --- a/opt/build/backends.rules +++ b/opt/build/backends.rules @@ -33,6 +33,7 @@ S3_URL=redismodules/${PRODUCT} build: @rm -f ${BACKEND_NAME} *.cid REDIS_ARCH=${ARCH} \ + REDIS_OSNICK=${OSNICK} \ ${READIES}/bin/dockerwrapper \ -d ${CURDIR}/Dockerfile${DOCKER_SUFFIX} \ -t ${DEFAULT_DOCKER_TAG} \ diff --git a/opt/build/dockerparts/apt.yml b/opt/build/dockerparts/apt.yml index 9415c7f2e..a2b09508e 100644 --- a/opt/build/dockerparts/apt.yml +++ b/opt/build/dockerparts/apt.yml @@ -1,7 +1,18 @@ -RUN apt-get -qq update +RUN apt-get update -qq +RUN DEBIAN_NONINTERACTIVE=y1 apt-get install -y software-properties-common + +{% if REDIS_OSNICK == 'xenial' %} +RUN add-apt-repository ppa:deadsnakes/ppa +RUN add-apt-repository ppa:ubuntu-toolchain-r/test +{% endif %} + +RUN apt-get update -qq RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ - python3 python3-pip python3-dev python3-numpy + python3.6 python3-pip python3-dev python3-numpy + +RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y gcc-9 g++-9 +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 RUN python3 -m pip install --upgrade pip setuptools wheel diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index 912bfaa81..da2e75d2f 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -7,6 +7,7 @@ export REDIS_ONNX_REPO PRODUCT=onnxruntime DOCKER_ORG=redislabs VERSION=${REDIS_ONNX_VERSION} +OSNICK=xenial ROOT=. diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index ffbc1b636..e323ebb74 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -20,20 +20,20 @@ ARG ONNXRUNTIME_VER={{REDIS_ONNX_VERSION}} # build WORKDIR /build {% if REDIS_GPU is defined %} -ARG BUILDTYPE=MinSizeRel -ARG BUILDARGS="--use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda" +{% set BUILDTYPE="MinSizeRel" %} +{% set BUILDARGS="--use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda" %} {% else %} -ARG BUILDTYPE=Release -ARG BUILDARGS +{% set BUILDTYPE="Release" %} +{% set BUILDARGS="" %} {% endif %} -ARG BUILDARGS="--config ${BUILDTYPE} --parallel" -RUN git clone --single-branch --branch v${ONNXRUNTIME_VER} ${ONNXRUNTIME_REPO} onnxruntime +ARG BUILDARGS="--config {{BUILDTYPE}} --parallel" +RUN git clone --single-branch --branch v{{REDIS_ONNX_VERSION}} {{REDIS_ONNX_REPO}} onnxruntime WORKDIR /build/onnxruntime -RUN git fetch --recurse-submodules -RUN ./build.sh --config ${BUILDTYPE} ${BUILDARGS} --update --build --build_shared_lib --parallel +RUN git fetch --recurse-submodules -j4 || git fetch --recurse-submodules +RUN ./build.sh --config {{BUILDTYPE}} {{BUILDARGS}} --update --build --build_shared_lib --parallel # package ADD ./pack.sh /build WORKDIR /build -RUN ./pack.sh {{REDIS_ONNX_VERSION}} {{REDIS_ARCH}} ${BUILDTYPE} linux {% if REDIS_GPU is defined %} gpu {% endif %} +RUN ./pack.sh {{REDIS_ONNX_VERSION}} {{REDIS_ARCH}} {{BUILDTYPE}} linux {% if REDIS_GPU is defined %} gpu {% endif %} From 08e8ef93ee5646d247d1816c440dfaa2d9a61da5 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 5 Oct 2021 14:22:37 +0300 Subject: [PATCH 12/28] fixing python --- opt/build/dockerparts/apt.yml | 7 ++++--- opt/build/onnxruntime/dockerfile.tmpl | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opt/build/dockerparts/apt.yml b/opt/build/dockerparts/apt.yml index a2b09508e..496e7166a 100644 --- a/opt/build/dockerparts/apt.yml +++ b/opt/build/dockerparts/apt.yml @@ -4,14 +4,15 @@ RUN DEBIAN_NONINTERACTIVE=y1 apt-get install -y software-properties-common {% if REDIS_OSNICK == 'xenial' %} RUN add-apt-repository ppa:deadsnakes/ppa RUN add-apt-repository ppa:ubuntu-toolchain-r/test -{% endif %} +{% endif %} RUN apt-get update -qq RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ - python3.6 python3-pip python3-dev python3-numpy + python3.6 python3-pip python3-dev python3-numpy \ + gcc-9 g++-9 -RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y gcc-9 g++-9 +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 60 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 RUN python3 -m pip install --upgrade pip setuptools wheel diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index e323ebb74..d962b65f0 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -30,7 +30,6 @@ WORKDIR /build ARG BUILDARGS="--config {{BUILDTYPE}} --parallel" RUN git clone --single-branch --branch v{{REDIS_ONNX_VERSION}} {{REDIS_ONNX_REPO}} onnxruntime WORKDIR /build/onnxruntime -RUN git fetch --recurse-submodules -j4 || git fetch --recurse-submodules RUN ./build.sh --config {{BUILDTYPE}} {{BUILDARGS}} --update --build --build_shared_lib --parallel # package From 63a318d2779033a4eca0575f76961264952ae528 Mon Sep 17 00:00:00 2001 From: alon Date: Wed, 6 Oct 2021 09:54:32 +0300 Subject: [PATCH 13/28] build onnx + test building with DISABLE_EXTERNAL_INITIALIZERS flag --- get_deps.sh | 2 +- opt/build/onnxruntime/dockerfile.tmpl | 2 +- opt/build/onnxruntime/pack.sh | 7 +++++-- tests/flow/includes.py | 18 +++++++++++------- tests/flow/tests_onnx.py | 19 +++++++++++++++++++ 5 files changed, 37 insertions(+), 11 deletions(-) diff --git a/get_deps.sh b/get_deps.sh index 11e18f8ae..c84e0e67f 100755 --- a/get_deps.sh +++ b/get_deps.sh @@ -289,7 +289,7 @@ fi ################################################################################### ONNXRUNTIME -ORT_VERSION="1.7.1" +ORT_VERSION="1.9.0" if [[ $WITH_ORT != 0 ]]; then [[ $FORCE == 1 ]] && rm -rf $ONNXRUNTIME diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index d962b65f0..0148b51e0 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -24,7 +24,7 @@ WORKDIR /build {% set BUILDARGS="--use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda" %} {% else %} {% set BUILDTYPE="Release" %} -{% set BUILDARGS="" %} +{% set BUILDARGS="--cmake_extra_defines onnxruntime_DISABLE_EXTERNAL_INITIALIZERS=ON" %} {% endif %} ARG BUILDARGS="--config {{BUILDTYPE}} --parallel" diff --git a/opt/build/onnxruntime/pack.sh b/opt/build/onnxruntime/pack.sh index 93f82d1fc..76df79999 100755 --- a/opt/build/onnxruntime/pack.sh +++ b/opt/build/onnxruntime/pack.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -VER="$1" # 1.8.0 +VER="$1" # 1.9.0 PLATFORM="$2" # x64|jetson BUILDTYPE="$3" # Release BASEOS="$4" # linux (mac future?) @@ -23,7 +23,10 @@ cd onnxruntime/ git rev-parse HEAD > ../pack/GIT_COMMIT_ID cd .. cp onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h pack/include/ -cp onnxruntime/include/onnxruntime/core/providers/cuda/cuda_provider_factory.h pack/include/ +cp onnxruntime/include/onnxruntime/core/session/onnxruntime_cxx_api.h pack/include/ +cp onnxruntime/include/onnxruntime/core/session/onnxruntime_cxx_inline.h pack/include/ +cp onnxruntime/include/onnxruntime/core/framework/provider_options.h pack/include/ +cp onnxruntime/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h pack/include/ cd pack/lib/ ln -s libonnxruntime.so.${VER} libonnxruntime.so cd ../.. diff --git a/tests/flow/includes.py b/tests/flow/includes.py index ed06105a4..b61764d81 100755 --- a/tests/flow/includes.py +++ b/tests/flow/includes.py @@ -32,6 +32,10 @@ MAX_TRANSACTIONS=100 +# returns the test name and line number from which a helper function within this file was called +def get_caller_pos(): + return "{}:{}".format(sys._getframe(2).f_code.co_name, sys._getframe(2).f_lineno) + def ensureSlaveSynced(con, env, timeout_ms=0): if env.useSlaves: # When WAIT returns, all the previous write commands @@ -43,7 +47,7 @@ def ensureSlaveSynced(con, env, timeout_ms=0): except Exception as ex: # Error in converting to int env.debugPring(str(ex), force=True) - env.assertFalse(True) + env.assertFalse(True, message=get_caller_pos()) return env.assertEqual(number_replicas, 1) @@ -220,23 +224,23 @@ def load_file_content(file_name): def check_error_message(env, con, error_msg, *command, error_msg_is_substr=False): try: con.execute_command(*command) - env.assertFalse(True) + env.assertFalse(True, message=get_caller_pos()) except Exception as exception: - env.assertEqual(type(exception), redis.exceptions.ResponseError) + env.assertEqual(type(exception), redis.exceptions.ResponseError, message=get_caller_pos()) if error_msg_is_substr: # We only verify that the given error_msg is a substring of the entire error message. - env.assertTrue(str(exception).find(error_msg) > 0) + env.assertTrue(str(exception).find(error_msg) >= 0, message=get_caller_pos()) else: - env.assertEqual(error_msg, str(exception)) + env.assertEqual(error_msg, str(exception), message=get_caller_pos()) def check_error(env, con, *command): try: con.execute_command(*command) - env.assertFalse(True) + env.assertFalse(True, message=get_caller_pos()) except Exception as e: exception = e - env.assertEqual(type(exception), redis.exceptions.ResponseError) + env.assertEqual(type(exception), redis.exceptions.ResponseError, message=get_caller_pos()) # Returns a dict with all the fields of a certain section from INFO MODULES command diff --git a/tests/flow/tests_onnx.py b/tests/flow/tests_onnx.py index 73abd85f4..32e9b444a 100644 --- a/tests/flow/tests_onnx.py +++ b/tests/flow/tests_onnx.py @@ -1,3 +1,4 @@ +import shutil import sys import os import subprocess @@ -428,3 +429,21 @@ def test_multiple_devices(self): backends_info = get_info_section(con, 'backends_info') self.env.assertEqual(backends_info['ai_onnxruntime_maximum_run_sessions_number'], str(len(devices)*self.threads_per_queue)) + + +def test_forbidden_external_initializers(env): + if not TEST_ONNX: + env.debugPrint("skipping {} since TEST_ONNX=0".format(sys._getframe().f_code.co_name), force=True) + return + if DEVICE != 'CPU': + return + con = get_connection(env, '{1}') + + # move the external initializer to the redis' current dir (tests/flow/logs) + external_initializer_model = load_file_content("model_with_external_initializers.onnx") + shutil.copy(ROOT+"/tests/flow/test_data/Pads.bin", ROOT+"/tests/flow/logs") + check_error_message(env, con, "Initializer tensors with external data is not allowed.", + 'AI.MODELSTORE', 'ext_initializers_model{1}', 'ONNX', DEVICE, + 'BLOB', external_initializer_model) + + os.remove(ROOT+"/tests/flow/logs/Pads.bin") From 724319b794cdd28d4d3af601a8b28932b5f65931 Mon Sep 17 00:00:00 2001 From: alon Date: Wed, 6 Oct 2021 11:45:49 +0300 Subject: [PATCH 14/28] Add the model with the external initializer --- tests/flow/test_data/Pads.bin | Bin 0 -> 32 bytes .../model_with_external_initializers.onnx | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 tests/flow/test_data/Pads.bin create mode 100644 tests/flow/test_data/model_with_external_initializers.onnx diff --git a/tests/flow/test_data/Pads.bin b/tests/flow/test_data/Pads.bin new file mode 100644 index 0000000000000000000000000000000000000000..d69e6beeff85daff64de4df5719686b136e278db GIT binary patch literal 32 PcmZQzKn09YE{p~M05|{x literal 0 HcmV?d00001 diff --git a/tests/flow/test_data/model_with_external_initializers.onnx b/tests/flow/test_data/model_with_external_initializers.onnx new file mode 100644 index 000000000..ab5470e22 --- /dev/null +++ b/tests/flow/test_data/model_with_external_initializers.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52b38a69e506b85e7f73c4a337e2674b5909d037ea94f3d0621c049a96f3e5a1 +size 173 From c9b82a39eb053cbb8bc48387f57e008c8504ec36 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 6 Oct 2021 12:23:12 +0300 Subject: [PATCH 15/28] Variablizing CUDA support Adding support for defining CUDA VERSIONS from outside the docker files, but still using defaults. --- opt/build/onnxruntime/Makefile | 9 ++++++--- opt/build/onnxruntime/dockerfile.tmpl | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index da2e75d2f..1960d406f 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -1,12 +1,15 @@ REDIS_ONNX_VERSION?=1.9.0 REDIS_ONNX_REPO?=https://github.com/microsoft/onnxruntime -export REDIS_ONNX_VERSION -export REDIS_ONNX_REPO - PRODUCT=onnxruntime DOCKER_ORG=redislabs VERSION=${REDIS_ONNX_VERSION} +REDIS_CUDA_VERSION=11.0-cudnn8 + +export REDIS_ONNX_VERSION +export REDIS_ONNX_REPO +export REDIS_CUDA_VERSION + OSNICK=xenial ROOT=. diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index 0148b51e0..a7c7c63c8 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -1,13 +1,23 @@ -#---------------------------------------------------------------------------------------------- +{% if REDIS_OSNICK == "xenial" %} +{% set cuda_suffix_os = "ubuntu16.04" %} +{% elif REDIS_OSNICK == "bionic" %} +{% set cuda_suffix_os = "ubuntu18.04" %} +{% endif %} + +{% if REDIS_ARCH == 'jetson' %} +FROM nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base +{% endif %} + {% if REDIS_ARCH == 'x64' %} {% if REDIS_GPU is defined %} -FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu16.04 +FROM nvidia/cuda:{{REDIS_CUDA_VERSION}}-devel-{{cuda_suffix_os}} {% else %} +{% if REDIS_OSNICK == "xenial" %} FROM ubuntu:xenial +{% elif REDIS_OSNICK == "bionic" %} +FROM ubuntu:bionic +{% endif %} {% endif %} - -{% elif REDIS_ARCH == 'jetson' %} -FROM nvcr.io/nvidia/deepstream-l4t:5.1-21.02-base {% endif %} ARG ONNXRUNTIME_REPO={{REDIS_ONNX_REPO}} From 1aa4836c9c00823b083b16f20aad9861fdf69e4e Mon Sep 17 00:00:00 2001 From: alon Date: Wed, 6 Oct 2021 16:00:27 +0300 Subject: [PATCH 16/28] use new key for deps cache --- .circleci/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 77850db05..295ae6b09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -101,7 +101,7 @@ commands: - checkout-all - restore_cache: keys: - - v1-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: @@ -112,7 +112,7 @@ commands: - save_cache: paths: - deps - key: v1-dependencies-{{ checksum "get_deps.sh" }}-cpu + key: v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu - run: name: Build command: make -C opt all SHOW=1 @@ -178,7 +178,7 @@ commands: - checkout-all - restore_cache: keys: - - v1-dependencies-{{ checksum "get_deps.sh" }}-gpu + - v1.2-dependencies-{{ checksum "get_deps.sh" }}-gpu - relocate-docker-storage - run: name: Build @@ -189,7 +189,7 @@ commands: - save_cache: paths: - deps - key: v1-dependencies-{{ checksum "get_deps.sh" }}-gpu + key: v1.2-dependencies-{{ checksum "get_deps.sh" }}-gpu - run: name: Test command: | @@ -239,7 +239,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1-dependencies-{{ checksum "get_deps.sh" }}-<>-<> + - v1.2-dependencies-{{ checksum "get_deps.sh" }}-<>-<> - setup-automation # since we run in parallel, we need to generate docker files with different suffixes hence the DOCKER_SUFFIX @@ -260,7 +260,7 @@ jobs: - save_cache: paths: - deps - key: v1-dependencies-{{ checksum "get_deps.sh" }}-<>-<> + key: v1.2-dependencies-{{ checksum "get_deps.sh" }}-<>-<> - persist_to_workspace: root: bin/ paths: @@ -275,7 +275,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: @@ -309,7 +309,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: From 297709845628f766c932717c4913275779a5518f Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Thu, 7 Oct 2021 15:06:47 +0300 Subject: [PATCH 17/28] gcc due to glibc versioning --- .circleci/config.yml | 22 +++++++++++----------- opt/build/dockerparts/apt.yml | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 295ae6b09..367c52ad7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -215,7 +215,7 @@ jobs: build-and-test: docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - build-steps: platform: debian @@ -229,7 +229,7 @@ jobs: target: # CPU|GPU type: string docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - abort_for_docs - abort_for_noci @@ -268,7 +268,7 @@ jobs: coverage: docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - abort_for_docs - abort_for_noci @@ -302,7 +302,7 @@ jobs: type: string default: "CLUSTER=0" docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - abort_for_docs - abort_for_noci @@ -331,14 +331,14 @@ jobs: valgrind-general-for-forked-prs: docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - only_run_if_forked_pull_request - valgrind-general-steps valgrind-general: docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - valgrind-general-steps @@ -411,7 +411,7 @@ jobs: location: type: string docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - abort_for_docs - abort_for_noci @@ -429,7 +429,7 @@ jobs: deploy-snapshot: docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - abort_for_docs - abort_for_noci @@ -446,7 +446,7 @@ jobs: deploy-release: docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - abort_for_docs - abort_for_noci @@ -464,7 +464,7 @@ jobs: release-automation: docker: - - image: redisfab/rmbuilder:6.2.5-x64-buster + - image: redisfab/rmbuilder:6.2.5-x64-bionic steps: - checkout - setup-automation @@ -478,7 +478,7 @@ jobs: #nightly-automation: # docker: - # - image: redisfab/rmbuilder:6.2.5-x64-buster + # - image: redisfab/rmbuilder:6.2.5-x64-bionic # steps: # - checkout # - setup-automation diff --git a/opt/build/dockerparts/apt.yml b/opt/build/dockerparts/apt.yml index 496e7166a..ee7233d94 100644 --- a/opt/build/dockerparts/apt.yml +++ b/opt/build/dockerparts/apt.yml @@ -10,10 +10,10 @@ RUN apt-get update -qq RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ python3.6 python3-pip python3-dev python3-numpy \ - gcc-9 g++-9 + gcc-7 g++-7 RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 60 -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 RUN python3 -m pip install --upgrade pip setuptools wheel From 728b6b9287f4ac0b4f0b29d519633e7c0151dd87 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Thu, 7 Oct 2021 15:47:51 +0300 Subject: [PATCH 18/28] s/bionic/buster/ is back --- .circleci/config.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 367c52ad7..295ae6b09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -215,7 +215,7 @@ jobs: build-and-test: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - build-steps: platform: debian @@ -229,7 +229,7 @@ jobs: target: # CPU|GPU type: string docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - abort_for_docs - abort_for_noci @@ -268,7 +268,7 @@ jobs: coverage: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - abort_for_docs - abort_for_noci @@ -302,7 +302,7 @@ jobs: type: string default: "CLUSTER=0" docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - abort_for_docs - abort_for_noci @@ -331,14 +331,14 @@ jobs: valgrind-general-for-forked-prs: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - only_run_if_forked_pull_request - valgrind-general-steps valgrind-general: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - valgrind-general-steps @@ -411,7 +411,7 @@ jobs: location: type: string docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - abort_for_docs - abort_for_noci @@ -429,7 +429,7 @@ jobs: deploy-snapshot: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - abort_for_docs - abort_for_noci @@ -446,7 +446,7 @@ jobs: deploy-release: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - abort_for_docs - abort_for_noci @@ -464,7 +464,7 @@ jobs: release-automation: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bionic + - image: redisfab/rmbuilder:6.2.5-x64-buster steps: - checkout - setup-automation @@ -478,7 +478,7 @@ jobs: #nightly-automation: # docker: - # - image: redisfab/rmbuilder:6.2.5-x64-bionic + # - image: redisfab/rmbuilder:6.2.5-x64-buster # steps: # - checkout # - setup-automation From 2b1f0bdf2014e6020be9e7710c367dee28d64ff4 Mon Sep 17 00:00:00 2001 From: alon Date: Thu, 7 Oct 2021 16:24:48 +0300 Subject: [PATCH 19/28] update deps cache key to v1.2.5 --- .circleci/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 367c52ad7..d05e26235 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -101,7 +101,7 @@ commands: - checkout-all - restore_cache: keys: - - v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: @@ -112,7 +112,7 @@ commands: - save_cache: paths: - deps - key: v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu + key: v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu - run: name: Build command: make -C opt all SHOW=1 @@ -178,7 +178,7 @@ commands: - checkout-all - restore_cache: keys: - - v1.2-dependencies-{{ checksum "get_deps.sh" }}-gpu + - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-gpu - relocate-docker-storage - run: name: Build @@ -189,7 +189,7 @@ commands: - save_cache: paths: - deps - key: v1.2-dependencies-{{ checksum "get_deps.sh" }}-gpu + key: v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-gpu - run: name: Test command: | @@ -239,7 +239,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1.2-dependencies-{{ checksum "get_deps.sh" }}-<>-<> + - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-<>-<> - setup-automation # since we run in parallel, we need to generate docker files with different suffixes hence the DOCKER_SUFFIX @@ -260,7 +260,7 @@ jobs: - save_cache: paths: - deps - key: v1.2-dependencies-{{ checksum "get_deps.sh" }}-<>-<> + key: v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-<>-<> - persist_to_workspace: root: bin/ paths: @@ -275,7 +275,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: @@ -309,7 +309,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1.2-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: From 24f7ea9e61fe3a9c6e195784851c81da167b6ebb Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 10 Oct 2021 10:37:33 +0300 Subject: [PATCH 20/28] PR comments Upgrade python in xenial to 3.7 from 3.6 - just needed for onnx build system. Added help text / make help --- docs/developer-backends.md | 4 +--- opt/build/backends.rules | 15 +++++++++++++++ opt/build/dockerparts/apt.yml | 4 ++-- opt/build/onnxruntime/Makefile | 3 +-- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/developer-backends.md b/docs/developer-backends.md index 26fcff676..28e4e53a1 100644 --- a/docs/developer-backends.md +++ b/docs/developer-backends.md @@ -15,7 +15,7 @@ Buiding the backends requires installation of the following tools: 1. docker 1. jinja2 jinja is used to generate the platform dockerfile from a *dockerfile.tmpl* that can be found in the directory of a given backend listed below. -On ubuntu bionic these can be installed by running: +On ubuntu bionic these can be installed by running the following. Similarly, one can use and activate a virtualenv. * sudo apt install python3 python3-dev make docker * pip install --user jinja @@ -32,8 +32,6 @@ On ubuntu bionic these can be installed by running: 1. x86\_64 bit linux systems with a GPU -1. jetson devices - **Directory:** opt/build/onnxruntime **Build options:** diff --git a/opt/build/backends.rules b/opt/build/backends.rules index faa655fce..d57898239 100644 --- a/opt/build/backends.rules +++ b/opt/build/backends.rules @@ -2,6 +2,7 @@ ARCH=$(shell ${READIES}/bin/platform --arch) OS=$(shell ${READIES}/bin/platform --os) REDIS_CMAKE_ARCH=x86_64 +DOCKER_ORG=redislabs # jetson ifeq ($(shell test -e /usr/share/doc/nvidia-l4t-jetson-io && echo -n yes),yes) @@ -46,3 +47,17 @@ build: publish: @aws s3 cp ${BACKEND_NAME} s3://$(S3_URL)/ --acl public-read + +# --------------------------------------------------------------------------------------------------- +define HELP +make build> # build the backend, tagging the docker image so that the files can be copied out of it + OSNICK=<> # optional base operating system (xenial, bionic, etc) + REDIS_CUDA_VERSION=<> # optional cuda version to override + DOCKER_SUFFIX=<> # optional suffix for the generated dockerfile + GPU=1 # if set, build the GPU +make publish > # upload the generated artifacts to s3 same + GPU=1 # if set, upload the GPU artifact (defaults to cpu) +endef +# --------------------------------------------------------------------------------------------------- +include ${READIES}/mk/help.defs +include ${READIES}/mk/help.rules diff --git a/opt/build/dockerparts/apt.yml b/opt/build/dockerparts/apt.yml index ee7233d94..bb45349f1 100644 --- a/opt/build/dockerparts/apt.yml +++ b/opt/build/dockerparts/apt.yml @@ -9,10 +9,10 @@ RUN add-apt-repository ppa:ubuntu-toolchain-r/test RUN apt-get update -qq RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ - python3.6 python3-pip python3-dev python3-numpy \ + python3.7 python3-pip python3-dev python3-numpy \ gcc-7 g++-7 -RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 60 +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 60 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 RUN python3 -m pip install --upgrade pip setuptools wheel diff --git a/opt/build/onnxruntime/Makefile b/opt/build/onnxruntime/Makefile index 1960d406f..f8cd57b05 100755 --- a/opt/build/onnxruntime/Makefile +++ b/opt/build/onnxruntime/Makefile @@ -2,10 +2,10 @@ REDIS_ONNX_VERSION?=1.9.0 REDIS_ONNX_REPO?=https://github.com/microsoft/onnxruntime PRODUCT=onnxruntime -DOCKER_ORG=redislabs VERSION=${REDIS_ONNX_VERSION} REDIS_CUDA_VERSION=11.0-cudnn8 +# anything prefixed with REDIS, and exported is available in the docker build export REDIS_ONNX_VERSION export REDIS_ONNX_REPO export REDIS_CUDA_VERSION @@ -13,7 +13,6 @@ export REDIS_CUDA_VERSION OSNICK=xenial ROOT=. - READIES=${ROOT}/../../readies include ../backends.rules From 063b86a6d2fb6a5c5d3702292e7e3a0dee4657a9 Mon Sep 17 00:00:00 2001 From: alon Date: Sun, 10 Oct 2021 10:54:07 +0300 Subject: [PATCH 21/28] PR fixes - documentation --- docs/developer-backends.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/developer-backends.md b/docs/developer-backends.md index 26fcff676..6ba95ddbf 100644 --- a/docs/developer-backends.md +++ b/docs/developer-backends.md @@ -4,7 +4,7 @@ This document describes how a backend for RedisAI can be built, from this reposi To follow these instructions, this repository must be cloned with all of its submodules (i.e *git clone --recursive https://github.com/RedisLabsModules/redisai*) -GNU Make is used as a runner for the dockerfile generator. Python is the language used for the generator script, and jinja is the templating library used to create the docker file from the template. +GNU Make is used as a runner for the dockerfile generator. Python is the language used for the generator script, and jinja is the templating library used to create the docker file from a template *dockerfile.tmpl* that can be found in the directory of a given backend listed below. ## Tools @@ -13,7 +13,7 @@ Buiding the backends requires installation of the following tools: 1. gnu make 1. python (3.0 or higher) 1. docker -1. jinja2 jinja is used to generate the platform dockerfile from a *dockerfile.tmpl* that can be found in the directory of a given backend listed below. +1. jinja2 On ubuntu bionic these can be installed by running: @@ -32,8 +32,6 @@ On ubuntu bionic these can be installed by running: 1. x86\_64 bit linux systems with a GPU -1. jetson devices - **Directory:** opt/build/onnxruntime **Build options:** @@ -42,7 +40,4 @@ On ubuntu bionic these can be installed by running: 1. To build with GPU support on x86\_64 run *make GPU=1* -1. Should you want to build multiple targets from a shared directory, run *make DOCKER_SUFFIX=* on your target system. For example, if building on an arm and x64 workload, from a shared directory run: - * On x86: make DOCKER\_SUFFIX=x86\_64 - - * On arm: make DOCKER\_SUFFIX=arm +Note: onnxruntime library is built with DISABLE_EXTERNAL_INITIALIZERS=ON build flag. This means that loading ONNX models that use external files to store the initial (usually very large) values of the model's operations, is invalid. That is, initializers values must be part of the serialized model (which is the standard use case) From 74bf6076a13290f05c249722ec4fef29bd8db9e1 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 10 Oct 2021 11:10:44 +0300 Subject: [PATCH 22/28] venv docs update --- docs/developer-backends.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/developer-backends.md b/docs/developer-backends.md index 28e4e53a1..128a5c134 100644 --- a/docs/developer-backends.md +++ b/docs/developer-backends.md @@ -15,10 +15,14 @@ Buiding the backends requires installation of the following tools: 1. docker 1. jinja2 jinja is used to generate the platform dockerfile from a *dockerfile.tmpl* that can be found in the directory of a given backend listed below. -On ubuntu bionic these can be installed by running the following. Similarly, one can use and activate a virtualenv. - -* sudo apt install python3 python3-dev make docker -* pip install --user jinja +On ubuntu bionic these can be installed by running the following steps, to install python3, create a virtual environment, and install the jinja templating dependency. Replace */path/to/venv* with your desired virtualenv location. + +``` +sudo apt install python3 python3-dev make docker +python3 -m venv /path/to/venv +source /path/to/venv/bin/activate +pip install jinja +``` ------- From 3e54ea299e59e2e1cafe606241848c16ec4e7679 Mon Sep 17 00:00:00 2001 From: alon Date: Sun, 10 Oct 2021 11:35:08 +0300 Subject: [PATCH 23/28] get caller position when assertion fails in an auxiliary file --- tests/flow/includes.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/flow/includes.py b/tests/flow/includes.py index ed06105a4..b61764d81 100755 --- a/tests/flow/includes.py +++ b/tests/flow/includes.py @@ -32,6 +32,10 @@ MAX_TRANSACTIONS=100 +# returns the test name and line number from which a helper function within this file was called +def get_caller_pos(): + return "{}:{}".format(sys._getframe(2).f_code.co_name, sys._getframe(2).f_lineno) + def ensureSlaveSynced(con, env, timeout_ms=0): if env.useSlaves: # When WAIT returns, all the previous write commands @@ -43,7 +47,7 @@ def ensureSlaveSynced(con, env, timeout_ms=0): except Exception as ex: # Error in converting to int env.debugPring(str(ex), force=True) - env.assertFalse(True) + env.assertFalse(True, message=get_caller_pos()) return env.assertEqual(number_replicas, 1) @@ -220,23 +224,23 @@ def load_file_content(file_name): def check_error_message(env, con, error_msg, *command, error_msg_is_substr=False): try: con.execute_command(*command) - env.assertFalse(True) + env.assertFalse(True, message=get_caller_pos()) except Exception as exception: - env.assertEqual(type(exception), redis.exceptions.ResponseError) + env.assertEqual(type(exception), redis.exceptions.ResponseError, message=get_caller_pos()) if error_msg_is_substr: # We only verify that the given error_msg is a substring of the entire error message. - env.assertTrue(str(exception).find(error_msg) > 0) + env.assertTrue(str(exception).find(error_msg) >= 0, message=get_caller_pos()) else: - env.assertEqual(error_msg, str(exception)) + env.assertEqual(error_msg, str(exception), message=get_caller_pos()) def check_error(env, con, *command): try: con.execute_command(*command) - env.assertFalse(True) + env.assertFalse(True, message=get_caller_pos()) except Exception as e: exception = e - env.assertEqual(type(exception), redis.exceptions.ResponseError) + env.assertEqual(type(exception), redis.exceptions.ResponseError, message=get_caller_pos()) # Returns a dict with all the fields of a certain section from INFO MODULES command From 7d31242c418007c93d829c2dbb93002ec1c94f0f Mon Sep 17 00:00:00 2001 From: alon Date: Sun, 10 Oct 2021 11:51:43 +0300 Subject: [PATCH 24/28] Return filename instead of function name --- tests/flow/includes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/flow/includes.py b/tests/flow/includes.py index b61764d81..36ed94f5b 100755 --- a/tests/flow/includes.py +++ b/tests/flow/includes.py @@ -32,9 +32,11 @@ MAX_TRANSACTIONS=100 -# returns the test name and line number from which a helper function within this file was called +# returns the test name and line number from which a helper function within this file was called. +# For example, if an assertion fails in check_error_message function, and the caller function to check_error_message +# is in tests_onnx.py line 25, this should return: "tests_onnx:py:25" def get_caller_pos(): - return "{}:{}".format(sys._getframe(2).f_code.co_name, sys._getframe(2).f_lineno) + return f'{sys._getframe(2).f_code.co_filename.split("/")[-1]}:{sys._getframe(2).f_lineno}' def ensureSlaveSynced(con, env, timeout_ms=0): if env.useSlaves: From c45934a93db884d66eb57930a2b6020f20689d82 Mon Sep 17 00:00:00 2001 From: alon Date: Sun, 10 Oct 2021 12:44:57 +0300 Subject: [PATCH 25/28] More PR fixes --- opt/build/backends.rules | 2 ++ tests/flow/tests_onnx.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/opt/build/backends.rules b/opt/build/backends.rules index d57898239..8a2a477eb 100644 --- a/opt/build/backends.rules +++ b/opt/build/backends.rules @@ -1,3 +1,5 @@ +# PRODUCT var is the backend name, without any other configuration (set in each backend's corresponding makefile) + # default is x64 ARCH=$(shell ${READIES}/bin/platform --arch) OS=$(shell ${READIES}/bin/platform --os) diff --git a/tests/flow/tests_onnx.py b/tests/flow/tests_onnx.py index 32e9b444a..2e2a1af36 100644 --- a/tests/flow/tests_onnx.py +++ b/tests/flow/tests_onnx.py @@ -435,6 +435,8 @@ def test_forbidden_external_initializers(env): if not TEST_ONNX: env.debugPrint("skipping {} since TEST_ONNX=0".format(sys._getframe().f_code.co_name), force=True) return + + # The DISABLE_EXTERNAL_INITIALIZERS flag is used for CPU build only if DEVICE != 'CPU': return con = get_connection(env, '{1}') From 55022ef903a8e421211acce99c193f92a4111a34 Mon Sep 17 00:00:00 2001 From: alon Date: Mon, 11 Oct 2021 14:57:09 +0300 Subject: [PATCH 26/28] Build onnx with DISABLE_EXTERNAL_INITIALIZERS flag for GPU as well --- .circleci/config.yml | 6 +++--- docs/developer-backends.md | 8 ++++---- opt/build/onnxruntime/dockerfile.tmpl | 4 ++-- tests/flow/tests_onnx.py | 3 --- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4b10a1aec..6b3efea70 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,9 +99,9 @@ commands: - abort_for_docs - abort_for_noci - checkout-all - - restore_cache: - keys: - - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu + #- restore_cache: + # keys: + # - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: diff --git a/docs/developer-backends.md b/docs/developer-backends.md index f80d9b66f..5d7411f80 100644 --- a/docs/developer-backends.md +++ b/docs/developer-backends.md @@ -2,13 +2,13 @@ This document describes how a backend for RedisAI can be built, from this repository. It highlights the supported compilation devices on a per-backend basis, and highlights the tools and commands required. Unless indicated otherwise, a backend is compiled in a docker, which is responsible for the configuration and installation of all tools required for a given backend on a per-platform basis. -To follow these instructions, this repository must be cloned with all of its submodules (i.e *git clone --recursive https://github.com/RedisLabsModules/redisai*) +To follow these instructions, this repository must be cloned with all of its submodules (i.e *git clone --recursive https://github.com/redisai/redisai*) GNU Make is used as a runner for the dockerfile generator. Python is the language used for the generator script, and jinja is the templating library used to create the docker file from a template *dockerfile.tmpl* that can be found in the directory of a given backend listed below. ## Tools -Buiding the backends requires installation of the following tools: +Building the backends requires installation of the following tools: 1. gnu make 1. python (3.0 or higher) @@ -30,6 +30,8 @@ pip install jinja ### onnxruntime +We build Onnxruntime library with DISABLE_EXTERNAL_INITIALIZERS=ON build flag. This means that loading ONNX models that use external files to store the initial (usually very large) values of the model's operations, is invalid. That is, initializers values must be part of the serialized model, which is also the standard use case. + **Compilation target devices:** 1. x86\_64 bit linux systems @@ -43,5 +45,3 @@ pip install jinja 1. To build run *make* 1. To build with GPU support on x86\_64 run *make GPU=1* - -Note: onnxruntime library is built with DISABLE_EXTERNAL_INITIALIZERS=ON build flag. This means that loading ONNX models that use external files to store the initial (usually very large) values of the model's operations, is invalid. That is, initializers values must be part of the serialized model (which is the standard use case) diff --git a/opt/build/onnxruntime/dockerfile.tmpl b/opt/build/onnxruntime/dockerfile.tmpl index a7c7c63c8..2fda1a4ed 100755 --- a/opt/build/onnxruntime/dockerfile.tmpl +++ b/opt/build/onnxruntime/dockerfile.tmpl @@ -30,8 +30,8 @@ ARG ONNXRUNTIME_VER={{REDIS_ONNX_VERSION}} # build WORKDIR /build {% if REDIS_GPU is defined %} -{% set BUILDTYPE="MinSizeRel" %} -{% set BUILDARGS="--use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda" %} +{% set BUILDTYPE="Release" %} +{% set BUILDARGS="--use_cuda --cudnn_home /usr/local/cuda --cuda_home /usr/local/cuda --cmake_extra_defines onnxruntime_DISABLE_EXTERNAL_INITIALIZERS=ON"%} {% else %} {% set BUILDTYPE="Release" %} {% set BUILDARGS="--cmake_extra_defines onnxruntime_DISABLE_EXTERNAL_INITIALIZERS=ON" %} diff --git a/tests/flow/tests_onnx.py b/tests/flow/tests_onnx.py index 2e2a1af36..7500c9baa 100644 --- a/tests/flow/tests_onnx.py +++ b/tests/flow/tests_onnx.py @@ -436,9 +436,6 @@ def test_forbidden_external_initializers(env): env.debugPrint("skipping {} since TEST_ONNX=0".format(sys._getframe().f_code.co_name), force=True) return - # The DISABLE_EXTERNAL_INITIALIZERS flag is used for CPU build only - if DEVICE != 'CPU': - return con = get_connection(env, '{1}') # move the external initializer to the redis' current dir (tests/flow/logs) From f63f95ff0d782e04abff0c373936069aff38e877 Mon Sep 17 00:00:00 2001 From: alon Date: Mon, 11 Oct 2021 15:12:54 +0300 Subject: [PATCH 27/28] update deps cache key in CI after rebuilding and publishing for gpu --- .circleci/config.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b3efea70..12ff58033 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,9 +99,9 @@ commands: - abort_for_docs - abort_for_noci - checkout-all - #- restore_cache: - # keys: - # - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu + - restore_cache: + keys: + - v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: @@ -112,7 +112,7 @@ commands: - save_cache: paths: - deps - key: v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu + key: v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu - run: name: Build command: make -C opt all SHOW=1 @@ -151,7 +151,7 @@ commands: - checkout-all - restore_cache: keys: - - v1-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: @@ -178,7 +178,7 @@ commands: - checkout-all - restore_cache: keys: - - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-gpu + - v1.2.5-deps-{{ checksum "get_deps.sh" }}-gpu - relocate-docker-storage - run: name: Build @@ -189,7 +189,7 @@ commands: - save_cache: paths: - deps - key: v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-gpu + key: v1.2.5-deps-{{ checksum "get_deps.sh" }}-gpu - run: name: Test command: | @@ -239,7 +239,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-<>-<> + - v1.2.5-deps-{{ checksum "get_deps.sh" }}-<>-<> - setup-automation # since we run in parallel, we need to generate docker files with different suffixes hence the DOCKER_SUFFIX @@ -260,7 +260,7 @@ jobs: - save_cache: paths: - deps - key: v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-<>-<> + key: v1.2.5-deps-{{ checksum "get_deps.sh" }}-<>-<> - persist_to_workspace: root: bin/ paths: @@ -275,7 +275,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: @@ -309,7 +309,7 @@ jobs: - checkout-all - restore_cache: keys: - - v1.2.5-dependencies-{{ checksum "get_deps.sh" }}-cpu + - v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu # If no exact match is found will get dependencies from source - setup-build-system - run: From ab200061ca961c082556e2b0ca17c27ccd860b5a Mon Sep 17 00:00:00 2001 From: alon Date: Mon, 11 Oct 2021 18:14:59 +0300 Subject: [PATCH 28/28] ignore overlap valgrind errors from onnx lib --- opt/redis_valgrind.sup | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/opt/redis_valgrind.sup b/opt/redis_valgrind.sup index 8b00a448c..d509b2e38 100644 --- a/opt/redis_valgrind.sup +++ b/opt/redis_valgrind.sup @@ -26,6 +26,13 @@ obj:*/libtorch_cpu.so* } +{ + ignore_unversioned_libs + Memcheck:Overlap + ... + obj:*/libonnxruntime.so* +} + { ignore_unversioned_libs Memcheck:Leak