diff options
-rw-r--r-- | pkgs/development/python-modules/torch/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index e31b6306bb191..c5d591c3f27a1 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -290,6 +290,24 @@ in buildPythonPackage rec { # error: cast from ... to ... converts to incompatible function type [-Werror,-Wcast-function-type-strict] ++ lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16") [ "-Wno-error=cast-function-type-strict" + # Suppresses the most spammy warnings. + # This is mainly to fix https://github.com/NixOS/nixpkgs/issues/266895. + ] ++ lib.optionals rocmSupport [ + "-Wno-#warnings" + "-Wno-cpp" + "-Wno-unknown-warning-option" + "-Wno-ignored-attributes" + "-Wno-deprecated-declarations" + "-Wno-defaulted-function-deleted" + "-Wno-pass-failed" + ] ++ [ + "-Wno-unused-command-line-argument" + "-Wno-maybe-uninitialized" + "-Wno-uninitialized" + "-Wno-array-bounds" + "-Wno-stringop-overflow" + "-Wno-free-nonheap-object" + "-Wno-unused-result" ])); nativeBuildInputs = [ |