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.
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user