Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

152 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synthesizer Runtime

Requirements

Setup Environment

VCPKG Packages

Windows

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat

vcpkg install --x-manifest-root=../scripts/vcpkg-manifest --x-install-root=./installed

Unix

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh

./vcpkg install \
    --x-manifest-root=../scripts/vcpkg-manifest \
    --x-install-root=./installed

Install OnnxRuntime

Default configuration (no CUDA support):

cd third-party && cmake -P ../scripts/setup-onnxruntime.cmake

With CUDA 11.x support:

cd third-party && cmake -Dep=cuda11 -P ../scripts/setup-onnxruntime.cmake

With CUDA 12.x support:

cd third-party && cmake -Dep=cuda12 -P ../scripts/setup-onnxruntime.cmake

Build & Install

The buildsystem is able to deploy the shared libraries to build directory and install directory automatically.

cmake -B build -G Ninja \
    -DCMAKE_INSTALL_PREFIX=<dir> \  # install directory
    -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake \
    -DQMSETUP_APPLOCAL_DEPS_PATHS_DEBUG=vcpkg/installed/<triplet>/debug/<runtime> \
    -DQMSETUP_APPLOCAL_DEPS_PATHS_RELEASE=vcpkg/installed/<triplet>/<runtime> \
    -DCMAKE_BUILD_TYPE=Release

cmake --build build --target all

cmake --build build --target install

How to Use

  1. CMakeLists.txt
cmake_minimum_required(VERSION 3.16)

project(example)

find_package(dsinfer CONFIG REQUIRED)
add_executable(example main.cpp)
target_link_libraries(example dsinfer::dsinfer)
  1. CMake Configure & Build
cmake -B build -G Ninja \
    -DCMAKE_PREFIX_PATH=<dir> \  # `synthrt` install directory
    -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake \
    -DCMAKE_BUILD_TYPE=Release

cmake --build build --target all

TODO

  • Logging
  • Documentation
  • Unit Tests

Releases

Packages

Contributors

Languages