Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opensycl: init at 0.9.4 #236274

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17935,6 +17935,12 @@
githubId = 73759599;
name = "Yaya";
};
yboettcher = {
name = "Yannik Böttcher";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be cool to add another mean of contact

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice if you have a matrix to add that but optional

github = "yboettcher";
githubId = 39460066;
email = "[email protected]";
};
ydlr = {
name = "ydlr";
email = "[email protected]";
Expand Down
67 changes: 67 additions & 0 deletions pkgs/development/compilers/opensycl/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
3 changes: 3 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16902,6 +16902,9 @@ with pkgs;

opensmalltalk-vm = callPackage ../development/compilers/opensmalltalk-vm { };

opensycl = darwin.apple_sdk_11_0.callPackage ../development/compilers/opensycl { };
Janik-Haag marked this conversation as resolved.
Show resolved Hide resolved
opensyclWithRocm = opensycl.override { rocmSupport = true; };

ravedude = callPackage ../development/tools/rust/ravedude { };

rhack = callPackage ../development/tools/rust/rhack { };
Expand Down