Index: head/lang/intel-compute-runtime/Makefile =================================================================== --- head/lang/intel-compute-runtime/Makefile (revision 524737) +++ head/lang/intel-compute-runtime/Makefile (revision 524738) @@ -1,42 +1,42 @@ # $FreeBSD$ PORTNAME= compute-runtime -DISTVERSION= 20.03.15346 +DISTVERSION= 20.04.15428 CATEGORIES= lang PKGNAMEPREFIX= intel- MAINTAINER= jbeich@FreeBSD.org COMMENT= OpenCL implementation for Intel HD 5000 (Gen8) or newer LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported LIB_DEPENDS= libigc.so:devel/intel-graphics-compiler \ libigdgmm.so:multimedia/gmmlib USES= cmake compiler:c++14-lang localbase:ldflags pkgconfig USE_GITHUB= yes USE_LDCONFIG= yes GH_ACCOUNT= intel CMAKE_ON= SKIP_UNIT_TESTS CMAKE_ARGS= -DNEO_DRIVER_VERSION:STRING="${DISTVERSIONFULL}" PLIST_FILES= etc/OpenCL/vendors/intel.icd \ bin/ocloc \ lib/intel-opencl/libigdrcl.so post-patch: @${REINPLACE_CMD} -e '/-Werror/d' \ -e '/FORCE_RESPONSE_FILE/d' \ ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e '/defaults/!s,/etc",${PREFIX}&,' \ ${WRKSRC}/package.cmake post-install: # install/strip has no effect on install(FILES), so strip manually ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/intel-opencl/*.so .include Index: head/lang/intel-compute-runtime/distinfo =================================================================== --- head/lang/intel-compute-runtime/distinfo (revision 524737) +++ head/lang/intel-compute-runtime/distinfo (revision 524738) @@ -1,3 +1,3 @@ -TIMESTAMP = 1579087635 -SHA256 (intel-compute-runtime-20.03.15346_GH0.tar.gz) = 6732e7b63ec0c32782e136f6c5ed3276c92c68616240b11183b7cc41237f92a6 -SIZE (intel-compute-runtime-20.03.15346_GH0.tar.gz) = 2671869 +TIMESTAMP = 1579774153 +SHA256 (intel-compute-runtime-20.04.15428_GH0.tar.gz) = 93d0e34763e627d58b37637c47f274f2e8e1563a45043e756b23071b668e4d61 +SIZE (intel-compute-runtime-20.04.15428_GH0.tar.gz) = 2698124 Index: head/lang/intel-compute-runtime/files/patch-clock_gettime =================================================================== --- head/lang/intel-compute-runtime/files/patch-clock_gettime (revision 524737) +++ head/lang/intel-compute-runtime/files/patch-clock_gettime (revision 524738) @@ -1,24 +1,24 @@ CLOCK_MONOTONIC_RAW doesn't exist on non-Linux systems. runtime/os_interface/linux/os_time_linux.cpp:61:21: error: use of undeclared identifier 'CLOCK_MONOTONIC_RAW' if (getTimeFunc(CLOCK_MONOTONIC_RAW, &ts)) { ^ runtime/os_interface/linux/os_time_linux.cpp:138:24: error: use of undeclared identifier 'CLOCK_MONOTONIC_RAW' if (resolutionFunc(CLOCK_MONOTONIC_RAW, &ts)) { ^ ---- runtime/os_interface/linux/os_time_linux.cpp.orig 2019-11-22 15:41:47 UTC -+++ runtime/os_interface/linux/os_time_linux.cpp +--- core/os_interface/linux/os_time_linux.cpp.orig 2020-01-23 10:09:13 UTC ++++ core/os_interface/linux/os_time_linux.cpp @@ -14,6 +14,10 @@ #include +#ifndef CLOCK_MONOTONIC_RAW +#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC +#endif + namespace NEO { OSTimeLinux::OSTimeLinux(OSInterface *osInterface) { Index: head/lang/intel-compute-runtime/files/patch-i386 =================================================================== --- head/lang/intel-compute-runtime/files/patch-i386 (revision 524737) +++ head/lang/intel-compute-runtime/files/patch-i386 (revision 524738) @@ -1,18 +1,18 @@ SSE2 is not enabled by default on BSDs core/utilities/clflush.cpp:16:5: error: '_mm_clflush' needs target feature sse2 _mm_clflush(ptr); ^ ---- core/utilities/clflush.cpp.orig 2019-11-29 14:23:34 UTC -+++ core/utilities/clflush.cpp +--- core/utilities/cpuintrinsics.cpp.orig 2020-01-23 10:09:13 UTC ++++ core/utilities/cpuintrinsics.cpp @@ -12,6 +12,9 @@ namespace NEO { namespace CpuIntrinsics { +#ifdef __GNUC__ +__attribute__((target("sse2"))) +#endif void clFlush(void const *ptr) { _mm_clflush(ptr); } Index: head/lang/intel-compute-runtime/files/patch-max_freq =================================================================== --- head/lang/intel-compute-runtime/files/patch-max_freq (revision 524737) +++ head/lang/intel-compute-runtime/files/patch-max_freq (revision 524738) @@ -1,44 +1,44 @@ /sys/bus/pci/devices doesn't exist as kms-drm exports sysfs via sysctl $ clinfo | fgrep clock Max clock frequency 0MHz ---- runtime/os_interface/linux/drm_neo.cpp.orig 2019-12-09 17:18:41 UTC -+++ runtime/os_interface/linux/drm_neo.cpp -@@ -16,6 +16,11 @@ +--- core/os_interface/linux/drm_neo.cpp.orig 2020-01-23 10:09:13 UTC ++++ core/os_interface/linux/drm_neo.cpp +@@ -18,6 +18,11 @@ #include #include +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#include +#include +#endif + namespace NEO { const char *Drm::sysFsDefaultGpuPath = "/drm/card0"; -@@ -66,6 +71,16 @@ int Drm::getEnabledPooledEu(int &enabled) { +@@ -68,6 +73,16 @@ int Drm::getEnabledPooledEu(int &enabled) { int Drm::getMaxGpuFrequency(int &maxGpuFrequency) { maxGpuFrequency = 0; +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + char max_freq[PAGE_SIZE]; + size_t len = sizeof(max_freq); + + if (sysctlbyname("sys.class.drm.card0.gt_max_freq_mhz", &max_freq, &len, NULL, 0)) { + return 0; + } + + maxGpuFrequency = std::stoi(max_freq); +#else int deviceID = 0; int ret = getDeviceID(deviceID); if (ret != 0) { -@@ -87,6 +102,7 @@ int Drm::getMaxGpuFrequency(int &maxGpuFrequency) { +@@ -89,6 +104,7 @@ int Drm::getMaxGpuFrequency(int &maxGpuFrequency) { ifs >> maxGpuFrequency; ifs.close(); +#endif return 0; }