-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional gpu tests (New) (#1359)
* Clone nvidia/cuda-samples repo * Add arm64 support to gpu-setup * Fix GPG missing key for cuda repo. Some repositories (namely 24.04) do not have the cuda-archive-keyring.gpg file. All relevant repositories have a .pub file, however. * Add some cuda-samples tests. Added matrixMulDrv, vectorAddDrv, deviceQueryDrv, simpleTextureDrv * Use uname -m instead of uname -i * Separate stress test from normal gpgpu tests * Rename gpgpu test plans * Fix new gpgpu names in gpgpu-only.pxu * Fix typos in gpgpu test-plan.pxu * Integrate gpu-setup into manage.py build call. * Verify cuda GPG key being imported. This hardcodes the current gpg key and checks its fingerprint. * Add checks for architectures. NOTE: It seems like x86_64 is the only architecture supported everywhere. Nvidia seems to support arm64 in *some* cases, but not a lot. Should we only support x86_64, then? * Build executables into `bin/` and `data/` This commit changes the gpu-setup script behaviour to build the cuda-samples and gpu-burn projects inside the `build/bin` directory, then copy them out into the `bin/` and (the necessary data files) into `data/`. For the cuda-samples executables to work, they need access to the data files, but they do not take the path to the data dir as an argument; to circumvent this limitation, I have made wrapper scripts that copy the necessary file into the temporary working directory that checkbox creates. Because of the change in build behaviour, the `gpu-setup` script now runs mostly as a regular user (to avoid permission issues when cleaning directories/builds). The expected operation now is to run `./manage.py build` instead of running the `gpu-setup.sh` script itself. This is more inline with what is done with the other providers. * Double quote to prevent globbing and word splitting * Gracefully exit on unsupported architectures. For now, we are limiting the gpgpu tests to x86_64 since nvidia only supports x86_64 consistently across distributions/releases. * Add snap build dependencies for gpgpu provider This allows the packaging to complete. The gpgpu provider still fails due to some issues with setting up the repository, but it does not prevent the packaging to complete. We may need to look into vendorizing some of the dependencies... * Remove use of relative paths in `gpu-setup`. These paths are now resolved to absolute paths to the gpgpu provider's subdirectories. I also made sure to clean up left-over data files in the wrapper scripts. * Revert "Add snap build dependencies for gpgpu provider" This reverts commit a7def84. We will revisit properly packaging the gpgpu provider at a later time.
- Loading branch information
1 parent
7ab7c0f
commit b3df727
Showing
8 changed files
with
151 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
cp -r "$PLAINBOX_PROVIDER_DATA/matrixMulDrv" ./data | ||
matrixMulDrv | ||
rm -r ./data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
cp -r "$PLAINBOX_PROVIDER_DATA/simpleTextureDrv" ./data | ||
simpleTextureDrv | ||
rm -r ./data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
cp -r "$PLAINBOX_PROVIDER_DATA/vectorAddDrv" ./data | ||
vectorAddDrv | ||
rm -r ./data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
id: gpgpu-tests | ||
id: gpgpu-stress | ||
unit: test plan | ||
_name: GPGPU Compute Testing | ||
_name: GPGPU Compute Stress Testing | ||
_description: | ||
Tests for GPGPU Computations (non-graphical) | ||
Stress Tests for GPGPU Computations (non-graphical) | ||
mandatory_include: | ||
gpgpu/gpu-burn | ||
include: | ||
|
||
id: gpgpu-automated | ||
unit: test plan | ||
_name: GPGPU Compute Automated Testing | ||
_description: | ||
Automated Tests for GPGPU Computations (non-graphical) | ||
include: | ||
gpgpu/matrix-mul-drv | ||
gpgpu/vector-add-drv | ||
gpgpu/device-query-drv | ||
gpgpu/simple-texture-drv |