Index: head/lang/intel-compute-runtime/Makefile =================================================================== --- head/lang/intel-compute-runtime/Makefile (revision 566069) +++ head/lang/intel-compute-runtime/Makefile (revision 566070) @@ -1,64 +1,63 @@ # $FreeBSD$ PORTNAME= compute-runtime -DISTVERSION= 21.06.18993 +DISTVERSION= 21.07.19042 CATEGORIES= lang PKGNAMEPREFIX= intel- PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ PATCHFILES+= 2a423820aaa4.patch:-p1 # https://github.com/intel/compute-runtime/pull/361 -PATCHFILES+= 7a91ef844a98.patch:-p1 # NEO_BUILD_DEBUG_SYMBOLS_PACKAGE 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++17-lang localbase:ldflags pkgconfig USE_GITHUB= yes USE_LDCONFIG= yes GH_ACCOUNT= intel CMAKE_ON= 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= VAAPI OPTIONS_DEFAULT=VAAPI OPTIONS_DEFINE_amd64= L0 OPTIONS_DEFAULT_amd64= L0 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.0.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 566069) +++ head/lang/intel-compute-runtime/distinfo (revision 566070) @@ -1,7 +1,5 @@ -TIMESTAMP = 1612206884 -SHA256 (intel-compute-runtime-21.06.18993_GH0.tar.gz) = 13008a5bf6b5da993217bafe8c57fa4bf85ee590068ebb1e9b90dffc2cb8b124 -SIZE (intel-compute-runtime-21.06.18993_GH0.tar.gz) = 3742086 +TIMESTAMP = 1612812767 +SHA256 (intel-compute-runtime-21.07.19042_GH0.tar.gz) = f554de1d8eb3eca57682be2139c3bea99f04edb28d36608a9d67753b876373d7 +SIZE (intel-compute-runtime-21.07.19042_GH0.tar.gz) = 3753534 SHA256 (2a423820aaa4.patch) = dd034e856e75d70bc6b63204aa2c67530a3212d111b67a703e4cbeb84e61685b SIZE (2a423820aaa4.patch) = 947 -SHA256 (7a91ef844a98.patch) = 3c628bb5e83fb79b63cfc66dd4f6cef6ae0cbe0b6ee0e2dd39f51294857e15fb -SIZE (7a91ef844a98.patch) = 13251 Index: head/lang/intel-compute-runtime/files/patch-no-perf =================================================================== --- head/lang/intel-compute-runtime/files/patch-no-perf (revision 566069) +++ head/lang/intel-compute-runtime/files/patch-no-perf (revision 566070) @@ -1,70 +1,70 @@ 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 2020-09-11 07:53:58 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->pmuReadSingle(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 2020-09-11 07:53:58 UTC +--- level_zero/tools/source/sysman/linux/os_sysman_imp.cpp.orig 2021-02-08 19:32:47 UTC +++ level_zero/tools/source/sysman/linux/os_sysman_imp.cpp -@@ -37,8 +37,10 @@ ze_result_t LinuxSysmanImp::init() { - pPmt = new PlatformMonitoringTech(); - UNRECOVERABLE_IF(nullptr == pPmt); - pPmt->init(myDeviceName, pFsAccess); +@@ -42,8 +42,10 @@ ze_result_t LinuxSysmanImp::init() { + auto rootPciPathOfGpuDevice = getPciRootPortDirectoryPath(realRootPath); + PlatformMonitoringTech::create(pParentSysmanDeviceImp->deviceHandles, pFsAccess, rootPciPathOfGpuDevice, mapOfSubDeviceIdToPmtObject); + +#ifdef __linux__ pPmuInterface = PmuInterface::create(this); UNRECOVERABLE_IF(nullptr == pPmuInterface); +#endif return ZE_RESULT_SUCCESS; } ---- level_zero/tools/source/sysman/linux/os_sysman_imp.h.orig 2020-09-11 07:53:58 UTC +--- level_zero/tools/source/sysman/linux/os_sysman_imp.h.orig 2021-02-08 19:32:47 UTC +++ level_zero/tools/source/sysman/linux/os_sysman_imp.h -@@ -13,7 +13,9 @@ - #include "level_zero/core/source/device/device.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.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/linux/xml_parser/xml_parser.h" #include "level_zero/tools/source/sysman/sysman_imp.h" --- 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}