diff --git a/lang/intel-compute-runtime/Makefile b/lang/intel-compute-runtime/Makefile index 2c963bd554bf..38a34e678b5c 100644 --- a/lang/intel-compute-runtime/Makefile +++ b/lang/intel-compute-runtime/Makefile @@ -1,61 +1,61 @@ PORTNAME= compute-runtime -DISTVERSION= 21.45.21574 +DISTVERSION= 21.46.21636 CATEGORIES= lang PKGNAMEPREFIX= intel- PKGNAMESUFFIX= -${FLAVOR} MAINTAINER= jbeich@FreeBSD.org COMMENT= OpenCL implementation for Intel HD 5000 (Gen8) or newer LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.md ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= only Intel GPUs on x86 are supported LIB_DEPENDS= libigc.so:devel/intel-graphics-compiler@${FLAVOR} \ libigdgmm.so:multimedia/gmmlib FLAVORS= ${12 11:L:S/^/llvm/} CONFLICTS_INSTALL= ${PORTNAME}-* USES= cmake compiler:c++17-lang localbase:ldflags pkgconfig USE_GITHUB= yes USE_LDCONFIG= yes GH_ACCOUNT= intel CMAKE_ON= RELEASE_WITH_REGKEYS SKIP_UNIT_TESTS SUPPORT_DG1 CMAKE_ARGS= -DNEO_OCL_DRIVER_VERSION:STRING="${DISTVERSIONFULL}" PLIST_FILES= bin/ocloc \ etc/OpenCL/vendors/intel.icd \ include/ocloc_api.h \ lib/intel-opencl/libigdrcl.so \ lib/libocloc.so \ ${NULL} OPTIONS_DEFINE= L0 VAAPI OPTIONS_DEFAULT=L0 VAAPI L0_DESC= oneAPI Level Zero support L0_BUILD_DEPENDS= level-zero>=1.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.1 \ lib/libze_intel_gpu.so.1.2.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 diff --git a/lang/intel-compute-runtime/distinfo b/lang/intel-compute-runtime/distinfo index 5d9f84c36c1d..4317bc08a436 100644 --- a/lang/intel-compute-runtime/distinfo +++ b/lang/intel-compute-runtime/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1636140707 -SHA256 (intel-compute-runtime-21.45.21574_GH0.tar.gz) = bf76ba2a6dd75ff528b0399fa75058a8ea8799c6b6048c25a4671ff1c699b468 -SIZE (intel-compute-runtime-21.45.21574_GH0.tar.gz) = 4868091 +TIMESTAMP = 1636734215 +SHA256 (intel-compute-runtime-21.46.21636_GH0.tar.gz) = 8e80c566fee646fbb8bb93cfe371723c9f2654d3ba2c7c62adea003add2b2aee +SIZE (intel-compute-runtime-21.46.21636_GH0.tar.gz) = 4878855 diff --git a/lang/intel-compute-runtime/files/patch-no-perf b/lang/intel-compute-runtime/files/patch-no-perf index 04729eaa066a..088e2b1541bf 100644 --- a/lang/intel-compute-runtime/files/patch-no-perf +++ b/lang/intel-compute-runtime/files/patch-no-perf @@ -1,71 +1,71 @@ Limit PMU counters to Linux In file included from level_zero/tools/source/sysman/linux/os_sysman_imp.cpp:8: In file included from level_zero/tools/source/sysman/linux/os_sysman_imp.h:16: level_zero/tools/source/sysman/linux/pmu/pmu_imp.h:12:10: fatal error: 'linux/perf_event.h' file not found #include ^~~~~~~~~~~~~~~~~~~~ --- level_zero/tools/source/sysman/engine/linux/os_engine_imp.cpp.orig 2021-03-24 20:23:19 UTC +++ level_zero/tools/source/sysman/engine/linux/os_engine_imp.cpp @@ -49,9 +49,11 @@ ze_result_t LinuxEngineImp::getActivity(zes_engine_sta return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE; } uint64_t data[2] = {}; +#ifdef __linux__ if (pPmuInterface->pmuRead(static_cast(fd), data, sizeof(data)) < 0) { return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE; } +#endif // In data[], First u64 is "active time", And second u64 is "timestamp". Both in nanoseconds pStats->activeTime = data[0] / microSecondsToNanoSeconds; pStats->timestamp = data[1] / microSecondsToNanoSeconds; @@ -66,9 +68,11 @@ ze_result_t LinuxEngineImp::getProperties(zes_engine_p } void LinuxEngineImp::init() { +#ifdef __linux auto i915EngineClass = engineToI915Map.find(engineGroup); // I915_PMU_ENGINE_BUSY macro provides the perf type config which we want to listen to get the engine busyness. fd = pPmuInterface->pmuInterfaceOpen(I915_PMU_ENGINE_BUSY(i915EngineClass->second, engineInstance), -1, PERF_FORMAT_TOTAL_TIME_ENABLED); +#endif } LinuxEngineImp::LinuxEngineImp(OsSysman *pOsSysman, zes_engine_group_t type, uint32_t engineInstance) : engineGroup(type), engineInstance(engineInstance) { ---- level_zero/tools/source/sysman/linux/os_sysman_imp.cpp.orig 2021-10-22 17:59:55 UTC +--- level_zero/tools/source/sysman/linux/os_sysman_imp.cpp.orig 2021-11-12 16:23:35 UTC +++ level_zero/tools/source/sysman/linux/os_sysman_imp.cpp -@@ -47,9 +47,11 @@ ze_result_t LinuxSysmanImp::init() { - auto rootPciPathOfGpuDevice = getPciRootPortDirectoryPath(realRootPath); - PlatformMonitoringTech::create(pParentSysmanDeviceImp->deviceHandles, pFsAccess, rootPciPathOfGpuDevice, mapOfSubDeviceIdToPmtObject); +@@ -36,9 +36,11 @@ ze_result_t LinuxSysmanImp::init() { + } + DEBUG_BREAK_IF(nullptr == pSysfsAccess); +#ifdef __linux__ pPmuInterface = PmuInterface::create(this); DEBUG_BREAK_IF(nullptr == pPmuInterface); +#endif - auto loc = realRootPath.find_last_of('/'); - std::string pciBDF = realRootPath.substr(loc + 1, std::string::npos); - pFwUtilInterface = FirmwareUtil::create(pciBDF); + pFwUtilInterface = FirmwareUtil::create(pDrm->getPciPath()); + return createPmtHandles(); + } --- level_zero/tools/source/sysman/linux/os_sysman_imp.h.orig 2021-10-01 16:31:56 UTC +++ level_zero/tools/source/sysman/linux/os_sysman_imp.h @@ -14,7 +14,9 @@ #include "level_zero/tools/source/sysman/linux/firmware_util/firmware_util.h" #include "level_zero/tools/source/sysman/linux/fs_access.h" #include "level_zero/tools/source/sysman/linux/pmt/pmt.h" +#ifdef __linux__ #include "level_zero/tools/source/sysman/linux/pmu/pmu_imp.h" +#endif #include "level_zero/tools/source/sysman/sysman_imp.h" #include --- level_zero/tools/source/sysman/linux/pmu/CMakeLists.txt.orig 2020-09-11 07:53:58 UTC +++ level_zero/tools/source/sysman/linux/pmu/CMakeLists.txt @@ -9,7 +9,7 @@ set(L0_SRCS_TOOLS_SYSMAN_LINUX_PMU ${CMAKE_CURRENT_SOURCE_DIR}/pmu_imp.h ${CMAKE_CURRENT_SOURCE_DIR}/pmu.h ) -if(UNIX) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") target_sources(${L0_STATIC_LIB_NAME} PRIVATE ${L0_SRCS_TOOLS_SYSMAN_LINUX_PMU}