From 3839b08b6f38f928ed7bf477bc647cc371d305c7 Mon Sep 17 00:00:00 2001 From: Christian Gutschow Date: Wed, 10 Jan 2024 17:14:26 +0000 Subject: [PATCH 1/7] enable shared option for ONNXrt --- .github/workflows/cmake.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 13fb37427..1df691aee 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -158,17 +158,17 @@ jobs: # sed -i'' -e "s|generators|#generators|1" ./cppflow/conanfile.py # conan create ./cppflow/ -s compiler.cppstd=gnu17 - - name: Conan install on gcc + - name: Conan install on apple-clang / ubuntu-gcc if: ${{ contains(matrix.cxx, 'g++-10') }} run: | conan profile detect conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 - - name: Conan install on apple-clang - if: ${{ contains(matrix.cxx, 'clang++') }} + - name: Conan install on apple-gcc + if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++') }} run: | conan profile detect - conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 + conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 --options=onnxruntime/*:shared=True - name: Build # Build your program with the given configuration. From f785e2ba6fae6846722c39bf072fa0786c1ca88b Mon Sep 17 00:00:00 2001 From: Christian Gutschow Date: Wed, 10 Jan 2024 17:16:09 +0000 Subject: [PATCH 2/7] enable shared option for ONNXrt --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1df691aee..0f630257c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -159,7 +159,7 @@ jobs: # conan create ./cppflow/ -s compiler.cppstd=gnu17 - name: Conan install on apple-clang / ubuntu-gcc - if: ${{ contains(matrix.cxx, 'g++-10') }} + if: ${{ ! (contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++')) }} run: | conan profile detect conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 From d291f57dffc07164d53a97705dee2d0de4474f58 Mon Sep 17 00:00:00 2001 From: Christian Gutschow Date: Thu, 11 Jan 2024 16:20:31 +0000 Subject: [PATCH 3/7] skip apple-g++ for now --- .github/workflows/cmake.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0f630257c..652a92be4 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -61,6 +61,9 @@ jobs: cxx: clang++ - os: macos-12 mpi: "on" + # This doesn't seem to work with ONNXrt yet: + - os: macos-12 + cxx: g++-10 steps: - uses: actions/checkout@v3 @@ -158,17 +161,17 @@ jobs: # sed -i'' -e "s|generators|#generators|1" ./cppflow/conanfile.py # conan create ./cppflow/ -s compiler.cppstd=gnu17 - - name: Conan install on apple-clang / ubuntu-gcc - if: ${{ ! (contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++')) }} + - name: Conan install on gcc + if: ${{ contains(matrix.cxx, 'g++') }} run: | conan profile detect conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 - - name: Conan install on apple-gcc - if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++') }} + - name: Conan install on clang + if: ${{ contains(matrix.cxx, 'clang') }} run: | conan profile detect - conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 --options=onnxruntime/*:shared=True + conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 - name: Build # Build your program with the given configuration. From 080940b47032525e2c27fd7c8a8cec2191486c68 Mon Sep 17 00:00:00 2001 From: Christian Gutschow Date: Thu, 11 Jan 2024 17:21:09 +0000 Subject: [PATCH 4/7] fix conditional syntax --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 652a92be4..bc05b570c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -162,13 +162,13 @@ jobs: # conan create ./cppflow/ -s compiler.cppstd=gnu17 - name: Conan install on gcc - if: ${{ contains(matrix.cxx, 'g++') }} + if: ${{ contains(matrix.cxx, 'g++-10') }} run: | conan profile detect conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 - name: Conan install on clang - if: ${{ contains(matrix.cxx, 'clang') }} + if: ${{ contains(matrix.cxx, 'clang++') }} run: | conan profile detect conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 From efe74d8b5d0f3b81abd4e43294e49da85658f8f4 Mon Sep 17 00:00:00 2001 From: Christian Gutschow Date: Fri, 12 Jan 2024 09:30:03 +0000 Subject: [PATCH 5/7] skip gcc on mac step --- .github/workflows/cmake.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bc05b570c..3d127245c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -82,10 +82,10 @@ jobs: brew install libtiff open-mpi libyaml ccache conan echo "CMAKE_PREFIX_PATH=/usr/local/opt/libomp" >> $GITHUB_ENV - - name: Install gcc on MacOS - if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++') }} - run: | - brew install gcc@10 + #- name: Install gcc on MacOS + # if: ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'g++10') }} + # run: | + # brew install gcc@10 # Enable tmate debugging of manually-triggered workflows if the input option was provided - name: Setup tmate session From 7132a648f6cf01605c1c561ca726752383829844 Mon Sep 17 00:00:00 2001 From: Christian Gutschow Date: Mon, 15 Jan 2024 10:35:54 +0000 Subject: [PATCH 6/7] restore previous apple-clang install --- .github/workflows/cmake.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3d127245c..18b185d9f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -165,18 +165,18 @@ jobs: if: ${{ contains(matrix.cxx, 'g++-10') }} run: | conan profile detect - conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 + conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=17 - - name: Conan install on clang + - name: Conan install on apple-clang if: ${{ contains(matrix.cxx, 'clang++') }} run: | conan profile detect - conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 + conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=17 - name: Build # Build your program with the given configuration. # The Github Actions machines are dual-core so we can build faster using 2 parallel processes - run: conan build ${{github.workspace}} -of ${{github.workspace}}/build -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=gnu17 + run: conan build ${{github.workspace}} -of ${{github.workspace}}/build -o mpi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=17 - name: Test working-directory: ${{github.workspace}}/build From 1bca6aed2fc328c4bd4636b9aa97d729728f585f Mon Sep 17 00:00:00 2001 From: Christian Gutschow Date: Mon, 15 Jan 2024 13:46:43 +0000 Subject: [PATCH 7/7] add comment on MacOS with g++ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4b846cc7..82d63c809 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ On MacOS, you can also install most of the dependencies with Homebrew e.g. ``` bash brew install libtensorflow eigen tiff spdlog catch2 ``` - +**Note that the ONNXruntime interface is currently only supported when compiling with Clang on MacOS, but not with g++** ## Common errors