-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to build dpcpp open-source version
- Loading branch information
Showing
4 changed files
with
198 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
|
||
cmake, | ||
python3, | ||
ninja, | ||
hwloc, | ||
perl, | ||
|
||
level-zero, | ||
}: | ||
let | ||
date = "2024-12-19"; | ||
|
||
vc-intrinsics = fetchFromGitHub { | ||
owner = "intel"; | ||
repo = "vc-intrinsics"; | ||
rev = "v0.21.0"; | ||
sha256 = "sha256-Ujekj1EeUuOsb1dXMk9XYYe0b1ZzKU7xygLkH8F71d8="; | ||
}; | ||
|
||
unified-runtime = fetchFromGitHub { | ||
owner = "oneapi-src"; | ||
repo = "unified-runtime"; | ||
rev = "v0.11.1"; | ||
sha256 = "sha256-WxbkisEZNTvZ+4xa/cUjaaTDWY3rOCdJraxKtRqbZL0="; | ||
}; | ||
|
||
compute-runtime = fetchFromGitHub { | ||
owner = "intel"; | ||
repo = "compute-runtime"; | ||
rev = "24.39.31294.12"; | ||
sha256 = "sha256-7GNtAo20DgxAxYSPt6Nh92nuuaS9tzsQGH+sLnsvBKU="; | ||
}; | ||
in | ||
stdenv.mkDerivation { | ||
pname = "dpcpp"; | ||
version = "0-unstable-${date}"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "intel"; | ||
repo = "llvm"; | ||
rev = "nightly-${date}"; | ||
sha256 = "rtGeE/7cTSgTg+KxuZOfc6HDHG4Fgte0jjh4nYLo/E8="; | ||
}; | ||
|
||
buildInputs = [ | ||
level-zero | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
python3 | ||
ninja | ||
hwloc | ||
perl | ||
]; | ||
|
||
unpackPhase = ":"; | ||
|
||
configurePhase = ":"; | ||
|
||
buildPhase = '' | ||
export LEVEL_ZERO_DIR=${level-zero} | ||
python3 $src/buildbot/configure.py \ | ||
--obj-dir=$PWD \ | ||
--cmake-opt="-DLLVMGenXIntrinsics_SOURCE_DIR=${vc-intrinsics}" \ | ||
--cmake-opt="-DSYCL_UR_USE_FETCH_CONTENT=OFF" \ | ||
--cmake-opt="-DSYCL_UR_SOURCE_DIR=${unified-runtime}" \ | ||
--cmake-opt="-DUR_LEVEL_ZERO_LOADER_LIBRARY=${level-zero}/lib" \ | ||
--cmake-opt="-DUR_LEVEL_ZERO_INCLUDE_DIR=${level-zero}" \ | ||
--cmake-opt="-DCOMPUTE_RUNTIME_LEVEL_ZERO_INCLUDE=${compute-runtime}" | ||
python3 $src/buildbot/compile.py | ||
''; | ||
|
||
# installPhase = '' | ||
# ''; | ||
|
||
# postInstallPhase = '' | ||
# ''; | ||
|
||
meta = with lib; { | ||
homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html"; | ||
description = "Intel's C, C++, SYCL, and Data Parallel C++ (DPC++) compilers for Intel processor-based systems"; | ||
license = licenses.free; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ arunoruto ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchurl, | ||
autoPatchelfHook, | ||
|
||
ncurses, | ||
xorg, | ||
}: | ||
let | ||
pname = "dpcpp"; | ||
version = "2025.0.4.20"; | ||
|
||
installer = stdenv.mkDerivation { | ||
name = "${pname}-installer-${version}"; | ||
|
||
src = fetchurl { | ||
url = "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/84c039b6-2b7d-4544-a745-3fcf8afd643f/intel-${pname}-cpp-compiler-${version}_offline.sh"; | ||
sha256 = "A8qubgwz5h0SoFSrnFyDkZzdfSW3OSl3keR3dOx/ti0="; | ||
executable = true; | ||
}; | ||
|
||
unpackPhase = '' | ||
mkdir -p $out | ||
$src -x -f $out | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
autoPatchelfHook | ||
ncurses | ||
stdenv.cc.cc.lib | ||
xorg.libXau | ||
]; | ||
}; | ||
in | ||
stdenv.mkDerivation { | ||
inherit pname; | ||
inherit version; | ||
|
||
src = installer; | ||
|
||
dontPatchELF = true; | ||
|
||
nativeBuildInputs = [ | ||
# autoPatchelfHook | ||
# ncurses | ||
]; | ||
|
||
unpackPhase = ":"; | ||
|
||
# configurePhase = ":"; | ||
|
||
# buildPhase = '' | ||
# ''; | ||
|
||
installPhase = '' | ||
mkdir -p $out | ||
ls -la $src/intel-dpcpp-cpp-compiler-${version}_offline/install.sh | ||
$src/intel-dpcpp-cpp-compiler-${version}_offline/install.sh -s --eula=accept --install-dir=$out | ||
''; | ||
|
||
# postInstallPhase = '' | ||
# ''; | ||
|
||
meta = with lib; { | ||
homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html"; | ||
description = "Intel's C, C++, SYCL, and Data Parallel C++ (DPC++) compilers for Intel processor-based systems"; | ||
license = licenses.free; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ arunoruto ]; | ||
}; | ||
} |