793755532f
* SWDEV-561708 Initial shared queue pool apis * Validate params; some fixes in callback function (but still needs to be checked) * Dtor cleanup * minor * Enable profiling; remove callback since aql_queue takes care of it * setPriority and setCuMask APIs updated for counted queues * Increasing step and minor version for rocprofiler * Tests for CountedQueueManager * tests * Code refactored to make pool manager part of GpuAgent only (incomplete); unique handles issue pending * Refactored code to support CQM inside GpuAgent and unique handles; multithreaded test added * Changed to ASSERT_SUCCESS macros for all tests * RIng buffer overflow test added * tests fixed; cleanup added at hsa_shutdown * priority conversion table changes * Compiler warnings fixed * Rewrite 1 test; add desc and improve SetUp() code * Improvement * Unififed getinfo for both counted and non-counted queues * Address PR feedback * Addressing feedback: memleak, data type mismatch, documentation * improve comment * format * Missing HSA_API macros for roctracer * Revert "Addressing feedback: memleak, data type mismatch, documentation" This reverts commit 5e498a55fb3640e00d06cec63dcec79293fb23de. * Improving acquire api doc * release api doc improved * error codes for release api doc
68 рядки
2.3 KiB
C++
68 рядки
2.3 KiB
C++
/*
|
|
* Copyright © Advanced Micro Devices, Inc., or its affiliates.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef ROCRTST_SUITES_FUNCTIONAL_COUNTED_QUEUES_H
|
|
#define ROCRTST_SUITES_FUNCTIONAL_COUNTED_QUEUES_H
|
|
|
|
|
|
#include "suites/test_common/test_base.h"
|
|
|
|
class CountedQueuesTest : public TestBase {
|
|
public:
|
|
explicit CountedQueuesTest();
|
|
|
|
// @Brief: Destructor for test case of CountedQueuesTest
|
|
virtual ~CountedQueuesTest();
|
|
|
|
// @Brief: Setup the environment for measurement
|
|
virtual void SetUp();
|
|
|
|
// @Brief: Core measurement execution
|
|
virtual void Run();
|
|
|
|
// @Brief: Clean up and retrive the resource
|
|
virtual void Close();
|
|
|
|
// @Brief: Display results
|
|
virtual void DisplayResults() const;
|
|
|
|
// @Brief: Display information about what this test does
|
|
virtual void DisplayTestInfo(void);
|
|
|
|
/// @brief Basic API test to acquire, query and release 1 HW queue
|
|
void CountedQueueBasicApiTest();
|
|
|
|
/// @brief This test verifies that when many queues of the same priority are created,
|
|
// they are evenly distributed across the limited set of hardware queues, reuse those
|
|
// hardware queues correctly, and report proper use-counts before and after release
|
|
void CountedQueues_SamePriority_MaxLimitTest();
|
|
|
|
// @brief Test to verify HSA status codes for incorrect arguments sent via API
|
|
void InvalidArgsTest();
|
|
|
|
// @brief Test to verify that counted queues across all priorities each reuse only
|
|
// their own priority-specific hardware queues
|
|
void CountedQueuesAllPrioritiesLimitTest();
|
|
|
|
/// @brief Test to verify hsa_amd_queue_set_priority() does not work on counted queues
|
|
void CountedQueuesSetPriorityNackTest();
|
|
|
|
/// @brief Test to verify hsa_amd_queue_cu_set_mask() does not work on counted queues
|
|
void CountedQueuesSetCUMaskNackTest();
|
|
|
|
/// @brief Test to verify that a counted queue correctly supports kernel dispatches end-to-end
|
|
void CountedQueuesDispatchTest();
|
|
|
|
/// @brief Test to verify kernel dispatches onto shared queues from multiple user apps even when they
|
|
// all share the same HW queue
|
|
void CountedQueuesMultithreadedDispatchTest();
|
|
|
|
/// @brief Test to verify ring buffer wrap around when more than queue_size number of
|
|
// AQL packets are enqueued
|
|
void CountedQueuesOverflowWrapAroundTest();
|
|
};
|
|
|
|
#endif // ROCRTST_SUITES_FUNCTIONAL_COUNTED_QUEUES_H
|