-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Replace vendored SIMD Everywhere by prefix/system install #10961
Open
tytan652
wants to merge
2
commits into
obsproject:master
Choose a base branch
from
tytan652:simd_everywhere_except_in_this_repo
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+138
−22,923
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "simde", | ||
"buildsystem": "meson", | ||
"builddir": true, | ||
"config-opts": [ | ||
"-Dtests=false" | ||
], | ||
"sources": [ | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/simd-everywhere/simde.git", | ||
"tag": "v0.8.2", | ||
"commit": "71fd833d9666141edcd1d3c109a80e228303d8d7" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#[=======================================================================[.rst | ||
FindSIMDE | ||
--------- | ||
|
||
FindModule for SIMD Everywhere | ||
|
||
Imported Targets | ||
^^^^^^^^^^^^^^^^ | ||
|
||
.. versionadded:: 3.0 | ||
|
||
This module defines the :prop_tgt:`IMPORTED` target ``SIMDE::SIMDE``. | ||
|
||
Result Variables | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module sets the following variables: | ||
|
||
``SIMDE_FOUND`` | ||
True, if headers were found. | ||
``SIMDE_VERSION`` | ||
Detected version of found SIMDE Everywhere. | ||
|
||
Cache variables | ||
^^^^^^^^^^^^^^^ | ||
|
||
The following cache variables may also be set: | ||
|
||
``SIMDE_INCLUDE_DIR`` | ||
Directory containing ``simde/simde-common.h``. | ||
|
||
#]=======================================================================] | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package(PkgConfig QUIET) | ||
if(PKG_CONFIG_FOUND) | ||
pkg_search_module(PC_SIMDE QUIET simde) | ||
endif() | ||
|
||
find_path( | ||
SIMDE_INCLUDE_DIR | ||
NAMES simde/simde-common.h | ||
HINTS ${PC_SIMDE_INCLUDE_DIRS} | ||
PATHS /usr/include /usr/local/include | ||
DOC "SIMD Everywhere include directory" | ||
) | ||
|
||
if(EXISTS "${SIMDE_INCLUDE_DIR}/simde/simde-common.h") | ||
file( | ||
STRINGS | ||
"${SIMDE_INCLUDE_DIR}/simde/simde-common.h" | ||
_version_string | ||
REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$" | ||
) | ||
|
||
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}") | ||
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _version_minor "${_version_string}") | ||
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _version_release "${_version_string}") | ||
|
||
set(SIMDE_VERSION "${_version_major}.${_version_minor}.${_version_release}") | ||
unset(_version_major) | ||
unset(_version_minor) | ||
unset(_version_release) | ||
else() | ||
if(NOT SIMDE_FIND_QUIETLY) | ||
message(AUTHOR_WARNING "Failed to find SIMD Everywhere version.") | ||
endif() | ||
set(SIMDE_VERSION 0.0.0) | ||
endif() | ||
|
||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows") | ||
set(SIMDE_ERROR_REASON "Ensure that obs-deps is provided as part of CMAKE_PREFIX_PATH.") | ||
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|FreeBSD") | ||
set(SIMDE_ERROR_REASON "Ensure SIMD Everywhere is available in local library paths.") | ||
endif() | ||
|
||
find_package_handle_standard_args( | ||
SIMDE | ||
REQUIRED_VARS SIMDE_INCLUDE_DIR | ||
VERSION_VAR SIMDE_VERSION | ||
REASON_FAILURE_MESSAGE "${SIMDE_ERROR_REASON}" | ||
) | ||
mark_as_advanced(SIMDE_INCLUDE_DIR) | ||
unset(SIMDE_ERROR_REASON) | ||
|
||
if(SIMDE_FOUND) | ||
if(NOT TARGET SIMDE::SIMDE) | ||
add_library(SIMDE::SIMDE INTERFACE IMPORTED) | ||
set_target_properties(SIMDE::SIMDE PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${SIMDE_INCLUDE_DIR}") | ||
endif() | ||
endif() | ||
|
||
include(FeatureSummary) | ||
set_package_properties( | ||
SIMDE | ||
PROPERTIES | ||
URL "https://github.com/simd-everywhere/simde" | ||
DESCRIPTION "Implementations of SIMD instruction sets for systems which don't natively support them." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,12 @@ | |
|
||
include(CMakeFindDependencyMacro) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/finders") | ||
|
||
if(MSVC) | ||
find_dependency(w32-pthreads REQUIRED) | ||
endif() | ||
find_dependency(SIMDE REQUIRED) | ||
find_dependency(Threads REQUIRED) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we also need to export SIMDE here? Are SIMDE types used in function prototypes or inline functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The headers include a SIMDE header which make it a dependency of libobs header and so the CMake package needs the finder to be installed alongside the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the question was more about which ones? Because SIMDE is an implementation detail of
libobs
internals and should not be exposed publicly. It doesn't make sense to expose it from an API point of view and if we do that seems like a mistake to me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
util/sse-intrin.h
(which hard depends on SIMDE) used in some installed headers:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right and of course we inlined all those functions so we created a tight coupling between API users and the internal data types..
That should have never happened, but I guess that's water under the bridge and can be cleaned up once the current API is not used externally anymore in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this thread can be resolved as "todo in a future effort".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally it should be fixed before making it an external dependency, because by fixing that, we exposed another open wound (namely that it now becomes an explicit public 3rd party dependency) and we just trade one problem (vendored dependency) for another (internal dependency becomes a hard public external dependency) even though there is no architectural reason for that to be the case.
We're doctoring around symptoms again and make a change that is mostly cosmetic instead of fixing the actual issue. But it's a fight I've never won, so I gave up fighting it.