Git Product home page Git Product logo

Comments (6)

Maratyszcza avatar Maratyszcza commented on May 3, 2024

This is expected. CMake build for Emscripten is currently not supported, you need to use Bazel for WebAssembly and WebAssembly SIMD targets.

from xnnpack.

dhirajnitk avatar dhirajnitk commented on May 3, 2024

I want to build these files from lite cmakelists.txt which are xnnpack_delegate.h/cc

if(TFLITE_ENABLE_XNNPACK)
  find_package(xnnpack REQUIRED)
  populate_tflite_source_vars("delegates/xnnpack"
    TFLITE_DELEGATES_XNNPACK_SRCS
    FILTER ".*(_test|_tester)\\.(cc|h)"
  )
  list(APPEND TFLITE_TARGET_DEPENDENCIES
    XNNPACK
  )
  list(APPEND TFLITE_TARGET_PUBLIC_OPTIONS "-DTFLITE_BUILD_WITH_XNNPACK_DELEGATE")
endif()

If I use bazel for xxnpack then should I be able to get libxnnpack.a(I dont want js/wasm)
Then I would need to link xnnpack_delegate.o with libxnnpack.a .

from xnnpack.

dhirajnitk avatar dhirajnitk commented on May 3, 2024

I m forcing the xnnpack_delegate.cc commenting on find_package(xnnpack)
its failing on "fp16.h' file not found". I see that this is half float library. Is this supported like numpy(not at cpu/compiler level)
If I am able to build xnnpack_delegate.o then I can use emcc to link it with libxnnpack.a(from bazel) ??

from xnnpack.

dhirajnitk avatar dhirajnitk commented on May 3, 2024

I dont understand bazel so How I can build the bazel for webassembly or WebAssembly simd. The config is not defined in .rc file.
bazel build -c opt --config emscripten_wasm : wasm_ukernels
bazel build -c opt --config emscripten_wasmsimd: wasm_ukernels
Added this to rc file
build:emscripten_wasm --crosstool_top=//toolchain:emscripten --cpu=wasm

could you please point to the tool chain http archive?

from xnnpack.

Maratyszcza avatar Maratyszcza commented on May 3, 2024

Bazel doesn't support building for WebAssembly out of the box. You'd need a custom toolchain specifications to enable this use case. You may the Bazel toolchain specification from TensorFlow.js which was tested to work with XNNPACK.

from xnnpack.

Kasthooriraja avatar Kasthooriraja commented on May 3, 2024

@dhirajnitk have you resolved the issue?
I want to build libxnnpack.a using emscripten, so that I can link this with libtensorflowlite.a
could you please post the procedure here?

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.