Unverified Commit 5f441444 authored by Martin Weinelt's avatar Martin Weinelt Committed by Pavol Rusnak
Browse files

onnxruntime: add option to link full protobuf, not protobuf-lite

This can be used to fix the import of tensorflow and onnxruntime in the
same python interpreter.
parent e7701fc6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
  pythonSupport ? true,
  cudaSupport ? config.cudaSupport,
  ncclSupport ? config.cudaSupport,
  withFullProtobuf ? false,
  cudaPackages ? { },
}@inputs:

@@ -195,7 +196,7 @@ effectiveStdenv.mkDerivation rec {
    (lib.cmakeFeature "ONNX_CUSTOM_PROTOC_EXECUTABLE" (lib.getExe protobuf))
    (lib.cmakeBool "onnxruntime_BUILD_SHARED_LIB" true)
    (lib.cmakeBool "onnxruntime_BUILD_UNIT_TESTS" doCheck)
    (lib.cmakeBool "onnxruntime_USE_FULL_PROTOBUF" false)
    (lib.cmakeBool "onnxruntime_USE_FULL_PROTOBUF" withFullProtobuf)
    (lib.cmakeBool "onnxruntime_USE_CUDA" cudaSupport)
    (lib.cmakeBool "onnxruntime_USE_NCCL" (cudaSupport && ncclSupport))
    (lib.cmakeBool "onnxruntime_ENABLE_LTO" (!cudaSupport || cudaPackages.cudaOlder "12.8"))