Skip to content

build: add Conan 2 + CMakePresets build system#490

Draft
mc-nv wants to merge 2 commits intomainfrom
mchornyi/TRI-122/conan-next
Draft

build: add Conan 2 + CMakePresets build system#490
mc-nv wants to merge 2 commits intomainfrom
mchornyi/TRI-122/conan-next

Conversation

@mc-nv
Copy link
Copy Markdown
Contributor

@mc-nv mc-nv commented Apr 13, 2026

Resolves: TRI-122
triton-inference-server/backend#123
triton-inference-server/common#154
triton-inference-server/server#8734
triton-inference-server/third_party#74

Description

Introduces Conan 2 package manager and CMakePresets-based build system for dependency management in the core repository, as part of the broader Triton CMake/Conan migration (TRI-122).

Changes

  • build: add Conan 2 + CMakePresets build system

Affected Files

  • CMakeLists.txt
  • CMakePresets.json
  • cmake/CMakePresets.json
  • conanfile.py
  • profiles/linux-gcc13-debug
  • profiles/linux-gcc13-release
  • src/CMakeLists.txt
  • src/test/CMakeLists.txt

Replace build.py / ExternalProject fetches with a CMake-native +
Conan 2 workflow.  Every dependency is resolved via Conan (private
NVIDIA Artifactory remote or Conan Center); sibling repos are
consumed as local add_subdirectory checkouts.

- CMakeLists.txt: guard FetchContent/ExternalProject blocks behind
  TRITON_SKIP_THIRD_PARTY_FETCH; add TRITON_CORE_HEADERS_ONLY path
- src/CMakeLists.txt: absolute ldscript path for Ninja compatibility;
  cnmem target guard (cnmem::cnmem imported target vs raw lib fallback)
- src/test/CMakeLists.txt: add re2::re2 to test link libraries
- CMakePresets.json / cmake/CMakePresets.json: configure + build presets
  for Release and Debug on Linux x86_64 and aarch64
- conanfile.py: Conan package descriptor for triton-core
- profiles/: GCC 13 host/build profiles (release + debug)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gets

- Set CMAKE_CUDA_RUNTIME_LIBRARY=Shared after find_package(CUDAToolkit)
  so CUDA::cudart resolves to libcudart.so (dynamic), not the static
  variant.

- Replace legacy ${CNMEM_PATH}/include + find_library(CNMEM_LIBRARY)
  with cnmem::cnmem imported target in all GPU test targets
  (memory_test, pinned_memory_manager_test, response_cache_test,
  metrics_api_test, input_byte_size_test).

- Add rapidjson and re2::re2 to response_cache_test which compiles
  filesystem sources directly and needs those headers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant