Giter Club home page Giter Club logo

Comments (3)

Chinneil avatar Chinneil commented on August 24, 2024

Ubuntu20.04 ndk 18b
git clone xxx.git
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=/home/chendongmin/project/ndk/android-ndk-r18b/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a ../
cmake --build . -j

from xnnpack.

Maratyszcza avatar Maratyszcza commented on August 24, 2024

You need a newer Android NDK. Clang in NDK r18b doesn't support the intrinsic functions used in some XNNPACK microkernels.

from xnnpack.

mhsmith avatar mhsmith commented on August 24, 2024

When building PyTorch version 1.8.1 with NDK r18, I hit this issue on both the armeabi-v8a and arm64-v8a ABIs. The x86 and x86_64 ABIs were OK.

It looks like NDK r19c supports the needed functions, but I wasn't able to use that to build PyTorch either because of a compiler crash on all ABIs:

  1.    <eof> parser at end of file
  2.    Per-file LLVM IR generation
  3.    aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:306:3 <Spelling=aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:309:9>: Generating code for declaration 'at::native::(anonymous namespace)::sinc_kernel(at::TensorIterator &)::(anonymous class)::operator()()::(anonymous class)::operator()()::(anonymous class)::operator()'
  4.    aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:306:3 <Spelling=aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:312:18>: LLVM IR generation of compound statement ('{}')
  #0 0x000000000234c8c6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x234c8c6)
  #1 0x000000000234b4d0 llvm::sys::RunSignalHandlers() (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x234b4d0)
  #2 0x000000000234cbaa (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x234cbaa)
  #3 0x00007f3f2c4ee0c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
  #4 0x0000000003638bb1 clang::VarDecl::isThisDeclarationADefinition(clang::ASTContext&) const (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x3638bb1)
  #5 0x0000000003638f8b clang::VarDecl::getDefinition(clang::ASTContext&) (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x3638f8b)
  #6 0x00000000036396d1 clang::VarDecl::getTemplateInstantiationPattern() const (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x36396d1)
  #7 0x00000000025de075 (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x25de075)
  #8 0x00000000025de082 (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x25de082)
  [repeats]
  #255 0x00000000025de082 (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x25de082)
  clang80++: error: unable to execute command: Segmentation fault

I then tried NDK r21e, which worked fine.

from xnnpack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.