push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
From f0e66bd446d44df1d30faaad520613f5fb7f5916 Mon Sep 17 00:00:00 2001
From: Martin Schwaighofer <mschwaig@users.noreply.github.com>
Date: Sat, 30 Mar 2024 15:36:52 +0100
Subject: [PATCH] set __STDC_CONSTANT_MACROS to make rocAL compile
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42b139b6..509915f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,6 +149,8 @@ message("-- ${Cyan} -D MIGRAPHX=${MIGRAPHX} [Turn ON/OFF MIGraphX Module (de
message("-- ${Cyan} -D BACKEND=${BACKEND} [Select MIVisionX Backend [options:CPU/OPENCL/HIP](default:HIP)]${ColourReset}")
message("-- ${Cyan} -D BUILD_WITH_AMD_ADVANCE=${BUILD_WITH_AMD_ADVANCE} [Turn ON/OFF Build for AMD advanced GPUs(default:OFF)]${ColourReset}")
+add_definitions(-D__STDC_CONSTANT_MACROS)
+
add_subdirectory(amd_openvx)
add_subdirectory(amd_openvx_extensions)
add_subdirectory(utilities)
--
2.43.0

View File

@@ -0,0 +1,149 @@
{
lib,
stdenv,
fetchFromGitHub,
rocmUpdateScript,
cmake,
rocm-cmake,
clr,
pkg-config,
rpp,
rocblas,
miopen,
migraphx,
openmp,
protobuf,
qtcreator,
opencv,
ffmpeg,
boost,
libjpeg_turbo,
half,
lmdb,
rapidjson,
rocm-docs-core,
python3Packages,
useOpenCL ? false,
useCPU ? false,
buildDocs ? false, # Needs internet
gpuTargets ? [ ],
}:
stdenv.mkDerivation (finalAttrs: {
pname =
"mivisionx-"
+ (
if (!useOpenCL && !useCPU) then
"hip"
else if (!useOpenCL && !useCPU) then
"opencl"
else
"cpu"
);
version = "6.4.3";
src = fetchFromGitHub {
owner = "ROCm";
repo = "MIVisionX";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-07MivgCYmKLnhGDjOYsFBfwIxEoQLYNoRbOo3MPpVzE=";
};
patches = [
./0001-set-__STDC_CONSTANT_MACROS-to-make-rocAL-compile.patch
];
nativeBuildInputs = [
cmake
rocm-cmake
pkg-config
]
++ lib.optionals (!useOpenCL && !useCPU) [
clr
]
++ lib.optionals buildDocs [
rocm-docs-core
python3Packages.python
];
buildInputs = [
rpp
openmp
half
protobuf
qtcreator
opencv
ffmpeg
boost
libjpeg_turbo
lmdb
rapidjson
python3Packages.pybind11
python3Packages.numpy
]
++ lib.optionals (!useOpenCL && !useCPU) [
miopen
rocblas
migraphx
];
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"
"-DCMAKE_INSTALL_PREFIX_PYTHON=lib"
# "-DAMD_FP16_SUPPORT=ON" `error: typedef redefinition with different types ('__half' vs 'half_float::half')`
]
++ lib.optionals (gpuTargets != [ ]) [
"-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}"
]
++ lib.optionals (!useOpenCL && !useCPU) [
"-DROCM_PATH=${clr}"
"-DAMDRPP_PATH=${rpp}"
"-DBACKEND=HIP"
"-DCMAKE_C_COMPILER=hipcc"
"-DCMAKE_CXX_COMPILER=hipcc"
]
++ lib.optionals (useOpenCL && !useCPU) [
"-DBACKEND=OCL"
]
++ lib.optionals useCPU [
"-DBACKEND=CPU"
];
postPatch = ''
# Properly find turbojpeg
substituteInPlace cmake/FindTurboJpeg.cmake \
--replace-fail "\''${TURBO_JPEG_PATH}/include" "${libjpeg_turbo.dev}/include" \
--replace-fail "\''${TURBO_JPEG_PATH}/lib" "${libjpeg_turbo.out}/lib"
${lib.optionalString (!useOpenCL && !useCPU) ''
# Properly find miopen
substituteInPlace amd_openvx_extensions/CMakeLists.txt \
--replace-fail "miopen PATHS \''${ROCM_PATH} QUIET" "miopen PATHS ${miopen} QUIET" \
--replace-fail "\''${ROCM_PATH}/include/miopen/config.h" "${miopen}/include/miopen/config.h"
''}
'';
postBuild = lib.optionalString buildDocs ''
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en ../docs _build/html
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
inherit (finalAttrs.src) owner;
inherit (finalAttrs.src) repo;
};
meta = with lib; {
description = "Set of comprehensive computer vision and machine intelligence libraries, utilities, and applications";
homepage = "https://github.com/ROCm/MIVisionX";
license = with licenses; [ mit ];
teams = [ teams.rocm ];
platforms = platforms.linux;
broken = useOpenCL;
};
})