EXSWHTEC-384 - Coverage Tool and Test Plan update #455
Change-Id: Idf52308186a73ae1c4d815eb59f20ea7da99c964
[ROCm/hip-tests commit: dc78fafa49]
Tento commit je obsažen v:
+1
-1
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip/hip_cooperative_groups.h>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup coalesced_group thread_block_tile
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <dlfcn.h>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
/**
|
||||
* @addtogroup hipLaunchKernelGGL hipLaunchCooperativeKernel
|
||||
* @{
|
||||
|
||||
@@ -17,7 +17,7 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <dlfcn.h>
|
||||
#include <vector>
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
constexpr size_t buffer_size = (1024*1024);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* */
|
||||
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include "hipMalloc.h"
|
||||
/**
|
||||
* @addtogroup hipMalloc hipMalloc
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* */
|
||||
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
extern "C" {
|
||||
#include "LaunchKernel.h"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#include "graph_dependency_common.hh"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#define CODEOBJ_FILE "add_Kernel.code"
|
||||
#define KERNEL_NAME "Add"
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#include "graph_dependency_common.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#include "graph_dependency_common.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#include "graph_dependency_common.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#include "graph_dependency_common.hh"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#include "graph_dependency_common.hh"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#include "graph_dependency_common.hh"
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ THE SOFTWARE.
|
||||
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
#include "stream_capture_common.hh" // NOLINT
|
||||
|
||||
#include "stream_capture_common.hh" // NOLINT
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#define LEN (16 * 1024)
|
||||
#define SIZE (LEN * sizeof(float))
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include "hip/hip_ext.h"
|
||||
|
||||
static unsigned threadsPerBlock = 256;
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
static unsigned threadsPerBlock = 256;
|
||||
static unsigned blocksPerCU = 6;
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include <hip/math_functions.h>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||
|
||||
@@ -20,7 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
class HipFunctorTests {
|
||||
public:
|
||||
|
||||
@@ -17,7 +17,7 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include <cstring>
|
||||
#include "../kernel/printf_common.h"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#define LEN 512
|
||||
#define SIZE 2048
|
||||
|
||||
@@ -17,7 +17,7 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#define LEN 512
|
||||
#define SIZE 2048
|
||||
|
||||
@@ -17,7 +17,7 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#define LEN8 8 * 4
|
||||
#define LEN9 9 * 4
|
||||
|
||||
@@ -17,7 +17,7 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
constexpr size_t N = 1024;
|
||||
int p_blockSize = 256;
|
||||
|
||||
@@ -32,7 +32,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_helper.hh>
|
||||
#include <hip_test_process.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include <utils.hh>
|
||||
|
||||
#define OFFSET 128
|
||||
|
||||
@@ -30,7 +30,7 @@ Following scenarios are verified for hipPointerGetAttributes API
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "hip/hip_ext.h"
|
||||
|
||||
@@ -23,7 +23,7 @@ THE SOFTWARE.
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include <hip_test_process.hh>
|
||||
#include <string>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup hipDeviceGetP2PAttribute hipDeviceGetP2PAttribute
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_process.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup printf printf
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
// Kernel Function
|
||||
__global__ void run_printf(int *count) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
#define ITER_COUNT 61681
|
||||
#define KERNEL_ITERATIONS 15
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_process.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup printf
|
||||
|
||||
@@ -20,6 +20,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_kernels.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_checkers.hh>
|
||||
|
||||
#define NUMBER_OF_THREADS 10
|
||||
static bool thread_results[NUMBER_OF_THREADS];
|
||||
|
||||
|
||||
@@ -731,3 +731,9 @@ Device float16 functions [
|
||||
__hisnan2
|
||||
__hneg2
|
||||
]
|
||||
|
||||
OpenGL Interop [
|
||||
hipGLGetDevices
|
||||
hipGraphicsGLRegisterBuffer
|
||||
hipGraphicsGLRegisterImage
|
||||
]
|
||||
@@ -47,7 +47,8 @@ void findAPICallInFile(HipAPI& hip_api, std::string test_module_file) {
|
||||
std::string api_member{"." + hip_api.getName() + "("};
|
||||
std::string api_newline{" " + hip_api.getName() + "("};
|
||||
std::string api_templated{" " + hip_api.getName() + "<"};
|
||||
std::string api_kernel_def_macro{"_KERNEL_DEF(" + hip_api.getName() + ")"};
|
||||
std::string api_kernel_def_macro{"_KERNEL_DEF(" + hip_api.getName()};
|
||||
std::string api_test_def_macro{"_TEST_DEF(" + hip_api.getName()};
|
||||
|
||||
std::string api_restriction{hip_api.getFileRestriction()};
|
||||
bool found_restriction{false};
|
||||
@@ -68,7 +69,8 @@ void findAPICallInFile(HipAPI& hip_api, std::string test_module_file) {
|
||||
(line.find(api_newline) != std::string::npos) ||
|
||||
(line.find(hip_api.getName() + "(") == 0) ||
|
||||
(line.find(api_templated) != std::string::npos) ||
|
||||
(line.find(api_kernel_def_macro) != std::string::npos)) {
|
||||
(line.find(api_kernel_def_macro) != std::string::npos) ||
|
||||
(line.find(api_test_def_macro) != std::string::npos)) {
|
||||
if (api_restriction == "" || found_restriction) {
|
||||
hip_api.addFileOccurrence(FileOccurrence(test_module_file, line_number));
|
||||
}
|
||||
@@ -199,6 +201,7 @@ std::vector<HipAPI> extractHipAPIs(std::string& hip_api_header_file,
|
||||
of code shall not be considered.
|
||||
*/
|
||||
std::string hip_api_prefix{"hip"};
|
||||
std::string hip_api_prefix_builtin{"__hip"};
|
||||
std::string group_definition{"@defgroup"};
|
||||
std::string add_group_definition{"@addtogroup"};
|
||||
std::string start_of_api_groups{"HIP API"};
|
||||
@@ -289,7 +292,11 @@ std::vector<HipAPI> extractHipAPIs(std::string& hip_api_header_file,
|
||||
Remove all spaces if they exist in the parsed string, e.g.,
|
||||
hipError_t hipDeviceSetLimit ( enum hipLimit_t limit, size_t value );.
|
||||
*/
|
||||
std::string api_name{api_name_no_brackets.substr(api_name_no_brackets.rfind(hip_api_prefix))};
|
||||
auto api_name_pos = api_name_no_brackets.rfind(hip_api_prefix_builtin);
|
||||
if (api_name_pos == std::string::npos) {
|
||||
api_name_pos = api_name_no_brackets.rfind(hip_api_prefix);
|
||||
}
|
||||
std::string api_name{api_name_no_brackets.substr(api_name_pos)};
|
||||
api_name.erase(std::remove(api_name.begin(), api_name.end(), ' '), api_name.end());
|
||||
|
||||
if (!api_group_names_tracker.empty()) {
|
||||
|
||||
@@ -47,6 +47,7 @@ int main(int argc, char** argv) {
|
||||
std::cout << "Number of detected HIP APIs from " << hip_api_header_file << ": " << hip_apis.size()
|
||||
<< std::endl;
|
||||
|
||||
api_group_names.push_back("Runtime Compilation");
|
||||
std::vector<HipAPI> hip_rtc_apis{extractHipAPIs(hip_rtc_header_file, api_group_names, true)};
|
||||
std::cout << "Number of detected HIP APIs from " << hip_rtc_header_file << ": "
|
||||
<< hip_rtc_apis.size() << std::endl;
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele