Skip to content

Commit

Permalink
Fix printing of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kchristin22 committed Sep 12, 2024
1 parent fc9e33e commit 3288ffe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/CUDA/GradientKernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int main(void) {

cudaMemcpy(asquare, d_square, sizeof(int), cudaMemcpyDeviceToHost);
cudaMemcpy(a, d_a, sizeof(int), cudaMemcpyDeviceToHost);
printf("a = %d, d(a^2)/da = %d\n", *a, *asquare); // CHECK-EXEC: a = 2, a^2 = 4
printf("a = %d, d(a^2)/da = %d\n", *a, *asquare); // CHECK-EXEC: a = 2, d(a^2)/da = 4

auto error = clad::gradient(fake_kernel);
error.execute_kernel(grid, block, d_a, d_square); // CHECK-EXEC: Use execute() for non-global CUDA kernels
Expand All @@ -123,7 +123,7 @@ int main(void) {

cudaMemcpy(asquare, d_square, sizeof(int), cudaMemcpyDeviceToHost);
cudaMemcpy(a, d_a, sizeof(int), cudaMemcpyDeviceToHost);
printf("a = %d, d(a^2)/da = %d\n", *a, *asquare); // CHECK-EXEC: a = 5, a^2 = 10
printf("a = %d, d(a^2)/da = %d\n", *a, *asquare); // CHECK-EXEC: a = 5, d(a^2)/da = 10

int *dummy_in, *dummy_out;
cudaMalloc(&dummy_in, sizeof(int));
Expand Down

0 comments on commit 3288ffe

Please sign in to comment.