Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fff815c
rocmPackages.rocmUpdateScript: take maxMajor and tagPrefixes
randomizedcoder Oct 17, 2026
f636197
llvmPackages_23.openmp: fix build for LLVM 23+
aaravrav Oct 16, 2026
c6ad124
rocmPackages_10: init
randomizedcoder Oct 22, 2026
0fbffa8
rocmPackages_10: copy llvm from rocmPackages
randomizedcoder Oct 22, 2026
417d349
rocmPackages_10.llvm: init at 10.1 (LLVM 24)
randomizedcoder Oct 22, 2026
ae580ea
rocmPackages_10.rocm-device-libs: init at 24.0.0-rocm
randomizedcoder Oct 22, 2026
ab8f71a
rocmPackages_10: copy runtime from rocmPackages
randomizedcoder Oct 22, 2026
3351249
rocmPackages_10: share hipcc, rocm-docs-core with rocmPackages
randomizedcoder Oct 22, 2026
05c1a15
rocmPackages_10.rocm-core: init at 10.1
randomizedcoder Oct 22, 2026
6019ee5
rocmPackages_10.rocm-cmake: init at 10.1
randomizedcoder Oct 22, 2026
b6a2140
rocmPackages_10.rocprofiler-register: init at 10.1
randomizedcoder Oct 22, 2026
05b4e34
rocmPackages_10.rocm-runtime: init at 10.1
randomizedcoder Oct 22, 2026
3ae4d90
rocmPackages_10.rocm-comgr: init at 24.0.0-rocm
randomizedcoder Oct 22, 2026
3166d74
rocmPackages_10.rocminfo: init at 10.1
randomizedcoder Oct 22, 2026
d35f8f2
rocmPackages_10.amdsmi: init at 10.1
randomizedcoder Oct 22, 2026
b592665
rocmPackages_10.rocm-smi: init at 10.1
randomizedcoder Oct 22, 2026
f409337
rocmPackages_10.hip-common: init at 10.1
randomizedcoder Oct 22, 2026
e48aa86
rocmPackages_10.roctracer: init at 10.1
randomizedcoder Oct 22, 2026
0204dbf
rocmPackages_10.clr: init at 10.1
randomizedcoder Oct 22, 2026
5271f12
rocmPackages_10.hipify: init at 10.1
randomizedcoder Oct 22, 2026
00b0bf3
rocmPackages_10.half: init at 10.1
randomizedcoder Oct 22, 2026
d3030b3
rocmPackages_10: copy profiling and debugging tools, RCCL
randomizedcoder Oct 22, 2026
f7a6fe3
rocmPackages_10: share rocprof-compute-viewer, mscclpp with rocmPackages
randomizedcoder Oct 22, 2026
714d302
rocmPackages_10.aqlprofile: init at 10.1
randomizedcoder Oct 22, 2026
ccf1430
rocmPackages_10.rocprof-trace-decoder: init at 0.2.2
randomizedcoder Oct 22, 2026
d692999
rocmPackages_10.rocdbgapi: init at 10.1
randomizedcoder Oct 22, 2026
90c358a
rocmPackages_10.rocgdb: init at 10.1
randomizedcoder Oct 22, 2026
80a94c1
rocmPackages_10.rocr-debug-agent: init at 10.1
randomizedcoder Oct 22, 2026
6b5e088
rocmPackages_10.rocprofiler: init at 10.1
randomizedcoder Oct 22, 2026
29472b7
rocmPackages_10.rdc: init at 10.1
randomizedcoder Oct 22, 2026
6ea18ed
rocmPackages_10.rccl: init at 10.1
randomizedcoder Oct 22, 2026
e89558d
rocmPackages_10.rocprofiler-sdk: init at 10.1
randomizedcoder Oct 22, 2026
e01bc52
rocmPackages_10.rocshmem: init at 10.1
randomizedcoder Oct 22, 2026
191f83c
rocmPackages_10: copy rocPRIM, rocRAND, rocFFT from rocmPackages
randomizedcoder Oct 22, 2026
4408c26
rocmPackages_10.rocprim: init at 10.1
randomizedcoder Oct 22, 2026
cbd6bbe
rocmPackages_10.rocthrust: init at 10.1
randomizedcoder Oct 22, 2026
5962e8c
rocmPackages_10.hipcub: init at 10.1
randomizedcoder Oct 22, 2026
0386a8b
rocmPackages_10.rocrand: init at 10.1
randomizedcoder Oct 22, 2026
3fda76a
rocmPackages_10.hiprand: init at 10.1
randomizedcoder Oct 22, 2026
d7b9cf2
rocmPackages_10.rocfft: init at 10.1
randomizedcoder Oct 22, 2026
fe3f688
rocmPackages_10.hipfft: init at 10.1
randomizedcoder Oct 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions pkgs/development/compilers/llvm/common/openmp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,28 @@ stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
__structuredAttrs = true;
}
''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/openmp "$out"
''
(
''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/openmp "$out"
''
+ lib.optionalString (lib.versionAtLeast release_version "23") ''
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/third-party "$out"
cp -r ${monorepoSrc}/runtimes "$out"
''
)
else
src;

sourceRoot = "${finalAttrs.src.name}/openmp";
# LLVM 23 removed OpenMP's standalone build
# https://openmp.llvm.org/Building.html
sourceRoot =
"${finalAttrs.src.name}/"
+ (if lib.versionAtLeast release_version "23" then "runtimes" else "openmp");

outputs = [
"out"
Expand Down Expand Up @@ -89,14 +102,19 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeFeature "OPT_TOOL" "${llvm}/bin/opt")
(lib.cmakeFeature "LINK_TOOL" "${llvm}/bin/llvm-link")
]
++ lib.optionals (lib.versionAtLeast release_version "23") [
(lib.cmakeFeature "LLVM_ENABLE_RUNTIMES" "openmp")
]
++ devExtraCmakeFlags;

doCheck = false;

checkTarget = "check-openmp";

preCheck = ''
patchShebangs ../tools/archer/tests/deflake.bash
patchShebangs ${
if lib.versionAtLeast release_version "23" then "../../openmp" else ".."
}/tools/archer/tests/deflake.bash
'';

__structuredAttrs = true;
Expand Down
100 changes: 100 additions & 0 deletions pkgs/development/rocm-modules/10/amdsmi/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
lib,
stdenv,
fetchFromGitHub,
rocmUpdateScript,
cmake,
pkg-config,
libdrm,
libnl,
libmnl,
python,
wrapPython,
autoPatchelfHook,
binutils,
}:

let
esmi_ib_src = fetchFromGitHub {
owner = "amd";
repo = "esmi_ib_library";
# The commit amdsmi pins (tag esmi_pkg_ver-5.2.1.1)
rev = "d494a3194ceb4cc4dbb2debf9fcbe8773c6d3bef";
hash = "sha256-StSYzyIujaH8UJIRpfJC0lf+oVT9fWflJgQONvRqu70=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "amdsmi";
version = "10.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocm-systems";
tag = "therock-${finalAttrs.version}";
sparseCheckout = [
"projects/amdsmi"
"shared"
];
hash = "sha256-CmCVPmqgU0HtqIBuJUs+Nr7LRKtngOaNNsWFek9Nino=";
};
sourceRoot = "${finalAttrs.src.name}/projects/amdsmi";

postPatch = ''
# Pre-populate esmi_ib_library so CMake does not FetchContent it.
cp -rf --no-preserve=mode ${esmi_ib_src} ./esmi_ib_library
mkdir -p ./esmi_ib_library/include/asm
cp ./include/amd_smi/impl/amd_hsmp.h ./esmi_ib_library/include/asm/amd_hsmp.h
'';

nativeBuildInputs = [
cmake
pkg-config
wrapPython
autoPatchelfHook
binutils # CMake resolves link-lib SONAMEs via `objdump -p`
];

buildInputs = [
libdrm
libnl # pkg_check_modules libnl-3.0 + libnl-genl-3.0
libmnl # pkg_check_modules libmnl
];

cmakeFlags = [
# Manually define CMAKE_INSTALL_<DIR>
# See: https://github.com/NixOS/nixpkgs/pull/197838
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
# py-interface/CMakeLists.txt fails without a system python3 unless this is set.
"-DAMDSMI_SYSTEM_PYTHON_SITELIB=${placeholder "out"}/${python.sitePackages}"
# libamd_smi.so still exports rsmi_init, and its own call to it goes
# through the PLT. Once librocm_smi64 is loaded globally (torch's
# libtorch_hip needs it), that call binds to rocm_smi's copy, amdsmi's own
# state is never initialised, and enumeration returns no processors:
# torch.cuda.device_count() is then 0. Upstream links only the wheel's
# libamd_smi_python.so this way; do the same for the system library.
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-Bsymbolic-functions"
];

postInstall = ''
mkdir -p $out/${python.sitePackages}
ln -s $out/share/amd_smi/amdsmi $out/${python.sitePackages}/amdsmi

makeWrapperArgs=(--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libdrm ]})
wrapPythonProgramsIn $out
rm $out/bin/amd-smi
ln -sf $out/libexec/amdsmi_cli/amdsmi_cli.py $out/bin/amd-smi
'';

passthru.updateScript = rocmUpdateScript { inherit finalAttrs; };

meta = {
description = "System management interface for AMD GPUs supported by ROCm";
homepage = "https://github.com/ROCm/rocm-systems/tree/develop/projects/amdsmi";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ lovesegfault ];
teams = [ lib.teams.rocm ];
platforms = [ "x86_64-linux" ];
mainProgram = "amd-smi";
};
})
42 changes: 42 additions & 0 deletions pkgs/development/rocm-modules/10/aqlprofile/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
stdenv,
clr,
cmake,
fetchFromGitHub,
rocmUpdateScript,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "aqlprofile";
version = "10.1";

src = fetchFromGitHub {
owner = "ROCm";
repo = "rocm-systems";
tag = "therock-${finalAttrs.version}";
sparseCheckout = [
"projects/aqlprofile"
"shared"
];
hash = "sha256-7yeEJoyShSCwy1MTCeArYBabh5qTVm5uZL8N74rvxPA=";
};
sourceRoot = "${finalAttrs.src.name}/projects/aqlprofile";

env.CXXFLAGS = "-DROCP_LD_AQLPROFILE=1";

nativeBuildInputs = [
cmake
clr
];

passthru.updateScript = rocmUpdateScript { inherit finalAttrs; };

meta = {
description = "AQLPROFILE library for AMD HSA runtime API extension support";
homepage = "https://github.com/ROCm/rocm-systems/tree/develop/projects/aqlprofile";
license = lib.licenses.mit;
teams = [ lib.teams.rocm ];
platforms = lib.platforms.linux;
};
})
40 changes: 40 additions & 0 deletions pkgs/development/rocm-modules/10/clr/cmake-find-x11-libgl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/rocclr/cmake/ROCclr.cmake b/rocclr/cmake/ROCclr.cmake
index 3f233b72f..67bdc62ee 100644
--- a/rocclr/cmake/ROCclr.cmake
+++ b/rocclr/cmake/ROCclr.cmake
@@ -44,6 +44,19 @@ find_package(Threads REQUIRED)

find_package(AMD_OPENCL)

+# Find X11 package
+find_package(X11 REQUIRED)
+if(NOT X11_FOUND)
+ message(FATAL_ERROR "X11 libraries not found")
+endif()
+
+# Find OpenGL package
+find_package(OpenGL REQUIRED)
+if(NOT OpenGL_FOUND)
+ message(FATAL_ERROR "OpenGL not found")
+endif()
+
+
add_library(rocclr STATIC)

include(ROCclrCompilerOptions)
@@ -123,9 +136,14 @@ target_include_directories(rocclr PUBLIC
${ROCCLR_SRC_DIR}/device
${ROCCLR_SRC_DIR}/elf
${ROCCLR_SRC_DIR}/include
+ ${X11_INCLUDE_DIR}
+ ${OPENGL_INCLUDE_DIR}
${AMD_OPENCL_INCLUDE_DIRS})

-target_link_libraries(rocclr PUBLIC Threads::Threads)
+target_link_libraries(rocclr PUBLIC
+ Threads::Threads
+ ${X11_LIBRARIES}
+ ${OPENGL_LIBRARIES})
# IPC on Windows is not supported
if(UNIX)
target_link_libraries(rocclr PUBLIC rt)
Loading
Loading