Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks.

This commit is contained in:
Rob Armstrong
2025-03-27 10:30:07 -07:00
parent 2cd58fbc9a
commit ceab6e8bcc
782 changed files with 107230 additions and 106548 deletions

View File

@@ -9,10 +9,10 @@ Initializing data...
Data init done.
Executing Black-Scholes GPU kernel (512 iterations)...
Options count : 8000000
Options count : 8000000
BlackScholesGPU() time : 0.048059 msec
Effective memory bandwidth: 1664.634581 GB/s
Gigaoptions per second : 166.463458
Gigaoptions per second : 166.463458
BlackScholes, Throughput = 166.4635 GOptions/s, Time = 0.00005 s, Size = 8000000 options, NumDevsUsed = 1, Workgroup = 128

View File

@@ -10,10 +10,10 @@ Initializing data...
Data init done.
Executing Black-Scholes GPU kernel (512 iterations)...
Options count : 8000000
Options count : 8000000
BlackScholesGPU() time : 0.047896 msec
Effective memory bandwidth: 1670.268678 GB/s
Gigaoptions per second : 167.026868
Gigaoptions per second : 167.026868
BlackScholes, Throughput = 167.0269 GOptions/s, Time = 0.00005 s, Size = 8000000 options, NumDevsUsed = 1, Workgroup = 128

View File

@@ -2,7 +2,7 @@ GPU Device 0: "Hopper" with compute capability 9.0
Running ........................................................
Overall Time For matrixMultiplyPerf
Overall Time For matrixMultiplyPerf
Printing Average of 20 measurements in (ms)
Size_KB UMhint UMhntAs UMeasy 0Copy MemCopy CpAsync CpHpglk CpPglAs

View File

@@ -3,7 +3,7 @@ batchCUBLAS Starting...
GPU Device 0: "Hopper" with compute capability 9.0
==== Running single kernels ====
==== Running single kernels ====
Testing sgemm
#### args: ta=0 tb=0 m=128 n=128 k=128 alpha = (0xbf800000, -1) beta= (0x40000000, 2)
@@ -16,7 +16,7 @@ Testing dgemm
^^^^ elapsed = 0.00003910 sec GFLOPS=107.269
@@@@ dgemm test OK
==== Running N=10 without streams ====
==== Running N=10 without streams ====
Testing sgemm
#### args: ta=0 tb=0 m=128 n=128 k=128 alpha = (0xbf800000, -1) beta= (0x00000000, 0)
@@ -29,7 +29,7 @@ Testing dgemm
^^^^ elapsed = 0.00144100 sec GFLOPS=29.1069
@@@@ dgemm test OK
==== Running N=10 with streams ====
==== Running N=10 with streams ====
Testing sgemm
#### args: ta=0 tb=0 m=128 n=128 k=128 alpha = (0x40000000, 2) beta= (0x40000000, 2)
@@ -42,7 +42,7 @@ Testing dgemm
^^^^ elapsed = 0.00014997 sec GFLOPS=279.685
@@@@ dgemm test OK
==== Running N=10 batched ====
==== Running N=10 batched ====
Testing sgemm
#### args: ta=0 tb=0 m=128 n=128 k=128 alpha = (0x3f800000, 1) beta= (0xbf800000, -1)

View File

@@ -6,4 +6,3 @@ Launching 228 blocks with 1024 threads...
Array size = 102400 Num of Odds = 50945 Sum of Odds = 1272565 Sum of Evens 1233938
...Done.

View File

@@ -3,10 +3,10 @@ GPU Device 0: "Hopper" with compute capability 9.0
Generating input data...
Running GPU binomial tree...
Options count : 1024
Time steps : 2048
Options count : 1024
Time steps : 2048
binomialOptionsGPU() time: 2.081000 msec
Options per second : 492071.098457
Options per second : 492071.098457
Running CPU binomial tree...
Comparing the results...
GPU binomial vs. Black-Scholes

View File

@@ -4,10 +4,10 @@ Running GPU binomial tree...
> Using CUDA Device [0]: NVIDIA H100 PCIe
> Using CUDA Device [0]: NVIDIA H100 PCIe
> GPU Device has SM 9.0 compute capability
Options count : 1024
Time steps : 2048
Options count : 1024
Time steps : 2048
binomialOptionsGPU() time: 3021.375000 msec
Options per second : 338.918539
Options per second : 338.918539
Running CPU binomial tree...
Comparing the results...
GPU binomial vs. Black-Scholes

View File

@@ -4,5 +4,5 @@ GPU Device 0: "Hopper" with compute capability 9.0
> GPU device has 114 Multi-Processors, SM 9.0 compute capabilities
GPU Final, residual = 1.600115e-06, kernel execution time = 16.014656 ms
Test Summary: Error amount = 0.000000
Test Summary: Error amount = 0.000000
&&&& conjugateGradientMultiBlockCG PASSED

View File

@@ -1,4 +1,4 @@
Starting [conjugateGradientMultiDeviceCG]...
GPU Device 0: "NVIDIA H100 PCIe" with compute capability 9.0
No two or more GPUs with same architecture capable of concurrentManagedAccess found.
No two or more GPUs with same architecture capable of concurrentManagedAccess found.
Waiving the sample

View File

@@ -1,19 +1,18 @@
conjugateGradientPrecond starting...
GPU Device 0: "Hopper" with compute capability 9.0
GPU selected Device ID = 0
GPU selected Device ID = 0
> GPU device has 114 Multi-Processors, SM 9.0 compute capabilities
laplace dimension = 128
Convergence of CG without preconditioning:
iteration = 564, residual = 9.174634e-13
Convergence Test: OK
Convergence of CG without preconditioning:
iteration = 564, residual = 9.174634e-13
Convergence Test: OK
Convergence of CG using ILU(0) preconditioning:
iteration = 188, residual = 9.084683e-13
Convergence Test: OK
Convergence of CG using ILU(0) preconditioning:
iteration = 188, residual = 9.084683e-13
Convergence Test: OK
Test Summary:
Counted total of 0 errors
qaerr1 = 0.000005 qaerr2 = 0.000003

View File

@@ -28,4 +28,3 @@ Number of Registers: 14
PTX Version: 90
Binary Version: 90
simple_kernel(const int *pIn1, const int *pIn2, int *pOut, int a) PASSED

View File

@@ -6,10 +6,10 @@ sparse matrix A is 900 x 900 with 7744 nonzeros, base=1
step 2: convert CSR(A) to dense matrix
step 3: set right hand side vector (b) to 1
step 4: prepare data on device
step 5: solve A*x = b
step 5: solve A*x = b
timing: cholesky = 0.000789 sec
step 6: evaluate residual
|b - A*x| = 1.278977E-13
|A| = 1.600000E+01
|x| = 2.357708E+01
|b - A*x|/(|A|*|x|) = 3.390413E-16
|b - A*x| = 1.278977E-13
|A| = 1.600000E+01
|x| = 2.357708E+01
|b - A*x|/(|A|*|x|) = 3.390413E-16

View File

@@ -3,47 +3,47 @@ step 1.1: read matrix market format
GPU Device 0: "Hopper" with compute capability 9.0
Using default input file [../../../../Samples/4_CUDA_Libraries/cuSolverRf/lap2D_5pt_n100.mtx]
WARNING: cusolverRf only works for base-0
WARNING: cusolverRf only works for base-0
sparse matrix A is 10000 x 10000 with 49600 nonzeros, base=0
step 1.2: set right hand side vector (b) to 1
step 2: reorder the matrix to reduce zero fill-in
Q = symrcm(A) or Q = symamd(A)
Q = symrcm(A) or Q = symamd(A)
step 3: B = Q*A*Q^T
step 4: solve A*x = b by LU(B) in cusolverSp
step 4.1: create opaque info structure
step 4.2: analyze LU(B) to know structure of Q and R, and upper bound for nnz(L+U)
step 4.3: workspace for LU(B)
step 4.4: compute Ppivot*B = L*U
step 4.5: check if the matrix is singular
step 4.6: solve A*x = b
i.e. solve B*(Qx) = Q*b
step 4.4: compute Ppivot*B = L*U
step 4.5: check if the matrix is singular
step 4.6: solve A*x = b
i.e. solve B*(Qx) = Q*b
step 4.7: evaluate residual r = b - A*x (result on CPU)
(CPU) |b - A*x| = 4.547474E-12
(CPU) |A| = 8.000000E+00
(CPU) |x| = 7.513384E+02
(CPU) |b - A*x|/(|A|*|x|) = 7.565621E-16
step 5: extract P, Q, L and U from P*B*Q^T = L*U
(CPU) |b - A*x| = 4.547474E-12
(CPU) |A| = 8.000000E+00
(CPU) |x| = 7.513384E+02
(CPU) |b - A*x|/(|A|*|x|) = 7.565621E-16
step 5: extract P, Q, L and U from P*B*Q^T = L*U
L has implicit unit diagonal
nnzL = 671550, nnzU = 681550
step 6: form P*A*Q^T = L*U
step 6.1: P = Plu*Qreroder
step 6.2: Q = Qlu*Qreorder
step 6.2: Q = Qlu*Qreorder
step 7: create cusolverRf handle
step 8: set parameters for cusolverRf
step 9: assemble P*A*Q = L*U
step 10: analyze to extract parallelism
step 11: import A to cusolverRf
step 12: refactorization
step 13: solve A*x = b
step 8: set parameters for cusolverRf
step 9: assemble P*A*Q = L*U
step 10: analyze to extract parallelism
step 11: import A to cusolverRf
step 12: refactorization
step 13: solve A*x = b
step 14: evaluate residual r = b - A*x (result on GPU)
(GPU) |b - A*x| = 4.320100E-12
(GPU) |A| = 8.000000E+00
(GPU) |x| = 7.513384E+02
(GPU) |b - A*x|/(|A|*|x|) = 7.187340E-16
===== statistics
(GPU) |b - A*x| = 4.320100E-12
(GPU) |A| = 8.000000E+00
(GPU) |x| = 7.513384E+02
(GPU) |b - A*x|/(|A|*|x|) = 7.187340E-16
===== statistics
nnz(A) = 49600, nnz(L+U) = 1353100, zero fill-in ratio = 27.280242
===== timing profile
===== timing profile
reorder A : 0.003304 sec
B = Q*A*Q^T : 0.000761 sec

View File

@@ -5,27 +5,27 @@ step 1: read matrix market format
sparse matrix A is 10000 x 10000 with 49600 nonzeros, base=1
step 2: reorder the matrix A to minimize zero fill-in
if the user choose a reordering by -P=symrcm, -P=symamd or -P=metis
step 2.1: no reordering is chosen, Q = 0:n-1
step 2.2: B = A(Q,Q)
step 3: b(j) = 1 + j/n
step 2.1: no reordering is chosen, Q = 0:n-1
step 2.2: B = A(Q,Q)
step 3: b(j) = 1 + j/n
step 4: prepare data on device
step 5: solve A*x = b on CPU
step 5: solve A*x = b on CPU
step 6: evaluate residual r = b - A*x (result on CPU)
(CPU) |b - A*x| = 5.393685E-12
(CPU) |A| = 8.000000E+00
(CPU) |x| = 1.136492E+03
(CPU) |b| = 1.999900E+00
(CPU) |b - A*x|/(|A|*|x| + |b|) = 5.931079E-16
(CPU) |b - A*x| = 5.393685E-12
(CPU) |A| = 8.000000E+00
(CPU) |x| = 1.136492E+03
(CPU) |b| = 1.999900E+00
(CPU) |b - A*x|/(|A|*|x| + |b|) = 5.931079E-16
step 7: solve A*x = b on GPU
step 8: evaluate residual r = b - A*x (result on GPU)
(GPU) |b - A*x| = 1.970424E-12
(GPU) |A| = 8.000000E+00
(GPU) |x| = 1.136492E+03
(GPU) |b| = 1.999900E+00
(GPU) |b - A*x|/(|A|*|x| + |b|) = 2.166745E-16
(GPU) |b - A*x| = 1.970424E-12
(GPU) |A| = 8.000000E+00
(GPU) |x| = 1.136492E+03
(GPU) |b| = 1.999900E+00
(GPU) |b - A*x|/(|A|*|x| + |b|) = 2.166745E-16
timing chol: CPU = 0.097956 sec , GPU = 0.103812 sec
show last 10 elements of solution vector (GPU)
consistent result for different reordering and solver
show last 10 elements of solution vector (GPU)
consistent result for different reordering and solver
x[9990] = 3.000016E+01
x[9991] = 2.807343E+01
x[9992] = 2.601354E+01

View File

@@ -6,19 +6,19 @@ sparse matrix A is 10000 x 10000 with 49600 nonzeros, base=1
step 2: create opaque info structure
step 3: analyze chol(A) to know structure of L
step 4: workspace for chol(A)
step 5: compute A = L*L^T
step 6: check if the matrix is singular
step 7: solve A*x = b
step 5: compute A = L*L^T
step 6: check if the matrix is singular
step 7: solve A*x = b
step 8: evaluate residual r = b - A*x (result on CPU)
(CPU) |b - A*x| = 3.637979E-12
(CPU) |A| = 8.000000E+00
(CPU) |x| = 7.513384E+02
(CPU) |b - A*x|/(|A|*|x|) = 6.052497E-16
(CPU) |b - A*x| = 3.637979E-12
(CPU) |A| = 8.000000E+00
(CPU) |x| = 7.513384E+02
(CPU) |b - A*x|/(|A|*|x|) = 6.052497E-16
step 9: create opaque info structure
step 10: analyze chol(A) to know structure of L
step 11: workspace for chol(A)
step 12: compute A = L*L^T
step 13: check if the matrix is singular
step 14: solve A*x = b
(GPU) |b - A*x| = 1.477929E-12
(GPU) |b - A*x|/(|A|*|x|) = 2.458827E-16
step 12: compute A = L*L^T
step 13: check if the matrix is singular
step 14: solve A*x = b
(GPU) |b - A*x| = 1.477929E-12
(GPU) |b - A*x|/(|A|*|x|) = 2.458827E-16

View File

@@ -6,20 +6,20 @@ sparse matrix A is 1024 x 1024 with 3008 nonzeros, base=1
step 2: create opaque info structure
step 3: analyze qr(A) to know structure of L
step 4: workspace for qr(A)
step 5: compute A = L*L^T
step 6: check if the matrix is singular
step 7: solve A*x = b
step 5: compute A = L*L^T
step 6: check if the matrix is singular
step 7: solve A*x = b
step 8: evaluate residual r = b - A*x (result on CPU)
(CPU) |b - A*x| = 5.329071E-15
(CPU) |A| = 6.000000E+00
(CPU) |x| = 5.000000E-01
(CPU) |b - A*x|/(|A|*|x|) = 1.776357E-15
(CPU) |b - A*x| = 5.329071E-15
(CPU) |A| = 6.000000E+00
(CPU) |x| = 5.000000E-01
(CPU) |b - A*x|/(|A|*|x|) = 1.776357E-15
step 9: create opaque info structure
step 10: analyze qr(A) to know structure of L
step 11: workspace for qr(A)
GPU buffer size = 3751424 bytes
step 12: compute A = L*L^T
step 13: check if the matrix is singular
step 14: solve A*x = b
(GPU) |b - A*x| = 4.218847E-15
(GPU) |b - A*x|/(|A|*|x|) = 1.406282E-15
step 12: compute A = L*L^T
step 13: check if the matrix is singular
step 14: solve A*x = b
(GPU) |b - A*x| = 4.218847E-15
(GPU) |b - A*x|/(|A|*|x|) = 1.406282E-15

View File

@@ -6,6 +6,6 @@ N: 4096 (16 x 256)
K: 4096 (16 x 256)
Preparing data for GPU...
Required shared memory size: 64 Kb
Computing... using high performance kernel compute_gemm
Computing... using high performance kernel compute_gemm
Time: 1.223904 ms
TFLOPS: 112.30

View File

@@ -16,9 +16,9 @@ Dumping result to teapot512_gold2.bmp... Success
Dumping result to teapot512_cuda1.bmp... Success
Dumping result to teapot512_cuda2.bmp... Success
Dumping result to teapot512_cuda_short.bmp... Success
Processing time (CUDA 1) : 0.021800 ms
Processing time (CUDA 2) : 0.003180 ms
Processing time (CUDA short): 0.033000 ms
Processing time (CUDA 1) : 0.021800 ms
Processing time (CUDA 2) : 0.003180 ms
Processing time (CUDA short): 0.033000 ms
PSNR Original <---> CPU(Gold 1) : 32.527462
PSNR Original <---> CPU(Gold 2) : 32.527309
PSNR Original <---> GPU(CUDA 1) : 32.527184

View File

@@ -1,6 +1,6 @@
./deviceQueryDrv Starting...
CUDA Device Query (Driver API) statically linked version
CUDA Device Query (Driver API) statically linked version
Detected 1 CUDA Capable device(s)
Device 0: "NVIDIA H100 PCIe"

View File

@@ -1,5 +1,5 @@
GPU Device 0: "Hopper" with compute capability 9.0
Result native operators : 644622.000000
Result intrinsics : 644622.000000
Result native operators : 644622.000000
Result intrinsics : 644622.000000
&&&& fp16ScalarProduct PASSED

View File

@@ -6,6 +6,6 @@ N: 4096 (16 x 256)
K: 4096 (16 x 256)
Preparing data for GPU...
Required shared memory size: 64 Kb
Computing... using high performance kernel compute_gemm_imma
Computing... using high performance kernel compute_gemm_imma
Time: 0.629184 ms
TOPS: 218.44

View File

@@ -13,4 +13,3 @@ Number of equations solved: 65536
Time per equation: 0.616870105266571 us
Check against Host computation...

View File

@@ -8,28 +8,28 @@ P2P Connectivity Matrix
D\D 0
0 1
Unidirectional P2P=Disabled Bandwidth Matrix (GB/s)
D\D 0
0 1628.72
D\D 0
0 1628.72
Unidirectional P2P=Enabled Bandwidth (P2P Writes) Matrix (GB/s)
D\D 0
0 1625.75
D\D 0
0 1625.75
Bidirectional P2P=Disabled Bandwidth Matrix (GB/s)
D\D 0
0 1668.11
D\D 0
0 1668.11
Bidirectional P2P=Enabled Bandwidth Matrix (GB/s)
D\D 0
0 1668.39
D\D 0
0 1668.39
P2P=Disabled Latency Matrix (us)
GPU 0
0 2.67
GPU 0
0 2.67
CPU 0
0 2.04
CPU 0
0 2.04
P2P=Enabled Latency (P2P Writes) Matrix (us)
GPU 0
0 2.68
GPU 0
0 2.68
CPU 0
0 2.02
CPU 0
0 2.02
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

View File

@@ -4,4 +4,3 @@ GPU Device 0: "Hopper" with compute capability 9.0
* Building segmentation tree... done in 24.6388 (ms)
* Dumping levels for each tree...

View File

@@ -20,5 +20,5 @@ CPU sum (naive) took 0.017810 ms
Computing Integral Image Test on size 1920 x 1080 synthetic data
---------------------------------------------------
Method: Fast Time (GPU Timer): 0.008032 ms Diff = 0
Method: Vertical Scan Time (GPU Timer): 0.068576 ms
Method: Vertical Scan Time (GPU Timer): 0.068576 ms
CheckSum: 2073600, (expect 1920x1080=2073600)

View File

@@ -1,4 +1,4 @@
Using 1 GPUs
GPU ID = 0, Name = NVIDIA H100 PCIe
GPU ID = 0, Name = NVIDIA H100 PCIe
simpleCUBLASXT test running..
simpleCUBLASXT test passed.

View File

@@ -11,4 +11,3 @@ Launching a single block with 64 threads...
Sum of all ranks 0..15 in this tiledPartition16 group is 120 (expected 120)
...Done.

View File

@@ -8,7 +8,7 @@ Num of nodes in the graph created manually = 7
[cudaGraphsManual] Host callback final reduced sum = 0.996214
[cudaGraphsManual] Host callback final reduced sum = 0.996214
[cudaGraphsManual] Host callback final reduced sum = 0.996214
Cloned Graph Output..
Cloned Graph Output..
[cudaGraphsManual] Host callback final reduced sum = 0.996214
[cudaGraphsManual] Host callback final reduced sum = 0.996214
[cudaGraphsManual] Host callback final reduced sum = 0.996214
@@ -17,7 +17,7 @@ Num of nodes in the graph created using stream capture API = 7
[cudaGraphsUsingStreamCapture] Host callback final reduced sum = 0.996214
[cudaGraphsUsingStreamCapture] Host callback final reduced sum = 0.996214
[cudaGraphsUsingStreamCapture] Host callback final reduced sum = 0.996214
Cloned Graph Output..
Cloned Graph Output..
[cudaGraphsUsingStreamCapture] Host callback final reduced sum = 0.996214
[cudaGraphsUsingStreamCapture] Host callback final reduced sum = 0.996214
[cudaGraphsUsingStreamCapture] Host callback final reduced sum = 0.996214

View File

@@ -18,7 +18,7 @@ Measured timings (throughput):
Kernel : 0.033408 ms (5021.915549 GB/s)
Theoretical limits for speedup gained from overlapped data transfers:
No overlap at all (transfer-kernel-transfer): 1.338048 ms
No overlap at all (transfer-kernel-transfer): 1.338048 ms
Compute can overlap with one transfer: 1.304640 ms
Compute can overlap with both data transfers: 0.694048 ms

View File

@@ -10,5 +10,4 @@ Computing with Host CPU...
Comparing GPU and Host CPU results...
GPU sum: 16777296.000000
CPU sum: 16777294.395033
Relative difference: 9.566307E-08
Relative difference: 9.566307E-08

View File

@@ -11,4 +11,3 @@ Potential occupancy: 100%
Elapsed time: 0.012384ms
Test PASSED

View File

@@ -1,4 +1,4 @@
GPU Device 0: "Hopper" with compute capability 9.0
CANNOT access pageable memory
systemWideAtomics completed, returned OK
systemWideAtomics completed, returned OK

View File

@@ -15,4 +15,3 @@ Device 0: "NVIDIA H100 PCIe" (Compute 9.0)
<CUDA Device=0, Context=0x564dc26bc230, Thread=1> - ThreadProc() Finished!
<CUDA Device=0, Context=0x564dc26bc230, Thread=0> - ThreadProc() Finished!

View File

@@ -2,4 +2,4 @@ GPU Device 0: "Hopper" with compute capability 9.0
CPU max matches GPU max
Warp Aggregated Atomics PASSED
Warp Aggregated Atomics PASSED