/* Copyright © Advanced Micro Devices, Inc., or its affiliates. SPDX-License-Identifier: MIT */ #include #include #include #include int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); // Initialize test logging infrastructure to forward logs to std::cerr based // on the current environment HIPDNN_LOG_LEVEL value when this function is called. // NOTE: Logs are not routed to the backend by the recordingCallback returned here // which is the desired behaviour because this is a plugin unit test harness. auto recordingCallback = hipdnn_test_sdk::utilities::initializeTestLogRecordingShared(); // Initialize plugin logger with test recording callback so that plugin logs // logs are first routed to the log recorder for capture and use by the unit tests. hipdnn_plugin_sdk::logging::initializeCallbackLogging("miopen_plugin_tests", recordingCallback); // Register HipErrorHandler to check and clear HIP errors after each test testing::TestEventListeners& listeners = testing::UnitTest::GetInstance()->listeners(); listeners.Append(new hipdnn_test_sdk::utilities::HipErrorHandler); return RUN_ALL_TESTS(); }