Skip to content
Snippets Groups Projects
Commit cd08c99e authored by olga's avatar olga
Browse files

Adding pocl version of the simpletrack container

parent 5534d94d
No related branches found
No related tags found
1 merge request!3Adding pocl version of the simpletrack container
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
stages: stages:
- build - build
build:nvidia: .job_template: &job_build
stage: build stage: build
image: image:
name: gitlab-registry.cern.ch/ci-tools/docker-image-builder name: gitlab-registry.cern.ch/ci-tools/docker-image-builder
...@@ -11,19 +11,21 @@ build:nvidia: ...@@ -11,19 +11,21 @@ build:nvidia:
name: build/$CI_COMMIT_REF_NAME name: build/$CI_COMMIT_REF_NAME
only: only:
- master - master
build:nvidia:
<<: *job_build
script: script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/lhc/simpletrack/Dockerfile.nvidia --destination ${CI_REGISTRY_IMAGE}/lhc/simpletrack:nvidia-latest - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/lhc/simpletrack/Dockerfile.nvidia --destination ${CI_REGISTRY_IMAGE}/lhc/simpletrack:nvidia-latest
build:intel: build:intel:
stage: build <<: *job_build
image: script:
name: gitlab-registry.cern.ch/ci-tools/docker-image-builder - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
entrypoint: [""] - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/lhc/simpletrack/Dockerfile.intel --destination ${CI_REGISTRY_IMAGE}/lhc/simpletrack:intel-latest
environment:
name: build/$CI_COMMIT_REF_NAME build:pocl:
only: <<: *job_build
- master
script: script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/lhc/simpletrack/Dockerfile.intel --destination ${CI_REGISTRY_IMAGE}/lhc/simpletrack:intel-latest - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/lhc/simpletrack/Dockerfile.pocl --destination ${CI_REGISTRY_IMAGE}/lhc/simpletrack:pocl-latest
\ No newline at end of file
FROM debian:latest
ARG LLVM_VERSION=7
ENV OCL_ICD_VENDORS=/pocl/build/ocl-vendors
ENV POCL_BUILDING=1
ENV PARTICLES 20000
ENV TURNS 15
ENV DEVICE "0.0"
RUN apt update && apt upgrade -y \
&& apt-get install -y build-essential ocl-icd-libopencl1 cmake git gcc g++ libhwloc5 pkg-config python3-pip libclang-${LLVM_VERSION}-dev clang-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev make ninja-build ocl-icd-libopencl1 ocl-icd-dev ocl-icd-opencl-dev libhwloc-dev zlib1g zlib1g-dev clinfo
RUN git clone https://github.com/pocl/pocl.git \
&& cd pocl && mkdir build && cd build && cmake -G Ninja .. \
&& ninja
RUN mkdir /.cache && chmod -R 777 /.cache/ \
&& git clone https://github.com/rdemaria/simpletrack.git \
&& cd simpletrack && pip3 install pyopencl && pip3 install -e .
ENTRYPOINT [ "/bin/bash", "-c", "cd /simpletrack/examples/lhc/ && python3 benchmark_opencl.py -p $PARTICLES -t $TURNS -d $DEVICE" ]
# SimpleTrack # SimpleTrack
Docker images meant to build versions with the simpletrack benchmark for nvidia GPU and intel runtimes. Docker images meant to build versions with the simpletrack benchmark for nvidia GPU and intel and pocl runtimes. To be specify custom number of particles and turns use the environment variables:
```
~$ docker run --rm -e PARTICLES=100 -e TURNS=5 gitlab-registry.cern.ch/hep-workloads-gpu/...
```
* __Nvidia__: To run the benchmark through the container image entrypoint make sure to enable GPU passthrough. * __Nvidia__: To run the benchmark through the container image entrypoint make sure to enable GPU passthrough.
...@@ -13,3 +17,15 @@ Docker images meant to build versions with the simpletrack benchmark for nvidia ...@@ -13,3 +17,15 @@ Docker images meant to build versions with the simpletrack benchmark for nvidia
``` ```
~$ docker run --rm --device /dev/dri:/dev/dri gitlab-registry.cern.ch/hep-benchmarks/hep-workloads-gpu/lhc/simpletrack:intel-latest ~$ docker run --rm --device /dev/dri:/dev/dri gitlab-registry.cern.ch/hep-benchmarks/hep-workloads-gpu/lhc/simpletrack:intel-latest
``` ```
* __POCL__: Portable Computing Language with built ICD extensions of OpenCL. Example execution using the cpu device:
```
~$ docker run --rm gitlab-registry.cern.ch/hep-benchmarks/hep-workloads-gpu/lhc/simpletrack:pocl-latest
```
To check for available devices:
```
~$ docker run --rm --entrypoint "/usr/bin/clinfo" gitlab-registry.cern.ch/hep-benchmarks/hep-workloads-gpu/lhc/simpletrack:pocl-latest
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment