Skip to content
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

how to compiler sve in Android system #854

Closed
xxxxxxLD opened this issue Jul 23, 2022 · 2 comments
Closed

how to compiler sve in Android system #854

xxxxxxLD opened this issue Jul 23, 2022 · 2 comments

Comments

@xxxxxxLD
Copy link

In linux system,I try to use Android.mk in Android compiler system to compile an executable file including SVE intrinsics, which is supported in armv8.2, and the system config as follows:

  • TARGET_ARCH=arm64;
  • TARGET_ARCH_VARIANT=armv8-2a;
  • TARGET_CPU_VARIANT=cortex-a76
  • TARGET_2ND_ARCH=arm;
  • TARGET_2ND_ARCH_VARIANT=armv8-2a
  • TARGET_2ND_CPU_VARIANT=cortex-a55
  • HOST_ARCH=x86_64
  • HOST_2ND_ARCH=x86
  • HOST_OS=linux

And here are the steps I build:
source build/envsetup.sh
lunch, I choose a platform described as above;
mm, build the modules in the SVE instrinsics directory,and the Android.mk is in the same deirctory;

And the Android.mk is

LOCAL_PATH:= $(call my-dir)
ROOT_DIR := $(LOCAL_PATH)/..
include $(CLEAR_VARS)
LOCAL_MODULE:= SVE_test
LOCAL_SRC_FILES := $(ROOT_DIR)/Project1/main.cpp
LOCAL_CFLAGS := -O3 -ffast-math -DNDK -D_GNU_SOURCE -D__ARM_FEATURE_SVE -D__LITTLE_ENDIAN
LOCAL_CFLAGS += -mfloat-abi=softfp -mfpu=neon -msve-vector-bits=256
LOCAL_LDLIBS  += -lc -ldl -lm -lz -llog -fPIE
APP_CPPFLAGS  +=-std=c++11

ifeq($(TARGET_ARCH_ABI), arm64-v8a)
LOCAL_ARM_NEON:=true
endif
LOCAL_PROPRIETARY_MODULE := TRUE
include $(BUILD_EXECUTABLE)

But some errors I met, it shows thaterror in backend:don't know how to legalize this scalable vector size.
How to solve this problem?

@xxxxxxLD xxxxxxLD changed the title how to compiler sve in Andoird system how to compiler sve in Android system Jul 23, 2022
@ggfan
Copy link
Contributor

ggfan commented Aug 5, 2022

you might direct the question to https://github.com/android/ndk/issues?

@DanAlbert
Copy link
Member

The NDK at the time did not support SVE. r27 should (idr about r26).

#1011 for adding a sample.

@DanAlbert DanAlbert closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
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

No branches or pull requests

3 participants