Repository navigation
cmake: support CPU_DISPATCH=ALL - #14486
Conversation
- CPU_DISPATCH_FINAL should be used for filtering
|
/cc @seiko2plus |
| set(CPU_DISPATCH_REQUIRE "") | ||
| endif() | ||
|
|
||
| if("x${CPU_DISPATCH}" STREQUAL "xALL") |
There was a problem hiding this comment.
It would be better to if we add an option to exclude specific optimization,
something like that
usage -DCPU_DISPATCH=ALL-AVX512_SKX-SSE4_1
if("${CPU_DISPATCH}" MATCHES "^(ALL)")
string(REPLACE "-" ";" _exclude_opt ${CPU_DISPATCH})
set(CPU_DISPATCH "${CPU_KNOWN_OPTIMIZATIONS}")
foreach(_exopt ${_exclude_opt})
list(REMOVE_ITEM CPU_DISPATCH ${_exopt})
endforeach()
endif()There was a problem hiding this comment.
I prefer to store excluded entries in a separate variables, like CPU_BASELINE_DISABLE - due better flexibility.
There was a problem hiding this comment.
excluded entries in a separate variable like CPU_BASELINE_DISABLE is reasonable since we force implies baseline opts but when it comes to dispatch ALL with unary minus and also DEFAULT! with unary addition seems more practical to me
There was a problem hiding this comment.
@seiko2plus That makes sense.
Actually real use cases of excluding from ALL is still not clear to me (except some debugging).
Main purpose of ALL value is enable testing of all available CPU configurations (even if they are not in the default list).
Anyway feel free to prepare separate PR for that.
|
👍 |
CPU_DISPATCH,CPU_DISPATCH_FINALshould be used for filteringUsage:
Main purpose of ALL value is enable testing of all available CPU configurations (even if they are not in default list).
Result:
continues #14007