Skip to content

Commit 2605fad

Browse files
authored
Merge pull request #266995 from Madouura/pr/fix-torch-log-limit
python3Packages.torch: Suppress spammy warnings
2 parents 6451ceb + c8f136c commit 2605fad

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

pkgs/development/python-modules/torch/default.nix

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,24 @@ in buildPythonPackage rec {
290290
# error: cast from ... to ... converts to incompatible function type [-Werror,-Wcast-function-type-strict]
291291
++ lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16") [
292292
"-Wno-error=cast-function-type-strict"
293+
# Suppresses the most spammy warnings.
294+
# This is mainly to fix https://github.com/NixOS/nixpkgs/issues/266895.
295+
] ++ lib.optionals rocmSupport [
296+
"-Wno-#warnings"
297+
"-Wno-cpp"
298+
"-Wno-unknown-warning-option"
299+
"-Wno-ignored-attributes"
300+
"-Wno-deprecated-declarations"
301+
"-Wno-defaulted-function-deleted"
302+
"-Wno-pass-failed"
303+
] ++ [
304+
"-Wno-unused-command-line-argument"
305+
"-Wno-maybe-uninitialized"
306+
"-Wno-uninitialized"
307+
"-Wno-array-bounds"
308+
"-Wno-stringop-overflow"
309+
"-Wno-free-nonheap-object"
310+
"-Wno-unused-result"
293311
]));
294312

295313
nativeBuildInputs = [

0 commit comments

Comments
 (0)