diff --git a/tests/l2/README.md b/tests/l2/README.md index fd94ab73..96764eba 100644 --- a/tests/l2/README.md +++ b/tests/l2/README.md @@ -61,6 +61,68 @@ $ oc logs intel-dgpu-clinfo-56mh2 Device OpenCL C all versions OpenCL ``` +### Verify IntelĀ® QuickAssist Technology provisioning +This workload runs [qatlib](https://github.com/intel/qatlib) sample tests for compression and crypto. Refer to the [qatlib readme](https://github.com/intel/qatlib/blob/main/INSTALL) for more details. +* Build the workload container image. + +```$ oc apply -f https://raw.githubusercontent.com/intel/intel-technology-enabling-for-openshift/main/tests/l2/qat/qatlib_build.yaml ``` + +* Deploy and execute the workload. + + * Run with privileged SCC +```$oc adm policy add-scc-to-user privileged -z intel-qat``` + +```$ oc apply -f https://raw.githubusercontent.com/intel/intel-technology-enabling-for-openshift/main/tests/l2/qat/qatlib_job.yaml``` + +* Check the results. +``` + $ oc get pods + intel-qat-workload-llhph 0/1 Completed 0 6m34s +``` + + +* For compression test `./cpa_sample_code runTests=32` and resource `qat.intel.com/dc` + +``` +$ oc logs intel-qat-workload-llhph +API Traditional +Session State STATELESS +Algorithm DEFLATE +Huffman Type STATIC +Mode ASYNCHRONOUS +CNV Enabled YES +Direction COMPRESS +Packet Size 8192 +Compression Level 1 +Corpus CALGARY_CORPUS +Corpus Filename calgary +CNV Recovery Enabled YES +Number of threads 12 +Total Responses 475200 +Total Retries 7983119 +Clock Cycles Start 618007337509561 +Clock Cycles End 618007830333759 +Total Cycles 492824198 +CPU Frequency(kHz) 1700171 +Throughput(Mbps) 107760 +Compression Ratio 0.4897 +``` + +* Similarly, for crypto test with same image: command `./cpa_sample_code runTests=2` and resource `qat.intel.com/cy`. + + +``` +RSA CRT DECRYPT +Modulus Size 2048 +Number of Threads 6 +Total Submissions 600000 +Total Responses 600000 +Total Retries 29945749 +CPU Frequency(kHz) 1700158 +Operations per second 58510 +``` + + ## See Also For Intel SGX demos on vanilla Kubernetes, refer to [link](https://github.com/intel/intel-device-plugins-for-kubernetes/tree/main/demo/sgx-sdk-demo) For GPU demos on vanilla Kubernetes, refer to [link](https://github.com/intel/intel-device-plugins-for-kubernetes/tree/main/demo/intel-opencl-icd) \ No newline at end of file diff --git a/tests/l2/qat/qatlib_build.yaml b/tests/l2/qat/qatlib_build.yaml new file mode 100644 index 00000000..f311b82a --- /dev/null +++ b/tests/l2/qat/qatlib_build.yaml @@ -0,0 +1,61 @@ +# Copyright (c) 2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + name: intel-qat-workload + namespace: intel-qat +spec: {} +--- +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: intel-qat-workload + namespace: intel-qat +spec: + triggers: + - type: "ConfigChange" + - type: "ImageChange" + runPolicy: "Serial" + source: + type: Dockerfile + dockerfile: | + + FROM registry.access.redhat.com/ubi8/ubi AS builder + ARG QATLIB_VERSION="23.02.0" + + RUN dnf -y update && \ + dnf install -y gcc \ + systemd-devel \ + make \ + automake \ + autoconf \ + libtool \ + openssl-devel \ + http://mirror.centos.org/centos/8-stream/PowerTools/x86_64/os/Packages/nasm-2.15.03-3.el8.x86_64.rpm \ + git && \ + git clone -b $QATLIB_VERSION https://github.com/intel/qatlib + + RUN cd /qatlib && \ + ./autogen.sh && \ + ./configure \ + --prefix=/usr \ + --enable-systemd=no && \ + make -j && \ + make install samples-install + + WORKDIR /usr/bin + ENTRYPOINT ["/usr/bin/cpa_sample_code"] + strategy: + type: Docker + noCache: true + dockerStrategy: + buildArgs: + - name: "QATLIB_VERSION" + value: "23.02.0" + + output: + to: + kind: ImageStreamTag + name: intel-qat-workload:latest \ No newline at end of file diff --git a/tests/l2/qat/qatlib_job.yaml b/tests/l2/qat/qatlib_job.yaml new file mode 100644 index 00000000..22568a0f --- /dev/null +++ b/tests/l2/qat/qatlib_job.yaml @@ -0,0 +1,24 @@ +# Copyright (c) 2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +apiVersion: batch/v1 +kind: Job +metadata: + name: intel-qat-workload + namespace: intel-qat +spec: + template: + spec: + restartPolicy: Never + containers: + - name: intel-qat-job + image: image-registry.openshift-image-registry.svc:5000/intel-qat/intel-qat-workload:latest + imagePullPolicy: IfNotPresent + command: ["./cpa_sample_code", "runTests=32"] + securityContext: + privileged: true + resources: + requests: + qat.intel.com/dc: '1' + limits: + qat.intel.com/dc: '1' + serviceAccount: intel-qat \ No newline at end of file