-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update output parsing for nvidiamon * Update test files for nvidia-smi parsing Update to the new nvidia-smi pmon output fields Add a pycuda GPU burner script for tests * Parse ccpm field as string This can be a "-" instead of 0 * Update precook script and precooked ouptuts Ensure precooked values are fixed to what we want * Fix hash-bang an mode on GPU burner * Python reformatting With latest verisons of black and flake8 There is one import in gpu-burner.py that is needed (pycuda.autoinit) as it has side effects, so this is marked as excempt for flake8 --------- Co-authored-by: Johannes Elmsheuser <[email protected]> Co-authored-by: Graeme Stewart <[email protected]>
- Loading branch information
1 parent
05939d1
commit 0696123
Showing
8 changed files
with
65 additions
and
17 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 |
---|---|---|
|
@@ -254,4 +254,4 @@ to CMake using `Gperftools_ROOT_DIR`. | |
|
||
# Copyright | ||
|
||
Copyright (c) 2018-2023 CERN. | ||
Copyright (c) 2018-2024 CERN. |
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,41 @@ | ||
#! /usr/bin/env python3 | ||
# | ||
# This is a slightly adapted "hello, world" script from | ||
# pycuda, that can be used for stressing a CUDA GPU for | ||
# tests | ||
# | ||
# pycuda is required! | ||
# | ||
|
||
import pycuda.autoinit # noqa: F401 | ||
import pycuda.driver as drv | ||
import numpy | ||
from time import time | ||
|
||
from pycuda.compiler import SourceModule | ||
|
||
mod = SourceModule( | ||
""" | ||
__global__ void multiply_them(float *dest, float *a, float *b, float *c) | ||
{ | ||
const int i = threadIdx.x; | ||
dest[i] = a[i] * b[i] + c[i]; | ||
} | ||
""" | ||
) | ||
|
||
multiply_them = mod.get_function("multiply_them") | ||
|
||
a = numpy.random.randn(1024).astype(numpy.float32) | ||
b = numpy.random.randn(1024).astype(numpy.float32) | ||
c = numpy.random.randn(1024).astype(numpy.float32) | ||
|
||
dest = numpy.zeros_like(a) | ||
|
||
start = time() | ||
while time() - start < 20: | ||
multiply_them( | ||
drv.Out(dest), drv.In(a), drv.In(b), drv.In(c), block=(1024, 1, 1), grid=(1, 1) | ||
) | ||
|
||
print(dest - a * b + c) |
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 +1 @@ | ||
0 1729 G 50 50 0 0 50 python3 | ||
0 1729 G 50 50 - - - - 50 0 python3 |
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 +1 @@ | ||
0 1729 G 100 100 0 0 100 python3 | ||
0 1729 G 100 100 - - - - 100 0 python3 |
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 +1 @@ | ||
0 1729 G 20 20 0 0 20 python3 | ||
0 1729 G 20 20 - - - - 20 0 python3 |
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