[x265] [PATCH] AArch64: Warn when compile time feature detection is unsupported
Karam Singh
karam.singh at multicorewareinc.com
Fri Sep 6 06:59:16 UTC 2024
This patch has been pushed to the master branch.
*__________________________*
*Karam Singh*
*Ph.D. IIT Guwahati*
Senior Software (Video Coding) Engineer
Mobile: +91 8011279030
Block 9A, 6th floor, DLF Cyber City
Manapakkam, Chennai 600 089
On Mon, Aug 5, 2024 at 5:50 AM chen <chenm003 at 163.com> wrote:
> Hi Hari,
>
>
> The new version looks good, thank you.
>
>
> Regards,
>
> Chen
>
> At 2024-08-01 17:29:01, "Hari Limaye" <hari.limaye at arm.com> wrote:
> >Hi Chen,
> >
> >Thank you for reviewing the SAD patches.
> >
> >I am putting this patch up to handle emitting warnings for platforms
> >where compile time feature detection is not implemented - as this is
> >currently true for all the existing find_package(*) scripts for AArch64
> >feature detection.
> >
> >Note: this patch is based on the `AArch64 SAD/SADxN Optimisations`
> >stack.
> >
> >Many thanks,
> >Hari
> >
> >---
> >As compile time feature detection for AArch64 platforms is currently
> >only supported on Linux and Darwin platforms, emit a warning message
> >when compiling for any other platform.
> >---
> > source/CMakeLists.txt | 41 ++++++++++++++++++++++++-----------------
> > 1 file changed, 24 insertions(+), 17 deletions(-)
> >
> >diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
> >index 8288fd234..55e4926c6 100755
> >--- a/source/CMakeLists.txt
> >+++ b/source/CMakeLists.txt
> >@@ -265,25 +265,32 @@ if(GCC)
> > set(CPU_HAS_NEON 1)
> > add_definitions(-DX265_ARCH_ARM64=1 -DHAVE_NEON=1)
> >
> >- # Handle cross-compilation options.
> >- if(CROSS_COMPILE_NEON_DOTPROD)
> >- set(CPU_HAS_NEON_DOTPROD 1)
> >- endif()
> >- if(CROSS_COMPILE_SVE)
> >- set(CPU_HAS_SVE 1)
> >- # We impose the constraint that SVE implies Neon DotProd.
> >- set(CPU_HAS_NEON_DOTPROD 1)
> >- endif()
> >- if(CROSS_COMPILE_SVE2)
> >- set(CPU_HAS_SVE2 1)
> >- # SVE2 implies SVE and Neon DotProd.
> >- set(CPU_HAS_SVE 1)
> >- set(CPU_HAS_NEON_DOTPROD 1)
> >+ if(CROSS_COMPILE_ARM64)
> >+ # Handle cross-compilation options.
> >+ if(CROSS_COMPILE_NEON_DOTPROD)
> >+ set(CPU_HAS_NEON_DOTPROD 1)
> >+ endif()
> >+ if(CROSS_COMPILE_SVE)
> >+ set(CPU_HAS_SVE 1)
> >+ # We impose the constraint that SVE implies Neon DotProd.
> >+ set(CPU_HAS_NEON_DOTPROD 1)
> >+ endif()
> >+ if(CROSS_COMPILE_SVE2)
> >+ set(CPU_HAS_SVE2 1)
> >+ # SVE2 implies SVE and Neon DotProd.
> >+ set(CPU_HAS_SVE 1)
> >+ set(CPU_HAS_NEON_DOTPROD 1)
> >+ endif()
> >+ else()
> >+ if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
> >+ find_package(NEON_DOTPROD)
> >+ find_package(SVE)
> >+ find_package(SVE2)
> >+ else()
> >+ message(STATUS "Compile time feature detection unsupported on this platform")
> >+ endif()
> > endif()
> >
> >- find_package(NEON_DOTPROD)
> >- find_package(SVE)
> >- find_package(SVE2)
> > if(CPU_HAS_NEON_DOTPROD)
> > # Neon DotProd is mandatory from Armv8.4.
> > message(STATUS "Found Neon DotProd")
> >--
> >2.42.1
> >
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240906/8fba162a/attachment.htm>
More information about the x265-devel
mailing list