C++ · Installation

Installation

#include <uform/types.hpp> 4.0.0-rc.1 · c58749fe

Ask your coding agent about this page, or add the docs server to it

curl -s 'https://www.unum.cloud/docs/uform/cpp/installation.md' | claude -p "How would this fit my code?"

The SDK’s headers call into the compiled library, so build and install it first from a checkout:

cmake -B build_release -D CMAKE_BUILD_TYPE=Release -D UFORM_BUILD_LIBRARIES=ON && cmake --build build_release && cmake --install build_release

The install carries the C and C++ headers, both libraries, and a CMake package whose uform::cpp target names the SDK headers, the C headers of uform::abi beneath them, and the archive uform::static:

find_package(uform CONFIG REQUIRED)
target_link_libraries(your_target PRIVATE uform::cpp)

Inside a superbuild, add_subdirectory of the repository gives the same uform::cpp. -D UFORM_ENCODER_DTYPES=bf16 narrows the block-product dtypes the library compiles from the default bf16;e4m3, and a model load in a left-out one answers status_code_t::unsupported_k. uform_encoder_dtypes_compiled() from c/uform/types.h answers the kept ones as a mask, bit n standing for the uform_scalar_t valued n. uform::cpp reaches only c/uform/*.h and the standard library, so the compiler refuses any SDK include of the engine. -D UFORM_BUILD_STUB=ON -D UFORM_BUILD_TEST=ON builds a stand-in that answers every verb over the standard library alone, and the suite against it:

cmake --preset stub_library -D UFORM_BUILD_TEST=ON && cmake --build --preset stub_library --target uform_test_cpp_stub
ctest --test-dir build_stub_library --tests-regex uform_test_cpp_stub

API

Functions

version_nameThe linked library's version, a release-candidate suffix included.
types.hpp:617 ↗
std::string_view version_name() noexcept;