SWDEV-355608 - deprecate/cleanup hipcc link flags (#3128)

- deprecate -use-staticlib, -use-sharedlib which no longer provide any
functional values
- use --hip-link instead of specifying the HIP runtime by name when
linking
- fix linker option bug in HIT test's cmake
- update build options for unit tests requiring pthread or rt

Change-Id: Ib49978773c80fb40c71dc52b050ce921943ee3e4

[ROCm/hip commit: a388eb1e6f]
This commit is contained in:
Siu Chi Chan
2023-01-24 06:42:52 +00:00
zatwierdzone przez GitHub
rodzic 13d47efdc7
commit 366445410e
42 zmienionych plików z 93 dodań i 72 usunięć
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -16,7 +16,7 @@ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/* HIT_START
* BUILD: %t %s test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s test_common.cpp LINK_OPTIONS -lpthread NVCC_OPTIONS -std=c++11
* TEST: %t
* HIT_END
*/
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../test_common.cpp
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS -lrt
* TEST: %t
* HIT_END
*/
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../test_common.cpp
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS -lrt
* TEST: %t --N 4
* HIT_END
*/
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp
* BUILD: %t %s ../../test_common.cpp LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp
* BUILD: %t %s ../../test_common.cpp LINK_OPTIONS -lrt -lpthread
* TEST: %t
* HIT_END
*/
@@ -58,7 +58,7 @@ Testcase Scenarios :
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 LINK_OPTIONS -lpthread
* TEST_NAMED: %t hipMalloc_ArgValidation --tests 1
* TEST_NAMED: %t hipMalloc_LoopRegression_AllocFreeCycle --tests 2
* TEST_NAMED: %t hipMalloc_LoopRegression_AllocPool --tests 3
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST_NAMED: %t hipMemcpy-modes --tests 0x1
* TEST_NAMED: %t hipMemcpy-size --tests 0x6
* TEST_NAMED: %t hipMemcpy-dev-offsets --tests 0x10
@@ -24,7 +24,7 @@ THE SOFTWARE.
// of 8 hipmemcpy apis
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 LINK_OPTIONS -lpthread
* TEST_NAMED: %t hipMemcpyNegativeMThrdMSize_Negative_tests --tests 1
* TEST_NAMED: %t hipMemcpyNegativeMThrdMSize_MultiThread_tests --tests 2
* TEST_NAMED: %t hipMemcpyNegativeMThrdMSize_MultiSize_singleType --tests 3 --memcpyPeersOnly 0 --testAllTypes 0
@@ -24,7 +24,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -24,7 +24,7 @@
//
/* HIT_START
* BUILD: %t %s ../../test_common.cpp
* BUILD: %t %s ../../test_common.cpp LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -34,7 +34,7 @@ Testcase Scenarios :
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 LINK_OPTIONS -lpthread
* TEST: %t --tests 1
* HIT_END
*/
@@ -22,7 +22,7 @@
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp
* BUILD: %t %s ../../test_common.cpp LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -21,7 +21,7 @@
// and also launch hipMemcpyAsync() api on the same stream. This test case is simulate the scenario
// reported in SWDEV-181598.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -21,7 +21,7 @@
// and also launch hipMemcpyAsync() api. This test case is simulate the scenario
// reported in SWDEV-181598.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp
* BUILD: %t %s ../../test_common.cpp LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -19,7 +19,7 @@ THE SOFTWARE.
/* HIT_START
* BUILD_CMD: empty_kernel.code %hc --genco %S/empty_kernel.cpp -o empty_kernel.code
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -23,7 +23,7 @@ THE SOFTWARE.
/* Tests 6 and 7 are skipped for CUDA 11.2 due to cuda runtime issues */
/* HIT_START
* BUILD_CMD: tex2d_kernel.code %hc --genco %S/tex2d_kernel.cpp -o tex2d_kernel.code
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t --tests 0x01
* TEST: %t --tests 0x02
* TEST: %t --tests 0x03
@@ -1,5 +1,5 @@
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST_NAMED: %t hipMultiThreadDevice-serial --tests 0x1
* TEST_NAMED: %t hipMultiThreadDevice-pyramid --tests 0x4
* TEST_NAMED: %t hipMultiThreadDevice-nearzero --tests 0x10
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD_CMD: %t %hc %S/%s -o %T/%t %S/../../test_common.cpp -I %S/../../ -L%rocm-path/rocm_smi/lib -lrocm_smi64 -ldl EXCLUDE_HIP_PLATFORM nvidia
* BUILD_CMD: %t %hc %S/%s -o %T/%t %S/../../test_common.cpp -I %S/../../ -L%rocm-path/rocm_smi/lib -lrocm_smi64 -lpthread -ldl EXCLUDE_HIP_PLATFORM nvidia
* TEST: %t --tests 0x1
* TEST: %t --tests 0x2
* TEST: %t --tests 0x3
@@ -21,7 +21,7 @@
// kernel. Verify that all the kernels queued are executed before the callback.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -22,7 +22,7 @@ THE SOFTWARE.
// This test case is disabled currently.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -11,7 +11,7 @@
#include "test_common.h"
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -39,7 +39,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/
@@ -19,7 +19,7 @@ THE SOFTWARE.
// Simple test for Fine Grained CPU-GPU coherency.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp HIPCC_OPTIONS -std=c++11 -lpthread EXCLUDE_HIP_PLATFORM nvidia
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia LINK_OPTIONS -lpthread
* TEST: %t
* HIT_END
*/