SWDEV-299127 - Merge 'develop' into 'amd-staging'

Change-Id: I49fc33ad5fa03329941bda654f81ce63792a1684
Αυτή η υποβολή περιλαμβάνεται σε:
Jenkins
2022-11-14 19:10:26 -05:00
γονέας d44e4d00ba 1f06f33d7d
υποβολή 5660cae4b2
7 αρχεία άλλαξαν με 99 προσθήκες και 5 διαγραφές
@@ -3,7 +3,8 @@
[
"Unit_hipStreamPerThread_DeviceReset_1",
"Unit_hipMallocManaged_OverSubscription",
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill"
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill",
"Unit_hipInit_Negative"
]
}
@@ -10,6 +10,7 @@
"Unit_hipGetDeviceFlags_Positive_Context",
"Unit_hipIpcCloseMemHandle_Negative_Close_In_Originating_Process",
"Unit_hipIpcOpenMemHandle_Negative_Open_In_Creating_Process",
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill"
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill",
"Unit_hipInit_Negative"
]
}
@@ -89,6 +89,7 @@
"Unit_hipStreamValue_Wait64_Blocking_NoMask_Eq",
"Unit_hipStreamValue_Wait64_Blocking_NoMask_And",
"Unit_hipStreamValue_Wait64_Blocking_NoMask_Nor",
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill"
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill",
"Unit_hipInit_Negative"
]
}
@@ -55,7 +55,7 @@
"Unit_hipGraphMemcpyNodeSetParamsToSymbol_Functional",
"Unit_hipStreamWaitEvent_DifferentStreams",
"Unit_hipStreamQuery_WithFinishedWork",
"Unit_hipDeviceGetCacheConfig_Positive_Basic",
"Unit_hipDeviceGetCacheConfig_Positive_Basic",
"Unit_hipDeviceGetCacheConfig_Positive_Threaded",
"Unit_hipStreamValue_Wait32_Blocking_Mask_Gte",
"Unit_hipStreamValue_Wait32_Blocking_Mask_Eq_1",
@@ -79,6 +79,13 @@
"Unit_hipIpcOpenMemHandle_Negative_Open_In_Creating_Process",
"Unit_hipDeviceGetPCIBusId_Negative_PartialFill",
"Unit_hipDeviceGetSharedMemConfig_Positive_Basic",
"Unit_hipDeviceGetSharedMemConfig_Positive_Threaded"
"Unit_hipDeviceGetSharedMemConfig_Positive_Threaded",
"Unit_hipInit_Negative",
"Unit_hipGraphMemcpyNodeSetParams_Functional",
"Unit_hipGraphNodeGetDependentNodes_Functional",
"Unit_hipGraphNodeGetDependencies_Functional",
"Unit_hipGraphExecChildGraphNodeSetParams_ChildTopology",
"Note: needs to be enabled when streamPerThread issues are fixed",
"Unit_hipStreamSynchronize_NullStreamAndStreamPerThread"
]
}
@@ -24,6 +24,8 @@ set(TEST_SRC
hipDeviceSetLimit.cc
hipDeviceSetGetSharedMemConfig.cc
hipDeviceSetGetMemPool.cc
hipInit.cc
hipDriverGetVersion.cc
)
if(UNIX)
@@ -0,0 +1,40 @@
/*
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANNTY OF ANY KIND, EXPRESS OR
IMPLIED, INNCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANNY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER INN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*
Testcase Scenarios :
Unit_hipDriverGetVersion_Positive - Test simple reading of HIP driver version with hipDriverGetVersion api
Unit_hipDriverGetVersion_Negative - Test unsuccessful execution of hipDriverGetVersion when nullptr is set as input parameter
*/
#include <hip_test_common.hh>
TEST_CASE("Unit_hipDriverGetVersion_Positive") {
int driverVersion = -1;
HIP_CHECK(hipDriverGetVersion(&driverVersion));
REQUIRE(driverVersion > 0);
INFO("Driver version " << driverVersion);
}
TEST_CASE("Unit_hipDriverGetVersion_Negative") {
// If initialization is attempted with nullptr, error shall be reported
HIP_CHECK_ERROR(hipDriverGetVersion(nullptr), hipErrorInvalidValue);
}
@@ -0,0 +1,42 @@
/*
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANNTY OF ANY KIND, EXPRESS OR
IMPLIED, INNCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANNY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER INN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*
Testcase Scenarios :
Unit_hipInit_Positive - Test explicit HIP initalization with hipInit api
Unit_hipInit_Negative_InvalidFlag - Test unsuccessful HIP initalization with hipInit api when flag is invalid
*/
#include <hip_test_common.hh>
TEST_CASE("Unit_hipInit_Positive") {
HIP_CHECK(hipInit(0));
// Verify that HIP runtime is successfully initialized by calling a HIP API
int count = -1;
HIP_CHECK(hipGetDeviceCount(&count));
REQUIRE(count >= 0);
}
TEST_CASE("Unit_hipInit_Negative") {
// If initialization is attempted with invalid flag, error shall be reported
unsigned int invalid_flag = 1;
HIP_CHECK_ERROR(hipInit(invalid_flag), hipErrorInvalidValue);
}