diff --git a/providers/gpgpu/bin/gpu_burn.sh b/providers/gpgpu/bin/gpu_burn.sh new file mode 100755 index 0000000000..08a8fd2a9e --- /dev/null +++ b/providers/gpgpu/bin/gpu_burn.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +CUDA_PATH=$(find /usr/local -maxdepth 1 -type d -iname "cuda*")/bin +export PATH=$PATH:$CUDA_PATH +gpu_burn -c $PLAINBOX_PROVIDER_DATA/compare.ptx 14400 | grep -v -e '^[[:space:]]*$' -e "errors:" -e "Summary at" diff --git a/providers/gpgpu/bin/matrixMulDrv.sh b/providers/gpgpu/bin/matrixMulDrv.sh new file mode 100755 index 0000000000..12eeb9bf83 --- /dev/null +++ b/providers/gpgpu/bin/matrixMulDrv.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh +cp $PLAINBOX_PROVIDER_DATA/matrixMul_kernel64.fatbin . +matrixMulDrv diff --git a/providers/gpgpu/bin/simpleTextureDrv.sh b/providers/gpgpu/bin/simpleTextureDrv.sh new file mode 100755 index 0000000000..5758392cdf --- /dev/null +++ b/providers/gpgpu/bin/simpleTextureDrv.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +cp $PLAINBOX_PROVIDER_DATA/simpleTexture_kernel64.fatbin . +cp $PLAINBOX_PROVIDER_DATA/teapot512.pgm . +cp $PLAINBOX_PROVIDER_DATA/ref_rotated.pgm . +simpleTextureDrv diff --git a/providers/gpgpu/bin/vectorAddDrv.sh b/providers/gpgpu/bin/vectorAddDrv.sh new file mode 100755 index 0000000000..bcc489b65a --- /dev/null +++ b/providers/gpgpu/bin/vectorAddDrv.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh +cp $PLAINBOX_PROVIDER_DATA/vectorAdd_kernel64.fatbin . +vectorAddDrv diff --git a/providers/gpgpu/src/Makefile b/providers/gpgpu/src/Makefile index 8a99feca38..00707b181d 100644 --- a/providers/gpgpu/src/Makefile +++ b/providers/gpgpu/src/Makefile @@ -1,4 +1,5 @@ +.PHONY: all all: gpu-setup gpu-setup: - sudo ../../tools/gpu-setup \ No newline at end of file + ../../tools/gpu-setup diff --git a/providers/gpgpu/tools/gpu-setup b/providers/gpgpu/tools/gpu-setup index 37454f2d2d..ee8c838287 100755 --- a/providers/gpgpu/tools/gpu-setup +++ b/providers/gpgpu/tools/gpu-setup @@ -1,10 +1,5 @@ #!/bin/bash -if [[ $EUID -ne 0 ]]; then - echo "ERROR: This script must be run as root" - exit 1 -fi - echo "Configuring system for GPU Testing" echo "**********************************" echo "*" @@ -75,48 +70,57 @@ if [[ $? -ne 0 ]] ; then echo "ERROR: GPG key import failed. Invalid gpg key?" exit 1 fi -gpg --yes --no-default-keyring --keyring ./temp-keyring.gpg --export \ +sudo gpg --yes --no-default-keyring --keyring ./temp-keyring.gpg --export \ --output /usr/share/keyrings/cuda-archive-keyring.gpg rm ./temp-keyring.gpg rm ./temp-keyring.gpg~ rm ./cuda-archive-keyring.gpg PINFILE="cuda-$OSRELEASE.pin" -wget -O /etc/apt/preferences.d/cuda-repository-pin-600 "$REPO_URL/$PINFILE" +sudo wget -O /etc/apt/preferences.d/cuda-repository-pin-600 "$REPO_URL/$PINFILE" -cat > /etc/apt/sources.list.d/cuda-$OSRELEASE-$ARCH.list <