Skip to content

Conversation

@XinfengZhang
Copy link
Contributor

cmake ../media-driver/ -DENABLE_PRODUCTION_KMD=ON -DMEDIA_BUILD_FATAL_WARNINGS=OFF -DBUILD_CMRTLIB=OFF -DENABLE_X86_INTRINSICS=OFF

Signed-off-by: XinfengZhang [email protected]

cmake ../media-driver/ -DENABLE_PRODUCTION_KMD=ON -DMEDIA_BUILD_FATAL_WARNINGS=OFF -DBUILD_CMRTLIB=OFF -DENABLE_X86_INTRINSICS=OFF

Signed-off-by: XinfengZhang <[email protected]>
Copy link
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build fails. Why do we need this option to disable intrinsic? What's the rationale behind that?

Copy link
Contributor

@HeFan2017 HeFan2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cm-related filed LGTM

option (BUILD_CMRTLIB "Build and Install cmrtlib together with media driver" ON)

option (ENABLE_PRODUCTION_KMD "Enable Production KMD header files" OFF)
option (ENABLE_X86_INTRINSICS "Enable x86 intrinsics" ON)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be configuration step check. Instead, this should be runtime check whether some features are supported or not. If not supported - disable these feature or select a supported path (since few implementations typically possible).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel has _may_i_use_cpu_feature() intrinsics function: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_may_i_use_cpu_feature

GCC has __builtin_cpu_supports() for runtime checks: https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/x86-Built-in-Functions.html

And other compilers have similar features.

Google provides "cpu_features" library (under Apache license).


# -m32 or -m64
-m${ARCH}
#-m${ARCH}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? If not needed - remove completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants