From cc18b95c7f01a6d3eecdc87528cdcae2b1fc79e3 Mon Sep 17 00:00:00 2001 From: "Kandula, Venkateshwar reddy" Date: Fri, 7 Mar 2025 14:43:29 -0600 Subject: [PATCH] rocprofv3-test-trace-hip-in-libraries-validate failed in PSDB (#248) * capture streams by reference * Fix sync_stream in tests/bin/vector-operations --------- Co-authored-by: Jonathan R. Madsen Co-authored-by: Bhardwaj, Gopesh --- tests/bin/vector-operations/vector-ops.cpp | 2 +- tests/lib/vector-operations/vector-ops.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bin/vector-operations/vector-ops.cpp b/tests/bin/vector-operations/vector-ops.cpp index 0db82b8b0b..a8a30bbe6b 100644 --- a/tests/bin/vector-operations/vector-ops.cpp +++ b/tests/bin/vector-operations/vector-ops.cpp @@ -152,7 +152,7 @@ run(int NUM_QUEUE, int DEVICE_ID) std::vector streams(NUM_QUEUE); - auto sync_stream = [NUM_QUEUE, streams](int q) { + auto sync_stream = [NUM_QUEUE, &streams](int q) { if(q < 0 || q >= NUM_QUEUE) throw std::runtime_error{std::string{"invalid stream id: "} + std::to_string(q)}; diff --git a/tests/lib/vector-operations/vector-ops.cpp b/tests/lib/vector-operations/vector-ops.cpp index 145b2656b2..411ab98317 100644 --- a/tests/lib/vector-operations/vector-ops.cpp +++ b/tests/lib/vector-operations/vector-ops.cpp @@ -156,7 +156,7 @@ run_vector_ops_impl(int num_queue, int device_id) std::vector streams(num_queue); - auto sync_stream = [num_queue, streams](int q) { + auto sync_stream = [num_queue, &streams](int q) { if(q < 0 || q >= num_queue) throw std::runtime_error{std::string{"invalid stream id: "} + std::to_string(q)};