-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fail with -DGEN8=OFF or -DGEN10=OFF #1065
Comments
If I change cmake to use "-DGEN8=ON", then the build fails to:
Aren't you doing automated build-testing before releases to check that the GEN options in CMake still work? |
No, we don't. These are advanced options used in rare cases. So far there were no requests asking for such build configurations to be permanently supported. We focus on the driver build which targets all platforms supported by the driver. Supported build options are described in the top level readme file: https://github.com/intel/media-driver#build-options. |
Thanks! If those options are deprecated legacy ones that're going away, that's fine. Some note [1] in CMake file about their status would be nice though. However, if media driver wants to avoid adding accidental dependencies between GENs, I would suggest adding tests for building with GENs disabled, as that kind of dependency mess can be very hard to clean up afterwards. It needs only build testing, and these two alternate configs would cover it pretty well, so it wouldn't take too much testing time either:
[1] I'm nowadays doing all my builds with CMake "-LH" option to see from build logs what config options were set. From that output it's easy to see all options and their descriptions. |
Even if the options are not tested, it makes sense to simply remove the Gen10 code, since Cannonlake GPUs never shipped. ChromeOS would appreciate code-size reductions, and Gen10 code is at least 3.8 MiB (>10%, 35 MiB -> 31 MiB): diff --git a/media_driver/cmake/linux/media_gen_flags_linux.cmake b/media_driver/cmake/linux/media_gen_flags_linux.cmake
index ce53e31a..4d3de925 100644
--- a/media_driver/cmake/linux/media_gen_flags_linux.cmake
+++ b/media_driver/cmake/linux/media_gen_flags_linux.cmake
@@ -121,14 +121,6 @@ if(GEN9_CMPV)
add_definitions(-DIGFX_GEN9_CMPV_SUPPORTED)
endif()
-if(GEN10)
- add_definitions(-DIGFX_GEN10_SUPPORTED)
-endif()
-
-if(GEN10_CNL)
- add_definitions(-DIGFX_GEN10_CNL_SUPPORTED)
-endif()
-
if(GEN11)
add_definitions(-DIGFX_GEN11_SUPPORTED)
endif()
|
This commit address the following compilation error when building with cmake -DGEN8=OFF. Partially fixes intel#1065. media-driver/media_driver/agnostic/gen12/cm/cm_hal_g12.h:32:10: fatal error: mhw_render_hwcmd_g8_X.h: No such file or directory
This commit address the following compilation error when building with cmake -DGEN8=OFF. Partially fixes intel#1065. media-driver/media_driver/agnostic/gen12/cm/cm_hal_g12.h:32:10: fatal error: mhw_render_hwcmd_g8_X.h: No such file or directory
This commit address the following compilation error when building with cmake -DGEN8=OFF. Partially fixes #1065. media-driver/media_driver/agnostic/gen12/cm/cm_hal_g12.h:32:10: fatal error: mhw_render_hwcmd_g8_X.h: No such file or directory
Please reopen. This is still broken for |
Reopening (got automatically closed after #1302 merge in). |
GEN10=OFF build failures:
@XinfengZhang : do you remember whether g10 headers usage for g11 path was by intent? |
Looking into the code, codechal_vdenc_vp9_g11.cpp is trivial - we can freely remove
|
Hi, ~/build_media# rm -rf * |
Yes, it's reproduceable with $ cmake -DGEN10=OFF -DENABLE_REQUIRED_GEN_CODE=OFF -GNinja -Bbuild
$ ninja -C build The key is that you have to turn off |
@cqian2: are you able to reproduce the issue? |
yes, we could reproduce the issue now. We will give solution in next two weeks. |
Any progress? |
This commit fix the compilation error when setting -DGEN10=OFF Fix for intel#1065
This commit fix the compilation error when setting -DGEN10=OFF Fix for intel#1065
This commit fix the compilation error when setting -DGEN10=OFF Fix for intel#1065
This commit fix the compilation error when setting -DGEN10=OFF Fix for #1065
Allowing the driver code to be disabled for Gen10 reduces the binary size by an additional 6.6 MiB over the 4 MiB reduction when removing the media kernels alone. text data bss dec hex filename 45485460 2374412 38736 47898608 2dadff0 iHD_drv_video.so # -DGEN10=ON 41422146 2237132 38768 43698046 29ac77e iHD_drv_video.so # -DGEN10=OFF before this patch 34483374 2219940 38704 36742018 230a382 iHD_drv_video.so # -DGEN10=OFF after this patch This change was enabled by the compile fix in commit e47460d ("Encode] Fix build issue when setting -DGEN10=OFF"). Closes: intel#1065
Allowing the driver code to be disabled for Gen10 reduces the binary size by an additional 6.6 MiB over the 4 MiB reduction when removing the media kernels alone. text data bss dec hex filename 45485460 2374412 38736 47898608 2dadff0 iHD_drv_video.so # -DGEN10=ON 41422146 2237132 38768 43698046 29ac77e iHD_drv_video.so # -DGEN10=OFF before this patch 34483374 2219940 38704 36742018 230a382 iHD_drv_video.so # -DGEN10=OFF after this patch This change was enabled by the compile fix in commit e47460d ("Encode] Fix build issue when setting -DGEN10=OFF"). Closes: #1065
When building media driver sources from latest release tag "intel-media-20.3.0":
cmake -G Ninja -DGEN8=OFF -DGEN9=ON -DGEN10=OFF -DGEN11=ON -DGEN12=ON . && ninja
The build fails with:
The text was updated successfully, but these errors were encountered: