Index: head/lang/intel-compute-runtime/Makefile =================================================================== --- head/lang/intel-compute-runtime/Makefile (revision 536252) +++ head/lang/intel-compute-runtime/Makefile (revision 536253) @@ -1,57 +1,61 @@ # $FreeBSD$ PORTNAME= compute-runtime -DISTVERSION= 20.19.16754 +DISTVERSION= 20.20.16837 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 +BROKEN_i386= https://github.com/intel/compute-runtime/issues/316 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_OCL_DRIVER_VERSION:STRING="${DISTVERSIONFULL}" -PLIST_FILES= etc/OpenCL/vendors/intel.icd \ - bin/ocloc \ - lib/intel-opencl/libigdrcl.so +PLIST_FILES= bin/ocloc \ + etc/OpenCL/vendors/intel.icd \ + include/ocloc_api.h \ + lib/intel-opencl/libigdrcl.so \ + lib/libocloc.so \ + ${NULL} OPTIONS_DEFINE= VAAPI OPTIONS_DEFAULT=VAAPI 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_CMAKE_ON= -DNEO_VERSION_BUILD:STRING="0" L0_PLIST_FILES= lib/libze_intel_gpu.so.0.8 \ lib/libze_intel_gpu.so.0.8.0 VAAPI_BUILD_DEPENDS= ${LOCALBASE}/include/va/va.h:multimedia/libva VAAPI_CMAKE_BOOL_OFF= DISABLE_LIBVA post-patch: @${REINPLACE_CMD} -e '/-Werror/d' \ -e '/FORCE_RESPONSE_FILE/d' \ ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e '/OCL_ICD_VENDORDIR/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 536252) +++ head/lang/intel-compute-runtime/distinfo (revision 536253) @@ -1,3 +1,3 @@ -TIMESTAMP = 1588775595 -SHA256 (intel-compute-runtime-20.19.16754_GH0.tar.gz) = efe934ec037b1a757e3b427ca110ca42aaa2ad21cd7e8cffc3f02f034eea828e -SIZE (intel-compute-runtime-20.19.16754_GH0.tar.gz) = 3099362 +TIMESTAMP = 1589575000 +SHA256 (intel-compute-runtime-20.20.16837_GH0.tar.gz) = 975787ced1800ea52ece2ca40c23c4cac9267a358957c4a7f5255d22dc6a6d5f +SIZE (intel-compute-runtime-20.20.16837_GH0.tar.gz) = 3121549 Index: head/lang/intel-compute-runtime/files/patch-getPath =================================================================== --- head/lang/intel-compute-runtime/files/patch-getPath (revision 536252) +++ head/lang/intel-compute-runtime/files/patch-getPath (nonexistent) @@ -1,38 +0,0 @@ -Implement getPath on BSDs - ---- shared/offline_compiler/source/utilities/linux/get_path.cpp.orig 2020-02-28 16:16:42 UTC -+++ shared/offline_compiler/source/utilities/linux/get_path.cpp -@@ -10,11 +10,33 @@ - #include - #include - -+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) -+#include -+#endif -+ - std::string getPath() { -+#if defined(KERN_PROC_PATHNAME) -+ char exepath[PATH_MAX + 1] = {0}; -+ size_t len = sizeof(exepath); -+ int mib[] = { -+ CTL_KERN, -+#if defined(__NetBSD__) -+ KERN_PROC_ARGS, -+ -1, -+ KERN_PROC_PATHNAME, -+#else -+ KERN_PROC, -+ KERN_PROC_PATHNAME, -+ -1, -+#endif -+ }; -+ if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), exepath, &len, NULL, 0) != -1) { -+#else // Linux - char exepath[128] = {0}; - std::stringstream ss; - ss << "/proc/" << getpid() << "/exe"; - if (readlink(ss.str().c_str(), exepath, 128) != -1) { -+#endif - std::string path = std::string(exepath); - path = path.substr(0, path.find_last_of('/') + 1); - return path; Property changes on: head/lang/intel-compute-runtime/files/patch-getPath ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/intel-compute-runtime/files/patch-ocloc-no-dlsym =================================================================== --- head/lang/intel-compute-runtime/files/patch-ocloc-no-dlsym (revision 536252) +++ head/lang/intel-compute-runtime/files/patch-ocloc-no-dlsym (nonexistent) @@ -1,34 +0,0 @@ -Regressed by https://github.com/intel/compute-runtime/commit/beab60f62634 - -FAILED: bin/built_ins/x64/gen12lp/copy_buffer_rect_Gen12LPlp.spv bin/built_ins/x64/gen12lp/copy_buffer_rect_Gen12LPlp.bin bin/built_ins/x64/gen12lp/copy_buffer_rect_Gen12LPlp.cpp bin/built_ins/x64/gen12lp/copy_buffer_rect_Gen12LPlp.gen -cd shared/source/built_ins/kernels && LD_LIBRARY_PATH=bin bin/ocloc -q -file copy_buffer_rect.builtin_kernel -device tgllp -64 -out_dir bin/built_ins/x64/gen12lp -cpp_file -options -cl-kernel-arg-info -Error! Couldn't find OclocInvoke function. -Error! Ocloc Library couldn't be loaded. - ---- shared/offline_compiler/source/ocloc_wrapper.cpp.orig 2020-02-28 16:16:42 UTC -+++ shared/offline_compiler/source/ocloc_wrapper.cpp -@@ -5,6 +5,7 @@ - * - */ - -+#include "ocloc_api.h" - #include "ocloc_wrapper.h" - - #include "shared/source/os_interface/os_library.h" -@@ -43,14 +44,8 @@ struct OclocWrapper::Impl { - OclocLibrary ocloc; - std::string oclocLibName = ""; - ocloc.library.reset(NEO::OsLibrary::load(oclocLibName)); -- if (nullptr == (ocloc.invoke = reinterpret_cast(ocloc.library->getProcAddress("oclocInvoke")))) { -- std::cout << "Error! Couldn't find OclocInvoke function.\n"; -- return; -- } -- if (nullptr == (ocloc.freeOutput = reinterpret_cast(ocloc.library->getProcAddress("oclocFreeOutput")))) { -- std::cout << "Error! Couldn't find OclocFreeOutput function.\n"; -- return; -- } -+ ocloc.invoke = oclocInvoke; -+ ocloc.freeOutput = oclocFreeOutput; - this->oclocLib = std::move(ocloc); - } - }; Property changes on: head/lang/intel-compute-runtime/files/patch-ocloc-no-dlsym ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/intel-compute-runtime/files/patch-backtrace =================================================================== --- head/lang/intel-compute-runtime/files/patch-backtrace (revision 536252) +++ head/lang/intel-compute-runtime/files/patch-backtrace (revision 536253) @@ -1,38 +1,37 @@ Adjust for backtrace(3) on BSDs In file included from offline_compiler/utilities/linux/safety_caller_linux.cpp:10: offline_compiler/utilities/linux/safety_guard_linux.h:36:25: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] backtraceSize = backtrace(addresses, callstackDepth); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ld: error: undefined symbol: backtrace >>> referenced by safety_caller_linux.cpp >>> CMakeFiles/ocloc.dir/utilities/linux/safety_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*)) ld: error: undefined symbol: backtrace_symbols >>> referenced by safety_caller_linux.cpp >>> CMakeFiles/ocloc.dir/utilities/linux/safety_caller_linux.cpp.o:(SafetyGuardLinux::sigAction(int, __siginfo*, void*)) --- shared/offline_compiler/source/utilities/linux/safety_guard_linux.h.orig 2020-02-28 16:16:42 UTC +++ shared/offline_compiler/source/utilities/linux/safety_guard_linux.h @@ -33,7 +33,7 @@ class SafetyGuardLinux { char **callstack; int backtraceSize = 0; - backtraceSize = backtrace(addresses, callstackDepth); + backtraceSize = (int)backtrace(addresses, callstackDepth); callstack = backtrace_symbols(addresses, backtraceSize); for (int i = 0; i < backtraceSize; ++i) { ---- shared/offline_compiler/source/CMakeLists.txt.orig 2020-02-28 16:16:42 UTC +--- shared/offline_compiler/source/CMakeLists.txt.orig 2020-05-15 20:36:40 UTC +++ shared/offline_compiler/source/CMakeLists.txt -@@ -161,6 +161,10 @@ endif() +@@ -140,6 +140,9 @@ endif() + if(UNIX) - target_link_libraries(ocloc_lib dl pthread) - target_link_libraries(ocloc dl pthread) + target_link_libraries(${OCLOC_NAME}_lib dl pthread) + if(CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD") -+ target_link_libraries(ocloc_lib execinfo) -+ target_link_libraries(ocloc execinfo) ++ target_link_libraries(${OCLOC_NAME}_lib execinfo) + endif() endif() set(CLOC_LIB_SRCS_LIB ${CLOC_LIB_SRCS_LIB} PARENT_SCOPE) Index: head/lang/intel-compute-runtime/files/patch-clock_gettime =================================================================== --- head/lang/intel-compute-runtime/files/patch-clock_gettime (revision 536252) +++ head/lang/intel-compute-runtime/files/patch-clock_gettime (revision 536253) @@ -1,24 +1,28 @@ 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)) { ^ ---- shared/source/os_interface/linux/os_time_linux.cpp.orig 2020-02-28 16:16:42 UTC +--- shared/source/os_interface/linux/os_time_linux.cpp.orig 2020-05-15 20:36:40 UTC +++ shared/source/os_interface/linux/os_time_linux.cpp -@@ -14,6 +14,10 @@ +@@ -14,6 +14,14 @@ #include +#ifndef CLOCK_MONOTONIC_RAW -+#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC ++# ifdef CLOCK_MONOTONIC_FAST ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST ++# else ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC ++# endif +#endif + namespace NEO { OSTimeLinux::OSTimeLinux(OSInterface *osInterface) { Index: head/lang/intel-compute-runtime/files/patch-no-blitter =================================================================== --- head/lang/intel-compute-runtime/files/patch-no-blitter (revision 536252) +++ head/lang/intel-compute-runtime/files/patch-no-blitter (revision 536253) @@ -1,37 +1,38 @@ Regressed by https://github.com/intel/compute-runtime/commit/691a4ea8237f blitterOperationsSupported isn't enabled on any GPU yet Process 82663 stopped * thread #1, name = 'ze_peak', stop reason = signal SIGABRT frame #0: 0x000000080060b02a libc.so.7`__sys_thr_kill at thr_kill.S:4 (lldb) bt * thread #1, name = 'ze_peak', stop reason = signal SIGABRT * frame #0: 0x000000080060b02a libc.so.7`__sys_thr_kill at thr_kill.S:4 frame #1: 0x000000080060a9c4 libc.so.7`__raise(s=6) at raise.c:52:10 frame #2: 0x0000000800573459 libc.so.7`abort at abort.c:67:8 frame #3: 0x00000008003d6a49 libcxxrt.so.1`report_failure(err=, thrown_exception=0x0000000802717fa8) at exception.cc:719:5 frame #4: 0x000000000020df59 ze_peak`L0Context::init_xe(this=0x00007fffffffde70) at ze_peak.cpp:183:5 frame #5: 0x00000000002115d9 ze_peak`main(argc=1, argv=0x00007fffffffe0f0) at ze_peak.cpp:760:11 frame #6: 0x000000000020b8bf ze_peak`_start(ap=, cleanup=) at crt1.c:76:7 (lldb) f 4 frame #4: 0x000000000020df59 ze_peak`L0Context::init_xe(this=0x00007fffffffde70) at ze_peak.cpp:183:5 180 result = 181 zeCommandListCreate(device, &command_list_description, &command_list); 182 if (result) { -> 183 throw std::runtime_error("zeDeviceCreateCommandList failed: " + 184 std::to_string(result)); 185 } 186 if (verbose) ---- level_zero/core/source/device/device_imp.h.orig 2020-04-17 18:43:38 UTC +--- level_zero/core/source/device/device_imp.h.orig 2020-05-15 20:36:40 UTC +++ level_zero/core/source/device/device_imp.h -@@ -99,9 +99,7 @@ struct DeviceImp : public Device { - auto hwInfo = neoDevice->getHardwareInfo(); - if (hwInfo.capabilityTable.blitterOperationsSupported) { - *useBliter = NEO::DebugManager.flags.EnableCopyOnlyCommandListsAndCommandQueues.get(); +@@ -102,10 +102,7 @@ struct DeviceImp : public Device { + } else { + *useBliter = NEO::DebugManager.flags.EnableCopyOnlyCommandListsAndCommandQueues.get(); + } - return ZE_RESULT_SUCCESS; } +- - return ZE_RESULT_ERROR_INVALID_ENUMERATION; } return ZE_RESULT_SUCCESS; }