diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2022-12-30 23:47:31 +0100 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2022-12-31 00:38:38 +0100 |
commit | 1451c6c95bf08ce6a4c14b2790622abcac338baa (patch) | |
tree | 32e11801329681343506586afbafe224bdfb1a7a /dev-util/intel-graphics-compiler | |
parent | dev-util/intel-graphics-compiler: drop 1.0.12504.6 (diff) | |
download | gentoo-1451c6c95bf08ce6a4c14b2790622abcac338baa.tar.gz gentoo-1451c6c95bf08ce6a4c14b2790622abcac338baa.tar.bz2 gentoo-1451c6c95bf08ce6a4c14b2790622abcac338baa.zip |
dev-util/intel-graphics-compiler: add vectorcompiler
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-util/intel-graphics-compiler')
-rw-r--r-- | dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.12504.5-vectorcompiler.patch | 165 | ||||
-rw-r--r-- | dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.12504.5-r1.ebuild (renamed from dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.12504.5.ebuild) | 14 | ||||
-rw-r--r-- | dev-util/intel-graphics-compiler/metadata.xml | 3 |
3 files changed, 176 insertions, 6 deletions
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.12504.5-vectorcompiler.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.12504.5-vectorcompiler.patch new file mode 100644 index 000000000000..ec75efc22b97 --- /dev/null +++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.12504.5-vectorcompiler.patch @@ -0,0 +1,165 @@ +From 753a6a4efd5fcb42a86a5f62b64c29393513d807 Mon Sep 17 00:00:00 2001 +From: Victor Mustya <victor.mustya@intel.com> +Date: Thu, 29 Dec 2022 05:03:39 +0000 +Subject: [PATCH] Fix open source build for some configurations + +When building for some Linux distros, cmake configures IGC to build all +the libraries as shared by default. So we have to explicitly configure +all the libraries as static or object. +--- + IGC/Options/CMakeLists.txt | 2 +- + IGC/VectorCompiler/CMCL/lib/Support/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/BiF/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/Driver/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/GenXCodeGen/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/GenXCodeGen/TargetInfo/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/GenXOpts/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/InternalIntrinsics/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/Support/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/Utils/GenX/CMakeLists.txt | 2 +- + IGC/VectorCompiler/lib/Utils/General/CMakeLists.txt | 2 +- + 11 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/IGC/Options/CMakeLists.txt b/IGC/Options/CMakeLists.txt +index 834d74d37ce..1dc079d1c1e 100644 +--- a/IGC/Options/CMakeLists.txt ++++ b/IGC/Options/CMakeLists.txt +@@ -6,7 +6,7 @@ + # + #============================ end_copyright_notice ============================= + +-add_library(IGCOptions "") ++add_library(IGCOptions STATIC "") + + add_subdirectory(src) + add_subdirectory(include/igc/Options) +diff --git a/IGC/VectorCompiler/CMCL/lib/Support/CMakeLists.txt b/IGC/VectorCompiler/CMCL/lib/Support/CMakeLists.txt +index ebab3db0005..eda77667ddf 100644 +--- a/IGC/VectorCompiler/CMCL/lib/Support/CMakeLists.txt ++++ b/IGC/VectorCompiler/CMCL/lib/Support/CMakeLists.txt +@@ -12,7 +12,7 @@ set(CM_CL_SUPPORT_SOURCES + InitializePasses.cpp + ) + +-add_library(CMCLSupport ${CM_CL_SUPPORT_SOURCES}) ++add_library(CMCLSupport STATIC ${CM_CL_SUPPORT_SOURCES}) + + # LLVM dependencies + igc_get_llvm_targets(LLVM_LIBS +diff --git a/IGC/VectorCompiler/lib/BiF/CMakeLists.txt b/IGC/VectorCompiler/lib/BiF/CMakeLists.txt +index 6235fc1d21e..c439f334a98 100644 +--- a/IGC/VectorCompiler/lib/BiF/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/BiF/CMakeLists.txt +@@ -275,7 +275,7 @@ add_custom_target(VCBiFPreparation + ${SPIRV_EXEC_BUILTINS_SRC_PATH} + ${SPIRV_ATOMIC_BUILTINS_SRC_PATH}) + +-add_library(VCEmbeddedBiF ++add_library(VCEmbeddedBiF OBJECT + ${PRINTF_OCL_32_CPP_PATH} + ${PRINTF_OCL_64_CPP_PATH} + ${PRINTF_ZE_32_CPP_PATH} +diff --git a/IGC/VectorCompiler/lib/Driver/CMakeLists.txt b/IGC/VectorCompiler/lib/Driver/CMakeLists.txt +index 74e4e661e74..fc14937a1c6 100644 +--- a/IGC/VectorCompiler/lib/Driver/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/Driver/CMakeLists.txt +@@ -11,7 +11,7 @@ set(DRIVER_SOURCES + SPIRVWrapper.cpp + ) + +-add_library(VCDriver ${DRIVER_SOURCES}) ++add_library(VCDriver STATIC ${DRIVER_SOURCES}) + igc_get_llvm_targets(LLVM_LIBS + Analysis + BitReader +diff --git a/IGC/VectorCompiler/lib/GenXCodeGen/CMakeLists.txt b/IGC/VectorCompiler/lib/GenXCodeGen/CMakeLists.txt +index 185a7533a89..4c3eada26fb 100644 +--- a/IGC/VectorCompiler/lib/GenXCodeGen/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/GenXCodeGen/CMakeLists.txt +@@ -88,7 +88,7 @@ set(CODEGEN_SOURCES + GenXFixInvalidFuncName.cpp + ) + +-add_library(VCCodeGen ${CODEGEN_SOURCES}) ++add_library(VCCodeGen STATIC ${CODEGEN_SOURCES}) + add_dependencies(VCCodeGen + GenXUtilBuild + GenXCommonTableGen_target +diff --git a/IGC/VectorCompiler/lib/GenXCodeGen/TargetInfo/CMakeLists.txt b/IGC/VectorCompiler/lib/GenXCodeGen/TargetInfo/CMakeLists.txt +index dca9455f464..8a0b66f7b55 100644 +--- a/IGC/VectorCompiler/lib/GenXCodeGen/TargetInfo/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/GenXCodeGen/TargetInfo/CMakeLists.txt +@@ -10,7 +10,7 @@ set(INFO_SOURCES + GenXTargetInfo.cpp + ) + +-add_library(VCTargetInfo ${INFO_SOURCES}) ++add_library(VCTargetInfo OBJECT ${INFO_SOURCES}) + + igc_get_llvm_targets(LLVM_LIBS Support) + +diff --git a/IGC/VectorCompiler/lib/GenXOpts/CMakeLists.txt b/IGC/VectorCompiler/lib/GenXOpts/CMakeLists.txt +index 44ebf851d6e..0f56a8c1a26 100644 +--- a/IGC/VectorCompiler/lib/GenXOpts/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/GenXOpts/CMakeLists.txt +@@ -27,7 +27,7 @@ set(OPT_SOURCES + CMPacketize/PacketBuilder_misc.cpp + ) + +-add_library(VCTransforms ${OPT_SOURCES}) ++add_library(VCTransforms OBJECT ${OPT_SOURCES}) + + igc_get_llvm_targets(LLVM_LIBS + Analysis +diff --git a/IGC/VectorCompiler/lib/InternalIntrinsics/CMakeLists.txt b/IGC/VectorCompiler/lib/InternalIntrinsics/CMakeLists.txt +index 332d74e25dd..060cccc91fc 100644 +--- a/IGC/VectorCompiler/lib/InternalIntrinsics/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/InternalIntrinsics/CMakeLists.txt +@@ -14,7 +14,7 @@ set(LLVM_COMPONENTS + ) + + igc_get_llvm_targets(LLVM_LIBS ${LLVM_COMPONENTS}) +-add_library(VCInternalIntrinsics ++add_library(VCInternalIntrinsics OBJECT + InternalIntrinsics.cpp + ) + +diff --git a/IGC/VectorCompiler/lib/Support/CMakeLists.txt b/IGC/VectorCompiler/lib/Support/CMakeLists.txt +index 047f2528761..12b7bb62cca 100644 +--- a/IGC/VectorCompiler/lib/Support/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/Support/CMakeLists.txt +@@ -15,7 +15,7 @@ set(SUPPORT_SOURCES + PassPrinters.cpp + ) + +-add_library(VCSupport ${SUPPORT_SOURCES}) ++add_library(VCSupport OBJECT ${SUPPORT_SOURCES}) + igc_get_llvm_targets(LLVM_LIBS + Support + Core +diff --git a/IGC/VectorCompiler/lib/Utils/GenX/CMakeLists.txt b/IGC/VectorCompiler/lib/Utils/GenX/CMakeLists.txt +index e5a7bff2392..b77547c6bcd 100644 +--- a/IGC/VectorCompiler/lib/Utils/GenX/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/Utils/GenX/CMakeLists.txt +@@ -21,7 +21,7 @@ set(GENX_UTILS_SOURCES + TransformArgCopy.cpp + ) + +-add_library(VCGenXUtils ${GENX_UTILS_SOURCES}) ++add_library(VCGenXUtils OBJECT ${GENX_UTILS_SOURCES}) + igc_get_llvm_targets(LLVM_LIBS + Core + Support +diff --git a/IGC/VectorCompiler/lib/Utils/General/CMakeLists.txt b/IGC/VectorCompiler/lib/Utils/General/CMakeLists.txt +index 873d45e8025..8408828f748 100644 +--- a/IGC/VectorCompiler/lib/Utils/General/CMakeLists.txt ++++ b/IGC/VectorCompiler/lib/Utils/General/CMakeLists.txt +@@ -16,7 +16,7 @@ set(GENERAL_UTILS_SOURCES + IndexFlattener.cpp + ) + +-add_library(VCGeneralUtils ${GENERAL_UTILS_SOURCES}) ++add_library(VCGeneralUtils OBJECT ${GENERAL_UTILS_SOURCES}) + igc_get_llvm_targets(LLVM_LIBS + Core + Support diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.12504.5.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.12504.5-r1.ebuild index 5d6a7abde11f..5942edc5cd67 100644 --- a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.12504.5.ebuild +++ b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.12504.5-r1.ebuild @@ -19,13 +19,17 @@ S="${WORKDIR}/${PN}-${MY_P}" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" -IUSE="debug" +IUSE="debug vc" DEPEND=" dev-libs/opencl-clang:${LLVM_MAX_SLOT}= dev-util/spirv-tools sys-devel/lld:${LLVM_MAX_SLOT}= sys-devel/llvm:${LLVM_MAX_SLOT}= + vc? ( + dev-libs/intel-vc-intrinsics + dev-util/spirv-llvm-translator:${LLVM_MAX_SLOT}= + ) " RDEPEND="${DEPEND}" @@ -40,6 +44,7 @@ PATCHES=( "${FILESDIR}/${PN}-1.0.8173-opencl-clang_version.patch" "${FILESDIR}/${PN}-1.0.8365-disable-git.patch" "${FILESDIR}/${PN}-1.0.11485-include-opencl-c.patch" + "${FILESDIR}/${PN}-1.0.12504.5-vectorcompiler.patch" ) pkg_setup() { @@ -62,6 +67,7 @@ src_configure() { -DCCLANG_INCLUDE_PREBUILDS_DIR="/usr/lib/clang/${llvm_version##*-}/include" -DCCLANG_SONAME_VERSION="${LLVM_MAX_SLOT}" -DCMAKE_LIBRARY_PATH="$(get_llvm_prefix ${LLVM_MAX_SLOT})/$(get_libdir)" + -DIGC_BUILD__VC_ENABLED="$(usex vc)" -DIGC_OPTION__ARCHITECTURE_TARGET="Linux64" -DIGC_OPTION__CLANG_MODE="Prebuilds" -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR="ON" @@ -72,14 +78,10 @@ src_configure() { -DIGC_OPTION__SPIRV_TOOLS_MODE="Prebuilds" -DIGC_OPTION__SPIRV_TRANSLATOR_MODE="Prebuilds" -DIGC_OPTION__USE_PREINSTALLED_SPRIV_HEADERS="ON" + $(usex vc '-DIGC_OPTION__VC_INTRINSICS_MODE=Prebuilds' '') -DINSTALL_GENX_IR="ON" -DSPIRVLLVMTranslator_INCLUDE_DIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAX_SLOT}/include/LLVMSPIRVLib" -Wno-dev - - # Compilation with VectorCompiler causes currently a segfault. - # See https://github.com/intel/intel-graphics-compiler/issues/236 - -DIGC_BUILD__VC_ENABLED="OFF" - # -DIGC_OPTION__VC_INTRINSICS_MODE="Prebuilds" ) cmake_src_configure diff --git a/dev-util/intel-graphics-compiler/metadata.xml b/dev-util/intel-graphics-compiler/metadata.xml index 084e53520273..35c67387290c 100644 --- a/dev-util/intel-graphics-compiler/metadata.xml +++ b/dev-util/intel-graphics-compiler/metadata.xml @@ -13,6 +13,9 @@ <email>conikost@gentoo.org</email> <name>Conrad Kostecki</name> </maintainer> + <use> + <flag name="vc">Enable VectorCompiler for a better performance.</flag> + </use> <upstream> <remote-id type="github">intel/intel-graphics-compiler</remote-id> </upstream> |