diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-19 14:12:32 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-19 14:12:32 -0400 |
| commit | 5e3a3b39aff457ee38906f6cc91608cecec60614 (patch) | |
| tree | 98b331b7752ddf576ee9c62ed648a86d3ea293ce /tools/cuda-ab/streams2.cu | |
| parent | aff2a72a6929b94474372f514d9979bbc5c03d1e (diff) | |
| download | open-iov-5e3a3b39aff457ee38906f6cc91608cecec60614.tar.gz open-iov-5e3a3b39aff457ee38906f6cc91608cecec60614.zip | |
cuda-ab: rebuild streams2/memcpy_roundtrip with localization; add vector_add binarybigpath
Diffstat (limited to 'tools/cuda-ab/streams2.cu')
| -rw-r--r-- | tools/cuda-ab/streams2.cu | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tools/cuda-ab/streams2.cu b/tools/cuda-ab/streams2.cu index a5dc5c2..cd6d1b8 100644 --- a/tools/cuda-ab/streams2.cu +++ b/tools/cuda-ab/streams2.cu @@ -137,11 +137,28 @@ int main(void) CHECK(cudaStreamSynchronize(s2s)); CHECK(cudaEventElapsedTime(&ms, t0, t1)); - for (i = 0; i < n; i++) { - if (h_c1[i] != h_a1[i] + h_b1[i]) - bad++; - if (h_c2[i] != (h_a2[i] + h_b2[i]) * s2) - bad++; + { + int b1 = 0, b2 = 0, f1 = -1, f2 = -1; + + for (i = 0; i < n; i++) { + if (h_c1[i] != h_a1[i] + h_b1[i]) { + b1++; + if (f1 < 0) + f1 = i; + } + if (h_c2[i] != (h_a2[i] + h_b2[i]) * s2) { + b2++; + if (f2 < 0) + f2 = i; + } + } + printf("C1 bad=%d first=%d a=%.3f %.3f %.3f b=%.3f %.3f %.3f c=%.3f %.3f %.3f\n", + b1, f1, h_a1[0], h_a1[1], h_a1[2], h_b1[0], h_b1[1], + h_b1[2], h_c1[0], h_c1[1], h_c1[2]); + printf("C2 bad=%d first=%d a=%.3f %.3f b=%.3f %.3f c=%.3f %.3f\n", + b2, f2, h_a2[0], h_a2[1], h_b2[0], h_b2[1], h_c2[0], + h_c2[1]); + bad = b1 + b2; } printf("STREAMS n=%d bad=%d\n", n, bad); |
