aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2020-04-07 23:50:46 +0800
committerJan Beich <jbeich@FreeBSD.org>2020-04-07 23:50:46 +0800
commit74dc463daee6825ed65dd6af8973258e76af4de5 (patch)
tree1b1231be0d1cd9a8ba612af06372373ab05d9958 /lang
parente9fffaf820146999d4958dc0f7a2ad52259c8e45 (diff)
downloadfreebsd-ports-gnome-74dc463daee6825ed65dd6af8973258e76af4de5.tar.gz
freebsd-ports-gnome-74dc463daee6825ed65dd6af8973258e76af4de5.tar.zst
freebsd-ports-gnome-74dc463daee6825ed65dd6af8973258e76af4de5.zip
lang/intel-compute-runtime: expose oneAPI support
Need help testing runtime e.g., finding a simple consumer.
Diffstat (limited to 'lang')
-rw-r--r--lang/intel-compute-runtime/Makefile10
-rw-r--r--lang/intel-compute-runtime/files/patch-glibc17
-rw-r--r--lang/intel-compute-runtime/files/patch-unix28
3 files changed, 55 insertions, 0 deletions
diff --git a/lang/intel-compute-runtime/Makefile b/lang/intel-compute-runtime/Makefile
index c1d995eb43fb..87762d089777 100644
--- a/lang/intel-compute-runtime/Makefile
+++ b/lang/intel-compute-runtime/Makefile
@@ -2,6 +2,7 @@
PORTNAME= compute-runtime
DISTVERSION= 20.13.16352
+PORTREVISION= 1
CATEGORIES= lang
PKGNAMEPREFIX= intel-
@@ -27,6 +28,15 @@ PLIST_FILES= etc/OpenCL/vendors/intel.icd \
bin/ocloc \
lib/intel-opencl/libigdrcl.so
+OPTIONS_DEFINE_amd64= L0
+OPTIONS_DEFAULT_amd64= L0
+
+L0_DESC= oneAPI Level Zero support
+L0_BUILD_DEPENDS= level-zero>0:devel/level-zero
+L0_CMAKE_BOOL= BUILD_WITH_L0
+L0_PLIST_FILES= lib/libze_intel_gpu.so.0.8 \
+ lib/libze_intel_gpu.so.0.8.0
+
post-patch:
@${REINPLACE_CMD} -e '/-Werror/d' \
-e '/FORCE_RESPONSE_FILE/d' \
diff --git a/lang/intel-compute-runtime/files/patch-glibc b/lang/intel-compute-runtime/files/patch-glibc
new file mode 100644
index 000000000000..50dc4418cf62
--- /dev/null
+++ b/lang/intel-compute-runtime/files/patch-glibc
@@ -0,0 +1,17 @@
+major/minor/makedev aren't used, so drop Linux-specific header.
+
+In file included from level_zero/tools/source/sysman/linux/os_sysman_imp.h:12:
+level_zero/tools/source/sysman/linux/fs_access.h:19:10: fatal error: 'sys/sysmacros.h' file not found
+#include <sys/sysmacros.h>
+ ^~~~~~~~~~~~~~~~~
+
+--- level_zero/tools/source/sysman/linux/fs_access.h.orig 2020-03-27 09:53:58 UTC
++++ level_zero/tools/source/sysman/linux/fs_access.h
+@@ -16,7 +16,6 @@
+ #include <sstream>
+ #include <string>
+ #include <sys/stat.h>
+-#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <vector>
diff --git a/lang/intel-compute-runtime/files/patch-unix b/lang/intel-compute-runtime/files/patch-unix
index 5e60e2476836..2d990bb22c5e 100644
--- a/lang/intel-compute-runtime/files/patch-unix
+++ b/lang/intel-compute-runtime/files/patch-unix
@@ -1,5 +1,13 @@
Relax Linux checks for the code works on any non-Windows platform
+In file included from level_zero/tools/source/pin/pin.cpp:11:
+level_zero/source/inc/ze_intel_gpu.h:34:2: error: "Unsupported OS"
+#error "Unsupported OS"
+ ^
+level_zero/api/core/ze_core_loader.cpp:29:41: error: use of undeclared identifier 'LOAD_INTEL_GPU_LIBRARY'
+ driver_ddiTable.driverLibrary = LOAD_INTEL_GPU_LIBRARY();
+ ^
+
core/elf/writer.cpp:54:9: error:
use of undeclared identifier 'memcpy_s'
memcpy_s(data, queueFront.dataSize, queueFront.data.c_str(), queueFront.dataSize);
@@ -13,6 +21,26 @@ core/elf/writer.cpp:76:5: error:
memcpy_s(curSectionHeader, sizeof(SElf64SectionHeader),
^
+--- level_zero/source/inc/ze_intel_gpu.h.orig 2020-03-27 09:53:58 UTC
++++ level_zero/source/inc/ze_intel_gpu.h
+@@ -12,7 +12,7 @@
+ #include <string.h>
+
+ ///////////////////////////////////////////////////////////////////////////////
+-#if defined(__linux__)
++#if !defined(__APPLE__) && !defined(_WIN32)
+ #include <dlfcn.h>
+ #define HMODULE void *
+ #define MAKE_VERSION() L0_PROJECT_VERSION_MAJOR "." L0_PROJECT_VERSION_MINOR
+@@ -42,7 +42,7 @@ inline bool getenv_tobool(const char *name) {
+ return (0 == strcmp("1", env));
+ }
+
+-#if defined(__linux__)
++#if !defined(__APPLE__) && !defined(_WIN32)
+ #define LOAD_INTEL_GPU_LIBRARY() LOAD_DRIVER_LIBRARY(MAKE_LIBRARY_NAME("ze_intel_gpu", MAKE_VERSION()))
+ #elif defined(_WIN32)
+ #if _WIN64
--- shared/source/helpers/string.h.orig 2020-02-28 16:16:42 UTC
+++ shared/source/helpers/string.h
@@ -10,7 +10,7 @@