Loading pkgs/by-name/ll/llama-cpp/package.nix +2 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ rocmSupport ? config.rocmSupport, rocmPackages ? { }, rocmGpuTargets ? builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets, rocmGpuTargets ? rocmPackages.clr.localGpuTargets or rocmPackages.clr.gpuTargets, openclSupport ? false, clblast, Loading Loading @@ -150,7 +150,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { ] ++ optionals rocmSupport [ (cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.clr.hipClangPath}/clang++") (cmakeFeature "CMAKE_HIP_ARCHITECTURES" rocmGpuTargets) (cmakeFeature "CMAKE_HIP_ARCHITECTURES" (builtins.concatStringsSep ";" rocmGpuTargets)) ] ++ optionals metalSupport [ (cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") Loading pkgs/by-name/ma/magma/package.nix +6 −5 Original line number Diff line number Diff line Loading @@ -170,6 +170,10 @@ stdenv.mkDerivation (finalAttrs: { ] ); env.CFLAGS = "-DADD_" + lib.optionalString rocmSupport " -fopenmp"; env.CXXFLAGS = finalAttrs.env.CFLAGS; env.FFLAGS = "-DADD_"; cmakeFlags = [ (strings.cmakeFeature "GPU_TARGET" gpuTargetString) (strings.cmakeBool "MAGMA_ENABLE_CUDA" cudaSupport) Loading @@ -179,9 +183,6 @@ stdenv.mkDerivation (finalAttrs: { # otherwise not be set in NVCC_FLAGS or DEVCCFLAGS (which we cannot modify). # See https://github.com/NixOS/nixpkgs/issues/281656#issuecomment-1902931289 (strings.cmakeBool "USE_FORTRAN" true) (strings.cmakeFeature "CMAKE_C_FLAGS" "-DADD_") (strings.cmakeFeature "CMAKE_CXX_FLAGS" "-DADD_") (strings.cmakeFeature "FORTRAN_CONVENTION" "-DADD_") ] ++ lists.optionals cudaSupport [ (strings.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaArchitecturesString) Loading @@ -192,8 +193,8 @@ stdenv.mkDerivation (finalAttrs: { # Can't easily apply the PR as a patch because we rely on the tarball with pregenerated # hipified files ∴ fetchpatch of the PR will apply cleanly but fail to build (strings.cmakeFeature "ROCM_CORE" "${rocmPackages.clr}") (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/hipcc") (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/hipcc") (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/clang") (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/clang++") ]; # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU. Loading pkgs/by-name/uc/ucx/package.nix +1 −4 Original line number Diff line number Diff line Loading @@ -32,11 +32,8 @@ let name = "rocm"; paths = rocmList; }; # rocm build fails with gcc stdenv due to unrecognised arg parallel-jobs stdenv' = if enableRocm then rocmPackages.stdenv else stdenv; in stdenv'.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: { pname = "ucx"; version = "1.19.0"; Loading pkgs/development/python-modules/torch/source/default.nix +43 −39 Original line number Diff line number Diff line Loading @@ -187,25 +187,25 @@ let # TODO: Retest after ROCm 6.4 or torch 2.8 "gfx1010" "gfx1012" # Strix Halo seems to be broken as well, see # https://github.com/NixOS/nixpkgs/pull/440359. "gfx1151" ] (rocmPackages.clr.localGpuTargets or rocmPackages.clr.gpuTargets) ] rocmPackages.clr.localGpuTargets or rocmPackages.clr.gpuTargets else throw "No GPU targets specified" ); # Use vendored CK as header only dep if rocmPackages' CK doesn't properly support targets vendorComposableKernel = rocmSupport && !rocmPackages.composable_kernel.anyMfmaTarget; rocmtoolkit_joined = symlinkJoin { name = "rocm-merged"; paths = with rocmPackages; [ paths = with rocmPackages; [ rocm-core clr rccl miopen aotriton composable_kernel rocrand rocblas rocsparse Loading @@ -229,6 +229,9 @@ let rocm-smi clr.icd hipify ] ++ lib.optionals (!vendorComposableKernel) [ composable_kernel ]; # Fix `setuptools` not being found Loading Loading @@ -373,8 +376,9 @@ buildPythonPackage rec { # Doesn't pick up the environment variable? substituteInPlace third_party/kineto/libkineto/CMakeLists.txt \ --replace-fail "\''$ENV{ROCM_SOURCE_DIR}" "${rocmtoolkit_joined}" # Use composable kernel as dependency, rather than built-in third-party '' # When possible, composable kernel as dependency, rather than built-in third-party + lib.optionalString (rocmSupport && !vendorComposableKernel) '' 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)" "" Loading Loading @@ -412,7 +416,7 @@ buildPythonPackage rec { export ROCM_PATH=${rocmtoolkit_joined} export ROCM_SOURCE_DIR=${rocmtoolkit_joined} export PYTORCH_ROCM_ARCH="${gpuTargetString}" export CMAKE_CXX_FLAGS="-I${rocmtoolkit_joined}/include -I${rocmtoolkit_joined}/include/rocblas" export CMAKE_CXX_FLAGS="-I${rocmtoolkit_joined}/include" python tools/amd_build/build_amd.py ''; Loading pkgs/development/rocm-modules/6/amdsmi/default.nix +9 −7 Original line number Diff line number Diff line Loading @@ -15,24 +15,26 @@ let esmi_ib_src = fetchFromGitHub { owner = "amd"; repo = "esmi_ib_library"; rev = "esmi_pkg_ver-3.0.3"; hash = "sha256-q0w5c5c+CpXkklmSyfzc+sbkt4cHNxscGJA3AXwvHxQ="; rev = "esmi_pkg_ver-4.2"; hash = "sha256-czF9ezkAO0PuDkXh8y639AcOZH+KVcWiXPX74H5W/nw="; }; in stdenv.mkDerivation (finalAttrs: { pname = "amdsmi"; version = "6.3.3"; version = "6.4.3"; src = fetchFromGitHub { owner = "rocm"; repo = "amdsmi"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-hrPqd4ZWqzTG7JRfVwc1SZx6TNS0Q/LFg8yDxrM3mPo="; hash = "sha256-9O29O4HGkQxFDglAhHKv5KWA7p97RwMGG2x/fkOS2jE="; }; postPatch = '' substituteInPlace goamdsmi_shim/CMakeLists.txt \ --replace-fail "amd_smi)" ${"'"}''${AMD_SMI_TARGET})' \ --replace-fail 'target_link_libraries(''${GOAMDSMI_SHIM_TARGET} -L' '#' substituteInPlace CMakeLists.txt \ --replace-fail "if(NOT latest_esmi_tag STREQUAL current_esmi_tag)" "if(OFF)" # Manually unpack esmi_ib_src and add amd_hsmp.h so execute-process git clone doesn't run cp -rf --no-preserve=mode ${esmi_ib_src} ./esmi_ib_library Loading @@ -41,10 +43,10 @@ stdenv.mkDerivation (finalAttrs: { ''; patches = [ # Fix ld.lld undefined reference: drmGetVersion (fetchpatch { url = "https://github.com/ROCm/amdsmi/commit/c3864bf6171970d86dc50fd23f06377736823997.patch"; hash = "sha256-zRG1tBD8sIQCWdKfCbXC/Z/6d6NTrRYvRpddPWdM4j8="; name = "esmi-to-tag-4.2.patch"; url = "https://github.com/ROCm/amdsmi/commit/49aa2af045a4bc688e6f3ee0545f12afc45c1efe.patch"; hash = "sha256-5dH9N4m+2mJIGVEB86SvdK3uAYyGFTfbCBJ8e09iQ3w="; }) ]; Loading Loading
pkgs/by-name/ll/llama-cpp/package.nix +2 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ rocmSupport ? config.rocmSupport, rocmPackages ? { }, rocmGpuTargets ? builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets, rocmGpuTargets ? rocmPackages.clr.localGpuTargets or rocmPackages.clr.gpuTargets, openclSupport ? false, clblast, Loading Loading @@ -150,7 +150,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { ] ++ optionals rocmSupport [ (cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.clr.hipClangPath}/clang++") (cmakeFeature "CMAKE_HIP_ARCHITECTURES" rocmGpuTargets) (cmakeFeature "CMAKE_HIP_ARCHITECTURES" (builtins.concatStringsSep ";" rocmGpuTargets)) ] ++ optionals metalSupport [ (cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") Loading
pkgs/by-name/ma/magma/package.nix +6 −5 Original line number Diff line number Diff line Loading @@ -170,6 +170,10 @@ stdenv.mkDerivation (finalAttrs: { ] ); env.CFLAGS = "-DADD_" + lib.optionalString rocmSupport " -fopenmp"; env.CXXFLAGS = finalAttrs.env.CFLAGS; env.FFLAGS = "-DADD_"; cmakeFlags = [ (strings.cmakeFeature "GPU_TARGET" gpuTargetString) (strings.cmakeBool "MAGMA_ENABLE_CUDA" cudaSupport) Loading @@ -179,9 +183,6 @@ stdenv.mkDerivation (finalAttrs: { # otherwise not be set in NVCC_FLAGS or DEVCCFLAGS (which we cannot modify). # See https://github.com/NixOS/nixpkgs/issues/281656#issuecomment-1902931289 (strings.cmakeBool "USE_FORTRAN" true) (strings.cmakeFeature "CMAKE_C_FLAGS" "-DADD_") (strings.cmakeFeature "CMAKE_CXX_FLAGS" "-DADD_") (strings.cmakeFeature "FORTRAN_CONVENTION" "-DADD_") ] ++ lists.optionals cudaSupport [ (strings.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaArchitecturesString) Loading @@ -192,8 +193,8 @@ stdenv.mkDerivation (finalAttrs: { # Can't easily apply the PR as a patch because we rely on the tarball with pregenerated # hipified files ∴ fetchpatch of the PR will apply cleanly but fail to build (strings.cmakeFeature "ROCM_CORE" "${rocmPackages.clr}") (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/hipcc") (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/hipcc") (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/clang") (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/clang++") ]; # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU. Loading
pkgs/by-name/uc/ucx/package.nix +1 −4 Original line number Diff line number Diff line Loading @@ -32,11 +32,8 @@ let name = "rocm"; paths = rocmList; }; # rocm build fails with gcc stdenv due to unrecognised arg parallel-jobs stdenv' = if enableRocm then rocmPackages.stdenv else stdenv; in stdenv'.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: { pname = "ucx"; version = "1.19.0"; Loading
pkgs/development/python-modules/torch/source/default.nix +43 −39 Original line number Diff line number Diff line Loading @@ -187,25 +187,25 @@ let # TODO: Retest after ROCm 6.4 or torch 2.8 "gfx1010" "gfx1012" # Strix Halo seems to be broken as well, see # https://github.com/NixOS/nixpkgs/pull/440359. "gfx1151" ] (rocmPackages.clr.localGpuTargets or rocmPackages.clr.gpuTargets) ] rocmPackages.clr.localGpuTargets or rocmPackages.clr.gpuTargets else throw "No GPU targets specified" ); # Use vendored CK as header only dep if rocmPackages' CK doesn't properly support targets vendorComposableKernel = rocmSupport && !rocmPackages.composable_kernel.anyMfmaTarget; rocmtoolkit_joined = symlinkJoin { name = "rocm-merged"; paths = with rocmPackages; [ paths = with rocmPackages; [ rocm-core clr rccl miopen aotriton composable_kernel rocrand rocblas rocsparse Loading @@ -229,6 +229,9 @@ let rocm-smi clr.icd hipify ] ++ lib.optionals (!vendorComposableKernel) [ composable_kernel ]; # Fix `setuptools` not being found Loading Loading @@ -373,8 +376,9 @@ buildPythonPackage rec { # Doesn't pick up the environment variable? substituteInPlace third_party/kineto/libkineto/CMakeLists.txt \ --replace-fail "\''$ENV{ROCM_SOURCE_DIR}" "${rocmtoolkit_joined}" # Use composable kernel as dependency, rather than built-in third-party '' # When possible, composable kernel as dependency, rather than built-in third-party + lib.optionalString (rocmSupport && !vendorComposableKernel) '' 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)" "" Loading Loading @@ -412,7 +416,7 @@ buildPythonPackage rec { export ROCM_PATH=${rocmtoolkit_joined} export ROCM_SOURCE_DIR=${rocmtoolkit_joined} export PYTORCH_ROCM_ARCH="${gpuTargetString}" export CMAKE_CXX_FLAGS="-I${rocmtoolkit_joined}/include -I${rocmtoolkit_joined}/include/rocblas" export CMAKE_CXX_FLAGS="-I${rocmtoolkit_joined}/include" python tools/amd_build/build_amd.py ''; Loading
pkgs/development/rocm-modules/6/amdsmi/default.nix +9 −7 Original line number Diff line number Diff line Loading @@ -15,24 +15,26 @@ let esmi_ib_src = fetchFromGitHub { owner = "amd"; repo = "esmi_ib_library"; rev = "esmi_pkg_ver-3.0.3"; hash = "sha256-q0w5c5c+CpXkklmSyfzc+sbkt4cHNxscGJA3AXwvHxQ="; rev = "esmi_pkg_ver-4.2"; hash = "sha256-czF9ezkAO0PuDkXh8y639AcOZH+KVcWiXPX74H5W/nw="; }; in stdenv.mkDerivation (finalAttrs: { pname = "amdsmi"; version = "6.3.3"; version = "6.4.3"; src = fetchFromGitHub { owner = "rocm"; repo = "amdsmi"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-hrPqd4ZWqzTG7JRfVwc1SZx6TNS0Q/LFg8yDxrM3mPo="; hash = "sha256-9O29O4HGkQxFDglAhHKv5KWA7p97RwMGG2x/fkOS2jE="; }; postPatch = '' substituteInPlace goamdsmi_shim/CMakeLists.txt \ --replace-fail "amd_smi)" ${"'"}''${AMD_SMI_TARGET})' \ --replace-fail 'target_link_libraries(''${GOAMDSMI_SHIM_TARGET} -L' '#' substituteInPlace CMakeLists.txt \ --replace-fail "if(NOT latest_esmi_tag STREQUAL current_esmi_tag)" "if(OFF)" # Manually unpack esmi_ib_src and add amd_hsmp.h so execute-process git clone doesn't run cp -rf --no-preserve=mode ${esmi_ib_src} ./esmi_ib_library Loading @@ -41,10 +43,10 @@ stdenv.mkDerivation (finalAttrs: { ''; patches = [ # Fix ld.lld undefined reference: drmGetVersion (fetchpatch { url = "https://github.com/ROCm/amdsmi/commit/c3864bf6171970d86dc50fd23f06377736823997.patch"; hash = "sha256-zRG1tBD8sIQCWdKfCbXC/Z/6d6NTrRYvRpddPWdM4j8="; name = "esmi-to-tag-4.2.patch"; url = "https://github.com/ROCm/amdsmi/commit/49aa2af045a4bc688e6f3ee0545f12afc45c1efe.patch"; hash = "sha256-5dH9N4m+2mJIGVEB86SvdK3uAYyGFTfbCBJ8e09iQ3w="; }) ]; Loading