SWDEV-411064 - check if image is supported before running image specific tests
Change-Id: I62b3f7489f2f33b4b4e02f42a46e66c8940f2277
Esse commit está contido em:
1 pai
b6b43db172
commit
ee3c94faf2
52 files changed
+524
-76
No files matched your search
@@ -66,6 +66,8 @@ Testcase Scenarios : Functional
|
||||
*/
|
||||
|
||||
TEST_CASE("Unit_hipGraphAddMemcpyNode_Negative") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
constexpr int width{10}, height{10}, depth{10};
|
||||
hipArray *devArray1;
|
||||
hipChannelFormatKind formatKind = hipChannelFormatKindSigned;
|
||||
@@ -479,6 +481,8 @@ static void validateMemcpyNode1DArray(bool peerAccess = false) {
|
||||
* Tests also verify memcpy node addition with 1D, 2D and 3D objects.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphAddMemcpyNode_BasicFunctional") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
SECTION("Memcpy with 3D array on default device") {
|
||||
validateMemcpyNode3DArray();
|
||||
}
|
||||
@@ -499,6 +503,8 @@ TEST_CASE("Unit_hipGraphAddMemcpyNode_BasicFunctional") {
|
||||
* Tests also verify memcpy node addition with 1D, 2D and 3D objects.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphAddMemcpyNode_PeerAccessFunctional") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
int numDevices{}, peerAccess{};
|
||||
HIP_CHECK(hipGetDeviceCount(&numDevices));
|
||||
if (numDevices > 1) {
|
||||
|
||||
@@ -56,6 +56,8 @@ static char memSetVal = 'a';
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEMPLATE_TEST_CASE("Unit_hipGraphAddMemsetNode_Positive_Basic", "", uint8_t, uint16_t, uint32_t) {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
const auto f = [](hipMemsetParams* params) {
|
||||
hipGraph_t graph = nullptr;
|
||||
HIP_CHECK(hipGraphCreate(&graph, 0));
|
||||
@@ -129,6 +131,8 @@ TEST_CASE("Unit_hipGraphAddMemsetNode_Negative_Parameters") {
|
||||
* hipGraphAddMemcpyNode. Verify the results.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphAddMemsetNode_hipMallocPitch_2D") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
size_t width = SIZE * sizeof(char), numW{SIZE},
|
||||
numH{SIZE}, pitch_A;
|
||||
char *A_d;
|
||||
@@ -198,6 +202,8 @@ TEST_CASE("Unit_hipGraphAddMemsetNode_hipMallocPitch_2D") {
|
||||
* hipGraphAddMemcpyNode. Verify the results.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphAddMemsetNode_hipMallocPitch_1D") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
size_t width = SIZE * sizeof(char), numW{SIZE}, pitch_A;
|
||||
char *A_d;
|
||||
|
||||
@@ -260,6 +266,8 @@ TEST_CASE("Unit_hipGraphAddMemsetNode_hipMallocPitch_1D") {
|
||||
* hipGraphAddMemcpyNode. Verify the results.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphAddMemsetNode_hipMalloc3D_2D") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
size_t width = SIZE * sizeof(char);
|
||||
size_t numW = SIZE, numH = SIZE;
|
||||
|
||||
@@ -337,6 +345,8 @@ TEST_CASE("Unit_hipGraphAddMemsetNode_hipMalloc3D_2D") {
|
||||
* memory to host using hipGraphAddMemcpyNode. Verify the results.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphAddMemsetNode_hipMalloc3D_1D") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
size_t width = SIZE * sizeof(char);
|
||||
size_t numW = SIZE;
|
||||
|
||||
|
||||
@@ -482,6 +482,8 @@ static void hipGraphClone_Test_hipGraphMemcpyNodeSetParams() {
|
||||
}
|
||||
|
||||
TEST_CASE("Unit_hipGraphClone_Test_hipGraphMemcpyNodeSetParams") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
hipGraphClone_Test_hipGraphMemcpyNodeSetParams();
|
||||
}
|
||||
|
||||
@@ -1873,6 +1875,9 @@ static void hipGraphClone_Test_All_API(int dev) {
|
||||
Run all the above writen test cases for multiple GPU scenarios */
|
||||
|
||||
TEST_CASE("Unit_hipGraphClone_multi_GPU_test") {
|
||||
//FIXME: This test tests 3D as well, decouple it
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
int devcount = 0;
|
||||
HIP_CHECK(hipGetDeviceCount(&devcount));
|
||||
// If only single GPU is detected then return
|
||||
|
||||
@@ -295,6 +295,8 @@ static void hipGraphDebugDotPrint_Functional(const char* fName,
|
||||
Verify that DOT file get created or not for each flag passed. */
|
||||
|
||||
TEST_CASE("Unit_hipGraphDebugDotPrint_Functional") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
SECTION("Call with hipGraphDebugDotFlagsVerbose flag") {
|
||||
hipGraphDebugDotPrint_Functional("./graphDotFileFuncVerbose.dot",
|
||||
hipGraphDebugDotFlagsVerbose);
|
||||
|
||||
@@ -38,6 +38,8 @@ Negative-
|
||||
/* Test verifies hipGraphExecMemcpyNodeSetParams API Negative scenarios.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphExecMemcpyNodeSetParams_Negative") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
constexpr int width{10}, height{10}, depth{10};
|
||||
hipArray *devArray, *devArray2;
|
||||
hipChannelFormatKind formatKind = hipChannelFormatKindSigned;
|
||||
@@ -152,6 +154,8 @@ TEST_CASE("Unit_hipGraphExecMemcpyNodeSetParams_Negative") {
|
||||
/* Test verifies hipGraphExecMemcpyNodeSetParams API Functional scenarios.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphExecMemcpyNodeSetParams_Functional") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
constexpr int XSIZE = 1024;
|
||||
int harray1D[XSIZE]{};
|
||||
int harray1Dres[XSIZE]{};
|
||||
|
||||
@@ -184,17 +184,6 @@ TEST_CASE("Unit_hipGraphExecMemcpyNodeSetParamsFromSymbol_Negative_Parameters")
|
||||
}
|
||||
#endif
|
||||
|
||||
if (HipTest::getDeviceCount() >= 2) {
|
||||
SECTION("Changing dst allocation device") {
|
||||
HIP_CHECK(hipSetDevice(1));
|
||||
LinearAllocGuard<int> new_var(LinearAllocs::hipMalloc, sizeof(int));
|
||||
HIP_CHECK_ERROR(hipGraphExecMemcpyNodeSetParamsFromSymbol(
|
||||
graph_exec, node, new_var.ptr(), SYMBOL(int_device_var),
|
||||
sizeof(*new_var.ptr()), 0, hipMemcpyDeviceToDevice),
|
||||
hipErrorInvalidValue);
|
||||
}
|
||||
}
|
||||
|
||||
HIP_CHECK(hipGraphExecDestroy(graph_exec));
|
||||
HIP_CHECK(hipGraphDestroy(graph));
|
||||
}
|
||||
@@ -56,6 +56,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
TEMPLATE_TEST_CASE("Unit_hipGraphExecMemsetNodeSetParams_Positive_Basic", "", uint8_t, uint16_t,
|
||||
uint32_t) {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
const size_t width = GENERATE(1, 64, kPageSize / sizeof(TestType) + 1);
|
||||
|
||||
hipGraph_t graph = nullptr;
|
||||
@@ -129,6 +131,10 @@ TEMPLATE_TEST_CASE("Unit_hipGraphExecMemsetNodeSetParams_Positive_Basic", "", ui
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphExecMemsetNodeSetParams_Negative_Parameters") {
|
||||
// FIXME: this test tests 1D/2D/3D stuff in one single go, need to decouple it so that it can run
|
||||
// on devices with no image support
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
hipGraph_t graph = nullptr;
|
||||
@@ -187,6 +193,8 @@ TEST_CASE("Unit_hipGraphExecMemsetNodeSetParams_Negative_Parameters") {
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphExecMemsetNodeSetParams_Negative_Updating_Non1D_Node") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
hipGraph_t graph = nullptr;
|
||||
HIP_CHECK(hipGraphCreate(&graph, 0));
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ Functional -
|
||||
/* Test verifies hipGraphMemcpyNodeGetParams API Negative scenarios.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphMemcpyNodeGetParams_Negative") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
constexpr int width{SIZE}, height{SIZE}, depth{SIZE};
|
||||
hipArray *devArray;
|
||||
hipChannelFormatKind formatKind = hipChannelFormatKindSigned;
|
||||
@@ -145,6 +147,8 @@ static bool memcpyNodeCompare(hipMemcpy3DParms *mNode1,
|
||||
}
|
||||
|
||||
TEST_CASE("Unit_hipGraphMemcpyNodeGetParams_Functional") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
constexpr int width{SIZE}, height{SIZE}, depth{SIZE};
|
||||
hipArray *devArray;
|
||||
hipChannelFormatKind formatKind = hipChannelFormatKindSigned;
|
||||
|
||||
@@ -38,6 +38,8 @@ Functional -
|
||||
/* Test verifies hipGraphMemcpyNodeSetParams API Negative scenarios.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphMemcpyNodeSetParams_Negative") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
constexpr int width{SIZE}, height{SIZE}, depth{SIZE};
|
||||
hipArray *devArray;
|
||||
hipChannelFormatKind formatKind = hipChannelFormatKindSigned;
|
||||
@@ -94,6 +96,8 @@ TEST_CASE("Unit_hipGraphMemcpyNodeSetParams_Negative") {
|
||||
/* Test verifies hipGraphMemcpyNodeSetParams API Functional scenarios.
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphMemcpyNodeSetParams_Functional") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
constexpr int width{SIZE}, height{SIZE}, depth{SIZE};
|
||||
hipArray *devArray;
|
||||
hipChannelFormatKind formatKind = hipChannelFormatKindSigned;
|
||||
|
||||
@@ -50,6 +50,8 @@ THE SOFTWARE.
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_hipGraphMemsetNodeGetParams_Negative_Parameters") {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
LinearAllocGuard2D<int> alloc(1, 1);
|
||||
hipMemsetParams params = {};
|
||||
params.dst = alloc.ptr();
|
||||
|
||||
@@ -54,6 +54,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
TEMPLATE_TEST_CASE("Unit_hipGraphMemsetNodeSetParams_Positive_Basic", "", uint8_t, uint16_t,
|
||||
uint32_t) {
|
||||
CHECK_IMAGE_SUPPORT
|
||||
|
||||
const auto f = [](hipMemsetParams* params) {
|
||||
hipGraph_t graph = nullptr;
|
||||
HIP_CHECK(hipGraphCreate(&graph, 0));
|
||||
|
||||
Reference in new issue
Bloquear um usuário