wasi-nn: Enable GPU support (#1922)
- Split logic in several dockers - runtime: wasi-nn-cpu and wasi-nn- Nvidia-gpu. - compilation: wasi-nn-compile. Prepare the testing wasm and generates the TFLites. - Implement GPU support for TFLite with Opencl.
This commit is contained in:
22
core/iwasm/libraries/wasi-nn/test/Dockerfile.base
Normal file
22
core/iwasm/libraries/wasi-nn/test/Dockerfile.base
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
FROM ubuntu:20.04 AS base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cmake build-essential git
|
||||
|
||||
WORKDIR /home/wamr
|
||||
|
||||
COPY . .
|
||||
|
||||
WORKDIR /home/wamr/core/iwasm/libraries/wasi-nn/test/build
|
||||
|
||||
RUN cmake \
|
||||
-DWAMR_BUILD_WASI_NN=1 \
|
||||
-DTFLITE_ENABLE_GPU=ON \
|
||||
..
|
||||
|
||||
RUN make -j $(grep -c ^processor /proc/cpuinfo)
|
||||
Reference in New Issue
Block a user