Refactor: combine insert_keyframe() and insert_key_rna() into a single function #122053
@ -17,6 +17,7 @@ body:
|
||||
* For feature requests, feedback, questions or build issues, see [communication channels](https://developer.blender.org/docs/handbook/communication/user_feedback/).
|
||||
* Security vulnerabilities should be [reported privately](https://developer.blender.org/docs/handbook/bug_reports/vulnerability_reports/).
|
||||
* If there are multiple bugs, make multiple bug reports.
|
||||
* Any content you upload will be shared publicly. Ensure you have permission to share any files you upload, and avoid uploading age restricted content.
|
||||
|
||||
- type: textarea
|
||||
id: body
|
||||
@ -29,7 +30,7 @@ body:
|
||||
Graphics card:
|
||||
|
||||
**Blender Version**
|
||||
Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen)
|
||||
Broken: (example: 3.0.0, main, `f1cca3055776`, 2020-12-30)
|
||||
Worked: (newest version of Blender that worked as expected)
|
||||
|
||||
**Short description of error**
|
||||
|
@ -2585,6 +2585,7 @@ if(WITH_BLENDER)
|
||||
# internal and external library information first, for test linking
|
||||
add_subdirectory(source)
|
||||
elseif(WITH_CYCLES_STANDALONE OR WITH_CYCLES_HYDRA_RENDER_DELEGATE)
|
||||
add_subdirectory(intern/atomic)
|
||||
add_subdirectory(intern/guardedalloc)
|
||||
add_subdirectory(intern/libc_compat)
|
||||
add_subdirectory(intern/sky)
|
||||
|
@ -153,6 +153,7 @@ if(NOT WIN32 OR ENABLE_MSYS2)
|
||||
include(cmake/opus.cmake)
|
||||
include(cmake/vpx.cmake)
|
||||
include(cmake/x264.cmake)
|
||||
include(cmake/x265.cmake)
|
||||
include(cmake/aom.cmake)
|
||||
include(cmake/ffmpeg.cmake)
|
||||
include(cmake/fftw.cmake)
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
set(DEFLATE_EXTRA_ARGS
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DLIBDEFLATE_BUILD_STATIC_LIB=ON
|
||||
-DLIBDEFLATE_BUILD_SHARED_LIB=OFF
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_deflate
|
||||
|
@ -107,6 +107,7 @@ download_source(FLAC)
|
||||
download_source(VPX)
|
||||
download_source(OPUS)
|
||||
download_source(X264)
|
||||
download_source(X265)
|
||||
download_source(OPENJPEG)
|
||||
download_source(FFMPEG)
|
||||
download_source(FFTW)
|
||||
@ -158,6 +159,7 @@ download_source(ICDLOADER)
|
||||
download_source(MP11)
|
||||
download_source(SPIRV_HEADERS)
|
||||
download_source(UNIFIED_RUNTIME)
|
||||
download_source(UNIFIED_MEMORY_FRAMEWORK)
|
||||
download_source(IGC)
|
||||
download_source(IGC_LLVM)
|
||||
download_source(IGC_OPENCL_CLANG)
|
||||
|
@ -41,9 +41,11 @@ set(DPCPP_EXTRA_ARGS
|
||||
-DOpenCL_LIBRARY_SRC=file://${PACKAGE_DIR}/${ICDLOADER_FILE}
|
||||
-DBOOST_MP11_SOURCE_DIR=${BUILD_DIR}/mp11/src/external_mp11/
|
||||
-DLEVEL_ZERO_LIBRARY=${LIBDIR}/level-zero/lib/${LIBPREFIX}ze_loader${SHAREDLIBEXT}
|
||||
-DLEVEL_ZERO_INCLUDE_DIR=${LIBDIR}/level-zero/include
|
||||
-DLEVEL_ZERO_INCLUDE_DIR=${LIBDIR}/level-zero/include/level_zero
|
||||
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${BUILD_DIR}/spirvheaders/src/external_spirvheaders/
|
||||
-DUNIFIED_RUNTIME_SOURCE_DIR=${BUILD_DIR}/unifiedruntime/src/external_unifiedruntime/
|
||||
-DSYCL_PI_UR_USE_FETCH_CONTENT=OFF
|
||||
-DSYCL_PI_UR_SOURCE_DIR=${BUILD_DIR}/unifiedruntime/src/external_unifiedruntime/
|
||||
-DFETCHCONTENT_SOURCE_DIR_UNIFIED-MEMORY-FRAMEWORK=${BUILD_DIR}/unifiedmemoryframework/src/external_unifiedmemoryframework/
|
||||
# Below here is copied from an invocation of buildbot/config.py
|
||||
-DLLVM_ENABLE_ASSERTIONS=ON
|
||||
-DLLVM_TARGETS_TO_BUILD=X86
|
||||
@ -69,6 +71,8 @@ set(DPCPP_EXTRA_ARGS
|
||||
-DXPTI_ENABLE_WERROR=OFF
|
||||
-DSYCL_CLANG_EXTRA_FLAGS=
|
||||
-DSYCL_ENABLE_PLUGINS=level_zero
|
||||
-DSYCL_ENABLE_KERNEL_FUSION=OFF
|
||||
-DSYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB=OFF
|
||||
-DCMAKE_INSTALL_RPATH=\$ORIGIN
|
||||
-DPython3_ROOT_DIR=${LIBDIR}/python/
|
||||
-DPython3_EXECUTABLE=${PYTHON_BINARY}
|
||||
@ -120,6 +124,7 @@ add_dependencies(
|
||||
external_level-zero
|
||||
external_spirvheaders
|
||||
external_unifiedruntime
|
||||
external_unifiedmemoryframework
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
@ -133,6 +138,9 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/lld.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/lld-link.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/wasm-ld.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/pi_unified_runtime.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ur_adapter_level_zero.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ur_loader.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@ -71,3 +71,13 @@ ExternalProject_Add(external_unifiedruntime
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND echo .
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_unifiedmemoryframework
|
||||
URL file://${PACKAGE_DIR}/${UNIFIED_MEMORY_FRAMEWORK_FILE}
|
||||
URL_HASH ${UNIFIED_MEMORY_FRAMEWORK_HASH_TYPE}=${UNIFIED_MEMORY_FRAMEWORK_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/unifiedmemoryframework
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND echo .
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ set(FFMPEG_CFLAGS "\
|
||||
-I${temp_LIBDIR}/vpx/include \
|
||||
-I${temp_LIBDIR}/x264/include \
|
||||
-I${temp_LIBDIR}/zlib/include \
|
||||
-I${temp_LIBDIR}/aom/include"
|
||||
-I${temp_LIBDIR}/aom/include \
|
||||
-I${temp_LIBDIR}/x265/include"
|
||||
)
|
||||
set(FFMPEG_LDFLAGS "\
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/lame/lib \
|
||||
@ -31,6 +32,7 @@ ${LIBDIR_FLAG}${temp_LIBDIR}/theora/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/opus/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/vpx/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/x264/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/x265/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/zlib/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/aom/lib"
|
||||
)
|
||||
@ -81,7 +83,8 @@ ${temp_LIBDIR}/vpx/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/theora/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/opus/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/aom/lib/pkgconfig:"
|
||||
${temp_LIBDIR}/aom/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/x265/lib/pkgconfig:"
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -180,6 +183,7 @@ ExternalProject_Add(external_ffmpeg
|
||||
--enable-libmp3lame
|
||||
--disable-librtmp
|
||||
--enable-libx264
|
||||
--enable-libx265
|
||||
--enable-libaom
|
||||
--disable-libopencore-amrnb
|
||||
--disable-libopencore-amrwb
|
||||
@ -230,6 +234,7 @@ add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib
|
||||
external_x264
|
||||
external_x265
|
||||
external_opus
|
||||
external_vpx
|
||||
external_theora
|
||||
|
@ -320,7 +320,12 @@ else()
|
||||
harvest(libglu/lib mesa/lib "*${SHAREDLIBEXT}*")
|
||||
harvest(mesa/lib64 mesa/lib "*${SHAREDLIBEXT}*")
|
||||
|
||||
harvest(dpcpp dpcpp "*")
|
||||
harvest(dpcpp/bin dpcpp/bin "*")
|
||||
harvest(dpcpp/include dpcpp/include "*")
|
||||
harvest(dpcpp/lib dpcpp/lib "libsycl*")
|
||||
# avoid harvesting libpi_unified_runtime and libur_ as they're optional.
|
||||
harvest(dpcpp/lib dpcpp/lib "libpi_level_zero*")
|
||||
harvest(dpcpp/lib/clang dpcpp/lib/clang "*")
|
||||
harvest(igc dpcpp/lib/igc "*")
|
||||
harvest(ocloc dpcpp/lib/ocloc "*")
|
||||
endif()
|
||||
|
@ -18,7 +18,6 @@ set(OPENEXR_EXTRA_ARGS
|
||||
-DOPENEXR_BUILD_BOTH_STATIC_SHARED=OFF
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DOPENEXR_INSTALL_TOOLS=OFF
|
||||
-DOPENEXR_INSTALL_EXAMPLES=OFF
|
||||
-DImath_DIR=${LIBDIR}/imath/lib/cmake/Imath
|
||||
-DOPENEXR_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
|
||||
-Dlibdeflate_DIR=${LIBDIR}/deflate/lib/cmake/libdeflate
|
||||
@ -29,10 +28,6 @@ ExternalProject_Add(external_openexr
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENEXR_HASH_TYPE}=${OPENEXR_HASH}
|
||||
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 2 -d
|
||||
${BUILD_DIR}/openexr/src/external_openexr <
|
||||
${PATCH_DIR}/openexr_deflate_1588.diff
|
||||
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/openexr
|
||||
|
||||
|
@ -104,6 +104,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
|
||||
-Dpybind11_ROOT=${LIBDIR}/pybind11
|
||||
-DPython_EXECUTABLE=${PYTHON_BINARY}
|
||||
-DTBB_ROOT=${LIBDIR}/tbb
|
||||
-Dlibdeflate_ROOT=${LIBDIR}/deflate
|
||||
-Dfmt_ROOT=${LIBDIR}/fmt
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openimageio
|
||||
@ -120,9 +122,6 @@ ExternalProject_Add(external_openimageio
|
||||
${PATCH_CMD} -p 1 -N -d
|
||||
${BUILD_DIR}/openimageio/src/external_openimageio/ <
|
||||
${PATCH_DIR}/oiio_webp.diff &&
|
||||
${PATCH_CMD} -p 1 -N -d
|
||||
${BUILD_DIR}/openimageio/src/external_openimageio/ <
|
||||
${PATCH_DIR}/oiio_4044.diff &&
|
||||
${PATCH_CMD} -p 1 -N -d
|
||||
${BUILD_DIR}/openimageio/src/external_openimageio/ <
|
||||
${PATCH_DIR}/oiio_4062.diff
|
||||
|
@ -118,6 +118,7 @@ if((NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/nasm.exe") AND (EXISTS "${D
|
||||
"${DOWNLOAD_DIR}/msys2/msys64/usr/bin/nasm.exe"
|
||||
)
|
||||
endif()
|
||||
set(NASM_PATH "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/nasm.exe")
|
||||
|
||||
message("Checking for perl")
|
||||
# download perl for libvpx
|
||||
|
@ -119,9 +119,12 @@ ExternalProject_Add(external_usd
|
||||
${PATCH_CMD} -p 1 -d
|
||||
${BUILD_DIR}/usd/src/external_usd <
|
||||
${PATCH_DIR}/usd.diff &&
|
||||
${PATCH_CMD} -p 1 -d
|
||||
${BUILD_DIR}/usd/src/external_usd <
|
||||
${PATCH_DIR}/usd_core_profile.diff
|
||||
${PATCH_CMD} -p 1 -d
|
||||
${BUILD_DIR}/usd/src/external_usd <
|
||||
${PATCH_DIR}/usd_core_profile.diff &&
|
||||
${PATCH_CMD} -p 1 -d
|
||||
${BUILD_DIR}/usd/src/external_usd <
|
||||
${PATCH_DIR}/usd_metal_edf.diff
|
||||
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd
|
||||
|
@ -83,9 +83,9 @@ set(DEFLATE_HASH a29d9dd653cbe03f2d5cd83972063f9e)
|
||||
set(DEFLATE_HASH_TYPE MD5)
|
||||
set(DEFLATE_FILE libdeflate-v${DEFLATE_VERSION}.tar.gz)
|
||||
|
||||
set(OPENEXR_VERSION 3.2.1)
|
||||
set(OPENEXR_VERSION 3.2.4)
|
||||
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
|
||||
set(OPENEXR_HASH 1d5bb07433ec641cf3bb1b519a27ea6f)
|
||||
set(OPENEXR_HASH 83b23b937b3a76fd37680422f41b81b7)
|
||||
set(OPENEXR_HASH_TYPE MD5)
|
||||
set(OPENEXR_FILE openexr-${OPENEXR_VERSION}.tar.gz)
|
||||
set(OPENEXR_CPE "cpe:2.3:a:openexr:openexr:${OPENEXR_VERSION}:*:*:*:*:*:*:*")
|
||||
@ -185,9 +185,9 @@ set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${
|
||||
set(OPENMP_HASH_TYPE MD5)
|
||||
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
|
||||
|
||||
set(OPENIMAGEIO_VERSION v2.5.6.0)
|
||||
set(OPENIMAGEIO_VERSION v2.5.11.0)
|
||||
set(OPENIMAGEIO_URI https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/${OPENIMAGEIO_VERSION}.tar.gz)
|
||||
set(OPENIMAGEIO_HASH d02db17716a20a71a446bdc6de57bd9c)
|
||||
set(OPENIMAGEIO_HASH 691e9364d25e2878e042d48980fad593)
|
||||
set(OPENIMAGEIO_HASH_TYPE MD5)
|
||||
set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz)
|
||||
|
||||
@ -208,9 +208,9 @@ set(ROBINMAP_HASH c08ec4b1bf1c85eb0d6432244a6a89862229da1cb834f3f90fba8dc35d8c8e
|
||||
set(ROBINMAP_HASH_TYPE SHA256)
|
||||
set(ROBINMAP_FILE robinmap-${ROBINMAP_VERSION}.tar.gz)
|
||||
|
||||
set(TIFF_VERSION 4.5.1)
|
||||
set(TIFF_VERSION 4.6.0)
|
||||
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_HASH d08c5f9eee6350fffc239e5993d92779)
|
||||
set(TIFF_HASH fc7d49a9348b890b29f91a4ecadd5b49)
|
||||
set(TIFF_HASH_TYPE MD5)
|
||||
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
|
||||
@ -351,6 +351,13 @@ set(X264_HASH_TYPE SHA256)
|
||||
set(X264_FILE x264-${X264_VERSION}.tar.gz)
|
||||
set(X264_HOMEPAGE https://www.videolan.org/developers/x264.html)
|
||||
|
||||
set(X265_VERSION 3cf6c1e53037eb9e198860365712e1bafb22f7c6)
|
||||
set(X265_URI https://bitbucket.org/multicoreware/x265_git/get/${X265_VERSION}.tar.gz)
|
||||
set(X265_HASH 40d12016192cdc740132cb00dd6cc80ead094ff91a1a897181256def2011342e)
|
||||
set(X265_HASH_TYPE SHA256)
|
||||
set(X265_FILE x265-${X265_VERSION}.tar.gz)
|
||||
set(X265_HOMEPAGE https://www.videolan.org/developers/x265.html)
|
||||
|
||||
set(OPENJPEG_VERSION 2.5.0)
|
||||
set(OPENJPEG_SHORT_VERSION 2.5)
|
||||
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
|
||||
@ -511,15 +518,15 @@ set(SQLITE_FILE sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
||||
set(SQLITE_CPE "cpe:2.3:a:sqlite:sqlite:${SQLITE_VERSION}:*:*:*:*:*:*:*")
|
||||
set(SQLITE_HOMEPAGE https://www.sqlite.org)
|
||||
|
||||
set(EMBREE_VERSION 4.1.0)
|
||||
set(EMBREE_VERSION 4.3.2-blender)
|
||||
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
|
||||
set(EMBREE_HASH 4b525955b08e1249a700dea5b5ffc8b2)
|
||||
set(EMBREE_HASH 91bd65e59c6cf4d9ff0e4d628aa28d6a)
|
||||
set(EMBREE_HASH_TYPE MD5)
|
||||
set(EMBREE_FILE embree-v${EMBREE_VERSION}.zip)
|
||||
|
||||
set(USD_VERSION 23.11)
|
||||
set(USD_VERSION 24.05)
|
||||
set(USD_URI https://github.com/PixarAnimationStudios/OpenUSD/archive/v${USD_VERSION}.tar.gz)
|
||||
set(USD_HASH 77358a244f50fc607e8b40764ea4f6c6)
|
||||
set(USD_HASH 44a5b976a76588b485a652f08a55e91f)
|
||||
set(USD_HASH_TYPE MD5)
|
||||
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
|
||||
|
||||
@ -646,15 +653,15 @@ set(OPENPGL_HASH 4192a4096ee3e3d31878cd013f8de23418c8037c576537551f946c4811931c5
|
||||
set(OPENPGL_HASH_TYPE SHA256)
|
||||
set(OPENPGL_FILE openpgl-${OPENPGL_VERSION}.tar.gz)
|
||||
|
||||
set(LEVEL_ZERO_VERSION 1.15.8)
|
||||
set(LEVEL_ZERO_VERSION 1.16.1)
|
||||
set(LEVEL_ZERO_URI https://codeload.github.com/oneapi-src/level-zero/tar.gz/refs/tags/v${LEVEL_ZERO_VERSION})
|
||||
set(LEVEL_ZERO_HASH 80663dbd4d01d9519185c6e568f2e836bfea7484363f4da8cf5cf77c3bf58602)
|
||||
set(LEVEL_ZERO_HASH f341dd6355d8da6ee9c29031642b8e8e4259f91c13c72d318c81663af048817e)
|
||||
set(LEVEL_ZERO_HASH_TYPE SHA256)
|
||||
set(LEVEL_ZERO_FILE level-zero-${LEVEL_ZERO_VERSION}.tar.gz)
|
||||
|
||||
set(DPCPP_VERSION 2022-12)
|
||||
set(DPCPP_URI https://github.com/intel/llvm/archive/refs/tags/${DPCPP_VERSION}.tar.gz)
|
||||
set(DPCPP_HASH 13151d5ae79f7c9c4a9b072a0c486ae7b3c4993e301bb1268c92214451025790)
|
||||
set(DPCPP_VERSION d2817d6d317db1143bb227168e85c409d5ab7c82) # tip of sycl-rel_5_2_0 as of 2024.05.24
|
||||
set(DPCPP_URI https://github.com/intel/llvm/archive/${DPCPP_VERSION}.tar.gz)
|
||||
set(DPCPP_HASH 86cbff157b79e29a6ebb96ba79c96f64b4296c33fcd896f60a5579955fca5724)
|
||||
set(DPCPP_HASH_TYPE SHA256)
|
||||
set(DPCPP_FILE DPCPP-${DPCPP_VERSION}.tar.gz)
|
||||
|
||||
@ -667,50 +674,57 @@ set(DPCPP_FILE DPCPP-${DPCPP_VERSION}.tar.gz)
|
||||
# will take care of building them, unpack is being done in dpcpp_deps.cmake
|
||||
|
||||
# Source llvm/lib/SYCLLowerIR/CMakeLists.txt
|
||||
set(VCINTRINSICS_VERSION 782fbf7301dc73acaa049a4324c976ad94f587f7)
|
||||
set(VCINTRINSICS_VERSION da892e1982b6c25b9a133f85b4ac97142d8a3def)
|
||||
set(VCINTRINSICS_URI https://github.com/intel/vc-intrinsics/archive/${VCINTRINSICS_VERSION}.tar.gz)
|
||||
set(VCINTRINSICS_HASH f4c0ccad8c1f77760364c551c65e8e1cf194d058889fa46d3b1b2d19ec4dc33f)
|
||||
set(VCINTRINSICS_HASH 06b85bd988059939770eb6e6e6194562d17c5f5a5df9947af18696b3b1fe92f3)
|
||||
set(VCINTRINSICS_HASH_TYPE SHA256)
|
||||
set(VCINTRINSICS_FILE vc-intrinsics-${VCINTRINSICS_VERSION}.tar.gz)
|
||||
|
||||
# Source opencl/CMakeLists.txt
|
||||
set(OPENCLHEADERS_VERSION dcd5bede6859d26833cd85f0d6bbcee7382dc9b3)
|
||||
set(OPENCLHEADERS_VERSION 9ddb236e6eb3cf844f9e2f81677e1045f9bf838e)
|
||||
set(OPENCLHEADERS_URI https://github.com/KhronosGroup/OpenCL-Headers/archive/${OPENCLHEADERS_VERSION}.tar.gz)
|
||||
set(OPENCLHEADERS_HASH ca8090359654e94f2c41e946b7e9d826253d795ae809ce7c83a7d3c859624693)
|
||||
set(OPENCLHEADERS_HASH 9db682a1b0037ef54c50ba8fa3fa73182e552fc1ad0119a771bebf68e43ea739)
|
||||
set(OPENCLHEADERS_HASH_TYPE SHA256)
|
||||
set(OPENCLHEADERS_FILE opencl_headers-${OPENCLHEADERS_VERSION}.tar.gz)
|
||||
|
||||
# Source opencl/CMakeLists.txt
|
||||
set(ICDLOADER_VERSION 792682ad3d877ab38573b997808bab3b43902b70)
|
||||
set(ICDLOADER_VERSION 9a3e962f16f5097d2054233ad8b6dad51b6f41b7)
|
||||
set(ICDLOADER_URI https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/${ICDLOADER_VERSION}.tar.gz)
|
||||
set(ICDLOADER_HASH b33a0320d94bf300efa1da97931ded506d27813bd1148da6858fe79d412d1ea2)
|
||||
set(ICDLOADER_HASH 5e2979be5692caf11a4afc2fd7995a54c94a03d0f7ee2959f03f98f7689b677b)
|
||||
set(ICDLOADER_HASH_TYPE SHA256)
|
||||
set(ICDLOADER_FILE icdloader-${ICDLOADER_VERSION}.tar.gz)
|
||||
|
||||
# Source sycl/cmake/modules/AddBoostMp11Headers.cmake
|
||||
# Using external MP11 here, getting AddBoostMp11Headers.cmake to recognize
|
||||
# our copy in boost directly was more trouble than it was worth.
|
||||
set(MP11_VERSION 7bc4e1ae9b36ec8ee635c3629b59ec525bbe82b9)
|
||||
set(MP11_VERSION ef7608b463298b881bc82eae4f45a4385ed74fca)
|
||||
set(MP11_URI https://github.com/boostorg/mp11/archive/${MP11_VERSION}.tar.gz)
|
||||
set(MP11_HASH 071ee2bd3952ec89882edb3af25dd1816f6b61723f66e42eea32f4d02ceef426)
|
||||
set(MP11_HASH ec2d68858dd4d04f9a1e3960fc94a58440715e1b3e746cc495438116715343e2)
|
||||
set(MP11_HASH_TYPE SHA256)
|
||||
set(MP11_FILE mp11-${MP11_VERSION}.tar.gz)
|
||||
|
||||
# Source llvm-spirv/CMakeLists.txt (repo)
|
||||
# Source llvm-spirv/spirv-headers-tag.conf (hash)
|
||||
set(SPIRV_HEADERS_VERSION 5a121866927a16ab9d49bed4788b532c7fcea766)
|
||||
set(SPIRV_HEADERS_VERSION b73e168ca5e123dcf3dea8a34b19a5130f421ae1)
|
||||
set(SPIRV_HEADERS_URI https://github.com/KhronosGroup/SPIRV-Headers/archive/${SPIRV_HEADERS_VERSION}.tar.gz)
|
||||
set(SPIRV_HEADERS_HASH ec8ecb471a62672697846c436501638ab25447ae9d4a6761e0bfe8a9a839502a)
|
||||
set(SPIRV_HEADERS_HASH 11d835c60297b26532c05c3f3b581ba7a2787b5ae7399e94f72c392169216f11)
|
||||
set(SPIRV_HEADERS_HASH_TYPE SHA256)
|
||||
set(SPIRV_HEADERS_FILE SPIR-V-Headers-${SPIRV_HEADERS_VERSION}.tar.gz)
|
||||
|
||||
# Source llvm/sycl/plugins/unified_runtime/CMakeLists.txt
|
||||
set(UNIFIED_RUNTIME_VERSION fd711c920acc4434cb52ff18b078c082d9d7f44d)
|
||||
# Source sycl/plugins/unified_runtime/CMakeLists.txt
|
||||
set(UNIFIED_RUNTIME_VERSION ec634ff05b067d7922ec45059dda94665e5dcd9b)
|
||||
set(UNIFIED_RUNTIME_URI https://github.com/oneapi-src/unified-runtime/archive/${UNIFIED_RUNTIME_VERSION}.tar.gz)
|
||||
set(UNIFIED_RUNTIME_HASH 535ca2ee78f68c5e7e62b10f1bbabd909179488885566e6d9b1fc50e8a1be65f)
|
||||
set(UNIFIED_RUNTIME_HASH ff15574aba6225d0c8a32f71866126551dee1aaacfa7894b8fdcc5e52e0f5da9)
|
||||
set(UNIFIED_RUNTIME_HASH_TYPE SHA256)
|
||||
set(UNIFIED_RUNTIME_FILE unified-runtime-${UNIFIED_RUNTIME_VERSION}.tar.gz)
|
||||
|
||||
# Source unified-runtime/source/common/CMakeList.txt
|
||||
set(UNIFIED_MEMORY_FRAMEWORK_VERSION 9bf7a0dc4dff76844e10edbb5c6e9d917536ef6d)
|
||||
set(UNIFIED_MEMORY_FRAMEWORK_URI https://github.com/oneapi-src/unified-memory-framework/archive/${UNIFIED_MEMORY_FRAMEWORK_VERSION}.tar.gz)
|
||||
set(UNIFIED_MEMORY_FRAMEWORK_HASH 7ff7d0be7be6e59693d238eab02b5a9741c820d3d995446781dcd7a2adaa28e9)
|
||||
set(UNIFIED_MEMORY_FRAMEWORK_HASH_TYPE SHA256)
|
||||
set(UNIFIED_MEMORY_FRAMEWORK_FILE unified-memory-framework-${UNIFIED_MEMORY_FRAMEWORK_VERSION}.tar.gz)
|
||||
|
||||
######################
|
||||
### DPCPP DEPS END ###
|
||||
######################
|
||||
|
167
build_files/build_environment/cmake/x265.cmake
Normal file
167
build_files/build_environment/cmake/x265.cmake
Normal file
@ -0,0 +1,167 @@
|
||||
# SPDX-FileCopyrightText: 2024 Blender Authors
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(LIB_PREFIX "")
|
||||
set(LIB_SUFFIX "-static")
|
||||
else()
|
||||
set(LIB_PREFIX "lib")
|
||||
set(LIB_SUFFIX "")
|
||||
endif()
|
||||
|
||||
if(BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
set(X265_WINDOWS_ARM64_ARGS
|
||||
-DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang-cl.exe
|
||||
-DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang-cl.exe
|
||||
-DCMAKE_C_FLAGS_INIT="--target=arm64-pc-windows-msvc"
|
||||
-DCMAKE_CXX_FLAGS_INIT="--target=arm64-pc-windows-msvc"
|
||||
-DCMAKE_CXX_STANDARD=11
|
||||
)
|
||||
|
||||
set(X265_12_PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/x265_12/src/external_x265_12 < ${PATCH_DIR}/x265_windows_arm.diff)
|
||||
set(X265_10_PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/x265_10/src/external_x265_10 < ${PATCH_DIR}/x265_windows_arm.diff)
|
||||
set(X265_PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/x265/src/external_x265 < ${PATCH_DIR}/x265_windows_arm.diff)
|
||||
else()
|
||||
set(X265_WINDOWS_ARM64_ARGS)
|
||||
set(X265_12_PATCH_COMMAND)
|
||||
set(X265_10_PATCH_COMMAND)
|
||||
set(X265_PATCH_COMMAND)
|
||||
endif()
|
||||
|
||||
# 12 bit build flags
|
||||
set(X265_12_EXTRA_ARGS
|
||||
-DHIGH_BIT_DEPTH=ON
|
||||
-DEXPORT_C_API=OFF
|
||||
-DENABLE_SHARED=OFF
|
||||
-DENABLE_CLI=OFF
|
||||
-DMAIN12=ON
|
||||
)
|
||||
|
||||
# 10 bit build flags
|
||||
set(X265_10_EXTRA_ARGS
|
||||
-DHIGH_BIT_DEPTH=ON
|
||||
-DEXPORT_C_API=OFF
|
||||
-DENABLE_SHARED=OFF
|
||||
-DENABLE_CLI=OFF
|
||||
)
|
||||
|
||||
# 8 bit build flags
|
||||
set(X265_EXTRA_ARGS
|
||||
-DENABLE_SHARED=OFF
|
||||
-DEXTRA_LIB=${LIBDIR}/x265_12/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}^^${LIBDIR}/x265_10/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}
|
||||
-DLINKED_10BIT=ON
|
||||
-DLINKED_12BIT=ON
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
list(APPEND X265_EXTRA_ARGS
|
||||
-DCMAKE_STATIC_LIBRARY_SUFFIX_C=_unmerged${LIB_SUFFIX}${LIBEXT}
|
||||
-DCMAKE_STATIC_LIBRARY_SUFFIX_CXX=_unmerged${LIB_SUFFIX}${LIBEXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND X265_EXTRA_ARGS -DNASM_EXECUTABLE=${NASM_PATH})
|
||||
list(APPEND X265_10_EXTRA_ARGS -DNASM_EXECUTABLE=${NASM_PATH})
|
||||
list(APPEND X265_12_EXTRA_ARGS -DNASM_EXECUTABLE=${NASM_PATH})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_x265_12
|
||||
URL file://${PACKAGE_DIR}/${X265_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${X265_HASH_TYPE}=${X265_HASH}
|
||||
PREFIX ${BUILD_DIR}/x265_12
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
SOURCE_SUBDIR source
|
||||
PATCH_COMMAND ${X265_12_PATCH_COMMAND}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/x265_12 ${DEFAULT_CMAKE_FLAGS} ${X265_WINDOWS_ARM64_ARGS} ${X265_12_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/x265_12
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_x265_10
|
||||
URL file://${PACKAGE_DIR}/${X265_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${X265_HASH_TYPE}=${X265_HASH}
|
||||
PREFIX ${BUILD_DIR}/x265_10
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
SOURCE_SUBDIR source
|
||||
PATCH_COMMAND ${X265_10_PATCH_COMMAND}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/x265_10 ${DEFAULT_CMAKE_FLAGS} ${X265_WINDOWS_ARM64_ARGS} ${X265_10_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/x265_10
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_x265
|
||||
URL file://${PACKAGE_DIR}/${X265_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${X265_HASH_TYPE}=${X265_HASH}
|
||||
PREFIX ${BUILD_DIR}/x265
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
SOURCE_SUBDIR source
|
||||
PATCH_COMMAND ${X265_PATCH_COMMAND}
|
||||
LIST_SEPARATOR ^^
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/x265 ${DEFAULT_CMAKE_FLAGS} ${X265_WINDOWS_ARM64_ARGS} ${X265_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/x265
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_x265
|
||||
external_x265_12
|
||||
external_x265_10
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_x265 after_install
|
||||
COMMAND "${CMAKE_AR}"
|
||||
/OUT:${LIBDIR}/x265/lib/x265.lib
|
||||
${LIBDIR}/x265/lib/${LIB_PREFIX}x265${LIB_SUFFIX}.lib
|
||||
${LIBDIR}/x265_10/lib/${LIB_PREFIX}x265${LIB_SUFFIX}.lib
|
||||
${LIBDIR}/x265_12/lib/${LIB_PREFIX}x265${LIB_SUFFIX}.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Write a script and the STDIN for CMAKE_AR.
|
||||
# This is needed because `ar` requires STDIN instead of command line arguments, sigh!
|
||||
set(_ar_stdin "${BUILD_DIR}/x265/tmp/x265_ar_script.stdin")
|
||||
set(_ar_cmake "${BUILD_DIR}/x265/tmp/x265_ar_script.cmake")
|
||||
file(WRITE ${_ar_stdin} "\
|
||||
CREATE ${LIBDIR}/x265/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}
|
||||
ADDLIB ${LIBDIR}/x265/lib/${LIB_PREFIX}x265${LIB_SUFFIX}_unmerged${LIBEXT}
|
||||
ADDLIB ${LIBDIR}/x265_10/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}
|
||||
ADDLIB ${LIBDIR}/x265_12/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}
|
||||
SAVE
|
||||
END
|
||||
")
|
||||
file(WRITE ${_ar_cmake} "\
|
||||
set(ARG_AR $\{CMAKE_ARGV0\})
|
||||
set(ARG_AR_INPUT $\{CMAKE_ARGV1\})
|
||||
execute_process(
|
||||
COMMAND $\{ARG_AR\} -M
|
||||
INPUT_FILE $\{ARG_AR_INPUT\}
|
||||
)
|
||||
")
|
||||
|
||||
ExternalProject_Add_Step(external_x265 after_install
|
||||
COMMAND ${CMAKE_COMMAND} -P ${_ar_cmake} -- ${CMAKE_AR} ${_ar_stdin}
|
||||
DEPENDEES install
|
||||
)
|
||||
unset(_ar_stdin)
|
||||
unset(_ar_cmake)
|
||||
else()
|
||||
ExternalProject_Add_Step(external_x265 after_install
|
||||
COMMAND libtool -static -o
|
||||
${LIBDIR}/x265/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}
|
||||
${LIBDIR}/x265/lib/${LIB_PREFIX}x265${LIB_SUFFIX}_unmerged${LIBEXT}
|
||||
${LIBDIR}/x265_10/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}
|
||||
${LIBDIR}/x265_12/lib/${LIB_PREFIX}x265${LIB_SUFFIX}${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(LIB_PREFIX)
|
||||
unset(LIB_SUFFIX)
|
@ -762,7 +762,7 @@ PACKAGES_ALL = (
|
||||
DISTRO_ID_ARCH: "imath",
|
||||
},
|
||||
),
|
||||
Package(name="OpenEXR Library", is_mandatory=False, version="3.2.1", version_short="3.2", version_min="3.0", version_mex="4.0",
|
||||
Package(name="OpenEXR Library", is_mandatory=False, version="3.2.4", version_short="3.2", version_min="3.0", version_mex="4.0",
|
||||
sub_packages=(),
|
||||
distro_package_names={DISTRO_ID_DEBIAN: "libopenexr-dev",
|
||||
DISTRO_ID_FEDORA: "openexr-devel",
|
||||
@ -770,7 +770,7 @@ PACKAGES_ALL = (
|
||||
DISTRO_ID_ARCH: "openexr",
|
||||
},
|
||||
),
|
||||
Package(name="OpenImageIO Library", is_mandatory=True, version="2.5.6.0", version_short="2.5", version_min="2.5.0", version_mex="2.6.0",
|
||||
Package(name="OpenImageIO Library", is_mandatory=True, version="2.5.11.0", version_short="2.5", version_min="2.5.0", version_mex="2.6.0",
|
||||
sub_packages=(
|
||||
Package(name="OpenImageIO Tools", is_mandatory=False,
|
||||
distro_package_names={DISTRO_ID_DEBIAN: "openimageio-tools",
|
||||
@ -869,7 +869,7 @@ PACKAGES_ALL = (
|
||||
DISTRO_ID_ARCH: "materialx-git",
|
||||
},
|
||||
),
|
||||
Package(name="USD Library", is_mandatory=False, version="23.11", version_short="23.11", version_min="20.05", version_mex="24.00",
|
||||
Package(name="USD Library", is_mandatory=False, version="24.05", version_short="24.05", version_min="22.05", version_mex="25.00",
|
||||
sub_packages=(),
|
||||
distro_package_names={DISTRO_ID_DEBIAN: None,
|
||||
DISTRO_ID_FEDORA: "usd-devel",
|
||||
@ -884,7 +884,7 @@ PACKAGES_ALL = (
|
||||
DISTRO_ID_ARCH: "opencollada",
|
||||
},
|
||||
),
|
||||
Package(name="Embree Library", is_mandatory=False, version="4.1.0", version_short="4.1", version_min="3.13", version_mex="5.0",
|
||||
Package(name="Embree Library", is_mandatory=False, version="4.3.2", version_short="4.3", version_min="3.13", version_mex="5.0",
|
||||
sub_packages=(),
|
||||
distro_package_names={DISTRO_ID_DEBIAN: "libembree-dev",
|
||||
DISTRO_ID_FEDORA: "embree-devel",
|
||||
@ -892,7 +892,7 @@ PACKAGES_ALL = (
|
||||
DISTRO_ID_ARCH: "embree",
|
||||
},
|
||||
),
|
||||
Package(name="OpenImageDenoiser Library", is_mandatory=False, version="2.2.0", version_short="2.2", version_min="2.0.0", version_mex="3.0",
|
||||
Package(name="OpenImageDenoiser Library", is_mandatory=False, version="2.3.0", version_short="2.3", version_min="2.0.0", version_mex="3.0",
|
||||
sub_packages=(),
|
||||
distro_package_names={DISTRO_ID_DEBIAN: None,
|
||||
DISTRO_ID_FEDORA: "oidn-devel",
|
||||
@ -900,7 +900,7 @@ PACKAGES_ALL = (
|
||||
DISTRO_ID_ARCH: "openimagedenoise",
|
||||
},
|
||||
),
|
||||
Package(name="Level Zero Library", is_mandatory=False, version="1.15.8", version_short="1.15", version_min="1.7", version_mex="2.0",
|
||||
Package(name="Level Zero Library", is_mandatory=False, version="1.16.1", version_short="1.16", version_min="1.7", version_mex="2.0",
|
||||
sub_packages=(),
|
||||
distro_package_names={DISTRO_ID_DEBIAN: None,
|
||||
DISTRO_ID_FEDORA: "oneapi-level-zero-devel",
|
||||
|
@ -34,246 +34,234 @@ diff -Naur llvm-sycl-nightly-20220208.orig/libdevice/cmake/modules/SYCLLibdevice
|
||||
libsycldevice-obj
|
||||
libsycldevice-spv)
|
||||
|
||||
diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp
|
||||
index 17eeaafae194..09e6d2217aaa 100644
|
||||
--- a/sycl/source/detail/program_manager/program_manager.cpp
|
||||
+++ b/sycl/source/detail/program_manager/program_manager.cpp
|
||||
@@ -1647,46 +1647,120 @@ ProgramManager::getSYCLDeviceImagesWithCompatibleState(
|
||||
}
|
||||
assert(BinImages.size() > 0 && "Expected to find at least one device image");
|
||||
diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt
|
||||
index 00ce045f43c3..e044262e628e 100644
|
||||
--- a/sycl/CMakeLists.txt
|
||||
+++ b/sycl/CMakeLists.txt
|
||||
@@ -188,7 +188,6 @@ install(FILES
|
||||
COMPONENT sycl-headers)
|
||||
|
||||
+ // Ignore images with incompatible state. Image is considered compatible
|
||||
+ // with a target state if an image is already in the target state or can
|
||||
+ // be brought to target state by compiling/linking/building.
|
||||
+ //
|
||||
+ // Example: an image in "executable" state is not compatible with
|
||||
+ // "input" target state - there is no operation to convert the image it
|
||||
+ // to "input" state. An image in "input" state is compatible with
|
||||
+ // "executable" target state because it can be built to get into
|
||||
+ // "executable" state.
|
||||
+ for (auto It = BinImages.begin(); It != BinImages.end();) {
|
||||
+ if (getBinImageState(*It) > TargetState)
|
||||
+ It = BinImages.erase(It);
|
||||
+ else
|
||||
+ ++It;
|
||||
+ }
|
||||
+
|
||||
std::vector<device_image_plain> SYCLDeviceImages;
|
||||
- for (RTDeviceBinaryImage *BinImage : BinImages) {
|
||||
- const bundle_state ImgState = getBinImageState(BinImage);
|
||||
include(AddBoostMp11Headers)
|
||||
-include(FetchBoostUnorderedHeaders)
|
||||
|
||||
# This is workaround to detect changes (add or modify) in subtree which
|
||||
# are not detected by copy_directory command.
|
||||
diff --git a/sycl/cmake/modules/FetchBoostUnorderedHeaders.cmake b/sycl/cmake/modules/FetchBoostUnorderedHeaders.cmake
|
||||
deleted file mode 100644
|
||||
index a0f446055026..000000000000
|
||||
--- a/sycl/cmake/modules/FetchBoostUnorderedHeaders.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,129 +0,0 @@
|
||||
-# Fetches the unordered boost module and its dependencies
|
||||
-function(add_boost_module_headers)
|
||||
- cmake_parse_arguments(
|
||||
- BOOST_MODULE # prefix
|
||||
- "" # options
|
||||
- "NAME;SRC_DIR;GIT_TAG;" # one value keywords
|
||||
- "" # multi-value keywords
|
||||
- ${ARGN}) # arguments
|
||||
-
|
||||
- // Ignore images with incompatible state. Image is considered compatible
|
||||
- // with a target state if an image is already in the target state or can
|
||||
- // be brought to target state by compiling/linking/building.
|
||||
- //
|
||||
- // Example: an image in "executable" state is not compatible with
|
||||
- // "input" target state - there is no operation to convert the image it
|
||||
- // to "input" state. An image in "input" state is compatible with
|
||||
- // "executable" target state because it can be built to get into
|
||||
- // "executable" state.
|
||||
- if (ImgState > TargetState)
|
||||
- continue;
|
||||
|
||||
- for (const sycl::device &Dev : Devs) {
|
||||
+ // If a non-input state is requested, we can filter out some compatible
|
||||
+ // images and return only those with the highest compatible state for each
|
||||
+ // device-kernel pair. This map tracks how many kernel-device pairs need each
|
||||
+ // image, so that any unneeded ones are skipped.
|
||||
+ // TODO this has no effect if the requested state is input, consider having
|
||||
+ // a separate branch for that case to avoid unnecessary tracking work.
|
||||
+ struct DeviceBinaryImageInfo {
|
||||
+ std::shared_ptr<std::vector<sycl::kernel_id>> KernelIDs;
|
||||
+ bundle_state State = bundle_state::input;
|
||||
+ int RequirementCounter = 0;
|
||||
+ };
|
||||
+ std::unordered_map<RTDeviceBinaryImage *, DeviceBinaryImageInfo> ImageInfoMap;
|
||||
+
|
||||
+ for (const sycl::device &Dev : Devs) {
|
||||
+ // Track the highest image state for each requested kernel.
|
||||
+ using StateImagesPairT =
|
||||
+ std::pair<bundle_state, std::vector<RTDeviceBinaryImage *>>;
|
||||
+ using KernelImageMapT =
|
||||
+ std::map<kernel_id, StateImagesPairT, LessByNameComp>;
|
||||
+ KernelImageMapT KernelImageMap;
|
||||
+ if (!KernelIDs.empty())
|
||||
+ for (const kernel_id &KernelID : KernelIDs)
|
||||
+ KernelImageMap.insert({KernelID, {}});
|
||||
+
|
||||
+ for (RTDeviceBinaryImage *BinImage : BinImages) {
|
||||
if (!compatibleWithDevice(BinImage, Dev) ||
|
||||
!doesDevSupportImgAspects(Dev, *BinImage))
|
||||
continue;
|
||||
|
||||
- std::shared_ptr<std::vector<sycl::kernel_id>> KernelIDs;
|
||||
- // Collect kernel names for the image
|
||||
- {
|
||||
- std::lock_guard<std::mutex> KernelIDsGuard(m_KernelIDsMutex);
|
||||
- KernelIDs = m_BinImg2KernelIDs[BinImage];
|
||||
- // If the image does not contain any non-service kernels we can skip it.
|
||||
- if (!KernelIDs || KernelIDs->empty())
|
||||
- continue;
|
||||
+ auto InsertRes = ImageInfoMap.insert({BinImage, {}});
|
||||
+ DeviceBinaryImageInfo &ImgInfo = InsertRes.first->second;
|
||||
+ if (InsertRes.second) {
|
||||
+ ImgInfo.State = getBinImageState(BinImage);
|
||||
+ // Collect kernel names for the image
|
||||
+ {
|
||||
+ std::lock_guard<std::mutex> KernelIDsGuard(m_KernelIDsMutex);
|
||||
+ ImgInfo.KernelIDs = m_BinImg2KernelIDs[BinImage];
|
||||
+ }
|
||||
}
|
||||
+ const bundle_state ImgState = ImgInfo.State;
|
||||
+ const std::shared_ptr<std::vector<sycl::kernel_id>> &ImageKernelIDs =
|
||||
+ ImgInfo.KernelIDs;
|
||||
+ int &ImgRequirementCounter = ImgInfo.RequirementCounter;
|
||||
|
||||
- DeviceImageImplPtr Impl = std::make_shared<detail::device_image_impl>(
|
||||
- BinImage, Ctx, Devs, ImgState, KernelIDs, /*PIProgram=*/nullptr);
|
||||
+ // If the image does not contain any non-service kernels we can skip it.
|
||||
+ if (!ImageKernelIDs || ImageKernelIDs->empty())
|
||||
+ continue;
|
||||
|
||||
- SYCLDeviceImages.push_back(
|
||||
- createSyclObjFromImpl<device_image_plain>(Impl));
|
||||
- break;
|
||||
+ // Update tracked information.
|
||||
+ for (kernel_id &KernelID : *ImageKernelIDs) {
|
||||
+ StateImagesPairT *StateImagesPair;
|
||||
+ // If only specific kernels are requested, ignore the rest.
|
||||
+ if (!KernelIDs.empty()) {
|
||||
+ auto It = KernelImageMap.find(KernelID);
|
||||
+ if (It == KernelImageMap.end())
|
||||
+ continue;
|
||||
+ StateImagesPair = &It->second;
|
||||
+ } else
|
||||
+ StateImagesPair = &KernelImageMap[KernelID];
|
||||
+
|
||||
+ auto &[KernelImagesState, KernelImages] = *StateImagesPair;
|
||||
+
|
||||
+ if (KernelImages.empty()) {
|
||||
+ KernelImagesState = ImgState;
|
||||
+ KernelImages.push_back(BinImage);
|
||||
+ ++ImgRequirementCounter;
|
||||
+ } else if (KernelImagesState < ImgState) {
|
||||
+ for (RTDeviceBinaryImage *Img : KernelImages) {
|
||||
+ auto It = ImageInfoMap.find(Img);
|
||||
+ assert(It != ImageInfoMap.end());
|
||||
+ assert(It->second.RequirementCounter > 0);
|
||||
+ --(It->second.RequirementCounter);
|
||||
+ }
|
||||
+ KernelImages.clear();
|
||||
+ KernelImages.push_back(BinImage);
|
||||
+ KernelImagesState = ImgState;
|
||||
+ ++ImgRequirementCounter;
|
||||
+ } else if (KernelImagesState == ImgState) {
|
||||
+ KernelImages.push_back(BinImage);
|
||||
+ ++ImgRequirementCounter;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
+ for (const auto &ImgInfoPair : ImageInfoMap) {
|
||||
+ if (ImgInfoPair.second.RequirementCounter == 0)
|
||||
+ continue;
|
||||
+
|
||||
+ DeviceImageImplPtr Impl = std::make_shared<detail::device_image_impl>(
|
||||
+ ImgInfoPair.first, Ctx, Devs, ImgInfoPair.second.State,
|
||||
+ ImgInfoPair.second.KernelIDs, /*PIProgram=*/nullptr);
|
||||
+
|
||||
+ SYCLDeviceImages.push_back(createSyclObjFromImpl<device_image_plain>(Impl));
|
||||
+ }
|
||||
+
|
||||
return SYCLDeviceImages;
|
||||
}
|
||||
|
||||
diff --git a/sycl/source/detail/pi.cpp b/sycl/source/detail/pi.cpp
|
||||
index fb228cd85979..94e8438ee964 100644
|
||||
--- a/sycl/source/detail/pi.cpp
|
||||
+++ b/sycl/source/detail/pi.cpp
|
||||
@@ -635,45 +635,47 @@ static uint16_t getELFHeaderType(const unsigned char *ImgData, size_t ImgSize) {
|
||||
RT::PiDeviceBinaryType getBinaryImageFormat(const unsigned char *ImgData,
|
||||
size_t ImgSize) {
|
||||
// Top-level magic numbers for the recognized binary image formats.
|
||||
- struct {
|
||||
- RT::PiDeviceBinaryType Fmt;
|
||||
- const uint32_t Magic;
|
||||
- } Fmts[] = {{PI_DEVICE_BINARY_TYPE_SPIRV, 0x07230203},
|
||||
- {PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE, 0xDEC04342},
|
||||
- // 'I', 'N', 'T', 'C' ; Intel native
|
||||
- {PI_DEVICE_BINARY_TYPE_NATIVE, 0x43544E49}};
|
||||
- if (NOT DEFINED BOOST_MODULE_SRC_DIR)
|
||||
- set(BOOST_MODULE_GIT_REPO "https://github.com/boostorg/${BOOST_MODULE_NAME}.git")
|
||||
- message(STATUS "Source dir not set for boost module ${BOOST_MODULE_NAME}, downloading headers from ${BOOST_MODULE_GIT_REPO}")
|
||||
-
|
||||
- if (ImgSize >= sizeof(Fmts[0].Magic)) {
|
||||
- detail::remove_const_t<decltype(Fmts[0].Magic)> Hdr = 0;
|
||||
- std::copy(ImgData, ImgData + sizeof(Hdr), reinterpret_cast<char *>(&Hdr));
|
||||
- set(BOOST_MODULE_FULL_NAME "boost_${BOOST_MODULE_NAME}")
|
||||
- FetchContent_Declare(${BOOST_MODULE_FULL_NAME}
|
||||
- GIT_REPOSITORY ${BOOST_MODULE_GIT_REPO}
|
||||
- GIT_TAG ${BOOST_MODULE_GIT_TAG}
|
||||
- )
|
||||
- FetchContent_GetProperties(${BOOST_MODULE_FULL_NAME})
|
||||
- FetchContent_MakeAvailable(${BOOST_MODULE_FULL_NAME})
|
||||
-
|
||||
- // Check headers for direct formats.
|
||||
- for (const auto &Fmt : Fmts) {
|
||||
- if (Hdr == Fmt.Magic)
|
||||
- return Fmt.Fmt;
|
||||
- }
|
||||
- set(BOOST_MODULE_SRC_DIR ${${BOOST_MODULE_FULL_NAME}_SOURCE_DIR})
|
||||
- else (NOT DEFINED BOOST_MODULE_SRC_DIR)
|
||||
- message(STATUS "Using boost/${BOOST_MODULE_NAME} headers from ${BOOST_MODULE_SRC_DIR}")
|
||||
- endif(NOT DEFINED BOOST_MODULE_SRC_DIR)
|
||||
-
|
||||
- // ELF e_type for recognized binary image formats.
|
||||
- struct {
|
||||
- RT::PiDeviceBinaryType Fmt;
|
||||
- const uint16_t Magic;
|
||||
- } ELFFmts[] = {{PI_DEVICE_BINARY_TYPE_NATIVE, 0xFF04}, // OpenCL executable
|
||||
- {PI_DEVICE_BINARY_TYPE_NATIVE, 0xFF12}}; // ZEBIN executable
|
||||
- set(BOOST_UNORDERED_INCLUDE_DIRS ${BOOST_UNORDERED_INCLUDE_DIRS} "${BOOST_MODULE_SRC_DIR}/include" PARENT_SCOPE)
|
||||
-endfunction(add_boost_module_headers)
|
||||
-
|
||||
- // ELF files need to be parsed separately. The header type ends after 18
|
||||
- // bytes.
|
||||
- if (Hdr == 0x464c457F && ImgSize >= 18) {
|
||||
- uint16_t HdrType = getELFHeaderType(ImgData, ImgSize);
|
||||
- for (const auto &ELFFmt : ELFFmts) {
|
||||
- if (HdrType == ELFFmt.Magic)
|
||||
- return ELFFmt.Fmt;
|
||||
- }
|
||||
- // Newer ZEBIN format does not have a special header type, but can instead
|
||||
- // be identified by having a required .ze_info section.
|
||||
- if (checkELFSectionPresent(".ze_info", ImgData, ImgSize))
|
||||
- return PI_DEVICE_BINARY_TYPE_NATIVE;
|
||||
- }
|
||||
+ auto MatchMagicNumber = [&](auto Number) {
|
||||
+ return ImgSize >= sizeof(Number) &&
|
||||
+ std::memcmp(ImgData, &Number, sizeof(Number)) == 0;
|
||||
+ };
|
||||
+
|
||||
+ if (MatchMagicNumber(uint32_t{0x07230203}))
|
||||
+ return PI_DEVICE_BINARY_TYPE_SPIRV;
|
||||
+
|
||||
+ if (MatchMagicNumber(uint32_t{0xDEC04342}))
|
||||
+ return PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE;
|
||||
+
|
||||
+ if (MatchMagicNumber(uint32_t{0x43544E49}))
|
||||
+ // 'I', 'N', 'T', 'C' ; Intel native
|
||||
+ return PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE;
|
||||
+
|
||||
+ // Check for ELF format, size requirements include data we'll read in case of
|
||||
+ // succesful match.
|
||||
+ if (ImgSize >= 18 && MatchMagicNumber(uint32_t{0x464c457F})) {
|
||||
+ uint16_t ELFHdrType = getELFHeaderType(ImgData, ImgSize);
|
||||
+ if (ELFHdrType == 0xFF04)
|
||||
+ // OpenCL executable.
|
||||
+ return PI_DEVICE_BINARY_TYPE_NATIVE;
|
||||
+
|
||||
+ if (ELFHdrType == 0xFF12)
|
||||
+ // ZEBIN executable.
|
||||
+ return PI_DEVICE_BINARY_TYPE_NATIVE;
|
||||
+
|
||||
+ // Newer ZEBIN format does not have a special header type, but can instead
|
||||
+ // be identified by having a required .ze_info section.
|
||||
+ if (checkELFSectionPresent(".ze_info", ImgData, ImgSize))
|
||||
+ return PI_DEVICE_BINARY_TYPE_NATIVE;
|
||||
}
|
||||
+
|
||||
+ // "ar" format is used to pack binaries for multiple devices, e.g. via
|
||||
+ //
|
||||
+ // -Xsycl-target-backend=spir64_gen "-device acm-g10,acm-g11"
|
||||
+ //
|
||||
+ // option.
|
||||
+ if (MatchMagicNumber(std::array{'!', '<', 'a', 'r', 'c', 'h', '>', '\n'}))
|
||||
+ return PI_DEVICE_BINARY_TYPE_NATIVE;
|
||||
+
|
||||
return PI_DEVICE_BINARY_TYPE_NONE;
|
||||
}
|
||||
-set(BOOST_UNORDERED_GIT_TAG bd24dfd284dbc70e7521915af0d8d049f74a1e85)
|
||||
-# Author: joaquintides <joaquin@tid.es>
|
||||
-# Date: Tue Jul 18 18:19:13 2023 +0200
|
||||
-#
|
||||
-# updated concurrent map benchmark plots
|
||||
-add_boost_module_headers(NAME "unordered" SRC_DIR ${BOOST_UNORDERED_SOURCE_DIR} GIT_TAG ${BOOST_UNORDERED_GIT_TAG})
|
||||
-
|
||||
-set(BOOST_ASSERT_GIT_TAG 02256c84fd0cd58a139d9dc1b25b5019ca976ada)
|
||||
-# Author: Peter Dimov <pdimov@gmail.com>
|
||||
-# Date: Thu Jun 22 18:11:58 2023 +0300
|
||||
-#
|
||||
-# Do not use std::source_location::current under nvcc. Fixes #32.
|
||||
-add_boost_module_headers(NAME "assert" SRC_DIR ${BOOST_ASSERT_SOURCE_DIR} GIT_TAG ${BOOST_ASSERT_GIT_TAG})
|
||||
-
|
||||
-set(BOOST_CONFIG_GIT_TAG a1cf5d531405e62927b0257b5cbecc66a545b508)
|
||||
-# Merge: f5726a26 a1edcd56
|
||||
-# Author: jzmaddock <john@johnmaddock.co.uk>
|
||||
-# Date: Sat Apr 15 13:20:12 2023 +0100
|
||||
-#
|
||||
-# Merge pull request #475 from boostorg/ci_2023_04
|
||||
-add_boost_module_headers(NAME "config" SRC_DIR ${BOOST_CONFIG_SOURCE_DIR} GIT_TAG ${BOOST_CONFIG_GIT_TAG})
|
||||
-
|
||||
-set(BOOST_CONTAINER_HASH_GIT_TAG 226eb066e949adbf37b220e993d64ecefeeaae99)
|
||||
-# Author: Peter Dimov <pdimov@gmail.com>
|
||||
-# Date: Thu Jun 29 14:38:53 2023 +0300
|
||||
-#
|
||||
-# Update .drone.jsonnet
|
||||
-add_boost_module_headers(NAME "container_hash" SRC_DIR ${BOOST_CONTAINER_HASH_SOURCE_DIR} GIT_TAG ${BOOST_CONTAINER_HASH_GIT_TAG})
|
||||
-
|
||||
-set(BOOST_CORE_GIT_TAG 216999e552e7f73e63c7bcc88b8ce9c179bbdbe2)
|
||||
-# Author: Peter Dimov <pdimov@gmail.com>
|
||||
-# Date: Sun Jun 25 13:46:53 2023 +0300
|
||||
-#
|
||||
-# Avoid -Wsign-conversion warning in checked_delete.hpp
|
||||
-add_boost_module_headers(NAME "core" SRC_DIR ${BOOST_CORE_SOURCE_DIR} GIT_TAG ${BOOST_CORE_GIT_TAG})
|
||||
-
|
||||
-# Describe is a dependency of container_hash
|
||||
-set(BOOST_DESCRIBE_GIT_TAG a0eafb08100eb15a57b6dae6d270c0012a56aa21)
|
||||
-# Merge: 1692c3e b54fda5
|
||||
-# Author: Peter Dimov <pdimov@gmail.com>
|
||||
-# Date: Sun May 21 04:51:35 2023 +0300
|
||||
-#
|
||||
-# Merge branch 'fix-deprecated-inline-static-variables' of https://github.com/Romain-Geissler-1A/describe into feature/pr-40
|
||||
-add_boost_module_headers(NAME "describe" SRC_DIR ${BOOST_DESCRIBE_SOURCE_DIR} GIT_TAG ${BOOST_DESCRIBE_GIT_TAG})
|
||||
-
|
||||
-set(BOOST_MOVE_GIT_TAG f1fbb45134065deebe95249c616a967d4b66c809)
|
||||
-# Author: Ion Gaztañaga <igaztanaga@gmail.com>
|
||||
-# Date: Mon Mar 13 13:32:29 2023 +0100
|
||||
-#
|
||||
-# Use [[msvc::intrinsic] attribute if available in move/forward in order to improve debug experience
|
||||
-add_boost_module_headers(NAME "move" SRC_DIR ${BOOST_MOVE_SOURCE_DIR} GIT_TAG ${BOOST_MOVE_GIT_TAG})
|
||||
-
|
||||
-# Reuse mp11 fetched earlier for DPC++ headers
|
||||
-set(BOOST_UNORDERED_INCLUDE_DIRS ${BOOST_UNORDERED_INCLUDE_DIRS} "${BOOST_MP11_SOURCE_DIR}/include/")
|
||||
-
|
||||
-set(BOOST_PREDEF_GIT_TAG 392e4e767469e3469c9390f0d9cca16724dc3fc8)
|
||||
-# Merge: a12c7fd 499d28e
|
||||
-# Author: Rene Rivera <grafikrobot@gmail.com>
|
||||
-# Date: Sun Feb 27 14:44:35 2022 -0600
|
||||