This repository was archived by the owner on Apr 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
build2cmake/src/templates/xpu Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11define_gpu_extension_target (
22 {{ ops_name }}
33 DESTINATION {{ ops_name }}
4+ INCLUDE_DIRECTORIES "${ONEDNN_XPU_INCLUDE_DIR} "
45 LANGUAGE ${GPU_LANG}
56 SOURCES ${SRC}
67 COMPILE_FLAGS ${sycl_flags}
Original file line number Diff line number Diff line change 5252 ) ;
5353
5454 oneapi-torch-dev = xpuPackages . oneapi-torch-dev . override { inherit stdenv ; } ;
55+ onednn-xpu = xpuPackages . onednn-xpu . override { inherit stdenv oneapi-torch-dev ; } ;
5556
5657 # On Darwin, we need the host's xcrun for `xcrun metal` to compile Metal shaders.
5758 # t's not supported by the nixpkgs shim.
@@ -132,7 +133,7 @@ stdenv.mkDerivation (prevAttrs: {
132133 ++ lib . optionals rocmSupport ( with rocmPackages ; [ hipsparselt ] )
133134 ++ lib . optionals xpuSupport ( [
134135 oneapi-torch-dev
135- xpuPackages . onednn-xpu
136+ onednn-xpu
136137 ] )
137138 ++ lib . optionals stdenv . hostPlatform . isDarwin [
138139 apple-sdk_15
@@ -172,6 +173,9 @@ stdenv.mkDerivation (prevAttrs: {
172173 ( lib . cmakeFeature "CMAKE_HIP_COMPILER_ROCM_ROOT" "${ clr } " )
173174 ( lib . cmakeFeature "HIP_ROOT_DIR" "${ clr } " )
174175 ]
176+ ++ lib . optionals xpuSupport [
177+ ( lib . cmakeFeature "ONEDNN_XPU_INCLUDE_DIR" "${ onednn-xpu } /include" )
178+ ]
175179 ++ lib . optionals stdenv . hostPlatform . isDarwin [
176180 # Use host compiler for Metal. Not included in the redistributable SDK.
177181 ( lib . cmakeFeature "METAL_COMPILER" "${ xcrunHost } /bin/xcrunHost" )
You can’t perform that action at this time.
0 commit comments