All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Stefan Hager <stefan.hager@ginzinger.com>,
	Samuel Martin <s.martin49@gmail.com>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
Date: Sun, 29 Jan 2023 22:45:07 +0100	[thread overview]
Message-ID: <20230129214507.GY2632@scaer> (raw)
In-Reply-To: <20230127141058.2180747-4-james.hilliard1@gmail.com>

James, All,

On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> From: Stefan Hager <stefan.hager@ginzinger.com>
> 
> This package is required by tensorflow-lite.
> 
> Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
[--SNIP--]
> diff --git a/package/gemmlowp/gemmlowp.mk b/package/gemmlowp/gemmlowp.mk
> new file mode 100644
> index 0000000000..1a36fc48f7
> --- /dev/null
> +++ b/package/gemmlowp/gemmlowp.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# gemmlowp
> +#
> +################################################################################
> +
> +GEMMLOWP_VERSION = 08e4bb339e34017a0835269d4a37c4ea04d15a69
> +GEMMLOWP_SITE = $(call github,google,gemmlowp,$(GEMMLOWP_VERSION))
> +GEMMLOWP_LICENSE = Apache-2.0
> +GEMMLOWP_LICENSE_FILES = LICENSE
> +GEMMLOWP_INSTALL_STAGING = YES
> +GEMMLOWP_INSTALL_TARGET = NO
> +GEMMLOWP_SUBDIR = contrib

Upstream is very careful to point to some optimisations that are
required or performance will suffer.

Notably, should be enabled:
  - for x86: sse4.1
  - for ARM: NEON

For NEON, it seems this is automatically handled, though, based on
looking at some macros:

    internal/detect_platform.h
    85 #if (defined __ARM_NEON) || (defined __ARM_NEON__)
    86 #define GEMMLOWP_NEON
    87 #endif

For x86, we should probably have code like (what we have as
BR2_X86_CPU_HAS_SSE4 seems to be SSE4.1, but it is not clear whether
there is an actual delta between SSE4 and SSE4.1 [0], so let's be safe
and assume that BR2_X86_CPU_HAS_SSE4 is not enough):

    ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
    GEMMLOWP_OPTIM += -msse4.1
    endif

However, that same header seems to also have some detection based on
macros... This needs to be cleared, maybe?

[0] https://en.wikipedia.org/wiki/SSE4

Regards,
Yann E. MORIN.

> +$(eval $(cmake-package))
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-01-29 21:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package James Hilliard
2023-01-29 21:18   ` Yann E. MORIN
2023-01-27 14:10 ` [Buildroot] [PATCH v4 03/13] package/ruy: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 04/13] package/gemmlowp: " James Hilliard
2023-01-29 21:45   ` Yann E. MORIN [this message]
2023-01-30  3:17     ` James Hilliard
2023-01-30  7:13       ` Yann E. MORIN
2023-01-30  7:45         ` James Hilliard
2023-01-29 21:46   ` Yann E. MORIN
2023-01-29 23:51     ` James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 05/13] package/neon-2-sse: " James Hilliard
2023-01-29 21:58   ` Yann E. MORIN
2023-01-27 14:10 ` [Buildroot] [PATCH v4 06/13] package/fxdiv: " James Hilliard
2023-01-29 22:28   ` Yann E. MORIN
2023-01-27 14:10 ` [Buildroot] [PATCH v4 07/13] package/pthreadpool: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 08/13] package/psimd: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 09/13] package/fp16: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 10/13] package/xnnpack: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 11/13] package/fft2d: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 12/13] package/farmhash: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 13/13] package/tensorflow-lite: " James Hilliard
2023-01-29 20:55 ` [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230129214507.GY2632@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=james.hilliard1@gmail.com \
    --cc=s.martin49@gmail.com \
    --cc=stefan.hager@ginzinger.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.