From e1cea2524edb1835e1317d540169dbc245416d6f Mon Sep 17 00:00:00 2001 From: mourogurt Date: Wed, 14 May 2025 05:38:28 +0300 Subject: [PATCH] python3Packages.torch: Remove built-in composable_kernel headers search path To make sure it will use headers from provided package. Signed-off-by: mourogurt --- pkgs/development/python-modules/torch/source/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/torch/source/default.nix b/pkgs/development/python-modules/torch/source/default.nix index 560ad2886d4a..46f0e7c1697a 100644 --- a/pkgs/development/python-modules/torch/source/default.nix +++ b/pkgs/development/python-modules/torch/source/default.nix @@ -351,6 +351,11 @@ buildPythonPackage rec { substituteInPlace cmake/public/LoadHIP.cmake \ --replace "set(ROCM_PATH \$ENV{ROCM_PATH})" \ "set(ROCM_PATH \$ENV{ROCM_PATH})''\nset(ROCM_VERSION ${lib.concatStrings (lib.intersperse "0" (lib.splitVersion rocmPackages.clr.version))})" + + # Use composable kernel as dependency, rather than built-in third-party + substituteInPlace aten/src/ATen/CMakeLists.txt \ + --replace-fail "list(APPEND ATen_HIP_INCLUDE \''${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party/composable_kernel/include)" "" \ + --replace-fail "list(APPEND ATen_HIP_INCLUDE \''${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party/composable_kernel/library/include)" "" '' # Detection of NCCL version doesn't work particularly well when using the static binary. + lib.optionalString cudaSupport ''