From aa46652fb751d2291ca04c96a7b2f5655e1724ca Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:35:15 +0530 Subject: [PATCH] SWDEV-334659 - Fixes build error because of an unused variable in the test (#2724) Change-Id: Ib1b39ee57efc49217e58332abf843b44b575d880 [ROCm/hip commit: ab6fc6dfdeca64352a72c6c1241774e036d203f2] --- .../hip/tests/catch/unit/graph/hipGraphAddHostNode.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/hip/tests/catch/unit/graph/hipGraphAddHostNode.cc b/projects/hip/tests/catch/unit/graph/hipGraphAddHostNode.cc index 596a57d755..f66e813352 100644 --- a/projects/hip/tests/catch/unit/graph/hipGraphAddHostNode.cc +++ b/projects/hip/tests/catch/unit/graph/hipGraphAddHostNode.cc @@ -56,14 +56,16 @@ static void __global__ vector_square(int *B_d, int *D_d) { } } static void vectorsquare_callback(void* ptr) { - // The callback func is not working with zero parameters - // Temporary fix for adding the below 2 lines and ticket - // has been raised for the same. + // The callback func is hipHostFn_t which is + // of type void (*)(void*). This test is designed to + // work with global variables, hence the workaround to + // print this *ptr value to avoid type mismatch errors. int *A = reinterpret_cast(ptr); - A++; + for (int i = 0; i < SIZE; i++) { if (D_h[i] != B_h[i] * B_h[i]) { INFO("Validation failed " << D_h[i] << B_h[i]); + INFO("Ignore this garbage value" << *A); REQUIRE(false); } }