diff --git a/hipamd/tests/README.md b/hipamd/tests/README.md index a9638ba95f..b1f70048a1 100644 --- a/hipamd/tests/README.md +++ b/hipamd/tests/README.md @@ -31,17 +31,17 @@ The parser looks for a code block similar to the one below. ``` /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * //Small copy - * RUN: %t -N 10 --memsetval 0x42 + * TEST: %t -N 10 --memsetval 0x42 * // Oddball size - * RUN: %t -N 10013 --memsetval 0x5a + * TEST: %t -N 10013 --memsetval 0x5a * // Big copy - * RUN: %t -N 256M --memsetval 0xa6 + * TEST: %t -N 256M --memsetval 0xa6 * HIT_END */ ``` -In the above, BUILD commands provide instructions on how to build the test case while RUN commands provide instructions on how to execute the test case. +In the above, BUILD commands provide instructions on how to build the test case while TEST commands provide instructions on how to execute the test case. #### BUILD command @@ -57,36 +57,38 @@ NVCC_OPTIONS: All options specified after this delimiter are passed to hipcc on EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from HCC, NVCC or both platforms. -#### RUN command +#### BUILD_CMD command -The supported syntax for the RUN command is: +The supported syntax for the BUILD_CMD command is: ``` -RUN: %t EXCLUDE_HIP_PLATFORM +BUILD_CMD: EXCLUDE_HIP_PLATFORM +``` +%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. +%hc: refers to hipcc pointed to by $CMAKE_INSTALL_PREFIX/bin/hipcc. +%cc: refers to system c compiler pointed to by $CC. +%S: refers to path to current source file. +%T: refers to path to current build target. + + +#### TEST command + +The supported syntax for the TEST command is: +``` +TEST: %t EXCLUDE_HIP_PLATFORM ``` %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 HCC, NVCC or both platforms. Note that if the test has been excluded for a specific platform in the BUILD command, it is automatically excluded from the RUN command as well for the same platform. +EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from HCC, NVCC or both platforms. Note that if the test has been excluded for a specific platform in the BUILD command, it is automatically excluded from the TEST command as well for the same platform. -#### RUN_NAMED command +#### TEST_NAMED command -When using the RUN 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 RUN_NAMED command is used for that. The supported syntax for the RUN_NAMED command is: +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: ``` -RUN: %t CMAKE_TEST_NAME EXCLUDE_HIP_PLATFORM +TEST: %t CMAKE_TEST_NAME EXCLUDE_HIP_PLATFORM ``` -#### CMAKECMD command - -The supported syntax for the CMAKECMD command is: -``` -CMAKECMD: -``` -cmake_command: refers to any of the commands supported by ```cmake -E``` as specified in the [cmake documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html#command-line-tool-mode). Note that the commands are limited by the version of cmake the user is running. -options_to_cmake_command: refers to the arguments supported by the specific cmake_command. The arguments are parsed by HIT to replace special markers. The markers supported by HIT are: -%S: Refers to the source directory containing the current source file. -%B: Refers to the build directory for the current cmake project i.e. CMAKE_CURRENT_BINARY_DIR. - - ### Running tests: ``` ctest @@ -111,7 +113,7 @@ Find the test and commandline that fail: (From the build directory, perhaps hip/build) grep -IR hipMemcpy-modes -IR ../tests/ -../tests/src/runtimeApi/memory/hipMemcpy.cpp: * RUN_NAMED: %t hipMemcpy-modes --tests 0x1 +../tests/src/runtimeApi/memory/hipMemcpy.cpp: * TEST_NAMED: %t hipMemcpy-modes --tests 0x1 # Guidelines for adding new tests diff --git a/hipamd/tests/hit/HIT.cmake b/hipamd/tests/hit/HIT.cmake index 82e8508dcd..f62ba65657 100644 --- a/hipamd/tests/hit/HIT.cmake +++ b/hipamd/tests/hit/HIT.cmake @@ -55,8 +55,31 @@ macro(PARSE_BUILD_COMMAND _target _sources _hipcc_options _hcc_options _nvcc_opt endforeach() endmacro() -# Helper macro to parse RUN instructions -macro(PARSE_RUN_COMMAND _target _arguments _exclude_platforms) +# Helper macro to parse CUSTOM BUILD instructions +macro(PARSE_CUSTOMBUILD_COMMAND _target _buildcmd _exclude_platforms) + set(${_target}) + set(${_buildcmd} " ") + set(${_exclude_platforms}) + set(_target_found FALSE) + set(_exclude_platforms_found FALSE) + foreach(arg ${ARGN}) + if(NOT _target_found) + set(_target_found TRUE) + set(${_target} ${arg}) + elseif("x${arg}" STREQUAL "xEXCLUDE_HIP_PLATFORM") + set(_exclude_platforms_found TRUE) + else() + if(_exclude_platforms_found) + set(${_exclude_platforms} ${arg}) + else() + list(APPEND ${_buildcmd} ${arg}) + endif() + endif() + endforeach() +endmacro() + +# Helper macro to parse TEST instructions +macro(PARSE_TEST_COMMAND _target _arguments _exclude_platforms) set(${_target}) set(${_arguments} " ") set(${_exclude_platforms}) @@ -78,8 +101,8 @@ macro(PARSE_RUN_COMMAND _target _arguments _exclude_platforms) endforeach() endmacro() -# Helper macro to parse RUN_NAMED instructions -macro(PARSE_RUN_NAMED_COMMAND _target _testname _arguments _exclude_platforms) +# Helper macro to parse TEST_NAMED instructions +macro(PARSE_TEST_NAMED_COMMAND _target _testname _arguments _exclude_platforms) set(${_target}) set(${_arguments} " ") set(${_exclude_platforms}) @@ -155,22 +178,35 @@ macro(HIT_ADD_FILES _dir _label _parent) endif() endforeach() - # Run cmake commands - execute_process(COMMAND ${HIP_SRC_PATH}/tests/hit/parser --cmakeCMDs ${file} + # Custom build commands + execute_process(COMMAND ${HIP_SRC_PATH}/tests/hit/parser --customBuildCMDs ${file} OUTPUT_VARIABLE _contents ERROR_QUIET WORKING_DIRECTORY ${_dir} OUTPUT_STRIP_TRAILING_WHITESPACE) string(REGEX REPLACE "\n" ";" _contents "${_contents}") + string(REGEX REPLACE "%hc" "${HIP_HIPCC_EXECUTABLE}" _contents "${_contents}") + string(REGEX REPLACE "%cc" "${CC}" _contents "${_contents}") string(REGEX REPLACE "%S" ${_dir} _contents "${_contents}") - string(REGEX REPLACE "%B" ${CMAKE_CURRENT_BINARY_DIR} _contents "${_contents}") + string(REGEX REPLACE "%T" ${_label} _contents "${_contents}") foreach(_cmd ${_contents}) string(REGEX REPLACE " " ";" _cmd "${_cmd}") - execute_process(COMMAND ${CMAKE_COMMAND} -E ${_cmd}) + parse_custombuild_command(_target _buildcmd _exclude_platforms ${_cmd}) + string(REGEX REPLACE "/" "." target ${_label}/${_target}) + insert_into_map("_exclude" "${target}" "${_exclude_platforms}") + if(_exclude_platforms STREQUAL "all" OR _exclude_platforms STREQUAL ${HIP_PLATFORM}) + else() + string(REGEX REPLACE ";" " " _buildcmd "${_buildcmd}") + #string(CONCAT buildscript ${CMAKE_CURRENT_BINARY_DIR}/${target} ".sh") + #file(WRITE ${buildscript} ${_buildcmd}) + #add_custom_target(${target} COMMAND ${buildscript}) + add_custom_target(${target} COMMAND sh -c "${_buildcmd}") + add_dependencies(${_parent} ${target}) + endif() endforeach() # Add tests - execute_process(COMMAND ${HIP_SRC_PATH}/tests/hit/parser --runCMDs ${file} + execute_process(COMMAND ${HIP_SRC_PATH}/tests/hit/parser --testCMDs ${file} OUTPUT_VARIABLE _contents ERROR_QUIET WORKING_DIRECTORY ${_dir} @@ -178,7 +214,7 @@ macro(HIT_ADD_FILES _dir _label _parent) string(REGEX REPLACE "\n" ";" _contents "${_contents}") foreach(_cmd ${_contents}) string(REGEX REPLACE " " ";" _cmd "${_cmd}") - parse_run_command(_target _arguments _exclude_platforms ${_cmd}) + parse_test_command(_target _arguments _exclude_platforms ${_cmd}) string(REGEX REPLACE "/" "." target ${_label}/${_target}) read_from_map("_exclude" "${target}" _exclude_platforms_from_build) if(_exclude_platforms STREQUAL "all" OR _exclude_platforms STREQUAL ${HIP_PLATFORM} OR @@ -189,7 +225,7 @@ macro(HIT_ADD_FILES _dir _label _parent) endforeach() # Add named tests - execute_process(COMMAND ${HIP_SRC_PATH}/tests/hit/parser --runNamedCMDs ${file} + execute_process(COMMAND ${HIP_SRC_PATH}/tests/hit/parser --testNamedCMDs ${file} OUTPUT_VARIABLE _contents ERROR_QUIET WORKING_DIRECTORY ${_dir} @@ -197,7 +233,7 @@ macro(HIT_ADD_FILES _dir _label _parent) string(REGEX REPLACE "\n" ";" _contents "${_contents}") foreach(_cmd ${_contents}) string(REGEX REPLACE " " ";" _cmd "${_cmd}") - parse_run_named_command(_target _testname _arguments _exclude_platforms ${_cmd}) + parse_test_named_command(_target _testname _arguments _exclude_platforms ${_cmd}) string(REGEX REPLACE "/" "." target ${_label}/${_target}) read_from_map("_exclude" "${target}" _exclude_platforms_from_build) if(_exclude_platforms STREQUAL "all" OR _exclude_platforms STREQUAL ${HIP_PLATFORM} OR diff --git a/hipamd/tests/hit/parser b/hipamd/tests/hit/parser index f77bd524f3..8381c78a3c 100755 --- a/hipamd/tests/hit/parser +++ b/hipamd/tests/hit/parser @@ -4,49 +4,57 @@ use 5.006; use v5.10.1; use File::Basename; use File::Spec; +my $patBUILD = "^".quotemeta(" * BUILD:"); +my $patTEST = "^".quotemeta(" * TEST:"); +my $patTEST_NAMED = "^".quotemeta(" * TEST_NAMED:"); +my $patBUILD_CMD = "^".quotemeta(" * BUILD_CMD:"); + # Scan input file for HIT information sub parse_file { my $file = shift; (my $exe = $file) =~ s/\.[^.]+$//g; - my (@buildCMDs, @runCMDs, @runNamedCMDs, @cmakeCMDs); + my (@buildCMDs, @testCMDs, @testNamedCMDs, @customBuildCMDs); if (open (SOURCE, '<:encoding(UTF-8)', "$file")) { while () { my $line=$_; # Look for BUILD instructions - if ($line =~ /^ \* BUILD:/) { + if ($line =~ /$patBUILD/) { $line =~ s/^ \* BUILD: //g; # Remove " * BUILD: " $line =~ s/%s/$file/g; # Substitute %s -> filename $line =~ s/%t/$exe/g; # Substitute %t -> targetname $line =~ s/\R//g; # Remove line endings push @buildCMDs, $line; } - # Look for RUN instructions - if ($line =~ /^ \* RUN:/) { - $line =~ s/^ \* RUN: //g; # Remove " * RUN: " + # Look for TEST instructions + if ($line =~ /$patTEST/) { + $line =~ s/^ \* TEST: //g; # Remove " * TEST: " $line =~ s/%s/$file/g; # Substitute %s -> filename $line =~ s/%t/$exe/g; # Subsitute %t -> targetname $line =~ s/\R//g; # Remove line endings - push @runCMDs, $line; + push @testCMDs, $line; } - # Look for RUN_NAMED instructions - if ($line =~ /^ \* RUN_NAMED:/) { - $line =~ s/^ \* RUN_NAMED: //g; # Remove " * RUN_NAMED: " + # Look for TEST_NAMED instructions + if ($line =~ /$patTEST_NAMED/) { + $line =~ s/^ \* TEST_NAMED: //g;# Remove " * TEST_NAMED: " $line =~ s/%s/$file/g; # Substitute %s -> filename $line =~ s/%t/$exe/g; # Subsitute %t -> targetname $line =~ s/\R//g; # Remove line endings - push @runNamedCMDs, $line; + push @testNamedCMDs, $line; } - # Look for CMAKECMD instructions - if ($line =~ /^ \* CMAKECMD:/) { - $line =~ s/^ \* CMAKECMD: //g; # Remove " * CMAKECMD: " - # Substitute %S -> srcdir and %B -> builddir happens in cmake + # Look for BUILD_CMD instructions + if ($line =~ /$patBUILD_CMD/) { + $line =~ s/^ \* BUILD_CMD: //g; # Remove " * BUILD_CMD: " + $line =~ s/%s/$file/g; # Substitute %s -> filename + $line =~ s/%t/$exe/g; # Substitute %t -> targetname + # Substitute %hc -> /path/to/hipcc and %cc -> /path/to/cc happens in cmake + # Substitute %S -> src dir and %T -> target build dir happens in cmake $line =~ s/\R//g; # Remove line endings - push @cmakeCMDs, $line; + push @customBuildCMDs, $line; } } close(SOURCE); } - return (\@buildCMDs, \@runCMDs, \@runNamedCMDs, \@cmakeCMDs); + return (\@buildCMDs, \@testCMDs, \@testNamedCMDs, \@customBuildCMDs); } # Exit if no arguments specified @@ -58,52 +66,52 @@ if(scalar @ARGV == 0){ # Parse command my @options = (); my $retBuildCMDs = 0; -my $retRunCMDs = 0; -my $retRunNamedCMDs = 0; -my $retCmakeCMDs = 0; +my $retTestCMDs = 0; +my $retTestNamedCMDs = 0; +my $retCustomBuildCMDs = 0; foreach $arg (@ARGV) { - if ($retBuildCMDs or $retRunCMDs or $retRunNamedCMDs or $retCmakeCMDs) { + if ($retBuildCMDs or $retTestCMDs or $retTestNamedCMDs or $retCustomBuildCMDs) { push (@options, $arg); } if ($arg eq '--buildCMDs') { $retBuildCMDs = 1; } - if ($arg eq '--runCMDs') { - $retRunCMDs = 1; + if ($arg eq '--testCMDs') { + $retTestCMDs = 1; } - if ($arg eq '--runNamedCMDs') { - $retRunNamedCMDs = 1; + if ($arg eq '--testNamedCMDs') { + $retTestNamedCMDs = 1; } - if ($arg eq '--cmakeCMDs') { - $retCmakeCMDs = 1; + if ($arg eq '--customBuildCMDs') { + $retCustomBuildCMDs = 1; } } # Atleast one command needs to be specified -if (($retBuildCMDs eq 0) and ($retRunCMDs eq 0) and ($retRunNamedCMDs eq 0) and ($retCmakeCMDs eq 0)) { - die "Usage: $0 <--buildCMDs|--runCMDs|--runNamedCMDs|--cmakeCMDs> FILENAMEs\n"; +if (($retBuildCMDs eq 0) and ($retTestCMDs eq 0) and ($retTestNamedCMDs eq 0) and($retCustomBuildCMDs eq 0)) { + die "Usage: $0 <--buildCMDs|--testCMDs|--testNamedCMDs|--customBuildCMDs> FILENAMEs\n"; } # Iterate over input files foreach $file (@options) { # Convert absolute path to path relative to working directory my $relfile = File::Spec->abs2rel($file); - my ($buildCMDs, $runCMDs, $runNamedCMDs, $cmakeCMDs) = parse_file("$relfile"); + my ($buildCMDs, $testCMDs, $testNamedCMDs, $customBuildCMDs) = parse_file("$relfile"); if ($retBuildCMDs) { # print "BuildCMDs:\n"; print "$_\n" for @$buildCMDs; } - if ($retRunCMDs) { - # print "RunCMDs:\n"; - print "$_\n" for @$runCMDs; + if ($retTestCMDs) { + # print "TestCMDs:\n"; + print "$_\n" for @$testCMDs; } - if ($retRunNamedCMDs) { - # print "RunNamedCMDs:\n"; - print "$_\n" for @$runNamedCMDs; + if ($retTestNamedCMDs) { + # print "TestNamedCMDs:\n"; + print "$_\n" for @$testNamedCMDs; } - if ($retCmakeCMDs) { - # print "CmakeCMDs:\n"; - print "$_\n" for @$cmakeCMDs; + if ($retCustomBuildCMDs) { + # print "CustomBuildCMDs:\n"; + print "$_\n" for @$customBuildCMDs; } } diff --git a/hipamd/tests/src/Functional/device/hipFuncDeviceSynchronize.cpp b/hipamd/tests/src/Functional/device/hipFuncDeviceSynchronize.cpp index 30866da654..68af1f1736 100644 --- a/hipamd/tests/src/Functional/device/hipFuncDeviceSynchronize.cpp +++ b/hipamd/tests/src/Functional/device/hipFuncDeviceSynchronize.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/Functional/device/hipFuncGetDevice.cpp b/hipamd/tests/src/Functional/device/hipFuncGetDevice.cpp index ac2c844408..664378f233 100644 --- a/hipamd/tests/src/Functional/device/hipFuncGetDevice.cpp +++ b/hipamd/tests/src/Functional/device/hipFuncGetDevice.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/Functional/device/hipFuncSetDevice.cpp b/hipamd/tests/src/Functional/device/hipFuncSetDevice.cpp index d65f6d1676..5ee086c8ac 100644 --- a/hipamd/tests/src/Functional/device/hipFuncSetDevice.cpp +++ b/hipamd/tests/src/Functional/device/hipFuncSetDevice.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t EXCLUDE_HIP_PLATFORM + * TEST: %t EXCLUDE_HIP_PLATFORM * HIT_END */ diff --git a/hipamd/tests/src/Functional/device/hipFuncSetDeviceFlags.cpp b/hipamd/tests/src/Functional/device/hipFuncSetDeviceFlags.cpp index f889011b9f..1de5c8c42f 100644 --- a/hipamd/tests/src/Functional/device/hipFuncSetDeviceFlags.cpp +++ b/hipamd/tests/src/Functional/device/hipFuncSetDeviceFlags.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/compiler/hipClassKernel.cpp b/hipamd/tests/src/compiler/hipClassKernel.cpp index edc3808d83..8295c6c62f 100644 --- a/hipamd/tests/src/compiler/hipClassKernel.cpp +++ b/hipamd/tests/src/compiler/hipClassKernel.cpp @@ -21,7 +21,7 @@ THE SOFTWARE. */ /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ #include "hipClassKernel.h" diff --git a/hipamd/tests/src/context/hipCtx_simple.cpp b/hipamd/tests/src/context/hipCtx_simple.cpp index 9d398ddf82..8f4e1a95bd 100644 --- a/hipamd/tests/src/context/hipCtx_simple.cpp +++ b/hipamd/tests/src/context/hipCtx_simple.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/context/hipMemsetD8.cpp b/hipamd/tests/src/context/hipMemsetD8.cpp index 7ae0e06b8d..30766da776 100644 --- a/hipamd/tests/src/context/hipMemsetD8.cpp +++ b/hipamd/tests/src/context/hipMemsetD8.cpp @@ -24,13 +24,13 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * //Small copy - * RUN: %t -N 10 --memsetval 0x42 + * TEST: %t -N 10 --memsetval 0x42 * // Oddball size - * RUN: %t -N 10013 --memsetval 0x5a + * TEST: %t -N 10013 --memsetval 0x5a * // Big copy - * RUN: %t -N 256M --memsetval 0xa6 + * TEST: %t -N 256M --memsetval 0xa6 * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipAsynchronousStreams.cpp b/hipamd/tests/src/deviceLib/hipAsynchronousStreams.cpp index b5f6d25793..165c469941 100644 --- a/hipamd/tests/src/deviceLib/hipAsynchronousStreams.cpp +++ b/hipamd/tests/src/deviceLib/hipAsynchronousStreams.cpp @@ -20,7 +20,7 @@ THE SOFTWARE. /* * HIT_START * BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipDeviceMalloc.cpp b/hipamd/tests/src/deviceLib/hipDeviceMalloc.cpp index 4ec10077c5..4af7614a5c 100644 --- a/hipamd/tests/src/deviceLib/hipDeviceMalloc.cpp +++ b/hipamd/tests/src/deviceLib/hipDeviceMalloc.cpp @@ -18,7 +18,7 @@ THE SOFTWARE. */ /* HIT_START * BUILD: %t %s NVCC_OPTIONS -std=c++11 - * RUN: %t EXCLUDE_HIP_PLATFORM nvcc + * TEST: %t EXCLUDE_HIP_PLATFORM nvcc * HIT_END */ #include "test_common.h" diff --git a/hipamd/tests/src/deviceLib/hipDeviceMemcpy.cpp b/hipamd/tests/src/deviceLib/hipDeviceMemcpy.cpp index 6ebdebf6fc..7033dc2113 100644 --- a/hipamd/tests/src/deviceLib/hipDeviceMemcpy.cpp +++ b/hipamd/tests/src/deviceLib/hipDeviceMemcpy.cpp @@ -9,7 +9,7 @@ /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp b/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp index 24a8320840..84f63f9f36 100644 --- a/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp +++ b/hipamd/tests/src/deviceLib/hipDoublePrecisionIntrinsics.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp b/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp index 2620a3cbde..43691882a9 100644 --- a/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp +++ b/hipamd/tests/src/deviceLib/hipDoublePrecisionMathDevice.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp b/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp index 4bac6614f5..a3283622ff 100644 --- a/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp +++ b/hipamd/tests/src/deviceLib/hipDoublePrecisionMathHost.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipFloatMath.cpp b/hipamd/tests/src/deviceLib/hipFloatMath.cpp index ab1deb477a..2f6557cab7 100644 --- a/hipamd/tests/src/deviceLib/hipFloatMath.cpp +++ b/hipamd/tests/src/deviceLib/hipFloatMath.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipFloatMathPrecise.cpp b/hipamd/tests/src/deviceLib/hipFloatMathPrecise.cpp index 6a0c91e890..4c23255d64 100644 --- a/hipamd/tests/src/deviceLib/hipFloatMathPrecise.cpp +++ b/hipamd/tests/src/deviceLib/hipFloatMathPrecise.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp b/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp index b8fe1d27c4..42d218acc5 100644 --- a/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp +++ b/hipamd/tests/src/deviceLib/hipIntegerIntrinsics.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipMathFunctions.cpp b/hipamd/tests/src/deviceLib/hipMathFunctions.cpp index 6a3d5501e0..6553094603 100644 --- a/hipamd/tests/src/deviceLib/hipMathFunctions.cpp +++ b/hipamd/tests/src/deviceLib/hipMathFunctions.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp b/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp index ec38a5d327..760d65e555 100644 --- a/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp +++ b/hipamd/tests/src/deviceLib/hipSimpleAtomicsTest.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 --gpu-architecture=sm_60 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp b/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp index 751ea88641..96ee8d2962 100644 --- a/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp +++ b/hipamd/tests/src/deviceLib/hipSinglePrecisionIntrinsics.cpp @@ -21,7 +21,7 @@ THE SOFTWARE. */ /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp b/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp index 15c0e6c1e3..65ac046e01 100644 --- a/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp +++ b/hipamd/tests/src/deviceLib/hipSinglePrecisionMathDevice.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp b/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp index a830f45d40..1dd5737f86 100644 --- a/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp +++ b/hipamd/tests/src/deviceLib/hipSinglePrecisionMathHost.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipStdComplex.cpp b/hipamd/tests/src/deviceLib/hipStdComplex.cpp index 5d91c574ec..0a57889be6 100644 --- a/hipamd/tests/src/deviceLib/hipStdComplex.cpp +++ b/hipamd/tests/src/deviceLib/hipStdComplex.cpp @@ -18,7 +18,7 @@ THE SOFTWARE. */ /* HIT_START * BUILD: %t %s NVCC_OPTIONS -std=c++11 - * RUN: %t EXCLUDE_HIP_PLATFORM nvcc + * TEST: %t EXCLUDE_HIP_PLATFORM nvcc * HIT_END */ #include "test_common.h" diff --git a/hipamd/tests/src/deviceLib/hipTestClock.cpp b/hipamd/tests/src/deviceLib/hipTestClock.cpp index ee6dca8a42..b5bb5d9a05 100644 --- a/hipamd/tests/src/deviceLib/hipTestClock.cpp +++ b/hipamd/tests/src/deviceLib/hipTestClock.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestDevice.cpp b/hipamd/tests/src/deviceLib/hipTestDevice.cpp index 2bb5163dc9..2cab5a91d8 100644 --- a/hipamd/tests/src/deviceLib/hipTestDevice.cpp +++ b/hipamd/tests/src/deviceLib/hipTestDevice.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp b/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp index b29a9d2c20..d3dfdfc3b9 100644 --- a/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp +++ b/hipamd/tests/src/deviceLib/hipTestDeviceDouble.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * XXBUILD: %t %s ../test_common.cpp - * XXRUN: %t + * XXTEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestDeviceSymbol.cpp b/hipamd/tests/src/deviceLib/hipTestDeviceSymbol.cpp index a17dd75a31..4c2dd279ea 100644 --- a/hipamd/tests/src/deviceLib/hipTestDeviceSymbol.cpp +++ b/hipamd/tests/src/deviceLib/hipTestDeviceSymbol.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestDotFunctions.cpp b/hipamd/tests/src/deviceLib/hipTestDotFunctions.cpp index 51e005f7fb..247ee02026 100644 --- a/hipamd/tests/src/deviceLib/hipTestDotFunctions.cpp +++ b/hipamd/tests/src/deviceLib/hipTestDotFunctions.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t EXCLUDE_HIP_PLATFORM nvcc + * TEST: %t EXCLUDE_HIP_PLATFORM nvcc * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestFMA.cpp b/hipamd/tests/src/deviceLib/hipTestFMA.cpp index 2771fac585..0c22f33d9f 100644 --- a/hipamd/tests/src/deviceLib/hipTestFMA.cpp +++ b/hipamd/tests/src/deviceLib/hipTestFMA.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestHalf.cpp b/hipamd/tests/src/deviceLib/hipTestHalf.cpp index 125edd76eb..96447960c1 100644 --- a/hipamd/tests/src/deviceLib/hipTestHalf.cpp +++ b/hipamd/tests/src/deviceLib/hipTestHalf.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestIncludeMath.cpp b/hipamd/tests/src/deviceLib/hipTestIncludeMath.cpp index 92b93eda36..21141eb10a 100644 --- a/hipamd/tests/src/deviceLib/hipTestIncludeMath.cpp +++ b/hipamd/tests/src/deviceLib/hipTestIncludeMath.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestNativeHalf.cpp b/hipamd/tests/src/deviceLib/hipTestNativeHalf.cpp index 10a3f33a27..17aa54a4cf 100644 --- a/hipamd/tests/src/deviceLib/hipTestNativeHalf.cpp +++ b/hipamd/tests/src/deviceLib/hipTestNativeHalf.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipTestNew.cpp b/hipamd/tests/src/deviceLib/hipTestNew.cpp index d644f8b483..bb96da4f7b 100644 --- a/hipamd/tests/src/deviceLib/hipTestNew.cpp +++ b/hipamd/tests/src/deviceLib/hipTestNew.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipThreadFence.cpp b/hipamd/tests/src/deviceLib/hipThreadFence.cpp index 296d1519aa..f91bd7bca6 100644 --- a/hipamd/tests/src/deviceLib/hipThreadFence.cpp +++ b/hipamd/tests/src/deviceLib/hipThreadFence.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipVectorTypes.cpp b/hipamd/tests/src/deviceLib/hipVectorTypes.cpp index 44681e3b05..f05e6372d8 100644 --- a/hipamd/tests/src/deviceLib/hipVectorTypes.cpp +++ b/hipamd/tests/src/deviceLib/hipVectorTypes.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hipVectorTypesDevice.cpp b/hipamd/tests/src/deviceLib/hipVectorTypesDevice.cpp index a1db8de361..ba23931ee5 100644 --- a/hipamd/tests/src/deviceLib/hipVectorTypesDevice.cpp +++ b/hipamd/tests/src/deviceLib/hipVectorTypesDevice.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_anyall.cpp b/hipamd/tests/src/deviceLib/hip_anyall.cpp index 6815ce8cbf..c77a3cd25d 100644 --- a/hipamd/tests/src/deviceLib/hip_anyall.cpp +++ b/hipamd/tests/src/deviceLib/hip_anyall.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp NVCC_OPTIONS --Wno-deprecated-declarations - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_ballot.cpp b/hipamd/tests/src/deviceLib/hip_ballot.cpp index 92cfabbd36..324047a6b1 100644 --- a/hipamd/tests/src/deviceLib/hip_ballot.cpp +++ b/hipamd/tests/src/deviceLib/hip_ballot.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp NVCC_OPTIONS --Wno-deprecated-declarations - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_bitextract.cpp b/hipamd/tests/src/deviceLib/hip_bitextract.cpp index e791d66b34..5ee3974107 100644 --- a/hipamd/tests/src/deviceLib/hip_bitextract.cpp +++ b/hipamd/tests/src/deviceLib/hip_bitextract.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_bitinsert.cpp b/hipamd/tests/src/deviceLib/hip_bitinsert.cpp index bf1146b91a..d2c1006b5f 100644 --- a/hipamd/tests/src/deviceLib/hip_bitinsert.cpp +++ b/hipamd/tests/src/deviceLib/hip_bitinsert.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_brev.cpp b/hipamd/tests/src/deviceLib/hip_brev.cpp index cc48cca31f..363c9faac3 100644 --- a/hipamd/tests/src/deviceLib/hip_brev.cpp +++ b/hipamd/tests/src/deviceLib/hip_brev.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_clz.cpp b/hipamd/tests/src/deviceLib/hip_clz.cpp index 77ba980fe3..c9c6a5eeec 100644 --- a/hipamd/tests/src/deviceLib/hip_clz.cpp +++ b/hipamd/tests/src/deviceLib/hip_clz.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_ffs.cpp b/hipamd/tests/src/deviceLib/hip_ffs.cpp index a877b113f1..92193873b8 100644 --- a/hipamd/tests/src/deviceLib/hip_ffs.cpp +++ b/hipamd/tests/src/deviceLib/hip_ffs.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_mbcnt.cpp b/hipamd/tests/src/deviceLib/hip_mbcnt.cpp index 440e54c222..343d6069d4 100644 --- a/hipamd/tests/src/deviceLib/hip_mbcnt.cpp +++ b/hipamd/tests/src/deviceLib/hip_mbcnt.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_popc.cpp b/hipamd/tests/src/deviceLib/hip_popc.cpp index 643b1ca783..24b6f89304 100644 --- a/hipamd/tests/src/deviceLib/hip_popc.cpp +++ b/hipamd/tests/src/deviceLib/hip_popc.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_test_ldg.cpp b/hipamd/tests/src/deviceLib/hip_test_ldg.cpp index 3d623f9cc3..0f97c1f0ad 100644 --- a/hipamd/tests/src/deviceLib/hip_test_ldg.cpp +++ b/hipamd/tests/src/deviceLib/hip_test_ldg.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp NVCC_OPTIONS --gpu-architecture=sm_35 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_threadfence_system.cpp b/hipamd/tests/src/deviceLib/hip_threadfence_system.cpp index a090aa811b..24732573e6 100644 --- a/hipamd/tests/src/deviceLib/hip_threadfence_system.cpp +++ b/hipamd/tests/src/deviceLib/hip_threadfence_system.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/deviceLib/hip_trig.cpp b/hipamd/tests/src/deviceLib/hip_trig.cpp index 3519d597b3..b712636a69 100644 --- a/hipamd/tests/src/deviceLib/hip_trig.cpp +++ b/hipamd/tests/src/deviceLib/hip_trig.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/dynamicLoading/complex_loading_behavior.cpp b/hipamd/tests/src/dynamicLoading/complex_loading_behavior.cpp index b8937e0582..ebf532a5c4 100644 --- a/hipamd/tests/src/dynamicLoading/complex_loading_behavior.cpp +++ b/hipamd/tests/src/dynamicLoading/complex_loading_behavior.cpp @@ -20,13 +20,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/** - * Build the test: - * hipcc complex_loading_behavior.cpp -o libfoo.so -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY - * hipcc complex_loading_behavior.cpp -o complex_loading_behavior -ldl - * - * Run the test: - * ./complex_loading_behavior +/* HIT_START + * BUILD_CMD: libfoo %hc %S/%s -o libfoo.so -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY + * BUILD_CMD: %t %hc %S/%s -o %T/%t -ldl + * TEST: %t + * HIT_END */ #if !defined(TEST_SHARED_LIBRARY) @@ -93,8 +91,7 @@ int launch_local_kernel() { free(B_h); free(C_h); - std::cout << "local launch succedded\n"; - + std::cout << "PASSED!\n"; return 0; } diff --git a/hipamd/tests/src/hipC.c b/hipamd/tests/src/hipC.c index 1484adf379..b769dadd15 100644 --- a/hipamd/tests/src/hipC.c +++ b/hipamd/tests/src/hipC.c @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s EXCLUDE_HIP_PLATFORM all - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/hipEnvVarDriver.cpp b/hipamd/tests/src/hipEnvVarDriver.cpp index e52aa46063..5063319ead 100644 --- a/hipamd/tests/src/hipEnvVarDriver.cpp +++ b/hipamd/tests/src/hipEnvVarDriver.cpp @@ -17,7 +17,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA /* HIT_START * BUILD: %t %s test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/hipHcc.cpp b/hipamd/tests/src/hipHcc.cpp index d2a24b4d2b..e0a843d4f5 100644 --- a/hipamd/tests/src/hipHcc.cpp +++ b/hipamd/tests/src/hipHcc.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s - * RUN: %t EXCLUDE_HIP_PLATFORM all + * TEST: %t EXCLUDE_HIP_PLATFORM all * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipDynamicShared.cpp b/hipamd/tests/src/kernel/hipDynamicShared.cpp index 8edd94b48c..d9a5942085 100644 --- a/hipamd/tests/src/kernel/hipDynamicShared.cpp +++ b/hipamd/tests/src/kernel/hipDynamicShared.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM hcc - * RUN: %t EXCLUDE_HIP_PLATFORM nvcc + * TEST: %t EXCLUDE_HIP_PLATFORM nvcc * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipDynamicShared2.cpp b/hipamd/tests/src/kernel/hipDynamicShared2.cpp index 0e85c1a8c0..11f0640537 100644 --- a/hipamd/tests/src/kernel/hipDynamicShared2.cpp +++ b/hipamd/tests/src/kernel/hipDynamicShared2.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM hcc - * RUN: %t EXCLUDE_HIP_PLATFORM nvcc + * TEST: %t EXCLUDE_HIP_PLATFORM nvcc * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipEmptyKernel.cpp b/hipamd/tests/src/kernel/hipEmptyKernel.cpp index 3a42b33072..08ac5afa8d 100644 --- a/hipamd/tests/src/kernel/hipEmptyKernel.cpp +++ b/hipamd/tests/src/kernel/hipEmptyKernel.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipGridLaunch.cpp b/hipamd/tests/src/kernel/hipGridLaunch.cpp index 4f7883c656..b06fe9776e 100644 --- a/hipamd/tests/src/kernel/hipGridLaunch.cpp +++ b/hipamd/tests/src/kernel/hipGridLaunch.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipLanguageExtensions.cpp b/hipamd/tests/src/kernel/hipLanguageExtensions.cpp index f40014d399..0448ebf177 100644 --- a/hipamd/tests/src/kernel/hipLanguageExtensions.cpp +++ b/hipamd/tests/src/kernel/hipLanguageExtensions.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipLaunchParm.cpp b/hipamd/tests/src/kernel/hipLaunchParm.cpp index aa9ccdf360..772ddc1032 100644 --- a/hipamd/tests/src/kernel/hipLaunchParm.cpp +++ b/hipamd/tests/src/kernel/hipLaunchParm.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipLaunchParmFunctor.cpp b/hipamd/tests/src/kernel/hipLaunchParmFunctor.cpp index f5c30b07a4..e7cc713f28 100755 --- a/hipamd/tests/src/kernel/hipLaunchParmFunctor.cpp +++ b/hipamd/tests/src/kernel/hipLaunchParmFunctor.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -O3 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipPrintfKernel.cpp b/hipamd/tests/src/kernel/hipPrintfKernel.cpp index 9b798de895..1d4fa5fe30 100644 --- a/hipamd/tests/src/kernel/hipPrintfKernel.cpp +++ b/hipamd/tests/src/kernel/hipPrintfKernel.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipTestConstant.cpp b/hipamd/tests/src/kernel/hipTestConstant.cpp index b114f8105f..575e28966f 100644 --- a/hipamd/tests/src/kernel/hipTestConstant.cpp +++ b/hipamd/tests/src/kernel/hipTestConstant.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipTestGlobalVariable.cpp b/hipamd/tests/src/kernel/hipTestGlobalVariable.cpp index 8ab8bef9c2..05b5b746e9 100644 --- a/hipamd/tests/src/kernel/hipTestGlobalVariable.cpp +++ b/hipamd/tests/src/kernel/hipTestGlobalVariable.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipTestMallocKernel.cpp b/hipamd/tests/src/kernel/hipTestMallocKernel.cpp index d8084f8883..2a9ee9c6ad 100644 --- a/hipamd/tests/src/kernel/hipTestMallocKernel.cpp +++ b/hipamd/tests/src/kernel/hipTestMallocKernel.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM all - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/hipTestMemKernel.cpp b/hipamd/tests/src/kernel/hipTestMemKernel.cpp index 8d928d3974..fa9b9fd5e9 100644 --- a/hipamd/tests/src/kernel/hipTestMemKernel.cpp +++ b/hipamd/tests/src/kernel/hipTestMemKernel.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/kernel/inline_asm_vadd.cpp b/hipamd/tests/src/kernel/inline_asm_vadd.cpp index 1c5a77537b..32f1b54403 100644 --- a/hipamd/tests/src/kernel/inline_asm_vadd.cpp +++ b/hipamd/tests/src/kernel/inline_asm_vadd.cpp @@ -17,7 +17,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA /* HIT_START * BUILD: %t %s - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/p2p/hipPeerToPeer_simple.cpp b/hipamd/tests/src/p2p/hipPeerToPeer_simple.cpp index 3fac91bc43..205e3fcc04 100644 --- a/hipamd/tests/src/p2p/hipPeerToPeer_simple.cpp +++ b/hipamd/tests/src/p2p/hipPeerToPeer_simple.cpp @@ -24,9 +24,9 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t EXCLUDE_HIP_PLATFORM hcc - * RUN: %t --memcpyWithPeer EXCLUDE_HIP_PLATFORM hcc - * RUN: %t --mirrorPeers EXCLUDE_HIP_PLATFORM hcc + * TEST: %t EXCLUDE_HIP_PLATFORM hcc + * TEST: %t --memcpyWithPeer EXCLUDE_HIP_PLATFORM hcc + * TEST: %t --mirrorPeers EXCLUDE_HIP_PLATFORM hcc * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipChooseDevice.cpp b/hipamd/tests/src/runtimeApi/device/hipChooseDevice.cpp index 8b27f4e2af..3868f9dc9e 100644 --- a/hipamd/tests/src/runtimeApi/device/hipChooseDevice.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipChooseDevice.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipDeviceComputeCapability.cpp b/hipamd/tests/src/runtimeApi/device/hipDeviceComputeCapability.cpp index cb5d035973..794da5fbe2 100644 --- a/hipamd/tests/src/runtimeApi/device/hipDeviceComputeCapability.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipDeviceComputeCapability.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipDeviceGetByPCIBusId.cpp b/hipamd/tests/src/runtimeApi/device/hipDeviceGetByPCIBusId.cpp index ac476337fb..2e81415cbe 100644 --- a/hipamd/tests/src/runtimeApi/device/hipDeviceGetByPCIBusId.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipDeviceGetByPCIBusId.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipDeviceGetName.cpp b/hipamd/tests/src/runtimeApi/device/hipDeviceGetName.cpp index 10c31f96b6..e86fa512ca 100644 --- a/hipamd/tests/src/runtimeApi/device/hipDeviceGetName.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipDeviceGetName.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp b/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp index 56a8ceeb3c..7e6897e9f9 100644 --- a/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipDeviceSynchronize.cpp b/hipamd/tests/src/runtimeApi/device/hipDeviceSynchronize.cpp index 30866da654..68af1f1736 100644 --- a/hipamd/tests/src/runtimeApi/device/hipDeviceSynchronize.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipDeviceSynchronize.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipDeviceTotalMem.cpp b/hipamd/tests/src/runtimeApi/device/hipDeviceTotalMem.cpp index 6c3139eb6b..6fad8c1b9e 100644 --- a/hipamd/tests/src/runtimeApi/device/hipDeviceTotalMem.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipDeviceTotalMem.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipGetDevice.cpp b/hipamd/tests/src/runtimeApi/device/hipGetDevice.cpp index ac2c844408..664378f233 100644 --- a/hipamd/tests/src/runtimeApi/device/hipGetDevice.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipGetDevice.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp b/hipamd/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp index ed0b7cb715..ec82861013 100644 --- a/hipamd/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipRuntimeGetVersion.cpp b/hipamd/tests/src/runtimeApi/device/hipRuntimeGetVersion.cpp index 33a605a2a1..9cdcac5e3f 100644 --- a/hipamd/tests/src/runtimeApi/device/hipRuntimeGetVersion.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipRuntimeGetVersion.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipSetCachceConfig.cpp b/hipamd/tests/src/runtimeApi/device/hipSetCachceConfig.cpp index 350a4bec7c..39f5fb7c04 100644 --- a/hipamd/tests/src/runtimeApi/device/hipSetCachceConfig.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipSetCachceConfig.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipSetDevice.cpp b/hipamd/tests/src/runtimeApi/device/hipSetDevice.cpp index d65f6d1676..5ee086c8ac 100644 --- a/hipamd/tests/src/runtimeApi/device/hipSetDevice.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipSetDevice.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t EXCLUDE_HIP_PLATFORM + * TEST: %t EXCLUDE_HIP_PLATFORM * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/device/hipSetDeviceFlags.cpp b/hipamd/tests/src/runtimeApi/device/hipSetDeviceFlags.cpp index f889011b9f..1de5c8c42f 100644 --- a/hipamd/tests/src/runtimeApi/device/hipSetDeviceFlags.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipSetDeviceFlags.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/error/hipPeekAtLastError.cpp b/hipamd/tests/src/runtimeApi/error/hipPeekAtLastError.cpp index 2cada53d20..a1923d2715 100644 --- a/hipamd/tests/src/runtimeApi/error/hipPeekAtLastError.cpp +++ b/hipamd/tests/src/runtimeApi/error/hipPeekAtLastError.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/event/hipEventRecord.cpp b/hipamd/tests/src/runtimeApi/event/hipEventRecord.cpp index bceb770fe0..a2a9beaf79 100644 --- a/hipamd/tests/src/runtimeApi/event/hipEventRecord.cpp +++ b/hipamd/tests/src/runtimeApi/event/hipEventRecord.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t --iterations 10 + * TEST: %t --iterations 10 * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/event/record_event.cpp b/hipamd/tests/src/runtimeApi/event/record_event.cpp index 3eb54e1735..8ba9ec3a27 100644 --- a/hipamd/tests/src/runtimeApi/event/record_event.cpp +++ b/hipamd/tests/src/runtimeApi/event/record_event.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipArray.cpp b/hipamd/tests/src/runtimeApi/memory/hipArray.cpp index 0c211eecfc..c022a40079 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipArray.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipArray.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM all - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipHostGetFlags.cpp b/hipamd/tests/src/runtimeApi/memory/hipHostGetFlags.cpp index cc93273f8a..ebb323c223 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipHostGetFlags.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipHostGetFlags.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipHostMalloc.cpp b/hipamd/tests/src/runtimeApi/memory/hipHostMalloc.cpp index 6a358c4fa6..3c902b3784 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipHostMalloc.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipHostMalloc.cpp @@ -22,7 +22,7 @@ /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipHostRegister.cpp b/hipamd/tests/src/runtimeApi/memory/hipHostRegister.cpp index ff6ea963e9..7957a50142 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipHostRegister.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipHostRegister.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMallocManaged.cpp b/hipamd/tests/src/runtimeApi/memory/hipMallocManaged.cpp index bf7662f6b7..8f30195948 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMallocManaged.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMallocManaged.cpp @@ -4,7 +4,7 @@ /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t -N 256M + * TEST: %t -N 256M * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemPtrGetInfo.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemPtrGetInfo.cpp index e470b1f325..2041ea41d1 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemPtrGetInfo.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemPtrGetInfo.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp index d7acc9c177..c8ee170336 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp @@ -22,11 +22,11 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN_NAMED: %t hipMemcpy-modes --tests 0x1 - * RUN_NAMED: %t hipMemcpy-size --tests 0x6 - * RUN_NAMED: %t hipMemcpy-dev-offsets --tests 0x10 - * RUN_NAMED: %t hipMemcpy-host-offsets --tests 0x20 - * RUN_NAMED: %t hipMemcpy-multithreaded --tests 0x8 + * TEST_NAMED: %t hipMemcpy-modes --tests 0x1 + * TEST_NAMED: %t hipMemcpy-size --tests 0x6 + * TEST_NAMED: %t hipMemcpy-dev-offsets --tests 0x10 + * TEST_NAMED: %t hipMemcpy-host-offsets --tests 0x20 + * TEST_NAMED: %t hipMemcpy-multithreaded --tests 0x8 * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoD.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoD.cpp index f546ae3ffd..b68cb3f708 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoD.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoD.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoDAsync.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoDAsync.cpp index 13eca9c24d..ec3c075cdf 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoDAsync.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpyDtoDAsync.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeer.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeer.cpp index ec7f0754d7..565cef91ee 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeer.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeer.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp index 57ec2038f5..d08ff2a7e8 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp index 265a5ced22..8ce02d6164 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpy_simple.cpp @@ -22,8 +22,8 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t - * RUN_NAMED: %t hipMemcpyAsync-simple --async + * TEST: %t + * TEST_NAMED: %t hipMemcpyAsync-simple --async * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp index 8487d92877..f2f1e49c33 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp @@ -17,7 +17,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp index abff987437..7edfe16b3c 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemset.cpp @@ -24,13 +24,13 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * //Small copy - * RUN: %t -N 10 --memsetval 0x42 --memsetD32val 0x101 + * TEST: %t -N 10 --memsetval 0x42 --memsetD32val 0x101 * // Oddball size - * RUN: %t -N 10013 --memsetval 0x5a --memsetD32val 0xDEADBEEF + * TEST: %t -N 10013 --memsetval 0x5a --memsetD32val 0xDEADBEEF * // Big copy - * RUN: %t -N 256M --memsetval 0xa6 --memsetD32val 0xCAFEBABE + * TEST: %t -N 256M --memsetval 0xa6 --memsetD32val 0xCAFEBABE * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemset2D.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemset2D.cpp index 51477e9eb2..956d26a323 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemset2D.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemset2D.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemset3D.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemset3D.cpp index 151a86a6c0..11bd656761 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemset3D.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemset3D.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipRandomMemcpyAsync.cpp b/hipamd/tests/src/runtimeApi/memory/hipRandomMemcpyAsync.cpp index bb25324e5c..98d07a316c 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipRandomMemcpyAsync.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipRandomMemcpyAsync.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/hipTestMemcpyPin.cpp b/hipamd/tests/src/runtimeApi/memory/hipTestMemcpyPin.cpp index 9cb1260b67..ab4b82b17d 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipTestMemcpyPin.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipTestMemcpyPin.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/memory/p2p_copy_coherency.cpp b/hipamd/tests/src/runtimeApi/memory/p2p_copy_coherency.cpp index 57810de02f..3db855c400 100644 --- a/hipamd/tests/src/runtimeApi/memory/p2p_copy_coherency.cpp +++ b/hipamd/tests/src/runtimeApi/memory/p2p_copy_coherency.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 - * RUN: %t EXCLUDE_HIP_PLATFORM all + * TEST: %t EXCLUDE_HIP_PLATFORM all * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp b/hipamd/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp index 6af87edb25..9ed9beb078 100644 --- a/hipamd/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp +++ b/hipamd/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/module/hipFuncSetCacheConfig.cpp b/hipamd/tests/src/runtimeApi/module/hipFuncSetCacheConfig.cpp index 350a4bec7c..39f5fb7c04 100644 --- a/hipamd/tests/src/runtimeApi/module/hipFuncSetCacheConfig.cpp +++ b/hipamd/tests/src/runtimeApi/module/hipFuncSetCacheConfig.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/module/hipModule.cpp b/hipamd/tests/src/runtimeApi/module/hipModule.cpp index 22b4e7ff49..30dec3ddd8 100644 --- a/hipamd/tests/src/runtimeApi/module/hipModule.cpp +++ b/hipamd/tests/src/runtimeApi/module/hipModule.cpp @@ -17,6 +17,13 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* HIT_START + * BUILD_CMD: vcpy_kernel.code %hc --genco %S/vcpy_kernel.cpp -o vcpy_kernel.code + * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 + * TEST: %t + * HIT_END + */ + #include "hip/hip_runtime.h" #include "hip/hip_runtime_api.h" #include @@ -33,13 +40,15 @@ THE SOFTWARE. #define fileName "vcpy_kernel.code" #define kernel_name "hello_world" -__global__ void Cpy(hipLaunchParm lp, float* Ad, float* Bd) { - int tx = threadIdx.x; - Bd[tx] = Ad[tx]; -} +#define HIP_CHECK(status) \ + if (status != hipSuccess) { \ + std::cout << "Got Status: " << status << " at Line: " << __LINE__ << std::endl; \ + exit(0); \ + } int main() { - float *A, *B, *Ad, *Bd; + float *A, *B; + hipDeviceptr_t Ad, Bd; A = new float[LEN]; B = new float[LEN]; @@ -48,47 +57,46 @@ int main() { B[i] = 0.0f; } + HIPCHECK(hipInit(0)); + + hipDevice_t device; + hipCtx_t context; + HIPCHECK(hipDeviceGet(&device, 0)); + HIPCHECK(hipCtxCreate(&context, 0, device)); + HIPCHECK(hipMalloc((void**)&Ad, SIZE)); HIPCHECK(hipMalloc((void**)&Bd, SIZE)); + HIPCHECK(hipMemcpyHtoD(Ad, A, SIZE)); + HIPCHECK(hipMemcpyHtoD(Bd, B, SIZE)); - HIPCHECK(hipMemcpy(Ad, A, SIZE, hipMemcpyHostToDevice)); - HIPCHECK(hipMemcpy(Bd, B, SIZE, hipMemcpyHostToDevice)); hipModule_t Module; hipFunction_t Function; HIPCHECK(hipModuleLoad(&Module, fileName)); HIPCHECK(hipModuleGetFunction(&Function, Module, kernel_name)); - hipFunction_t f; - HIPCHECK(hipModuleGetFunction(&f, Module, kernel_name)); - assert(f == Function); + hipStream_t stream; HIPCHECK(hipStreamCreate(&stream)); - void* args[2] = {&Ad, &Bd}; - std::vector argBuffer(5); - memcpy(&argBuffer[3], &Ad, sizeof(void*)); - memcpy(&argBuffer[4], &Bd, sizeof(void*)); + struct { + void* _Ad; + void* _Bd; + } args; + args._Ad = (void*) Ad; + args._Bd = (void*) Bd; + size_t size = sizeof(args); - size_t size = argBuffer.size() * sizeof(void*); - - void* config[] = {HIP_LAUNCH_PARAM_BUFFER_POINTER, &argBuffer[0], HIP_LAUNCH_PARAM_BUFFER_SIZE, - &size, HIP_LAUNCH_PARAM_END}; - - hipModuleLaunchKernel(Function, 1, 1, 1, LEN, 1, 1, 0, stream, NULL, (void**)&config); + void* config[] = {HIP_LAUNCH_PARAM_BUFFER_POINTER, &args, HIP_LAUNCH_PARAM_BUFFER_SIZE, &size, + HIP_LAUNCH_PARAM_END}; + HIP_CHECK(hipModuleLaunchKernel(Function, 1, 1, 1, LEN, 1, 1, 0, stream, NULL, (void**)&config)); HIPCHECK(hipStreamDestroy(stream)); - HIPCHECK(hipMemcpy(B, Bd, SIZE, hipMemcpyDeviceToHost)); + HIPCHECK(hipMemcpyDtoH(B, Bd, SIZE)); for (uint32_t i = 0; i < LEN; i++) { assert(A[i] == B[i]); } - std::vector vec(1024 * 1024 * 64); - for (unsigned i = 0; i < 1024 * 1024 * 64; i++) { - hipFunction_t func; - hipModuleGetFunction(&func, Module, kernel_name); - vec[i] = func; - } + HIPCHECK(hipCtxDestroy(context)); passed(); - return 0; } diff --git a/hipamd/tests/src/runtimeApi/module/vcpy_kernel.code b/hipamd/tests/src/runtimeApi/module/vcpy_kernel.code deleted file mode 100755 index 4fd6472496..0000000000 Binary files a/hipamd/tests/src/runtimeApi/module/vcpy_kernel.code and /dev/null differ diff --git a/hipamd/tests/src/runtimeApi/module/vcpy_kernel.cpp b/hipamd/tests/src/runtimeApi/module/vcpy_kernel.cpp index c99e3df985..d7c23a8810 100644 --- a/hipamd/tests/src/runtimeApi/module/vcpy_kernel.cpp +++ b/hipamd/tests/src/runtimeApi/module/vcpy_kernel.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2015 - present 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 @@ -22,7 +22,7 @@ THE SOFTWARE. #include "hip/hip_runtime.h" -extern "C" __global__ void hello_world(hipLaunchParm lp, float* a, float* b) { - int tx = threadIdx.x; +extern "C" __global__ void hello_world(float* a, float* b) { + int tx = hipThreadIdx_x; b[tx] = a[tx]; } diff --git a/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp b/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp index 249fbeb792..af48d5a367 100644 --- a/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp +++ b/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadDevice.cpp @@ -1,8 +1,8 @@ /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN_NAMED: %t hipMultiThreadDevice-serial --tests 0x1 - * RUN_NAMED: %t hipMultiThreadDevice-pyramid --tests 0x4 - * RUN_NAMED: %t hipMultiThreadDevice-nearzero --tests 0x10 + * TEST_NAMED: %t hipMultiThreadDevice-serial --tests 0x1 + * TEST_NAMED: %t hipMultiThreadDevice-pyramid --tests 0x4 + * TEST_NAMED: %t hipMultiThreadDevice-nearzero --tests 0x10 * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp b/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp index 418a411613..bed7ba7b9f 100644 --- a/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp +++ b/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams1.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams2.cpp b/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams2.cpp index 7fadc60a05..2a0093be8e 100644 --- a/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams2.cpp +++ b/hipamd/tests/src/runtimeApi/multiThread/hipMultiThreadStreams2.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/stream/hipNullStream.cpp b/hipamd/tests/src/runtimeApi/stream/hipNullStream.cpp index bf4699ddb6..16c9b1917b 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipNullStream.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipNullStream.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/stream/hipStreamAddCallback.cpp b/hipamd/tests/src/runtimeApi/stream/hipStreamAddCallback.cpp index 37e5cba920..d94d7d82d4 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipStreamAddCallback.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipStreamAddCallback.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp b/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp index 582da67d85..ba2b140611 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/stream/hipStreamGetFlags.cpp b/hipamd/tests/src/runtimeApi/stream/hipStreamGetFlags.cpp index 19ae7c11b0..8d1129e567 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipStreamGetFlags.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipStreamGetFlags.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/stream/hipStreamL5.cpp b/hipamd/tests/src/runtimeApi/stream/hipStreamL5.cpp index 31f8d128c0..32bce643b7 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipStreamL5.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipStreamL5.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/stream/hipStreamSync2.cpp b/hipamd/tests/src/runtimeApi/stream/hipStreamSync2.cpp index cf25d0bd2b..c365dce70a 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipStreamSync2.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipStreamSync2.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp b/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp index 8dbf37186e..4ddc7b98b0 100644 --- a/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp +++ b/hipamd/tests/src/runtimeApi/stream/hipStreamWaitEvent.cpp @@ -19,7 +19,7 @@ THE SOFTWARE. /* HIT_START * ZZZBUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 - * ZZZRUN: %t + * ZZZTEST: %t * HIT_END */ diff --git a/hipamd/tests/src/runtimeApi/synchronization/copy_coherency.cpp b/hipamd/tests/src/runtimeApi/synchronization/copy_coherency.cpp index be813e1a7d..4dce05ef72 100644 --- a/hipamd/tests/src/runtimeApi/synchronization/copy_coherency.cpp +++ b/hipamd/tests/src/runtimeApi/synchronization/copy_coherency.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. // TODO - add code object support here. /* HIT_START * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/surface/hipSurfaceObj2D.cpp b/hipamd/tests/src/surface/hipSurfaceObj2D.cpp index 6f9de9c094..b6c016ecc0 100644 --- a/hipamd/tests/src/surface/hipSurfaceObj2D.cpp +++ b/hipamd/tests/src/surface/hipSurfaceObj2D.cpp @@ -1,6 +1,6 @@ /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ #include diff --git a/hipamd/tests/src/texture/hipBindTexRef1DFetch.cpp b/hipamd/tests/src/texture/hipBindTexRef1DFetch.cpp index fa63efc1bb..546e9775e8 100644 --- a/hipamd/tests/src/texture/hipBindTexRef1DFetch.cpp +++ b/hipamd/tests/src/texture/hipBindTexRef1DFetch.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/texture/hipGetChanDesc.cpp b/hipamd/tests/src/texture/hipGetChanDesc.cpp index 9034668ccf..bbdfd85392 100644 --- a/hipamd/tests/src/texture/hipGetChanDesc.cpp +++ b/hipamd/tests/src/texture/hipGetChanDesc.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/texture/hipTextureObj1DFetch.cpp b/hipamd/tests/src/texture/hipTextureObj1DFetch.cpp index faf6541ce1..206173b954 100644 --- a/hipamd/tests/src/texture/hipTextureObj1DFetch.cpp +++ b/hipamd/tests/src/texture/hipTextureObj1DFetch.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. /*HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ diff --git a/hipamd/tests/src/texture/hipTextureObj2D.cpp b/hipamd/tests/src/texture/hipTextureObj2D.cpp index e214295989..148c966e80 100644 --- a/hipamd/tests/src/texture/hipTextureObj2D.cpp +++ b/hipamd/tests/src/texture/hipTextureObj2D.cpp @@ -1,6 +1,6 @@ /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ #include diff --git a/hipamd/tests/src/texture/hipTextureRef2D.cpp b/hipamd/tests/src/texture/hipTextureRef2D.cpp index b912f789a7..2b19d1b5b3 100644 --- a/hipamd/tests/src/texture/hipTextureRef2D.cpp +++ b/hipamd/tests/src/texture/hipTextureRef2D.cpp @@ -1,6 +1,6 @@ /* HIT_START * BUILD: %t %s ../test_common.cpp - * RUN: %t + * TEST: %t * HIT_END */ #include