Merge pull request #236274 from yboettcher/add-opensycl
This commit is contained in:
commit
7e2f926bbb
|
@ -18076,6 +18076,12 @@
|
||||||
githubId = 73759599;
|
githubId = 73759599;
|
||||||
name = "Yaya";
|
name = "Yaya";
|
||||||
};
|
};
|
||||||
|
yboettcher = {
|
||||||
|
name = "Yannik Böttcher";
|
||||||
|
github = "yboettcher";
|
||||||
|
githubId = 39460066;
|
||||||
|
email = "yannikboettcher@outlook.de";
|
||||||
|
};
|
||||||
ydlr = {
|
ydlr = {
|
||||||
name = "ydlr";
|
name = "ydlr";
|
||||||
email = "ydlr@ydlr.io";
|
email = "ydlr@ydlr.io";
|
||||||
|
|
67
pkgs/development/compilers/opensycl/default.nix
Normal file
67
pkgs/development/compilers/opensycl/default.nix
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, llvmPackages_15
|
||||||
|
, lld_15
|
||||||
|
, rocm-device-libs
|
||||||
|
, python3
|
||||||
|
, rocm-runtime
|
||||||
|
, cmake
|
||||||
|
, boost
|
||||||
|
, libxml2
|
||||||
|
, libffi
|
||||||
|
, makeWrapper
|
||||||
|
, hip
|
||||||
|
, rocmSupport ? false
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (llvmPackages_15) stdenv;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "OpenSYCL";
|
||||||
|
version = "0.9.4";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "OpenSYCL";
|
||||||
|
repo = "OpenSYCL";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-5YkuUOAnvoAD5xDKxKMPq0B7+1pb6hVisPAhs0Za1ls=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libxml2
|
||||||
|
libffi
|
||||||
|
boost
|
||||||
|
llvmPackages_15.openmp
|
||||||
|
llvmPackages_15.libclang.dev
|
||||||
|
llvmPackages_15.llvm
|
||||||
|
] ++ lib.optionals rocmSupport [
|
||||||
|
hip
|
||||||
|
rocm-runtime
|
||||||
|
];
|
||||||
|
|
||||||
|
# opensycl makes use of clangs internal headers. Its cmake does not successfully discover them automatically on nixos, so we supply the path manually
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DCLANG_INCLUDE_PATH=${llvmPackages_15.libclang.dev}/include"
|
||||||
|
];
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/bin/syclcc-clang \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ python3 lld_15 ]} \
|
||||||
|
--add-flags "-L${llvmPackages_15.openmp}/lib" \
|
||||||
|
--add-flags "-I${llvmPackages_15.openmp.dev}/include" \
|
||||||
|
'' + lib.optionalString rocmSupport ''
|
||||||
|
--add-flags "--rocm-device-lib-path=${rocm-device-libs}/amdgcn/bitcode"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/OpenSYCL/OpenSYCL";
|
||||||
|
description = "Multi-backend implementation of SYCL for CPUs and GPUs";
|
||||||
|
maintainers = with maintainers; [ yboettcher ];
|
||||||
|
license = licenses.bsd2;
|
||||||
|
};
|
||||||
|
}
|
|
@ -16984,6 +16984,9 @@ with pkgs;
|
||||||
|
|
||||||
opensmalltalk-vm = callPackage ../development/compilers/opensmalltalk-vm { };
|
opensmalltalk-vm = callPackage ../development/compilers/opensmalltalk-vm { };
|
||||||
|
|
||||||
|
opensycl = darwin.apple_sdk_11_0.callPackage ../development/compilers/opensycl { };
|
||||||
|
opensyclWithRocm = opensycl.override { rocmSupport = true; };
|
||||||
|
|
||||||
ravedude = callPackage ../development/tools/rust/ravedude { };
|
ravedude = callPackage ../development/tools/rust/ravedude { };
|
||||||
|
|
||||||
ra-multiplex = callPackage ../development/tools/rust/ra-multiplex {};
|
ra-multiplex = callPackage ../development/tools/rust/ra-multiplex {};
|
||||||
|
|
Loading…
Reference in a new issue