mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
demo: Add DML, QPL demos
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit is contained in:
parent
974c8e40bc
commit
ad3955e5a3
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
@ -128,7 +128,6 @@ jobs:
|
||||
- crypto-perf
|
||||
- accel-config-demo
|
||||
- intel-opencl-icd
|
||||
- iaa-qpl-demo
|
||||
- opae-nlb-demo
|
||||
- openssl-qat-engine
|
||||
- sgx-sdk-demo
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
FROM ubuntu:22.04 AS builder
|
||||
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
gcc make patch autoconf automake libtool pkg-config curl ca-certificates \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc g++ nasm make cmake patch autoconf automake libtool pkg-config git curl ca-certificates \
|
||||
libjson-c-dev uuid-dev zlib1g-dev
|
||||
|
||||
ARG ACCEL_CONFIG_VERSION="3.5.2"
|
||||
@ -24,8 +24,8 @@ ARG ACCEL_CONFIG_SHA256="a2d52007b4bfdc050a21893466e78328c6800f9a87b0806c7e7f577
|
||||
|
||||
RUN curl -fsSL "$ACCEL_CONFIG_DOWNLOAD_URL" -o accel-config.tar.gz && echo "$ACCEL_CONFIG_SHA256 accel-config.tar.gz" | sha256sum -c - && tar -xzf accel-config.tar.gz
|
||||
|
||||
ADD idxd-reset.patch /
|
||||
ADD test_runner_disable_shared_queues.patch /
|
||||
COPY idxd-reset.patch /
|
||||
COPY test_runner_disable_shared_queues.patch /
|
||||
|
||||
RUN cd idxd-config-accel-config-v$ACCEL_CONFIG_VERSION && \
|
||||
patch -p1 < ../idxd-reset.patch && \
|
||||
@ -35,9 +35,25 @@ RUN cd idxd-config-accel-config-v$ACCEL_CONFIG_VERSION && \
|
||||
./configure -q --libdir=/usr/lib64 --enable-test=yes --disable-docs && \
|
||||
make install
|
||||
|
||||
COPY dml.patch /
|
||||
RUN cd / && git clone --recurse-submodules --branch v0.1.9-beta --depth 1 https://github.com/intel/DML.git && \
|
||||
mkdir DML/build && cd DML/build && \
|
||||
patch -d .. -p1 < /dml.patch && \
|
||||
cmake .. && \
|
||||
make install && \
|
||||
mv -v /usr/local/bin/tests /usr/local/bin/dml_tests && \
|
||||
mv -v /usr/local/bin/tests_mt /usr/local/bin/dml_tests_mt && \
|
||||
mv -v /usr/local/bin/job_api_samples /usr/local/bin/dml_job_api_samples
|
||||
|
||||
RUN cd / && git clone --recursive --depth 1 --branch v1.0.0 https://github.com/intel/qpl.git && \
|
||||
mkdir qpl/build && cd qpl/build && \
|
||||
sed -i '10i #include <stdexcept>' ../tools/benchmarks/include/types.hpp && \
|
||||
cmake -DLOG_HW_INIT=ON .. && \
|
||||
make install
|
||||
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN apt update && apt install -y libjson-c5
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libjson-c5 && rm -rf /var/lib/apt/lists/\*
|
||||
|
||||
COPY --from=builder /usr/lib64/libaccel-config.so.1.0.0 "/lib/x86_64-linux-gnu/"
|
||||
RUN ldconfig
|
||||
@ -46,4 +62,10 @@ COPY --from=builder /usr/bin/accel-config /usr/bin/
|
||||
COPY --from=builder /usr/lib/accel-config/test /test
|
||||
COPY --from=builder /idxd-reset.patch /usr/local/share/package-sources/
|
||||
|
||||
COPY --from=builder /usr/local /usr/local
|
||||
COPY --from=builder /qpl/build/examples /usr/local/bin/
|
||||
|
||||
COPY dml-test.sh /usr/local/bin/
|
||||
COPY qpl-test.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT cd /test && /bin/bash -e ./dsa_user_test_runner.sh
|
||||
|
5
demo/accel-config-demo/dml-test.sh
Executable file
5
demo/accel-config-demo/dml-test.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
/usr/local/bin/dml_tests
|
51
demo/accel-config-demo/dml.patch
Normal file
51
demo/accel-config-demo/dml.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 31be752ada72f85b2eca9b5a3eef8c41dedb4ad6 Mon Sep 17 00:00:00 2001
|
||||
From: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
|
||||
Date: Wed, 28 Dec 2022 17:21:15 +0200
|
||||
Subject: [PATCH] tests: Ass includes in order to compile with gcc 11, gcc 12
|
||||
|
||||
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
|
||||
---
|
||||
include/dml/detail/ml/buffer.hpp | 1 +
|
||||
tests/common/t_utility_functions.hpp | 1 +
|
||||
tests/utils/include/utils/memory.hpp | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/dml/detail/ml/buffer.hpp b/include/dml/detail/ml/buffer.hpp
|
||||
index 8f2f529..d59514c 100644
|
||||
--- a/include/dml/detail/ml/buffer.hpp
|
||||
+++ b/include/dml/detail/ml/buffer.hpp
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <dml/detail/ml/allocator.hpp>
|
||||
#include <dml/detail/ml/utils.hpp>
|
||||
#include <memory>
|
||||
+#include <utility>
|
||||
|
||||
namespace dml::detail::ml
|
||||
{
|
||||
diff --git a/tests/common/t_utility_functions.hpp b/tests/common/t_utility_functions.hpp
|
||||
index c445cb7..caaf411 100644
|
||||
--- a/tests/common/t_utility_functions.hpp
|
||||
+++ b/tests/common/t_utility_functions.hpp
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef DML_T_UTILITY_FUNCTIONS_HPP
|
||||
#define DML_T_UTILITY_FUNCTIONS_HPP
|
||||
|
||||
+#include <stdlib.h>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
diff --git a/tests/utils/include/utils/memory.hpp b/tests/utils/include/utils/memory.hpp
|
||||
index 4f3cdcf..e408cd9 100644
|
||||
--- a/tests/utils/include/utils/memory.hpp
|
||||
+++ b/tests/utils/include/utils/memory.hpp
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
+#include <utility>
|
||||
|
||||
namespace dml::testing
|
||||
{
|
||||
--
|
||||
2.39.0
|
||||
|
11
demo/accel-config-demo/qpl-test.sh
Executable file
11
demo/accel-config-demo/qpl-test.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd /usr/local/bin/low-level-api
|
||||
|
||||
time for i in $(ls ll_* | grep -v ll_canned_mode_with_data_example); do
|
||||
echo $i;
|
||||
./$i;
|
||||
echo $?;
|
||||
done
|
@ -1,51 +0,0 @@
|
||||
# Copyright 2021-2022 Intel Corporation. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu:22.04 AS builder
|
||||
|
||||
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ="Etc/UTC" \
|
||||
apt install -y --no-install-recommends \
|
||||
g++ clang nasm cmake make git ca-certificates uuid-dev \
|
||||
gcc autoconf automake libtool pkg-config libjson-c-dev curl zlib1g-dev
|
||||
|
||||
ARG ACCEL_CONFIG_VERSION=3.5.2
|
||||
ARG ACCEL_CONFIG_DOWNLOAD_URL="https://github.com/intel/idxd-config/archive/accel-config-v$ACCEL_CONFIG_VERSION.tar.gz"
|
||||
ARG ACCEL_CONFIG_SHA256="a2d52007b4bfdc050a21893466e78328c6800f9a87b0806c7e7f5775ff48387b"
|
||||
|
||||
RUN curl -fsSL "$ACCEL_CONFIG_DOWNLOAD_URL" -o accel-config.tar.gz && echo "$ACCEL_CONFIG_SHA256 accel-config.tar.gz" | sha256sum -c - && tar -xzf accel-config.tar.gz
|
||||
RUN cd idxd-config-accel-config-v$ACCEL_CONFIG_VERSION && \
|
||||
./git-version-gen && \
|
||||
autoreconf -i && \
|
||||
./configure -q --libdir=/usr/lib64 --disable-test --disable-docs && \
|
||||
make install
|
||||
|
||||
RUN git clone --recursive --depth 1 --branch v1.0.0 \
|
||||
https://github.com/intel/qpl.git && \
|
||||
mkdir qpl/build && cd qpl/build && \
|
||||
sed -i '10i #include <stdexcept>' ../tools/benchmarks/include/types.hpp && \
|
||||
cmake -DLOG_HW_INIT=ON .. && \
|
||||
cmake --build . --target install
|
||||
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ="Etc/UTC" \
|
||||
apt install -y libjson-c5 python3
|
||||
|
||||
COPY --from=builder /usr/bin/accel-config /usr/bin/
|
||||
COPY --from=builder /usr/lib64/libaccel-config.so.1.0.0 "/lib/x86_64-linux-gnu/"
|
||||
RUN ldconfig
|
||||
|
||||
COPY --from=builder /usr/local/bin/ /usr/local/bin/
|
||||
|
||||
ENTRYPOINT cd /usr/local/bin/test_frontend && python init_tests.py --test_path=/usr/local/bin/init_tests
|
Loading…
Reference in New Issue
Block a user