Make directed_test support static libs
1.Make directed_test apps linked against static libs
of hip, rocclr, rocr, roct and amd_comgr.
2.Remove custom_target amdhip64_static_combiner.
3.Support EXCLUDE_HIP_LIB_TYPE <static|shared>.
4.Simplify argument list parsing.
5.Install rocclr when rocm is installed.
6.Fix some original small bugs.
Revert "Revert "Make directed_test support static libs""
This reverts commit 5b7533e49f.
Change-Id: I918eeae94487e5e2ff5bfde083667ac65fb6e702
This commit is contained in:
+10
-6
@@ -26,7 +26,7 @@ Copy this to a new test name and modify it.
|
||||
|
||||
### HIP Integrated Tester (HIT)
|
||||
|
||||
The HIT framework sutomatically finds and adds test cases to the CMAKE testing environment. It achives this by parsing all files in the tests/src folder.
|
||||
The HIT framework automatically finds and adds test cases to the CMAKE testing environment. It achives this by parsing all files in the tests/src folder.
|
||||
The parser looks for a code block similar to the one below.
|
||||
```
|
||||
/* HIT_START
|
||||
@@ -46,8 +46,8 @@ In the above, BUILD commands provide instructions on how to build the test case
|
||||
#### BUILD command
|
||||
|
||||
The supported syntax for the BUILD command is:
|
||||
<<<<<<< HEAD
|
||||
BUILD: %t %s HIPCC_OPTIONS <hipcc_specific_options> HCC_OPTIONS <hcc_specific_options> CLANG_OPTIONS <clang_specific_options> NVCC_OPTIONS <nvcc_specific_options> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> DEPENDS <dependencies>
|
||||
```
|
||||
BUILD: %t %s HIPCC_OPTIONS <hipcc_specific_options> HCC_OPTIONS <hcc_specific_options> CLANG_OPTIONS <clang_specific_options> NVCC_OPTIONS <nvcc_specific_options> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> DEPENDS EXCLUDE_HIP_LIB_TYPE <static|shared> <dependencies>
|
||||
```
|
||||
%s: refers to current source file name. Additional source files needed for the test can be specified by name (including relative path).
|
||||
%t: refers to target executable named derived by removing the extension from the current source file. Alternatively a target executable name can be specified.
|
||||
@@ -59,6 +59,7 @@ EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from amd, nvidia o
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from hcc or rocclr runtime.
|
||||
EXCLUDE_HIP_COMPILER: This can be used to exclude a test case from hcc or clang compiler.
|
||||
EXCLUDE_HIP_RUNTIME AND EXCLUDE_HIP_COMPILER: when both options are specified it excludes test case from particular runtime and compiler.
|
||||
EXCLUDE_HIP_LIB_TYPE: This can be used to exclude a test case from static or shared libs.
|
||||
DEPENDS: This can be used to specify dependencies that need to be built before building the current target.
|
||||
|
||||
|
||||
@@ -66,7 +67,7 @@ DEPENDS: This can be used to specify dependencies that need to be built before b
|
||||
|
||||
The supported syntax for the BUILD_CMD command is:
|
||||
```
|
||||
BUILD_CMD: <targetname> <build_command> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> DEPENDS <dependencies>
|
||||
BUILD_CMD: <targetname> <build_command> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> EXCLUDE_HIP_LIB_TYPE <static|shared> DEPENDS <dependencies>
|
||||
```
|
||||
%s: refers to current source file name. Additional source files needed for the test can be specified by name (including relative path).
|
||||
%t: refers to target executable named derived by removing the extension from the current source file. Alternatively a target executable name can be specified.
|
||||
@@ -80,6 +81,7 @@ EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from amd, nvidia o
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from hcc or rocclr runtime.
|
||||
EXCLUDE_HIP_COMPILER: This can be used to exclude a test case from hcc or clang compiler.
|
||||
EXCLUDE_HIP_RUNTIME AND EXCLUDE_HIP_COMPILER: when both options are specified it excludes test from particular runtime and compiler.
|
||||
EXCLUDE_HIP_LIB_TYPE: This can be used to exclude a test case from static or shared libs.
|
||||
DEPENDS: This can be used to specify dependencies that need to be built before building the current target.
|
||||
|
||||
|
||||
@@ -87,20 +89,22 @@ DEPENDS: This can be used to specify dependencies that need to be built before b
|
||||
|
||||
The supported syntax for the TEST command is:
|
||||
```
|
||||
TEST: %t <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang>
|
||||
TEST: %t <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> EXCLUDE_HIP_LIB_TYPE <static|shared>
|
||||
```
|
||||
%t: refers to target executable named derived by removing the extension from the current source file. Alternatively a target executable name can be specified.
|
||||
EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from amd, nvidia or both platforms.
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from hcc or rocclr runtime.
|
||||
EXCLUDE_HIP_COMPILER: This can be used to exclude a test case from hcc or clang compiler.
|
||||
EXCLUDE_HIP_RUNTIME AND EXCLUDE_HIP_COMPILER: when both options are specified it excludes test from particular runtime and compiler.
|
||||
EXCLUDE_HIP_LIB_TYPE: This can be used to exclude a test case from static or shared libs.
|
||||
|
||||
Note that if the test has been excluded for a specific platform/runtime/compiler in the BUILD command, it is automatically excluded from the TEST command as well for the sameplatform.
|
||||
|
||||
#### TEST_NAMED command
|
||||
|
||||
When using the TEST command, HIT will squash and append the arguments specified to the test executable name to generate the CMAKE test name. Sometimes we might want to specify a more descriptive name. The TEST_NAMED command is used for that. The supported syntax for the TEST_NAMED command is:
|
||||
```
|
||||
TEST: %t CMAKE_TEST_NAME <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang>
|
||||
TEST: %t CMAKE_TEST_NAME <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> EXCLUDE_HIP_LIB_TYPE <static|shared>
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user