Skip to content

Commit ad3955e

Browse files
committed
demo: Add DML, QPL demos
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
1 parent 974c8e4 commit ad3955e

File tree

6 files changed

+94
-57
lines changed

6 files changed

+94
-57
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ jobs:
128128
- crypto-perf
129129
- accel-config-demo
130130
- intel-opencl-icd
131-
- iaa-qpl-demo
132131
- opae-nlb-demo
133132
- openssl-qat-engine
134133
- sgx-sdk-demo

demo/accel-config-demo/Dockerfile

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
FROM ubuntu:22.04 AS builder
1616

17-
RUN apt update && apt install -y --no-install-recommends \
18-
gcc make patch autoconf automake libtool pkg-config curl ca-certificates \
17+
RUN apt-get update && apt-get install -y --no-install-recommends \
18+
gcc g++ nasm make cmake patch autoconf automake libtool pkg-config git curl ca-certificates \
1919
libjson-c-dev uuid-dev zlib1g-dev
2020

2121
ARG ACCEL_CONFIG_VERSION="3.5.2"
@@ -24,8 +24,8 @@ ARG ACCEL_CONFIG_SHA256="a2d52007b4bfdc050a21893466e78328c6800f9a87b0806c7e7f577
2424

2525
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
2626

27-
ADD idxd-reset.patch /
28-
ADD test_runner_disable_shared_queues.patch /
27+
COPY idxd-reset.patch /
28+
COPY test_runner_disable_shared_queues.patch /
2929

3030
RUN cd idxd-config-accel-config-v$ACCEL_CONFIG_VERSION && \
3131
patch -p1 < ../idxd-reset.patch && \
@@ -35,9 +35,25 @@ RUN cd idxd-config-accel-config-v$ACCEL_CONFIG_VERSION && \
3535
./configure -q --libdir=/usr/lib64 --enable-test=yes --disable-docs && \
3636
make install
3737

38+
COPY dml.patch /
39+
RUN cd / && git clone --recurse-submodules --branch v0.1.9-beta --depth 1 https://github.com/intel/DML.git && \
40+
mkdir DML/build && cd DML/build && \
41+
patch -d .. -p1 < /dml.patch && \
42+
cmake .. && \
43+
make install && \
44+
mv -v /usr/local/bin/tests /usr/local/bin/dml_tests && \
45+
mv -v /usr/local/bin/tests_mt /usr/local/bin/dml_tests_mt && \
46+
mv -v /usr/local/bin/job_api_samples /usr/local/bin/dml_job_api_samples
47+
48+
RUN cd / && git clone --recursive --depth 1 --branch v1.0.0 https://github.com/intel/qpl.git && \
49+
mkdir qpl/build && cd qpl/build && \
50+
sed -i '10i #include <stdexcept>' ../tools/benchmarks/include/types.hpp && \
51+
cmake -DLOG_HW_INIT=ON .. && \
52+
make install
53+
3854
FROM ubuntu:22.04
3955

40-
RUN apt update && apt install -y libjson-c5
56+
RUN apt-get update && apt-get install -y --no-install-recommends libjson-c5 && rm -rf /var/lib/apt/lists/\*
4157

4258
COPY --from=builder /usr/lib64/libaccel-config.so.1.0.0 "/lib/x86_64-linux-gnu/"
4359
RUN ldconfig
@@ -46,4 +62,10 @@ COPY --from=builder /usr/bin/accel-config /usr/bin/
4662
COPY --from=builder /usr/lib/accel-config/test /test
4763
COPY --from=builder /idxd-reset.patch /usr/local/share/package-sources/
4864

65+
COPY --from=builder /usr/local /usr/local
66+
COPY --from=builder /qpl/build/examples /usr/local/bin/
67+
68+
COPY dml-test.sh /usr/local/bin/
69+
COPY qpl-test.sh /usr/local/bin/
70+
4971
ENTRYPOINT cd /test && /bin/bash -e ./dsa_user_test_runner.sh

demo/accel-config-demo/dml-test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
/usr/local/bin/dml_tests

demo/accel-config-demo/dml.patch

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From 31be752ada72f85b2eca9b5a3eef8c41dedb4ad6 Mon Sep 17 00:00:00 2001
2+
From: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
3+
Date: Wed, 28 Dec 2022 17:21:15 +0200
4+
Subject: [PATCH] tests: Ass includes in order to compile with gcc 11, gcc 12
5+
6+
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
7+
---
8+
include/dml/detail/ml/buffer.hpp | 1 +
9+
tests/common/t_utility_functions.hpp | 1 +
10+
tests/utils/include/utils/memory.hpp | 1 +
11+
3 files changed, 3 insertions(+)
12+
13+
diff --git a/include/dml/detail/ml/buffer.hpp b/include/dml/detail/ml/buffer.hpp
14+
index 8f2f529..d59514c 100644
15+
--- a/include/dml/detail/ml/buffer.hpp
16+
+++ b/include/dml/detail/ml/buffer.hpp
17+
@@ -10,6 +10,7 @@
18+
#include <dml/detail/ml/allocator.hpp>
19+
#include <dml/detail/ml/utils.hpp>
20+
#include <memory>
21+
+#include <utility>
22+
23+
namespace dml::detail::ml
24+
{
25+
diff --git a/tests/common/t_utility_functions.hpp b/tests/common/t_utility_functions.hpp
26+
index c445cb7..caaf411 100644
27+
--- a/tests/common/t_utility_functions.hpp
28+
+++ b/tests/common/t_utility_functions.hpp
29+
@@ -7,6 +7,7 @@
30+
#ifndef DML_T_UTILITY_FUNCTIONS_HPP
31+
#define DML_T_UTILITY_FUNCTIONS_HPP
32+
33+
+#include <stdlib.h>
34+
#include <vector>
35+
#include <cstdint>
36+
37+
diff --git a/tests/utils/include/utils/memory.hpp b/tests/utils/include/utils/memory.hpp
38+
index 4f3cdcf..e408cd9 100644
39+
--- a/tests/utils/include/utils/memory.hpp
40+
+++ b/tests/utils/include/utils/memory.hpp
41+
@@ -12,6 +12,7 @@
42+
#include <memory>
43+
#include <vector>
44+
#include <ostream>
45+
+#include <utility>
46+
47+
namespace dml::testing
48+
{
49+
--
50+
2.39.0
51+

demo/accel-config-demo/qpl-test.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
cd /usr/local/bin/low-level-api
6+
7+
time for i in $(ls ll_* | grep -v ll_canned_mode_with_data_example); do
8+
echo $i;
9+
./$i;
10+
echo $?;
11+
done

demo/iaa-qpl-demo/Dockerfile

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)