diff --git a/test/conformance/adapters/hip/test_context.cpp b/test/conformance/adapters/hip/test_context.cpp index 8be836ad75..82008c305f 100644 --- a/test/conformance/adapters/hip/test_context.cpp +++ b/test/conformance/adapters/hip/test_context.cpp @@ -15,7 +15,6 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urHipContextTest); constexpr int HIP_DRIVER_API_VERSION = 4; TEST_P(urHipContextTest, ActiveContexts) { - ur_context_handle_t context = nullptr; ASSERT_SUCCESS(urContextCreate(1, &device, nullptr, &context)); ASSERT_NE(context, nullptr); @@ -29,7 +28,10 @@ TEST_P(urHipContextTest, ActiveContexts) { // check that the current context is the active HIP context hipCtx_t hipContext = nullptr; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ASSERT_SUCCESS_HIP(hipCtxGetCurrent(&hipContext)); +#pragma GCC diagnostic pop ASSERT_NE(hipContext, nullptr); ASSERT_EQ(hipContext, context->getDevice()->getNativeContext()); @@ -61,8 +63,11 @@ TEST_P(urHipContextTest, ActiveContextsThreads) { // ensure queue has the correct context ASSERT_EQ(queue->getContext(), context1); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // check that the first context is now the active HIP context ASSERT_SUCCESS_HIP(hipCtxGetCurrent(¤t)); +#pragma GCC diagnostic pop ASSERT_EQ(current, context1->getDevice()->getNativeContext()); ASSERT_SUCCESS(urQueueRelease(queue)); @@ -88,8 +93,11 @@ TEST_P(urHipContextTest, ActiveContextsThreads) { // ensure the queue has the correct context ASSERT_EQ(queue->getContext(), context2); - // check that the second context is now the active HIP context +// check that the second context is now the active HIP context +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ASSERT_SUCCESS_HIP(hipCtxGetCurrent(¤t)); +#pragma GCC diagnostic pop ASSERT_EQ(current, context2->getDevice()->getNativeContext()); ASSERT_SUCCESS(urQueueRelease(queue));