onnxruntime: fix loongarch64-linux build (#442711)
This commit is contained in:
@@ -135,7 +135,6 @@ effectiveStdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cpuinfo
|
||||
eigen
|
||||
glibcLocales
|
||||
howard-hinnant-date
|
||||
@@ -145,6 +144,9 @@ effectiveStdenv.mkDerivation rec {
|
||||
pytorch_clog
|
||||
zlib
|
||||
]
|
||||
++ lib.optionals (lib.meta.availableOn effectiveStdenv.hostPlatform cpuinfo) [
|
||||
cpuinfo
|
||||
]
|
||||
++ lib.optionals pythonSupport (
|
||||
with python3Packages;
|
||||
[
|
||||
@@ -234,11 +236,24 @@ effectiveStdenv.mkDerivation rec {
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
};
|
||||
|
||||
# aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox
|
||||
doCheck = !(cudaSupport || effectiveStdenv.buildPlatform.system == "aarch64-linux");
|
||||
doCheck =
|
||||
!(
|
||||
cudaSupport
|
||||
|| builtins.elem effectiveStdenv.buildPlatform.system [
|
||||
# aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox
|
||||
"aarch64-linux"
|
||||
# 1 - onnxruntime_test_all (Failed)
|
||||
# 4761 tests from 311 test suites ran, 57 failed.
|
||||
"loongarch64-linux"
|
||||
]
|
||||
);
|
||||
|
||||
requiredSystemFeatures = lib.optionals cudaSupport [ "big-parallel" ];
|
||||
|
||||
hardeningEnable = lib.optionals (effectiveStdenv.hostPlatform.system == "loongarch64-linux") [
|
||||
"nostrictaliasing"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace cmake/libonnxruntime.pc.cmake.in \
|
||||
--replace-fail '$'{prefix}/@CMAKE_INSTALL_ @CMAKE_INSTALL_
|
||||
|
||||
Reference in New Issue
Block a user