Merge branch '2019-01-25-baseline' into 2019-01-25-master
This commit is contained in:
Коммит
9656c4de03
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"project_id" : "test-suite",
|
||||
"repository.callsign" : "T",
|
||||
"conduit_uri" : "https://reviews.llvm.org/"
|
||||
}
|
||||
|
|
136
CMakeLists.txt
136
CMakeLists.txt
|
@ -57,12 +57,24 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
|
|||
Please delete them.")
|
||||
endif()
|
||||
|
||||
# Sanity check SIZEOF_VOID_P. This is sometimes empty when compiler detection
|
||||
# failed, error out to avoid a mostly working but invalid setup.
|
||||
if(NOT CMAKE_SIZEOF_VOID_P)
|
||||
message(FATAL_ERROR "CMAKE_SIZEOF_VOID_P is not defined")
|
||||
endif()
|
||||
|
||||
# Remote configuration (will be set in lit.site.cfg)
|
||||
set(TEST_SUITE_REMOTE_CLIENT "ssh" CACHE STRING "Remote execution client")
|
||||
set(TEST_SUITE_REMOTE_HOST "" CACHE STRING "Remote execution host")
|
||||
set(TEST_SUITE_REMOTE_USER "" CACHE STRING "Remote execution user")
|
||||
set(TEST_SUITE_REMOTE_PORT "" CACHE STRING "Remote execution port")
|
||||
mark_as_advanced(TEST_SUITE_REMOTE_CLIENT TEST_SUITE_REMOTE_USER TEST_SUITE_REMOTE_PORT)
|
||||
mark_as_advanced(TEST_SUITE_REMOTE_CLIENT)
|
||||
|
||||
if(TEST_SUITE_REMOTE_HOST)
|
||||
add_custom_target(rsync
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/utils/rsync.sh
|
||||
${TEST_SUITE_REMOTE_HOST} ${PROJECT_BINARY_DIR}
|
||||
USES_TERMINAL
|
||||
)
|
||||
endif()
|
||||
|
||||
# Run Under configuration for RunSafely.sh (will be set in lit.site.cfg)
|
||||
set(TEST_SUITE_RUN_UNDER "" CACHE STRING "RunSafely.sh run-under (-u) parameter")
|
||||
|
@ -72,18 +84,32 @@ set(TEST_SUITE_RUN_TYPE "train" CACHE STRING
|
|||
"Type of benchmark inputs (may be test,train or ref)")
|
||||
|
||||
get_filename_component(CMAKE_C_COMPILER_DIRECTORY ${CMAKE_C_COMPILER} DIRECTORY)
|
||||
find_program(TEST_SUITE_LLVM_SIZE NAMES "llvm-size"
|
||||
HINTS ${CMAKE_C_COMPILER_DIRECTORY})
|
||||
find_program(TEST_SUITE_LLVM_PROFDATA NAMES "llvm-profdata"
|
||||
HINTS ${CMAKE_C_COMPILER_DIRECTORY})
|
||||
mark_as_advanced(TEST_SUITE_LLVM_SIZE TEST_SUITE_LLVM_PROFDATA)
|
||||
|
||||
option(TEST_SUITE_COLLECT_CODE_SIZE "Measure code size of binaries" ON)
|
||||
if(TEST_SUITE_COLLECT_CODE_SIZE)
|
||||
find_program(TEST_SUITE_LLVM_SIZE NAMES "llvm-size"
|
||||
HINTS ${CMAKE_C_COMPILER_DIRECTORY})
|
||||
mark_as_advanced(TEST_SUITE_LLVM_SIZE)
|
||||
if(TEST_SUITE_LLVM_SIZE STREQUAL "TEST_SUITE_LLVM_SIZE-NOTFOUND")
|
||||
message(FATAL_ERROR "llvm-size not found.
|
||||
Make sure it is in your path or set TEST_SUITE_COLLECT_CODE_SIZE to OFF")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Enable profile generate mode in lit. Note that this does not automatically
|
||||
# add something like -fprofile-instr-generate to the compiler flags.
|
||||
set(TEST_SUITE_PROFILE_GENERATE "FALSE" CACHE BOOL
|
||||
"Enable lit profile generate mode")
|
||||
option(TEST_SUITE_PROFILE_GENERATE "Enable lit profile generate mode" OFF)
|
||||
# Set value to python style True/False
|
||||
if(TEST_SUITE_PROFILE_GENERATE)
|
||||
find_program(TEST_SUITE_LLVM_PROFDATA NAMES "llvm-profdata"
|
||||
HINTS ${CMAKE_C_COMPILER_DIRECTORY})
|
||||
mark_as_advanced(TEST_SUITE_LLVM_PROFDATA)
|
||||
if(TEST_SUITE_LLVM_PROFDATA STREQUAL "TEST_SUITE_LLVM_PROFDATA-NOTFOUND")
|
||||
message(FATAL_ERROR "llvm-profdata not found.
|
||||
Make sure it is in your path or set TEST_SUITE_PROFILE_GENERATE to OFF")
|
||||
endif()
|
||||
|
||||
set(TEST_SUITE_PROFILE_GENERATE "True")
|
||||
list(APPEND CFLAGS -fprofile-instr-generate)
|
||||
list(APPEND CXXFLAGS -fprofile-instr-generate)
|
||||
|
@ -92,8 +118,9 @@ else()
|
|||
set(TEST_SUITE_PROFILE_GENERATE "False")
|
||||
endif()
|
||||
|
||||
set(TEST_SUITE_PROFILE_USE "FALSE" CACHE BOOL
|
||||
"Add apropriate -fprofile-instr-use to CFLAGS/CXXFLAGS for each benchmark")
|
||||
option(TEST_SUITE_PROFILE_USE
|
||||
"Add apropriate -fprofile-instr-use to CFLAGS/CXXFLAGS for each benchmark"
|
||||
OFF)
|
||||
|
||||
# When running the test-suite in diagnosis mode, use these flags passed by
|
||||
# LNT to gather data, for examples -ftime-report, or -mllvm -stats. This way
|
||||
|
@ -108,6 +135,21 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TEST_SUITE_DIAGNOSE_FLAGS}")
|
|||
set(CMAKE_EXE_LINKER_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} ${TEST_SUITE_DIAGNOSE_LINKER_FLAGS}")
|
||||
|
||||
# Append extra flags. These extra flags are mainly meant for cache files that
|
||||
# want to apply flags that get not override even when the user manually
|
||||
# specifies CMAKE_C_FLAGS and similar.
|
||||
set(TEST_SUITE_EXTRA_C_FLAGS CACHE STRING "Extra flags for CMAKE_C_FLAGS")
|
||||
set(TEST_SUITE_EXTRA_CXX_FLAGS CACHE STRING "Extra flags for CMAKE_CXX_FLAGS")
|
||||
set(TEST_SUITE_EXTRA_EXE_LINKER_FLAGS CACHE STRING
|
||||
"Extra flags for CMAKE_EXE_LINKER_FLAGS")
|
||||
mark_as_advanced(TEST_SUITE_EXTRA_C_FLAGS, TEST_SUITE_EXTRA_CXX_FLAGS,
|
||||
TEST_SUITE_EXTRA_EXE_LINKER_FLAGS)
|
||||
set(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} ${TEST_SUITE_EXTRA_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TEST_SUITE_EXTRA_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} ${TEST_SUITE_EXTRA_EXE_LINKER_FLAGS}")
|
||||
|
||||
include(TestSuite)
|
||||
include(SingleMultiSource)
|
||||
find_package(TCL)
|
||||
|
||||
|
@ -119,6 +161,10 @@ if(NOT DEFINED ARCH)
|
|||
include(DetectArchitecture)
|
||||
detect_architecture(ARCH)
|
||||
endif()
|
||||
if(NOT DEFINED X86CPU_ARCH AND ARCH STREQUAL "x86")
|
||||
include(DetectArchitecture)
|
||||
detect_x86_cpu_architecture(X86CPU_ARCH)
|
||||
endif()
|
||||
if(NOT DEFINED ENDIAN)
|
||||
include(TestBigEndian)
|
||||
test_big_endian(IS_BIGENDIAN)
|
||||
|
@ -131,8 +177,8 @@ endif()
|
|||
|
||||
# Disabling address space randomization makes the performance of memory/cache
|
||||
# intensive benchmarks more deterministic.
|
||||
set(TEST_SUITE_DISABLE_PIE "True" CACHE BOOL
|
||||
"Disable position independent executables and ASLR")
|
||||
option(TEST_SUITE_DISABLE_PIE
|
||||
"Disable position independent executables and ASLR" ON)
|
||||
mark_as_advanced(TEST_SUITE_DISABLE_PIE)
|
||||
if(TEST_SUITE_DISABLE_PIE)
|
||||
if(APPLE AND NOT ARCH STREQUAL "AArch64")
|
||||
|
@ -155,24 +201,26 @@ add_subdirectory(tools)
|
|||
# Shortcut for the path to the fpcmp executable
|
||||
set(FPCMP ${CMAKE_BINARY_DIR}/tools/fpcmp)
|
||||
|
||||
set(TEST_SUITE_TAKE_COMPILE_TIME "TRUE" CACHE BOOL
|
||||
"Measure compile time by wrapping compiler invocations in timeit")
|
||||
mark_as_advanced(TEST_SUITE_TAKE_COMPILE_TIME)
|
||||
if(TEST_SUITE_TAKE_COMPILE_TIME)
|
||||
option(TEST_SUITE_COLLECT_COMPILE_TIME
|
||||
"Measure compile time by wrapping compiler invocations in timeit" ON)
|
||||
if(TEST_SUITE_COLLECT_COMPILE_TIME)
|
||||
set(CMAKE_C_COMPILE_OBJECT "${CMAKE_BINARY_DIR}/tools/timeit --summary <OBJECT>.time ${CMAKE_C_COMPILE_OBJECT}")
|
||||
set(CMAKE_CXX_COMPILE_OBJECT "${CMAKE_BINARY_DIR}/tools/timeit --summary <OBJECT>.time ${CMAKE_CXX_COMPILE_OBJECT}")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_BINARY_DIR}/tools/timeit --summary <TARGET>.link.time ${CMAKE_C_LINK_EXECUTABLE}")
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_BINARY_DIR}/tools/timeit --summary <TARGET>.link.time ${CMAKE_CXX_LINK_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
set(TEST_SUITE_BENCHMARKING_ONLY "OFF" CACHE BOOL
|
||||
"Only run the benchmarking only subset")
|
||||
option(TEST_SUITE_BENCHMARKING_ONLY "Only run the benchmarking only subset" OFF)
|
||||
|
||||
set(TEST_SUITE_COLLECT_STATS "FALSE" CACHE BOOL
|
||||
"Collect LLVM statistics")
|
||||
option(TEST_SUITE_COLLECT_STATS "Collect LLVM statistics" OFF)
|
||||
if(TEST_SUITE_COLLECT_STATS)
|
||||
list(APPEND CFLAGS -save-stats=obj)
|
||||
list(APPEND CXXFLAGS -save-stats=obj)
|
||||
# Collect stats for LTO step too.
|
||||
if (${CMAKE_C_FLAGS} MATCHES ".*-flto.*" AND
|
||||
${CMAKE_CXX_FLAGS} MATCHES ".*-flto.*")
|
||||
list(APPEND LDFLAGS -save-stats=obj)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Detect and include subdirectories
|
||||
|
@ -181,37 +229,52 @@ endif()
|
|||
# manually specify directories to include test-suites at external locations
|
||||
# and to leave out some of the default ones.
|
||||
if(NOT TEST_SUITE_SUBDIRS)
|
||||
file(GLOB sub_cmakelists */CMakeLists.txt)
|
||||
file(GLOB sub_cmakelists RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} */CMakeLists.txt)
|
||||
set(TEST_SUITE_SUBDIRS "")
|
||||
foreach(entry ${sub_cmakelists})
|
||||
get_filename_component(subdir ${entry} DIRECTORY)
|
||||
# Exclude tools and CTMark from default list
|
||||
if(NOT ${subdir} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/tools AND
|
||||
NOT ${subdir} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/CTMark AND
|
||||
NOT ${subdir} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
if(NOT ${subdir} STREQUAL tools AND
|
||||
NOT ${subdir} STREQUAL CTMark AND
|
||||
NOT ${subdir} STREQUAL /include)
|
||||
list(APPEND TEST_SUITE_SUBDIRS ${subdir})
|
||||
endif()
|
||||
endforeach()
|
||||
set(TEST_SUITE_SUBDIRS "${TEST_SUITE_SUBDIRS}" CACHE STRING
|
||||
"Semicolon separated list of directories with CMakeLists.txt to include")
|
||||
set(TEST_SUITE_SUBDIRS "${TEST_SUITE_SUBDIRS}")
|
||||
endif()
|
||||
mark_as_advanced(TEST_SUITE_SUBDIRS)
|
||||
set(TEST_SUITE_SUBDIRS "${TEST_SUITE_SUBDIRS}" CACHE STRING
|
||||
"Semicolon separated list of directories with CMakeLists.txt to include")
|
||||
|
||||
foreach(subdir ${TEST_SUITE_SUBDIRS})
|
||||
# When we add subdirs outside the toplevel source directory then we have to
|
||||
# make up a directory to use for the builddir.
|
||||
if(subdir MATCHES "^/" OR subdir MATCHES "\\.\\.")
|
||||
if(subdir MATCHES "/$")
|
||||
message(FATAL_ERROR "Subdir must not end in '/'")
|
||||
endif()
|
||||
get_filename_component(subdir_name ${subdir} NAME)
|
||||
else()
|
||||
set(subdir_name ${subdir})
|
||||
endif()
|
||||
message(STATUS "Adding directory ${subdir}")
|
||||
add_subdirectory(${subdir})
|
||||
add_subdirectory(${subdir} ${subdir_name})
|
||||
endforeach()
|
||||
|
||||
set(TEST_SUITE_RUN_BENCHMARKS "ON" CACHE BOOL
|
||||
"Actually run the benchmarks in lit")
|
||||
option(TEST_SUITE_RUN_BENCHMARKS "Actually run the benchmarks in lit" ON)
|
||||
|
||||
set(LIT_MODULES "")
|
||||
set(TEST_SUITE_EXTRA_LIT_MODULES "" CACHE STRING
|
||||
"Semicolon separated list of extra lit modules in use")
|
||||
mark_as_advanced(TEST_SUITE_EXTRA_LIT_MODULES)
|
||||
# Construct list testing modules (see also litsupport/modules/*.py)
|
||||
set(LIT_MODULES ${TEST_SUITE_EXTRA_LIT_MODULES})
|
||||
if(TEST_SUITE_RUN_BENCHMARKS)
|
||||
list(APPEND LIT_MODULES run)
|
||||
endif()
|
||||
list(APPEND LIT_MODULES codesize)
|
||||
if(TEST_SUITE_COLLECT_CODE_SIZE)
|
||||
list(APPEND LIT_MODULES codesize)
|
||||
endif()
|
||||
list(APPEND LIT_MODULES hash)
|
||||
if(TEST_SUITE_TAKE_COMPILE_TIME)
|
||||
if(TEST_SUITE_COLLECT_COMPILE_TIME)
|
||||
list(APPEND LIT_MODULES compiletime)
|
||||
endif()
|
||||
if(TEST_SUITE_RUN_UNDER)
|
||||
|
@ -221,9 +284,6 @@ list(APPEND LIT_MODULES timeit)
|
|||
if(TEST_SUITE_PROFILE_GENERATE)
|
||||
list(APPEND LIT_MODULES profilegen)
|
||||
endif()
|
||||
if(TEST_SUITE_REMOTE_HOST)
|
||||
list(APPEND LIT_MODULES remote)
|
||||
endif()
|
||||
if(TEST_SUITE_COLLECT_STATS)
|
||||
list(APPEND LIT_MODULES stats)
|
||||
endif()
|
||||
|
|
|
@ -8,3 +8,5 @@ add_subdirectory(ClamAV)
|
|||
add_subdirectory(sqlite3)
|
||||
add_subdirectory(consumer-typeset)
|
||||
add_subdirectory(mafft)
|
||||
|
||||
file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
config.traditional_output = True
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
@ -45,25 +46,24 @@ class BreakPoint:
|
|||
self.values[arg_name] = value
|
||||
|
||||
def __repr__(self):
|
||||
print self.name
|
||||
items = self.values.items()
|
||||
for i in range(len(items)):
|
||||
print items[i][0]," = ",items[i][1]
|
||||
print(self.name)
|
||||
for k, v in self.values.items():
|
||||
print(k, "=", v)
|
||||
return ''
|
||||
|
||||
def compare_args(self, other, file):
|
||||
myitems = self.values.items()
|
||||
otheritems = other.values.items()
|
||||
otheritems = list(other.values.items())
|
||||
match = False
|
||||
for i in range(len(myitems)):
|
||||
for i, my_item in enumerate(my_items):
|
||||
if i >= len(otheritems):
|
||||
match = True
|
||||
self.missing_args.append(myitems[i][0])
|
||||
elif cmp(myitems[i][1], otheritems[i][1]):
|
||||
self.missing_args.append(myitem[0])
|
||||
elif cmp(myitem[1], otheritems[i][1]):
|
||||
match = True
|
||||
self.notmatching_args.append(myitems[i][0])
|
||||
self.notmatching_args.append(myitem[0])
|
||||
else:
|
||||
self.matching_args.append(myitems[i][0])
|
||||
self.matching_args.append(myitem[0])
|
||||
|
||||
self.print_list(self.matching_args, " Matching arguments ", file)
|
||||
self.print_list(self.notmatching_args, " Not Matching arguments ", file)
|
||||
|
@ -108,9 +108,7 @@ f2_items = f2_breakpoints.items()
|
|||
|
||||
f = open(LOG_FILE, "w")
|
||||
f.write("Log output\n")
|
||||
for f2bp in range(len(f2_items)):
|
||||
id = f2_items[f2bp][0]
|
||||
bp = f2_items[f2bp][1]
|
||||
for id, bp in f2_items:
|
||||
bp1 = f1_breakpoints.get(id)
|
||||
if bp1 is None:
|
||||
bp.setMissing()
|
||||
|
@ -127,9 +125,7 @@ read_input(NATIVE_OPT_DBG_OUTPUT_FILE, nf2_breakpoints)
|
|||
nf2_items = nf2_breakpoints.items()
|
||||
|
||||
nfl = open(NATIVE_LOG_FILE, "w")
|
||||
for nf2bp in range(len(nf2_items)):
|
||||
id = nf2_items[nf2bp][0]
|
||||
bp = nf2_items[nf2bp][1]
|
||||
for id, bp in nf2_items:
|
||||
bp1 = nf1_breakpoints.get(id)
|
||||
if bp1 is None:
|
||||
bp.setMissing()
|
||||
|
@ -141,8 +137,8 @@ f1_arg_count = 0
|
|||
f1_matching_arg_count = 0
|
||||
f1_notmatching_arg_count = 0
|
||||
f1_missing_arg_count = 0
|
||||
for idx in range(len(f1_items)):
|
||||
bp = f1_items[idx][1]
|
||||
for f1_item in f1_items:
|
||||
bp = f1_item[1]
|
||||
f1_arg_count = f1_arg_count + bp.getArgCount()
|
||||
f1_matching_arg_count = f1_matching_arg_count + bp.getMatchingArgCount()
|
||||
f1_notmatching_arg_count = f1_notmatching_arg_count + bp.getNotMatchingArgCount()
|
||||
|
@ -152,8 +148,8 @@ nf1_arg_count = 0
|
|||
nf1_matching_arg_count = 0
|
||||
nf1_notmatching_arg_count = 0
|
||||
nf1_missing_arg_count = 0
|
||||
for idx in range(len(nf1_items)):
|
||||
bp = nf1_items[idx][1]
|
||||
for nf1_item in nf1_items:
|
||||
bp = nf1_item[1]
|
||||
nf1_arg_count = nf1_arg_count + bp.getArgCount()
|
||||
nf1_matching_arg_count = nf1_matching_arg_count + bp.getMatchingArgCount()
|
||||
nf1_notmatching_arg_count = nf1_notmatching_arg_count + bp.getNotMatchingArgCount()
|
||||
|
|
|
@ -1,27 +1,3 @@
|
|||
set(TEST_SUITE_EXTERNALS_DIR "" CACHE PATH
|
||||
"Directory containing test-suite external benchmark sources")
|
||||
|
||||
# Find path containing an external benchmark and set PATHVAR to it.
|
||||
# Specifically this:
|
||||
# - Adds a CACHE variable for PATHVAR
|
||||
# - If PATHVAR is unset set it to the first existing directory in this list:
|
||||
# - ${TEST_SUITE_EXTERNALS_DIR}/${NAME}
|
||||
# - ${CMAKE_SOURCE_DIR}/test-suite-externals/${NAME}
|
||||
macro(llvm_externals_find PATHVAR NAME DESCRIPTION)
|
||||
set(${PATHVAR} "" CACHE PATH "Directory containing ${DESCRIPTION} sourcecode")
|
||||
if(TEST_SUITE_EXTERNALS_DIR AND NOT ${PATHVAR} AND
|
||||
IS_DIRECTORY "${TEST_SUITE_EXTERNALS_DIR}/${NAME}")
|
||||
set(${PATHVAR} "${TEST_SUITE_EXTERNALS_DIR}/${NAME}")
|
||||
endif()
|
||||
if(NOT ${PATHVAR} AND
|
||||
IS_DIRECTORY "${CMAKE_SOURCE_DIR}/test-suite-externals/${NAME}")
|
||||
set(${PATHVAR} "${CMAKE_SOURCE_DIR}/test-suite-externals/${NAME}")
|
||||
endif()
|
||||
if(${PATHVAR})
|
||||
message(STATUS "Found ${DESCRIPTION}: ${${PATHVAR}}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
add_subdirectory(CUDA)
|
||||
add_subdirectory(HMMER)
|
||||
add_subdirectory(Nurbs)
|
||||
|
|
|
@ -1,12 +1,47 @@
|
|||
include(External)
|
||||
llvm_externals_find(TEST_SUITE_CUDA_ROOT "cuda" "CUDA prerequisites")
|
||||
|
||||
set(SUPPORTED_GPU_CUDA_7_0
|
||||
sm_20 sm_21
|
||||
sm_30 sm_32 sm_35 sm_37
|
||||
sm_50 sm_52 sm_53)
|
||||
set(SUPPORTED_GPU_CUDA_7_5
|
||||
sm_20 sm_21
|
||||
sm_30 sm_32 sm_35 sm_37
|
||||
sm_50 sm_52 sm_53)
|
||||
set(SUPPORTED_GPU_CUDA_8_0
|
||||
sm_20 sm_21
|
||||
sm_30 sm_32 sm_35 sm_37
|
||||
sm_50 sm_52 sm_53
|
||||
sm_60 sm_61 sm_62)
|
||||
set(SUPPORTED_GPU_CUDA_9_0
|
||||
sm_30 sm_32 sm_35 sm_37
|
||||
sm_50 sm_52 sm_53
|
||||
sm_60 sm_61 sm_62
|
||||
sm_70)
|
||||
set(SUPPORTED_GPU_CUDA_9_1
|
||||
sm_30 sm_32 sm_35
|
||||
sm_50 sm_52 sm_53
|
||||
sm_60 sm_61 sm_62
|
||||
sm_70 sm_72)
|
||||
set(SUPPORTED_GPU_CUDA_9_2
|
||||
sm_30 sm_32 sm_35
|
||||
sm_50 sm_52 sm_53
|
||||
sm_60 sm_61 sm_62
|
||||
sm_70 sm_72)
|
||||
set(SUPPORTED_GPU_CUDA_10_0
|
||||
sm_30 sm_32 sm_35
|
||||
sm_50 sm_52 sm_53
|
||||
sm_60 sm_61 sm_62
|
||||
sm_70 sm_72 sm_75)
|
||||
|
||||
# Helper macro to extract version number at the end of the string
|
||||
# Input: get_version(Var String)
|
||||
# Where String = /some/string/with/version-x.y.z
|
||||
# Output:
|
||||
# Sets Var=x.y.z
|
||||
macro(get_version Var Path)
|
||||
string(REGEX MATCH "[0-9]+(\.[0-9]+)+" ${Var} ${Path})
|
||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" ${Var} ${Path})
|
||||
endmacro (get_version)
|
||||
|
||||
# Helper function to glob CUDA source files and set LANGUAGE property
|
||||
|
@ -22,26 +57,38 @@ macro(cuda_glob Var)
|
|||
set(${Var} ${FileList})
|
||||
endmacro(cuda_glob)
|
||||
|
||||
macro(create_one_local_test Name FileGlob)
|
||||
cuda_glob(_sources ${FileGlob})
|
||||
set(_executable ${Name}-${VariantSuffix})
|
||||
set(_executable_path ${CMAKE_CURRENT_BINARY_DIR}/${_executable})
|
||||
# Verify reference output if it exists.
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
|
||||
set(NO_REFERENCE_OUTPUT 1)
|
||||
set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
|
||||
llvm_test_traditional(${_executable})
|
||||
else()
|
||||
# otherwise just run the executable.
|
||||
macro(create_one_local_test_f Name FileGlob FilterRegex)
|
||||
if (${VariantSuffix} MATCHES ${FilterRegex})
|
||||
cuda_glob(_sources ${FileGlob})
|
||||
set(_executable ${Name}-${VariantSuffix})
|
||||
set(_executable_path ${CMAKE_CURRENT_BINARY_DIR}/${_executable})
|
||||
llvm_test_run()
|
||||
set(REFERENCE_OUTPUT)
|
||||
# Verify reference output if it exists.
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
|
||||
set(REFERENCE_OUTPUT ${Name}.reference_output)
|
||||
llvm_test_verify(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} %o ${REFERENCE_OUTPUT}-${VariantSuffix}
|
||||
)
|
||||
llvm_test_executable(${_executable} ${_sources})
|
||||
llvm_test_data(${_executable}
|
||||
DEST_SUFFIX "-${VariantSuffix}"
|
||||
${REFERENCE_OUTPUT})
|
||||
else()
|
||||
llvm_test_executable(${_executable} ${_sources})
|
||||
endif()
|
||||
target_compile_options(${_executable} PUBLIC ${VariantCPPFLAGS})
|
||||
if(VariantLibs)
|
||||
target_link_libraries(${_executable} ${VariantLibs})
|
||||
endif()
|
||||
add_dependencies(cuda-tests-simple-${VariantSuffix} ${_executable})
|
||||
# Local tests are presumed to be fast.
|
||||
list(APPEND CUDA_SIMPLE_TEST_TARGETS ${_executable}.test)
|
||||
endif()
|
||||
llvm_test_executable(${_executable} ${_sources})
|
||||
if(VariantLibs)
|
||||
target_link_libraries(${_executable} ${VariantLibs})
|
||||
endif()
|
||||
add_dependencies(cuda-tests-simple-${VariantSuffix} ${_executable})
|
||||
# Local tests are presumed to be fast.
|
||||
list(APPEND CUDA_SIMPLE_TEST_TARGETS ${_executable}.test)
|
||||
endmacro()
|
||||
|
||||
macro(create_one_local_test Name FileGlob)
|
||||
create_one_local_test_f(${Name} ${FileGlob} ".*")
|
||||
endmacro()
|
||||
|
||||
# Create targets for CUDA tests that are part of the test suite.
|
||||
|
@ -52,9 +99,17 @@ macro(create_local_cuda_tests VariantSuffix)
|
|||
create_one_local_test(cmath cmath.cu)
|
||||
create_one_local_test(complex complex.cu)
|
||||
create_one_local_test(math_h math_h.cu)
|
||||
create_one_local_test(new new.cu)
|
||||
create_one_local_test(empty empty.cu)
|
||||
create_one_local_test(printf printf.cu)
|
||||
create_one_local_test(future future.cu)
|
||||
# We only need SIMD tests on CUDA-8.0 to verivy that our reference is correct
|
||||
# and matches NVIDIA-provided one. and on CUDA-9.2 to verify that clang's
|
||||
# implementation matches the reference. This test also happens to be the
|
||||
# longest one, so by not running unnecessary instances we speed up cuda
|
||||
# buildbot a lot.
|
||||
create_one_local_test_f(simd simd.cu
|
||||
"cuda-(8[.]0|9[.]2)-c[+][+]11-libc[+][+]")
|
||||
endmacro()
|
||||
|
||||
macro(thrust_make_test_name TestName TestSourcePath)
|
||||
|
@ -72,7 +127,8 @@ macro(create_one_thrust_test TestSource)
|
|||
llvm_test_run(--verbose ${_ExtraThrustTestArgs})
|
||||
llvm_test_executable(${_executable} ${TestSource})
|
||||
target_link_libraries(${_executable} ${VariantLibs})
|
||||
target_compile_options(${_executable} PUBLIC ${THRUST_CPPFLAGS})
|
||||
target_compile_options(${_executable} BEFORE PUBLIC ${THRUST_CPPFLAGS})
|
||||
target_compile_options(${_executable} PUBLIC ${VariantCPPFLAGS})
|
||||
list(APPEND THRUST_VARIANT_TESTS ${_executable})
|
||||
endmacro()
|
||||
|
||||
|
@ -85,7 +141,8 @@ function(create_thrust_tests VariantSuffix)
|
|||
# test framework is common for all tests, so we build it once as a
|
||||
# library.
|
||||
add_library(ThrustTestFrameworkLib-${VariantSuffix} STATIC ${ThrustTestFramework})
|
||||
append_compile_flags(ThrustTestFrameworkLib-${VariantSuffix} ${CPPFLAGS} ${THRUST_CPPFLAGS})
|
||||
target_compile_options(ThrustTestFrameworkLib-${VariantSuffix} BEFORE PRIVATE ${THRUST_CPPFLAGS})
|
||||
target_compile_options(ThrustTestFrameworkLib-${VariantSuffix} PRIVATE ${VariantCPPFLAGS})
|
||||
add_dependencies(ThrustTestFrameworkLib-${VariantSuffix} timeit-host fpcmp-host)
|
||||
list(APPEND VariantLibs ThrustTestFrameworkLib-${VariantSuffix})
|
||||
|
||||
|
@ -107,8 +164,12 @@ function(create_thrust_tests VariantSuffix)
|
|||
# overhead, so it's actually way slower than running all tests
|
||||
# sequentially.
|
||||
llvm_test_run(--verbose ${_ExtraThrustTestArgs})
|
||||
# CUDA SDK comes with its own version of thrust in its include directory.
|
||||
# In order to use the thrust library we want, its include path must precede
|
||||
# that of the CUDA SDK include path.
|
||||
llvm_test_executable(${_ThrustMainTarget} ${ThrustTestFramework} ${ThrustAllTestSources})
|
||||
target_compile_options(${_ThrustMainTarget} PUBLIC ${THRUST_CPPFLAGS})
|
||||
target_compile_options(${_ThrustMainTarget} BEFORE PUBLIC ${THRUST_CPPFLAGS})
|
||||
target_compile_options(${_ThrustMainTarget} PUBLIC ${VariantCPPFLAGS})
|
||||
target_link_libraries(${_ThrustMainTarget} ${VariantLibs})
|
||||
endif()
|
||||
add_dependencies(cuda-tests-${VariantSuffix} cuda-tests-thrust-${VariantSuffix})
|
||||
|
@ -122,7 +183,7 @@ function(create_cuda_test_variant Std VariantSuffix)
|
|||
COMMENT "Build CUDA test variant ${VariantSuffix}")
|
||||
|
||||
set(VariantLibs ${_Cuda_Libs} ${_Stdlib_Libs})
|
||||
list(APPEND CPPFLAGS ${_Cuda_CPPFLAGS} ${_Std_CPPFLAGS} ${_Stdlib_CPPFLAGS})
|
||||
set(VariantCPPFLAGS ${_Cuda_CPPFLAGS} ${_Std_CPPFLAGS} ${_Stdlib_CPPFLAGS})
|
||||
list(APPEND LDFLAGS ${_Cuda_LDFLAGS} ${_Std_LDFLAGS} ${_Stdlib_LDFLAGS})
|
||||
|
||||
# Create a separate test target for simple tests that can be built/tested quickly.
|
||||
|
@ -131,7 +192,7 @@ function(create_cuda_test_variant Std VariantSuffix)
|
|||
create_local_cuda_tests(${VariantSuffix})
|
||||
add_dependencies(cuda-tests-simple cuda-tests-simple-${VariantSuffix})
|
||||
|
||||
if(EXISTS ${THRUST_PATH} AND (NOT ${Std} STREQUAL "c++14"))
|
||||
if(DEFINED THRUST_PATH AND (NOT ${Std} STREQUAL "c++14"))
|
||||
create_thrust_tests(${VariantSuffix})
|
||||
endif()
|
||||
|
||||
|
@ -175,15 +236,12 @@ macro(create_cuda_tests)
|
|||
if(NOT CUDA_GPU_ARCH)
|
||||
list(APPEND CUDA_GPU_ARCH sm_35)
|
||||
endif()
|
||||
list(SORT CUDA_GPU_ARCH)
|
||||
|
||||
if (CUDA_JOBS)
|
||||
set(TEST_SUITE_LIT_FLAGS ${TEST_SUITE_LIT_FLAGS} -j ${CUDA_JOBS})
|
||||
endif()
|
||||
|
||||
foreach(GpuArch IN LISTS CUDA_GPU_ARCH)
|
||||
list(APPEND CPPFLAGS --cuda-gpu-arch=${GpuArch})
|
||||
endforeach()
|
||||
|
||||
file(GLOB GccVersions ${TEST_SUITE_CUDA_ROOT}/gcc-*)
|
||||
list(SORT GccVersions)
|
||||
foreach(GccRoot IN LISTS GccVersions)
|
||||
|
@ -261,6 +319,24 @@ macro(create_cuda_tests)
|
|||
get_version(_CudaVersion ${_CudaPath})
|
||||
set(_Cuda_Suffix "cuda-${_CudaVersion}")
|
||||
set(_Cuda_CPPFLAGS --cuda-path=${_CudaPath} -I${_CudaPath}/include)
|
||||
# clear the list of GPUs to compile for.
|
||||
set(_CudaArchFlags)
|
||||
set(_CudaArchList)
|
||||
string(REPLACE "." "_" _CudaVersionSuffix ${_CudaVersion})
|
||||
foreach(_CudaGpuArch IN LISTS CUDA_GPU_ARCH)
|
||||
if(_CudaGpuArch IN_LIST SUPPORTED_GPU_CUDA_${_CudaVersionSuffix})
|
||||
list(APPEND _CudaArchFlags --cuda-gpu-arch=${_CudaGpuArch})
|
||||
list(APPEND _CudaArchList ${_CudaGpuArch})
|
||||
endif()
|
||||
endforeach()
|
||||
if (_CudaArchList)
|
||||
message(STATUS "Building ${_Cuda_Suffix} targets for ${_CudaArchList}")
|
||||
else()
|
||||
message(WARNING "${_Cuda_Suffix} does not support ${CUDA_GPU_ARCH} GPUs. Skipped.")
|
||||
continue()
|
||||
endif()
|
||||
list(APPEND _Cuda_CPPFLAGS ${_CudaArchFlags})
|
||||
|
||||
set(_Cuda_Libs cudart-${_CudaVersion})
|
||||
foreach(_Std IN ITEMS "c++98" "c++11" "c++14")
|
||||
set(_Std_Suffix "${_Std}")
|
||||
|
@ -268,10 +344,6 @@ macro(create_cuda_tests)
|
|||
set(_Std_LDFLAGS -std=${_Std})
|
||||
foreach(_GccPath IN LISTS GCC_PATHS)
|
||||
get_version(_GccVersion ${_GccPath})
|
||||
# libstdc++ seems not to support C++14 before version 5.0.
|
||||
if(${_Std} STREQUAL "c++14" AND ${_GccVersion} VERSION_LESS "5.0")
|
||||
continue()
|
||||
endif()
|
||||
set(_Gcc_Suffix "libstdc++-${_GccVersion}")
|
||||
# Tell clang to use libstdc++ and where to find it.
|
||||
set(_Stdlib_CPPFLAGS -stdlib=libstdc++ -gcc-toolchain ${_GccPath})
|
||||
|
@ -279,17 +351,26 @@ macro(create_cuda_tests)
|
|||
# Add libstdc++ as link dependency.
|
||||
set(_Stdlib_Libs libstdcxx-${_GccVersion})
|
||||
|
||||
# libstdc++ seems not to support C++14 before version 5.0. We still
|
||||
# want to run in C++14 mode with old libstdc++s to test compiler C++14
|
||||
# with stdlib C++11, but we add a -D so that our tests can detect this.
|
||||
if (${_GccVersion} VERSION_LESS "5.0")
|
||||
list(APPEND _Stdlib_CPPFLAGS -DSTDLIB_VERSION=2011)
|
||||
else()
|
||||
list(APPEND _Stdlib_CPPFLAGS -DSTDLIB_VERSION=2014)
|
||||
endif()
|
||||
|
||||
create_cuda_test_variant(${_Std} "${_Cuda_Suffix}-${_Std_Suffix}-${_Gcc_Suffix}")
|
||||
endforeach()
|
||||
|
||||
if(HAVE_LIBCXX)
|
||||
# Same as above, but for libc++
|
||||
# Tell clang to use libc++
|
||||
# We also need to add compiler's include path for cxxabi.h
|
||||
get_filename_component(_compiler_path ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||
set(_Stdlib_CPPFLAGS -stdlib=libc++ -I${_compiler_path}/../include/c++-build)
|
||||
set(_Stdlib_LDFLAGS -stdlib=libc++)
|
||||
set(_Stdlib_Libs libcxx)
|
||||
# Same as above, but for libc++
|
||||
# Tell clang to use libc++
|
||||
# We also need to add compiler's include path for cxxabi.h
|
||||
get_filename_component(_compiler_path ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||
set(_Stdlib_CPPFLAGS -stdlib=libc++ -I${_compiler_path}/../include/c++/v1 -DSTDLIB_VERSION=2017)
|
||||
set(_Stdlib_LDFLAGS -stdlib=libc++)
|
||||
set(_Stdlib_Libs libcxx)
|
||||
create_cuda_test_variant(${_Std} "${_Cuda_Suffix}-${_Std_Suffix}-libc++")
|
||||
endif()
|
||||
endforeach()
|
||||
|
|
|
@ -7,39 +7,69 @@
|
|||
// we can successfully compile and run the standard library's implementations
|
||||
// of these functions.
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
#if __cplusplus >= 201103L
|
||||
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <stdio.h>
|
||||
|
||||
__device__ void greater() {
|
||||
assert(std::greater<int>()(1, 0));
|
||||
}
|
||||
|
||||
__device__ void min() {
|
||||
assert(std::min(0, 1) == 0);
|
||||
assert(std::min({5, 1, 10}) == 1);
|
||||
}
|
||||
__host__ __device__ void min_hd() {
|
||||
assert(std::min(0, 1) == 0);
|
||||
}
|
||||
|
||||
__device__ void max() {
|
||||
assert(std::max(0, 1) == 1);
|
||||
assert(std::max({5, 1, 10}, std::less<int>()) == 10);
|
||||
}
|
||||
__host__ __device__ void max_hd() {
|
||||
assert(std::max(0, 1) == 1);
|
||||
}
|
||||
|
||||
__device__ void minmax() {
|
||||
// Clang has device-side shims implementing std::min and std::max for scalars
|
||||
// starting in C++11, but doesn't implement minimax or std::min/max on
|
||||
// initializer_lists until C++14, when it gets these for free from the standard
|
||||
// library (because they're constexpr).
|
||||
__device__ void cpp14_tests() {
|
||||
#if __cplusplus >= 201402L && STDLIB_VERSION >= 2014
|
||||
assert(std::greater<int>()(1, 0));
|
||||
assert(std::min({5, 1, 10}) == 1);
|
||||
assert(std::max({5, 1, 10}, std::less<int>()) == 10);
|
||||
|
||||
assert(std::minmax(1, 0).first == 0);
|
||||
assert(std::minmax(1, 0).second == 1);
|
||||
assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
|
||||
assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
|
||||
constexpr auto min = std::min(1, 2);
|
||||
constexpr auto max = std::max(1, 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Same tests as cpp14_tests, but from a host-device context.
|
||||
__host__ __device__ void cpp14_tests_hd() {
|
||||
#if __cplusplus >= 201402L && STDLIB_VERSION >= 2014
|
||||
assert(std::greater<int>()(1, 0));
|
||||
assert(std::min({5, 1, 10}) == 1);
|
||||
assert(std::max({5, 1, 10}, std::less<int>()) == 10);
|
||||
|
||||
assert(std::minmax(1, 0).first == 0);
|
||||
assert(std::minmax(1, 0).second == 1);
|
||||
assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
|
||||
assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
|
||||
constexpr auto min = std::min(1, 2);
|
||||
constexpr auto max = std::max(1, 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
__global__ void kernel() {
|
||||
greater();
|
||||
min();
|
||||
min_hd();
|
||||
max();
|
||||
minmax();
|
||||
max_hd();
|
||||
cpp14_tests();
|
||||
cpp14_tests_hd();
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
@ -49,6 +79,11 @@ int main() {
|
|||
printf("CUDA error %d\n", (int)err);
|
||||
return 1;
|
||||
}
|
||||
|
||||
min_hd();
|
||||
max_hd();
|
||||
cpp14_tests_hd();
|
||||
|
||||
printf("Success!\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
@ -89,7 +88,6 @@ __device__ Ambiguous lrint(Ambiguous){ return Ambiguous(); }
|
|||
__device__ Ambiguous lround(Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous nearbyint(Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous nextafter(Ambiguous, Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous nexttoward(Ambiguous, Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous remainder(Ambiguous, Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous remquo(Ambiguous, Ambiguous, int*){ return Ambiguous(); }
|
||||
__device__ Ambiguous rint(Ambiguous){ return Ambiguous(); }
|
||||
|
@ -1146,7 +1144,7 @@ __device__ void test_hypot()
|
|||
assert(std::hypot(3.f, 4.) == 5);
|
||||
assert(std::hypot(3.f, 4.f) == 5);
|
||||
|
||||
#if TEST_STD_VER > 14
|
||||
#if __cplusplus >= 201703L && STDLIB_VERSION >= 2017
|
||||
static_assert((std::is_same<decltype(std::hypot((float)0, (float)0, (float)0)), float>::value), "");
|
||||
static_assert((std::is_same<decltype(std::hypot((float)0, (bool)0, (float)0)), double>::value), "");
|
||||
static_assert((std::is_same<decltype(std::hypot((float)0, (unsigned short)0, (double)0)), double>::value), "");
|
||||
|
@ -1159,8 +1157,8 @@ __device__ void test_hypot()
|
|||
static_assert((std::is_same<decltype(std::hypot((int)0, (int)0, (int)0)), double>::value), "");
|
||||
static_assert((std::is_same<decltype(hypot(Ambiguous(), Ambiguous(), Ambiguous())), Ambiguous>::value), "");
|
||||
|
||||
assert(std::hypot(2,3,6) == 7);
|
||||
assert(std::hypot(1,4,8) == 9);
|
||||
assert(std::hypot(2, 3, 6) == 7);
|
||||
assert(std::hypot(1, 4, 8) == 9);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1387,38 +1385,20 @@ __device__ void test_nextafter()
|
|||
static_assert((std::is_same<decltype(std::nextafter((int)0, (int)0)), double>::value), "");
|
||||
static_assert((std::is_same<decltype(nextafter(Ambiguous(), Ambiguous())), Ambiguous>::value), "");
|
||||
|
||||
// Invoke all our overloads, even if we can't be bothered to check the
|
||||
// results.
|
||||
std::nextafter(0, 1);
|
||||
std::nextafter(0, 1.);
|
||||
std::nextafter(0, 1.f);
|
||||
// Invoke all our overloads. Even though we don't check the exact result
|
||||
// (this is pretty annoying to do for this function), we make sure to *use*
|
||||
// the results so that these function calls can't be DCE'ed.
|
||||
assert(std::nextafter(0, 1) != 0);
|
||||
assert(std::nextafter(0, 1.) != 0);
|
||||
assert(std::nextafter(0, 1.f) != 0);
|
||||
|
||||
std::nextafter(0., 1);
|
||||
std::nextafter(0., 1.);
|
||||
std::nextafter(0., 1.f);
|
||||
assert(std::nextafter(0., 1) != 0);
|
||||
assert(std::nextafter(0., 1.) != 0);
|
||||
assert(std::nextafter(0., 1.f) != 0);
|
||||
|
||||
std::nextafter(0.f, 1);
|
||||
std::nextafter(0.f, 1.);
|
||||
std::nextafter(0.f, 1.f);
|
||||
}
|
||||
|
||||
__device__ void test_nexttoward()
|
||||
{
|
||||
static_assert((std::is_same<decltype(nexttoward(Ambiguous(), Ambiguous())), Ambiguous>::value), "");
|
||||
|
||||
// Invoke all our overloads, even if we can't be bothered to check the
|
||||
// results.
|
||||
std::nexttoward(0, 1);
|
||||
std::nexttoward(0, 1.);
|
||||
std::nexttoward(0, 1.f);
|
||||
|
||||
std::nexttoward(0., 1);
|
||||
std::nexttoward(0., 1.);
|
||||
std::nexttoward(0., 1.f);
|
||||
|
||||
std::nexttoward(0.f, 1);
|
||||
std::nexttoward(0.f, 1.);
|
||||
std::nexttoward(0.f, 1.f);
|
||||
assert(std::nextafter(0.f, 1) != 0);
|
||||
assert(std::nextafter(0.f, 1.) != 0);
|
||||
assert(std::nextafter(0.f, 1.f) != 0);
|
||||
}
|
||||
|
||||
__device__ void test_remainder()
|
||||
|
@ -1671,7 +1651,6 @@ __global__ void tests()
|
|||
test_nan();
|
||||
test_nearbyint();
|
||||
test_nextafter();
|
||||
test_nexttoward();
|
||||
test_remainder();
|
||||
test_remquo();
|
||||
test_rint();
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <complex>
|
||||
|
||||
// These are loosely adapted from libc++'s tests. In general, we don't care a
|
||||
// ton about verifying the return types or results we get, on the assumption
|
||||
// that our standard library is correct. But we care deeply about calling every
|
||||
|
@ -19,13 +14,16 @@
|
|||
// We do care about the results of complex multiplication / division, since
|
||||
// these use code we've written.
|
||||
|
||||
// These tests are pretty annoying to write without C++11, so we require that.
|
||||
// In addition, these tests currently don't compile with libc++, because of the
|
||||
// issue in https://reviews.llvm.org/D25403.
|
||||
//
|
||||
// TODO: Once that issue is resolved, take out !defined(_LIBCPP_VERSION) here.
|
||||
#if __cplusplus >= 201103L && !defined(_LIBCPP_VERSION)
|
||||
#include <stdio.h>
|
||||
|
||||
// These tests are pretty annoying to write without C++11, so we require that.
|
||||
//
|
||||
// In addition, these tests don't work in C++14 mode with pre-C++14 versions of
|
||||
// libstdc++ (compile errors in <complex>).
|
||||
#if __cplusplus >= 201103L && (__cplusplus < 201402L || STDLIB_VERSION >= 2014)
|
||||
|
||||
#include <assert.h>
|
||||
#include <complex>
|
||||
#include <type_traits>
|
||||
|
||||
template <class T>
|
||||
|
@ -69,7 +67,7 @@ __device__ void test_promotion() {
|
|||
}
|
||||
|
||||
__device__ void test_literals() {
|
||||
#if __cplusplus >= 201402L
|
||||
#if __cplusplus >= 201402L && STDLIB_VERSION >= 2014
|
||||
using namespace std::literals::complex_literals;
|
||||
|
||||
{
|
||||
|
|
|
@ -15,3 +15,10 @@ cuda_env_vars = [
|
|||
for var in cuda_env_vars:
|
||||
if var in os.environ:
|
||||
config.environment[var] = os.environ[var]
|
||||
|
||||
config.traditional_output = True
|
||||
|
||||
# "compiletime" wants to traverse whole build directory after each test which
|
||||
# takes a lot of time if we have config with split thrust tests. Disable it
|
||||
# until it has smaller overhead.
|
||||
config.test_modules.remove("compiletime")
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
@ -87,7 +86,6 @@ __device__ Ambiguous lrint(Ambiguous){ return Ambiguous(); }
|
|||
__device__ Ambiguous lround(Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous nearbyint(Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous nextafter(Ambiguous, Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous nexttoward(Ambiguous, Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous remainder(Ambiguous, Ambiguous){ return Ambiguous(); }
|
||||
__device__ Ambiguous remquo(Ambiguous, Ambiguous, int*){ return Ambiguous(); }
|
||||
__device__ Ambiguous rint(Ambiguous){ return Ambiguous(); }
|
||||
|
@ -1363,39 +1361,20 @@ __device__ void test_nextafter()
|
|||
static_assert((std::is_same<decltype(nextafter(Ambiguous(), Ambiguous())), Ambiguous>::value), "");
|
||||
//assert(nextafter(0,1) == hexfloat<double>(0x1, 0, -1074));
|
||||
|
||||
// Invoke all our overloads, even if we can't be bothered to check the
|
||||
// results.
|
||||
nextafter(0, 1);
|
||||
nextafter(0, 1.);
|
||||
nextafter(0, 1.f);
|
||||
// Invoke all our overloads. Even though we don't check the exact result
|
||||
// (this is pretty annoying to do for this function), we make sure to *use*
|
||||
// the results so that these function calls can't be DCE'ed.
|
||||
assert(nextafter(0, 1) != 0);
|
||||
assert(nextafter(0, 1.) != 0);
|
||||
assert(nextafter(0, 1.f) != 0);
|
||||
|
||||
nextafter(0., 1);
|
||||
nextafter(0., 1.);
|
||||
nextafter(0., 1.f);
|
||||
assert(nextafter(0., 1) != 0);
|
||||
assert(nextafter(0., 1.) != 0);
|
||||
assert(nextafter(0., 1.f) != 0);
|
||||
|
||||
nextafter(0.f, 1);
|
||||
nextafter(0.f, 1.);
|
||||
nextafter(0.f, 1.f);
|
||||
}
|
||||
|
||||
__device__ void test_nexttoward()
|
||||
{
|
||||
static_assert((std::is_same<decltype(nexttoward(Ambiguous(), Ambiguous())), Ambiguous>::value), "");
|
||||
//assert(nexttoward(0, 1) == hexfloat<double>(0x1, 0, -1074));
|
||||
|
||||
// Invoke all our overloads, even if we can't be bothered to check the
|
||||
// results.
|
||||
nexttoward(0, 1);
|
||||
nexttoward(0, 1.);
|
||||
nexttoward(0, 1.f);
|
||||
|
||||
nexttoward(0., 1);
|
||||
nexttoward(0., 1.);
|
||||
nexttoward(0., 1.f);
|
||||
|
||||
nexttoward(0.f, 1);
|
||||
nexttoward(0.f, 1.);
|
||||
nexttoward(0.f, 1.f);
|
||||
assert(nextafter(0.f, 1) != 0);
|
||||
assert(nextafter(0.f, 1.) != 0);
|
||||
assert(nextafter(0.f, 1.f) != 0);
|
||||
}
|
||||
|
||||
__device__ void test_remainder()
|
||||
|
@ -1648,7 +1627,6 @@ __global__ void tests()
|
|||
test_nan();
|
||||
test_nearbyint();
|
||||
test_nextafter();
|
||||
test_nexttoward();
|
||||
test_remainder();
|
||||
test_remquo();
|
||||
test_rint();
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
// Check that operator new and operator delete work.
|
||||
|
||||
#include <assert.h>
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
|
||||
__device__ void global_new() {
|
||||
void* x = ::operator new(42);
|
||||
assert(x != NULL);
|
||||
::operator delete(x);
|
||||
|
||||
x = ::operator new(42, std::nothrow);
|
||||
assert(x != NULL);
|
||||
::operator delete(x, std::nothrow);
|
||||
|
||||
x = ::operator new[](42);
|
||||
assert(x != NULL);
|
||||
::operator delete[](x);
|
||||
|
||||
x = ::operator new[](42, std::nothrow);
|
||||
assert(x != NULL);
|
||||
::operator delete[](x, std::nothrow);
|
||||
}
|
||||
|
||||
__device__ void sized_delete() {
|
||||
#if __cplusplus>= 201402L
|
||||
void* x = ::operator new(42);
|
||||
assert(x != NULL);
|
||||
::operator delete(x, 42);
|
||||
|
||||
x = ::operator new[](42);
|
||||
assert(x != NULL);
|
||||
::operator delete[](x, 42);
|
||||
#endif
|
||||
}
|
||||
|
||||
__device__ void int_new() {
|
||||
int* x = new int();
|
||||
assert(*x == 0);
|
||||
delete x;
|
||||
}
|
||||
|
||||
struct Foo {
|
||||
__device__ Foo() : x(42) {}
|
||||
int x;
|
||||
};
|
||||
__device__ void class_new() {
|
||||
Foo* foo = new Foo();
|
||||
assert(foo->x == 42);
|
||||
delete foo;
|
||||
}
|
||||
|
||||
__global__ void kernel() {
|
||||
global_new();
|
||||
sized_delete();
|
||||
int_new();
|
||||
class_new();
|
||||
}
|
||||
|
||||
int main() {
|
||||
kernel<<<32, 32>>>();
|
||||
cudaError_t err = cudaDeviceSynchronize();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA error %d\n", (int)err);
|
||||
return 1;
|
||||
}
|
||||
printf("Success!\n");
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
Success!
|
||||
exit 0
|
|
@ -0,0 +1,454 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <complex> // Needed for std::min and max to work on device.
|
||||
#include <limits>
|
||||
|
||||
int verbose = 0;
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#include <type_traits>
|
||||
|
||||
// Convert a function into a functor with two arguments. We rely on SFINAE to
|
||||
// instantiate a function template call() which will invoke FUNC() with one or
|
||||
// two arguments.
|
||||
#define F(FUNC, NELTS, NARGS) \
|
||||
typedef struct FUNC##_f { \
|
||||
static const int num_args = NARGS; \
|
||||
static const int num_elts = NELTS; \
|
||||
template <typename T, int NA = num_args> \
|
||||
__device__ static typename std::enable_if<NA == 1, unsigned int>::type \
|
||||
call(T a, T b) { \
|
||||
return FUNC(a); \
|
||||
} \
|
||||
template <typename T, int NA = num_args> \
|
||||
__device__ static typename std::enable_if<NA == 2, unsigned int>::type \
|
||||
call(T a, T b) { \
|
||||
return FUNC(a, b); \
|
||||
} \
|
||||
} FUNC##_f
|
||||
|
||||
template <int N, typename T>
|
||||
__device__ unsigned int pack(T a[N]) {
|
||||
unsigned int mask = (N == 2) ? 0xffff : 0xff;
|
||||
unsigned int shift = (N == 2) ? 16 : 8;
|
||||
unsigned int r = 0;
|
||||
for (int i = 0; i < N; ++i) {
|
||||
r |= ((unsigned int)a[i] & mask) << (shift * i);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
template <int N, typename T>
|
||||
__device__ void unpack(unsigned int r, T (&a)[N]) {
|
||||
unsigned int mask = (N == 2) ? 0xffff : 0xff;
|
||||
unsigned int shift = (N == 2) ? 16 : 8;
|
||||
for (int i = 0; i < N; ++i) {
|
||||
a[i] = ((r >> (shift * i)) & mask);
|
||||
}
|
||||
}
|
||||
|
||||
enum op_t {
|
||||
OP_ABS,
|
||||
OP_ABSDIFF,
|
||||
OP_ABSS,
|
||||
OP_ADD,
|
||||
OP_ADDS,
|
||||
OP_AVG,
|
||||
OP_CMPEQ,
|
||||
OP_CMPGE,
|
||||
OP_CMPGT,
|
||||
OP_CMPLE,
|
||||
OP_CMPLT,
|
||||
OP_CMPNE,
|
||||
OP_HADD,
|
||||
OP_MAX,
|
||||
OP_MIN,
|
||||
OP_NEG,
|
||||
OP_SAD,
|
||||
OP_SETEQ,
|
||||
OP_SETGE,
|
||||
OP_SETGT,
|
||||
OP_SETLE,
|
||||
OP_SETLT,
|
||||
OP_SETNE,
|
||||
OP_SUB,
|
||||
OP_SUBS,
|
||||
OP_LAST
|
||||
};
|
||||
|
||||
template <enum op_t OP, typename T>
|
||||
__device__ inline T elt_op(T a, T b = INT_MIN) {
|
||||
switch (OP) {
|
||||
case OP_ABS:
|
||||
if (!std::numeric_limits<T>::is_signed) return a;
|
||||
// This is wrong, but that's what __vabsN() returns. We also need to
|
||||
// handle that because abs(std::numeric_limits<T>::min()) would be an
|
||||
// undefined behavior otherwise.
|
||||
if (a == std::numeric_limits<T>::min())
|
||||
return std::numeric_limits<T>::min();
|
||||
return (a >= 0) ? a : -a;
|
||||
|
||||
case OP_ABSDIFF:
|
||||
return std::abs(a - b);
|
||||
case OP_ABSS: {
|
||||
int result = std::abs(a);
|
||||
if (result > std::numeric_limits<T>::max())
|
||||
return std::numeric_limits<T>::max();
|
||||
return result;
|
||||
}
|
||||
case OP_ADD:
|
||||
return a + b;
|
||||
case OP_ADDS: {
|
||||
int result = (int)a + (int)b;
|
||||
if (result > std::numeric_limits<T>::max())
|
||||
return std::numeric_limits<T>::max();
|
||||
if (std::numeric_limits<T>::is_signed &&
|
||||
result < std::numeric_limits<T>::min())
|
||||
return std::numeric_limits<T>::min();
|
||||
return result;
|
||||
}
|
||||
case OP_AVG:
|
||||
// This is *rounded* average. For simplicity let FP do the
|
||||
// rounding. Considering that T is byte or short, we're guaranteed not to
|
||||
// lose any bits.
|
||||
return round(((float)a + (float)b) / 2.0f);
|
||||
case OP_CMPEQ:
|
||||
return a == b ? -1 : 0;
|
||||
case OP_CMPGE:
|
||||
return a >= b ? -1 : 0;
|
||||
case OP_CMPGT:
|
||||
return a > b ? -1 : 0;
|
||||
case OP_CMPLE:
|
||||
return a <= b ? -1 : 0;
|
||||
case OP_CMPLT:
|
||||
return a < b ? -1 : 0;
|
||||
case OP_CMPNE:
|
||||
return a != b ? -1 : 0;
|
||||
case OP_HADD:
|
||||
return (a + b) / 2;
|
||||
case OP_MAX:
|
||||
return std::max(a, b);
|
||||
case OP_MIN:
|
||||
return std::min(a, b);
|
||||
case OP_NEG:
|
||||
// This is wrong, but that's what __vnegN() returns. We also need to
|
||||
// handle that because abs(std::numeric_limits<T>::min()) would be an
|
||||
// undefined behavior otherwise.
|
||||
if (std::numeric_limits<T>::is_signed &&
|
||||
a == std::numeric_limits<T>::min())
|
||||
return std::numeric_limits<T>::min();
|
||||
return -a;
|
||||
case OP_SAD:
|
||||
return std::abs(a - b); // need to sum per-element results later.
|
||||
case OP_SETEQ:
|
||||
return a == b ? 1 : 0;
|
||||
case OP_SETGE:
|
||||
return a >= b ? 1 : 0;
|
||||
case OP_SETGT:
|
||||
return a > b ? 1 : 0;
|
||||
case OP_SETLE:
|
||||
return a <= b ? 1 : 0;
|
||||
case OP_SETLT:
|
||||
return a < b ? 1 : 0;
|
||||
case OP_SETNE:
|
||||
return a != b ? 1 : 0;
|
||||
case OP_SUB:
|
||||
return a - b;
|
||||
case OP_SUBS: {
|
||||
int result = (int)a - (int)b;
|
||||
if (result > std::numeric_limits<T>::max())
|
||||
return std::numeric_limits<T>::max();
|
||||
if (result < std::numeric_limits<T>::min())
|
||||
return std::numeric_limits<T>::min();
|
||||
return result;
|
||||
}
|
||||
default:
|
||||
assert(false && "unknown OP");
|
||||
}
|
||||
assert(false && "Unreachable.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <op_t OP, typename T, int N>
|
||||
__device__ void simd_op(T (&r)[N], T a[N], T b[N]) {
|
||||
if (OP == OP_SAD) {
|
||||
// Sum up all elements in r[0] and clear the rest of r.
|
||||
int result = 0;
|
||||
for (int i = 0; i < N; ++i) {
|
||||
result += elt_op<OP, T>(a[i], b[i]);
|
||||
r[i] = 0;
|
||||
}
|
||||
r[0] = result;
|
||||
} else {
|
||||
// Just an element-wise op.
|
||||
for (int i = 0; i < N; ++i) {
|
||||
r[i] = elt_op<OP, T>(a[i], b[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <op_t OP, class SIMD_OP, typename T>
|
||||
__device__ void test_func(int verbose, int a, int b) {
|
||||
constexpr int N = SIMD_OP::num_elts;
|
||||
int dummy_args[] = {0,
|
||||
1,
|
||||
-1,
|
||||
std::numeric_limits<T>::max(),
|
||||
std::numeric_limits<T>::max() - 1,
|
||||
std::numeric_limits<T>::min(),
|
||||
std::numeric_limits<T>::min() + 1};
|
||||
for (T x : dummy_args) {
|
||||
for (int e = 0; e < N; ++e) {
|
||||
T args_a[N];
|
||||
T args_b[N];
|
||||
for (int i = 0; i < N; ++i) {
|
||||
args_a[i] = x;
|
||||
args_b[i] = x;
|
||||
}
|
||||
args_a[e] = a;
|
||||
args_b[e] = b;
|
||||
unsigned int va = pack<N, T>(args_a);
|
||||
unsigned int vb = pack<N, T>(args_b);
|
||||
T expected_r[N];
|
||||
simd_op<OP, T>(expected_r, args_a, args_b);
|
||||
unsigned int evr = pack<N, T>(expected_r);
|
||||
// This is weird and I don't understand what's going on. With T = short,
|
||||
// compiler ends up generating code which triggers the assert below
|
||||
// if verbose == false, but triggers no assert if verbose == 1. It may be
|
||||
// due to an undefined behavior somewhere, but the same code (with SIMD_OP
|
||||
// below replaced with a pack(simd_op(a,b)) (so it could run on host)
|
||||
// triggerend no ubsan reports.
|
||||
asm volatile("" ::: "memory");
|
||||
unsigned int vr = SIMD_OP::call(va, vb);
|
||||
if (verbose && vr != evr) {
|
||||
printf("e=%d a=%d b=%d va=%08x vb=%08x vr=%08x expected vr=%08x\n", e,
|
||||
a, b, va, vb, vr, evr);
|
||||
}
|
||||
assert((vr == evr) && "Value mismatch");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <op_t OP, class SIMD_OP, typename T>
|
||||
__global__ void test_kernel(int verbose) {
|
||||
int a = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
int b = blockIdx.y * blockDim.y + threadIdx.y;
|
||||
test_func<OP, SIMD_OP, T>(verbose, a, b);
|
||||
}
|
||||
|
||||
template <op_t OP, class SIMD_OP, typename T>
|
||||
void test_op() {
|
||||
int elements_a = SIMD_OP::num_elts == 2 ? 0x10000 : 0x100;
|
||||
// Collapse second dimension if we test single-operand function.
|
||||
int elements_b = SIMD_OP::num_args == 2 ? elements_a : 0;
|
||||
dim3 grid_size(elements_a / 32, elements_b ? elements_b / 32 : 1, 1);
|
||||
dim3 block_size(32, elements_b ? 32 : 1, 1);
|
||||
printf("Testing %s...", __PRETTY_FUNCTION__);
|
||||
test_kernel<OP, SIMD_OP, T><<<grid_size, block_size>>>(verbose);
|
||||
cudaError_t err = cudaDeviceSynchronize();
|
||||
if (err != cudaSuccess) {
|
||||
printf("%s failed\n", __PRETTY_FUNCTION__);
|
||||
printf("CUDA error %d\n", (int)err);
|
||||
exit(EXIT_FAILURE);
|
||||
} else {
|
||||
printf("OK\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Define functor types which we can then use to parametrize device-side tests.
|
||||
// F(function, num-elements, num-args)
|
||||
F(__vabs2, 2, 1);
|
||||
F(__vabs4, 4, 1);
|
||||
F(__vabsdiffs2, 2, 2);
|
||||
F(__vabsdiffs4, 4, 2);
|
||||
F(__vabsdiffu2, 2, 2);
|
||||
F(__vabsdiffu4, 4, 2);
|
||||
F(__vabsss2, 2, 1);
|
||||
F(__vabsss4, 4, 1);
|
||||
F(__vadd2, 2, 2);
|
||||
F(__vadd4, 4, 2);
|
||||
F(__vaddss2, 2, 2);
|
||||
F(__vaddus2, 2, 2);
|
||||
F(__vaddss4, 4, 2);
|
||||
F(__vaddus4, 4, 2);
|
||||
F(__vavgs2, 2, 2);
|
||||
F(__vavgu2, 2, 2);
|
||||
F(__vavgs4, 4, 2);
|
||||
F(__vavgu4, 4, 2);
|
||||
F(__vcmpeq2, 2, 2);
|
||||
F(__vcmpeq4, 4, 2);
|
||||
F(__vcmpges2, 2, 2);
|
||||
F(__vcmpges4, 4, 2);
|
||||
F(__vcmpgeu2, 2, 2);
|
||||
F(__vcmpgeu4, 4, 2);
|
||||
F(__vcmpgts2, 2, 2);
|
||||
F(__vcmpgts4, 4, 2);
|
||||
F(__vcmpgtu2, 2, 2);
|
||||
F(__vcmpgtu4, 4, 2);
|
||||
F(__vcmples2, 2, 2);
|
||||
F(__vcmples4, 4, 2);
|
||||
F(__vcmpleu2, 2, 2);
|
||||
F(__vcmpleu4, 4, 2);
|
||||
F(__vcmplts2, 2, 2);
|
||||
F(__vcmplts4, 4, 2);
|
||||
F(__vcmpltu2, 2, 2);
|
||||
F(__vcmpltu4, 4, 2);
|
||||
F(__vcmpne2, 2, 2);
|
||||
F(__vcmpne4, 4, 2);
|
||||
F(__vhaddu2, 2, 2);
|
||||
F(__vhaddu4, 4, 2);
|
||||
F(__vmaxs2, 2, 2);
|
||||
F(__vmaxs4, 4, 2);
|
||||
F(__vmaxu2, 2, 2);
|
||||
F(__vmaxu4, 4, 2);
|
||||
F(__vmins2, 2, 2);
|
||||
F(__vmins4, 4, 2);
|
||||
F(__vminu2, 2, 2);
|
||||
F(__vminu4, 4, 2);
|
||||
F(__vneg2, 2, 1);
|
||||
F(__vneg4, 4, 1);
|
||||
F(__vsads2, 2, 2);
|
||||
F(__vsadu2, 2, 2);
|
||||
F(__vsads4, 4, 2);
|
||||
F(__vsadu4, 4, 2);
|
||||
F(__vseteq2, 2, 2);
|
||||
F(__vseteq4, 4, 2);
|
||||
F(__vsetges2, 2, 2);
|
||||
F(__vsetges4, 4, 2);
|
||||
F(__vsetgeu2, 2, 2);
|
||||
F(__vsetgeu4, 4, 2);
|
||||
F(__vsetgts2, 2, 2);
|
||||
F(__vsetgts4, 4, 2);
|
||||
F(__vsetgtu2, 2, 2);
|
||||
F(__vsetgtu4, 4, 2);
|
||||
F(__vsetles2, 2, 2);
|
||||
F(__vsetles4, 4, 2);
|
||||
F(__vsetleu2, 2, 2);
|
||||
F(__vsetleu4, 4, 2);
|
||||
F(__vsetlts2, 2, 2);
|
||||
F(__vsetlts4, 4, 2);
|
||||
F(__vsetltu2, 2, 2);
|
||||
F(__vsetltu4, 4, 2);
|
||||
F(__vsetne2, 2, 2);
|
||||
F(__vsetne4, 4, 2);
|
||||
F(__vsub2, 2, 2);
|
||||
F(__vsub4, 4, 2);
|
||||
F(__vsubss2, 2, 2);
|
||||
F(__vsubus2, 2, 2);
|
||||
F(__vsubss4, 4, 2);
|
||||
F(__vsubus4, 4, 2);
|
||||
|
||||
void tests() {
|
||||
test_op<OP_NEG, __vneg2_f, short>();
|
||||
test_op<OP_ABS, __vabs2_f, short>();
|
||||
test_op<OP_ABS, __vabs4_f, signed char>();
|
||||
test_op<OP_ABSDIFF, __vabsdiffs2_f, short>();
|
||||
test_op<OP_ABSDIFF, __vabsdiffs4_f, signed char>();
|
||||
test_op<OP_ABSDIFF, __vabsdiffu2_f, unsigned short>();
|
||||
test_op<OP_ABSDIFF, __vabsdiffu4_f, unsigned char>();
|
||||
test_op<OP_ABSS, __vabsss2_f, short>();
|
||||
test_op<OP_ABSS, __vabsss4_f, signed char>();
|
||||
test_op<OP_ADD, __vadd2_f, short>();
|
||||
test_op<OP_ADD, __vadd4_f, signed char>();
|
||||
test_op<OP_ADDS, __vaddss2_f, short>();
|
||||
test_op<OP_ADDS, __vaddss4_f, signed char>();
|
||||
test_op<OP_ADDS, __vaddus2_f, unsigned short>();
|
||||
test_op<OP_ADDS, __vaddus4_f, unsigned char>();
|
||||
test_op<OP_AVG, __vavgs2_f, short>();
|
||||
test_op<OP_AVG, __vavgs4_f, signed char>();
|
||||
test_op<OP_AVG, __vavgu2_f, unsigned short>();
|
||||
test_op<OP_AVG, __vavgu4_f, unsigned char>();
|
||||
test_op<OP_CMPEQ, __vcmpeq2_f, short>();
|
||||
test_op<OP_CMPEQ, __vcmpeq4_f, signed char>();
|
||||
test_op<OP_CMPGE, __vcmpges2_f, short>();
|
||||
test_op<OP_CMPGE, __vcmpges4_f, signed char>();
|
||||
test_op<OP_CMPGE, __vcmpgeu2_f, unsigned short>();
|
||||
test_op<OP_CMPGE, __vcmpgeu4_f, unsigned char>();
|
||||
test_op<OP_CMPGT, __vcmpgts2_f, short>();
|
||||
test_op<OP_CMPGT, __vcmpgts4_f, signed char>();
|
||||
test_op<OP_CMPGT, __vcmpgtu2_f, unsigned short>();
|
||||
test_op<OP_CMPGT, __vcmpgtu4_f, unsigned char>();
|
||||
test_op<OP_CMPLE, __vcmples2_f, short>();
|
||||
test_op<OP_CMPLE, __vcmples4_f, signed char>();
|
||||
test_op<OP_CMPLE, __vcmpleu2_f, unsigned short>();
|
||||
test_op<OP_CMPLE, __vcmpleu4_f, unsigned char>();
|
||||
test_op<OP_CMPLT, __vcmplts2_f, short>();
|
||||
test_op<OP_CMPLT, __vcmplts4_f, signed char>();
|
||||
test_op<OP_CMPLT, __vcmpltu2_f, unsigned short>();
|
||||
test_op<OP_CMPLT, __vcmpltu4_f, unsigned char>();
|
||||
test_op<OP_CMPNE, __vcmpne2_f, short>();
|
||||
test_op<OP_CMPNE, __vcmpne4_f, signed char>();
|
||||
test_op<OP_HADD, __vhaddu2_f, unsigned short>();
|
||||
test_op<OP_HADD, __vhaddu4_f, unsigned char>();
|
||||
test_op<OP_MAX, __vmaxs2_f, short>(); // ??? Fails?
|
||||
test_op<OP_MAX, __vmaxs4_f, signed char>();
|
||||
test_op<OP_MAX, __vmaxu2_f, unsigned short>();
|
||||
test_op<OP_MAX, __vmaxu4_f, unsigned char>();
|
||||
test_op<OP_MIN, __vmins2_f, short>();
|
||||
test_op<OP_MIN, __vmins4_f, signed char>();
|
||||
test_op<OP_MIN, __vminu2_f, unsigned short>();
|
||||
test_op<OP_MIN, __vminu4_f, unsigned char>();
|
||||
test_op<OP_NEG, __vneg2_f, short>();
|
||||
test_op<OP_NEG, __vneg4_f, signed char>();
|
||||
test_op<OP_SAD, __vsads2_f, short>();
|
||||
test_op<OP_SAD, __vsads4_f, signed char>();
|
||||
test_op<OP_SAD, __vsadu2_f, unsigned short>();
|
||||
test_op<OP_SAD, __vsadu4_f, unsigned char>();
|
||||
test_op<OP_SETEQ, __vseteq2_f, short>();
|
||||
test_op<OP_SETEQ, __vseteq4_f, signed char>();
|
||||
test_op<OP_SETGE, __vsetges2_f, short>();
|
||||
test_op<OP_SETGE, __vsetges4_f, signed char>();
|
||||
test_op<OP_SETGE, __vsetgeu2_f, unsigned short>();
|
||||
test_op<OP_SETGE, __vsetgeu4_f, unsigned char>();
|
||||
test_op<OP_SETGT, __vsetgts2_f, short>();
|
||||
test_op<OP_SETGT, __vsetgts4_f, signed char>();
|
||||
test_op<OP_SETGT, __vsetgtu2_f, unsigned short>();
|
||||
test_op<OP_SETGT, __vsetgtu4_f, unsigned char>();
|
||||
test_op<OP_SETLE, __vsetles2_f, short>();
|
||||
test_op<OP_SETLE, __vsetles4_f, signed char>();
|
||||
test_op<OP_SETLE, __vsetleu2_f, unsigned short>();
|
||||
test_op<OP_SETLE, __vsetleu4_f, unsigned char>();
|
||||
test_op<OP_SETLT, __vsetlts2_f, short>();
|
||||
test_op<OP_SETLT, __vsetlts4_f, signed char>();
|
||||
test_op<OP_SETLT, __vsetltu2_f, unsigned short>();
|
||||
test_op<OP_SETLT, __vsetltu4_f, unsigned char>();
|
||||
test_op<OP_SETNE, __vsetne2_f, short>();
|
||||
test_op<OP_SETNE, __vsetne4_f, signed char>();
|
||||
test_op<OP_SUB, __vsub2_f, short>();
|
||||
test_op<OP_SUB, __vsub4_f, signed char>();
|
||||
test_op<OP_SUBS, __vsubss2_f, short>();
|
||||
test_op<OP_SUBS, __vsubss4_f, signed char>();
|
||||
test_op<OP_SUBS, __vsubus2_f, unsigned short>();
|
||||
test_op<OP_SUBS, __vsubus4_f, unsigned char>();
|
||||
}
|
||||
#else // !C++11
|
||||
void tests() {
|
||||
// These tests need C++11 to compile.
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int opt;
|
||||
while ((opt = getopt(argc, argv, "v")) != -1) {
|
||||
switch (opt) {
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
default: /* '?' */
|
||||
fprintf(stderr, "Usage: %s [-v]\n", argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
tests();
|
||||
printf("Success!\n");
|
||||
return 0;
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
include(External)
|
||||
llvm_externals_find(TEST_SUITE_HMMER_ROOT "hmmer" "HMMER 2.3.2")
|
||||
|
||||
if(TEST_SUITE_HMMER_ROOT)
|
||||
|
@ -11,11 +12,19 @@ if(TEST_SUITE_HMMER_ROOT)
|
|||
add_definitions(-DSSE2)
|
||||
endif()
|
||||
|
||||
llvm_test_prepare(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
cp -f globin.hmm run.hmm
|
||||
)
|
||||
if(LARGE_PROBLEM_SIZE)
|
||||
llvm_test_run(--fixed 400 --cpu 1 --num 200000 --seed 1158818515 ${TEST_SUITE_HMMER_ROOT}/globin.hmm)
|
||||
llvm_test_run(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--fixed 400 --cpu 1 --num 200000 --seed 1158818515 run.hmm
|
||||
)
|
||||
else()
|
||||
llvm_test_run(--fixed 400 --cpu 1 --num 80000 --seed 1158818515 ${TEST_SUITE_HMMER_ROOT}/globin.hmm)
|
||||
llvm_test_run(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--fixed 400 --cpu 1 --num 80000 --seed 1158818515 run.hmm
|
||||
)
|
||||
endif()
|
||||
FILE(GLOB SOURCES ${TEST_SUITE_HMMER_ROOT}/*.c)
|
||||
llvm_test_executable(hmmcalibrate ${SOURCES})
|
||||
llvm_test_data(hmmcalibrate SOURCE_DIR ${TEST_SUITE_HMMER_ROOT} globin.hmm)
|
||||
endif()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Nurbs uses SSE and only works on x86.
|
||||
if(ARCH STREQUAL "x86")
|
||||
include(External)
|
||||
llvm_externals_find(TEST_SUITE_NURBS_ROOT "nurbs" "Nurbs")
|
||||
|
||||
if(TEST_SUITE_NURBS_ROOT)
|
||||
|
@ -9,12 +10,14 @@ if(ARCH STREQUAL "x86")
|
|||
endif()
|
||||
|
||||
llvm_test_run(/k all timed /t 500 /vsteps 192 /usteps 192 /vcp 20 /ucp 20)
|
||||
llvm_test_verify(${FPCMP}
|
||||
%o
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nurbs.reference_output
|
||||
llvm_test_verify(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} %o nurbs.reference_output
|
||||
)
|
||||
|
||||
file(GLOB SOURCES ${TEST_SUITE_NURBS_ROOT}/*.cpp)
|
||||
llvm_test_executable(nurbs ${SOURCES})
|
||||
llvm_test_data(nurbs nurbs.reference_output)
|
||||
|
||||
file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
config.traditional_output = True
|
|
@ -1,3 +1,4 @@
|
|||
include(External)
|
||||
llvm_externals_find(TEST_SUITE_POVRAY_ROOT "povray31" "POV-Ray 3.1")
|
||||
|
||||
if(TEST_SUITE_POVRAY_ROOT)
|
||||
|
@ -20,15 +21,18 @@ if(TEST_SUITE_POVRAY_ROOT)
|
|||
)
|
||||
list(APPEND LDFLAGS -lz -lm)
|
||||
|
||||
llvm_test_run(
|
||||
-I${TEST_SUITE_POVRAY_ROOT}/scenes/advanced/chess2.pov
|
||||
-L${TEST_SUITE_POVRAY_ROOT}/include
|
||||
llvm_test_run(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-Iscenes/advanced/chess2.pov
|
||||
-Linclude
|
||||
-GA/dev/null -O-
|
||||
)
|
||||
llvm_test_verify(${FPCMP}
|
||||
%o
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/povray.reference_output
|
||||
llvm_test_verify(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} %o povray.reference_output
|
||||
)
|
||||
|
||||
llvm_test_executable(povray ${Source})
|
||||
llvm_test_data(povray povray.reference_output)
|
||||
llvm_test_data(povray SOURCE_DIR ${TEST_SUITE_POVRAY_ROOT} scenes include)
|
||||
|
||||
file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
config.traditional_output = True
|
|
@ -67,14 +67,11 @@ macro(test_input run_type frames)
|
|||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
-frames ${frames} -meshfile mesa.in -ppmfile mesa.ppm
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/mesa.log
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/mesa.log
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/mesa.log data/${run_type}/input/mesa.log
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 6.0
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/mesa.ppm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/mesa.ppm
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 6.0 data/${run_type}/output/mesa.ppm data/${run_type}/input/mesa.ppm
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -82,9 +79,5 @@ test_input(test 10)
|
|||
test_input(train 500)
|
||||
test_input(ref 1000)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
|
||||
# The benchmark writes the output where the input files are, so we have to
|
||||
# copy the data over.
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(177.mesa ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)
|
||||
llvm_test_executable(177.mesa ${Source})
|
||||
llvm_test_data_spec(177.mesa MUST_COPY data)
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
macro(test_input run_type output)
|
||||
llvm_test_run(RUN_TYPE ${run_type} ${ARGN} > "${CMAKE_CURRENT_BINARY_DIR}/${output}")
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.01
|
||||
"${BENCHMARK_DIR}/data/${run_type}/output/${output}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${output}"
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${ARGN} > ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.01 data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
set(DATADIR ${BENCHMARK_DIR}/data)
|
||||
test_input(test test.out
|
||||
WORKDIR ${DATADIR}/test/input
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
|
||||
-scanfile c756hel.in
|
||||
-trainfile1 a10.img
|
||||
-stride 2
|
||||
|
@ -20,7 +19,7 @@ test_input(test test.out
|
|||
-objects 1
|
||||
)
|
||||
test_input(train train.out
|
||||
WORKDIR ${DATADIR}/train/input
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input
|
||||
-scanfile c756hel.in
|
||||
-trainfile1 a10.img
|
||||
-stride 2
|
||||
|
@ -31,7 +30,7 @@ test_input(train train.out
|
|||
-objects 3
|
||||
)
|
||||
test_input(ref ref.1.out
|
||||
WORKDIR ${DATADIR}/ref/input
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
-scanfile c756hel.in
|
||||
-trainfile1 a10.img
|
||||
-trainfile2 hc.img
|
||||
|
@ -43,7 +42,7 @@ test_input(ref ref.1.out
|
|||
-objects 10
|
||||
)
|
||||
test_input(ref ref.2.out
|
||||
WORKDIR ${DATADIR}/ref/input
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
-scanfile c756hel.in
|
||||
-trainfile1 a10.img
|
||||
-trainfile2 hc.img
|
||||
|
@ -55,4 +54,5 @@ test_input(ref ref.2.out
|
|||
-objects 10
|
||||
)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(179.art ${Source})
|
||||
llvm_test_data_spec_default(179.art)
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
< "${BENCHMARK_DIR}/data/${run_type}/input/inp.in"
|
||||
> "${CMAKE_CURRENT_BINARY_DIR}/inp.out"
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
< data/${run_type}/input/inp.in > inp.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.00001
|
||||
"${BENCHMARK_DIR}/data/${run_type}/output/inp.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/inp.out"
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.00001 data/${run_type}/output/inp.out inp.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -14,4 +11,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(183.equake ${Source})
|
||||
llvm_test_data_spec_default(183.equake)
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
|
||||
< ${BENCHMARK_DIR}/data/${run_type}/input/ammp.in
|
||||
> "${CMAKE_CURRENT_BINARY_DIR}/ammp.out"
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
< ammp.in > ${CMAKE_CURRENT_BINARY_DIR}/ammp.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.003 -a 0.0001
|
||||
"${BENCHMARK_DIR}/data/${run_type}/output/ammp.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ammp.out"
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.003 -a 0.0001 data/${run_type}/output/ammp.out ammp.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -15,4 +12,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(188.ammp ${Source})
|
||||
llvm_test_data_spec_default(188.ammp)
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
list(APPEND LDFLAGS -lm)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU2000)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU2000_LP64)
|
||||
include(${CMAKE_SOURCE_DIR}/External/SPEC/SpecCPU2000.cmake)
|
||||
if(TEST_SUITE_SPEC2000_ROOT)
|
||||
list(APPEND LDFLAGS -lm)
|
||||
|
||||
macro(cfp2000_subdir BENCHMARK)
|
||||
set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CFP2000/${BENCHMARK})
|
||||
file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
|
||||
add_subdirectory(${BENCHMARK})
|
||||
endmacro()
|
||||
|
||||
cfp2000_subdir(177.mesa)
|
||||
cfp2000_subdir(179.art)
|
||||
cfp2000_subdir(183.equake)
|
||||
cfp2000_subdir(188.ammp)
|
||||
endif()
|
||||
|
||||
macro(cfp2000_subdir BENCHMARK)
|
||||
set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CFP2000/${BENCHMARK})
|
||||
set(PROG ${BENCHMARK})
|
||||
file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
|
||||
add_subdirectory(${BENCHMARK})
|
||||
endmacro()
|
||||
|
||||
cfp2000_subdir(177.mesa)
|
||||
cfp2000_subdir(179.art)
|
||||
cfp2000_subdir(183.equake)
|
||||
cfp2000_subdir(188.ammp)
|
||||
|
|
|
@ -4,14 +4,14 @@ include_directories(${BENCHMARK_DIR}/src)
|
|||
add_definitions(-DFN -DFAST -DCONGRAD_TMP_VECTORS -DDSLASH_TMP_LINKS)
|
||||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
< ${BENCHMARK_DIR}/data/${run_type}/input/su3imp.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/su3imp.out
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
< data/${run_type}/input/su3imp.in
|
||||
> su3imp.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.0001 -a 0.0000002
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/su3imp.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/su3imp.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.0001 -a 0.0000002
|
||||
data/${run_type}/output/su3imp.out
|
||||
su3imp.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -19,4 +19,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(433.milc ${Source})
|
||||
llvm_test_data_spec_default(433.milc)
|
||||
|
|
|
@ -17,16 +17,14 @@ foreach(FILENAME ${SourceNames})
|
|||
endforeach()
|
||||
|
||||
macro(test_input run_type iters)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
--input ${BENCHMARK_DIR}/data/all/input/namd.input
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--input data/all/input/namd.input
|
||||
--iterations ${iters}
|
||||
--output ${CMAKE_CURRENT_BINARY_DIR}/namd.out
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/namd.stdout
|
||||
--output namd.out
|
||||
> namd.stdout
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 0.00001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/namd.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/namd.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 0.00001 data/${run_type}/output/namd.out namd.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -34,4 +32,5 @@ test_input(test 1)
|
|||
test_input(train 1)
|
||||
test_input(ref 38)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(444.namd ${Source})
|
||||
llvm_test_data_spec_default(444.namd)
|
||||
|
|
|
@ -1,31 +1,32 @@
|
|||
include_directories(${BENCHMARK_DIR}/src/include)
|
||||
add_definitions(-DBOOST_DISABLE_THREADS -Ddeal_II_dimension=3)
|
||||
list(APPEND LDFLAGS -lm)
|
||||
list(APPEND CXXFLAGS -std=gnu++98)
|
||||
|
||||
macro(verify_n run_type dir n)
|
||||
# Note that the official SPEC fp tolarence is only "-a .0000001", however this
|
||||
# has proven to only work reliably for x86 targets/libm.
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 1e-5 -r 1e-5
|
||||
${BENCHMARK_DIR}/data/${dir}/output/grid-${n}.eps
|
||||
${CMAKE_CURRENT_BINARY_DIR}/grid-${n}.eps
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 1e-5 -r 1e-5
|
||||
data/${dir}/output/grid-${n}.eps
|
||||
grid-${n}.eps
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 1e-5 -r 1e-5
|
||||
${BENCHMARK_DIR}/data/${dir}/output/solution-${n}.gmv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/solution-${n}.gmv
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 1e-5 -r 1e-5
|
||||
data/${dir}/output/solution-${n}.gmv
|
||||
solution-${n}.gmv
|
||||
)
|
||||
endmacro()
|
||||
|
||||
macro(test_input run_type size)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${size}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/log
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
> log
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/log
|
||||
${CMAKE_CURRENT_BINARY_DIR}/log
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 1e-5 -r 1e-5
|
||||
data/${run_type}/output/log
|
||||
log
|
||||
)
|
||||
foreach(i RANGE 0 8)
|
||||
verify_n(${run_type} all ${i})
|
||||
|
@ -41,4 +42,5 @@ test_input(test 8)
|
|||
test_input(train 10)
|
||||
test_input(ref 23)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(447.dealII ${Source})
|
||||
llvm_test_data_spec_default(447.dealII)
|
||||
|
|
|
@ -16,7 +16,7 @@ CPPFLAGS += \
|
|||
-Ddeal_II_dimension=3 \
|
||||
-DBOOST_DISABLE_THREADS \
|
||||
-I$(SPEC_BENCH_DIR)/src/include
|
||||
CXXFLAGS += -stdlib=libstdc++
|
||||
CXXFLAGS += -stdlib=libstdc++ -std=gnu++98
|
||||
|
||||
STDOUT_FILENAME := log
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
list(APPEND LDFLAGS -lm)
|
||||
list(APPEND CXXFLAGS -std=gnu++98)
|
||||
|
||||
macro(test_input run_type input outname stdout_reltol info_reltol)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${ARGN} ${input}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${outname}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
${ARGN} ${input} > ${outname}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r ${stdout_reltol} -a 1.0e-5
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${outname}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${outname}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r ${stdout_reltol} -a 1.0e-5
|
||||
data/${run_type}/output/${outname}
|
||||
data/${run_type}/input/${outname}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r ${info_reltol} -a 20
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${input}.info
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${input}.info
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r ${info_reltol} -a 20
|
||||
data/${run_type}/output/${input}.info
|
||||
data/${run_type}/input/${input}.info
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -24,14 +24,5 @@ test_input(train pds-20.mps pds-20.mps.out 0.02 0.0001 -s1 -e -m5000)
|
|||
test_input(ref ref.mps ref.out 0.02 0.0001 -m3500)
|
||||
test_input(ref pds-50.mps pds-50.mps.out 0.02 0.0001 -s1 -e -m45000)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
|
||||
macro(prepare_data run_type)
|
||||
llvm_copy_dir(450.soplex
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
${BENCHMARK_DIR}/data/${run_type}/input
|
||||
)
|
||||
endmacro()
|
||||
prepare_data(test)
|
||||
prepare_data(train)
|
||||
prepare_data(ref)
|
||||
llvm_test_executable(450.soplex ${Source})
|
||||
llvm_test_data_spec(450.soplex MUST_COPY data)
|
||||
|
|
|
@ -9,6 +9,7 @@ LEVEL = ../../../..
|
|||
FP_ABSTOLERANCE = 1.0e-5
|
||||
|
||||
CPPFLAGS += -DNDEBUG
|
||||
CXXFLAGS += -std=gnu++98
|
||||
|
||||
LDFLAGS = -lstdc++ -lm
|
||||
LIBS = -lstdc++ -lm
|
||||
|
|
|
@ -2,17 +2,18 @@ list(APPEND LDFLAGS -lm)
|
|||
|
||||
macro(test_input run_type stdout_reltol)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
SPEC-benchmark-${run_type}.ini
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
SPEC-benchmark-${run_type}.ini
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r ${stdout_reltol}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/SPEC-benchmark.log
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/SPEC-benchmark.log
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r ${stdout_reltol}
|
||||
data/${run_type}/output/SPEC-benchmark.log
|
||||
data/${run_type}/input/SPEC-benchmark.log
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/SPEC-benchmark.tga
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/SPEC-benchmark.tga
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP}
|
||||
data/${run_type}/output/SPEC-benchmark.tga
|
||||
data/${run_type}/input/SPEC-benchmark.tga
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -20,9 +21,13 @@ test_input(test 0.0002)
|
|||
test_input(train 0.00005)
|
||||
test_input(ref 0.00005)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(453.povray ${Source})
|
||||
llvm_test_data_spec(453.povray
|
||||
data/test/output
|
||||
data/train/output
|
||||
data/ref/output
|
||||
)
|
||||
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(453.povray ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
|
||||
${BENCHMARK_DIR}/data/test/input
|
||||
${BENCHMARK_DIR}/data/all/input
|
||||
|
|
|
@ -4,14 +4,14 @@ list(APPEND LDFLAGS -lm)
|
|||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
${ARGN}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/lbm.out
|
||||
WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 0.0000001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/lbm.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lbm.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 0.0000001
|
||||
data/${run_type}/output/lbm.out
|
||||
lbm.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -19,4 +19,5 @@ test_input(test 20 reference.dat 0 1 100_100_130_cf_a.of)
|
|||
test_input(train 300 reference.dat 0 1 100_100_130_cf_b.of)
|
||||
test_input(ref 3000 reference.dat 0 0 100_100_130_ldc.of)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(470.lbm ${Source})
|
||||
llvm_test_data_spec_default(470.lbm)
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
add_definitions(-DHAVE_CONFIG_H)
|
||||
include_directories(${BENCHMARK_DIR}/src ${BENCHMARK_DIR}/src/libutil)
|
||||
list(APPEND LDFLAGS -lm)
|
||||
list(APPEND CFLAGS -fsigned-char)
|
||||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
ctlfile . args.an4
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/an4.log
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r .0004
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/considered.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/considered.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r .0004
|
||||
data/${run_type}/output/considered.out
|
||||
data/${run_type}/input/considered.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 1e-6
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/total_considered.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/total_considered.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 1e-6
|
||||
data/${run_type}/output/total_considered.out
|
||||
data/${run_type}/input/total_considered.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r .001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/an4.log
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/an4.log
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r .001
|
||||
data/${run_type}/output/an4.log
|
||||
data/${run_type}/input/an4.log
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -36,26 +37,27 @@ foreach(s ${Source})
|
|||
set_source_files_properties(${s} PROPERTIES COMPILE_DEFINITIONS __FILE__="${basename}")
|
||||
endforeach()
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(482.sphinx3 ${Source})
|
||||
|
||||
macro(prepare_data run_type)
|
||||
set(DESTDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input)
|
||||
llvm_copy_dir(${PROG} ${DESTDIR}/model
|
||||
llvm_copy_dir(482.sphinx3 ${DESTDIR}/model
|
||||
${BENCHMARK_DIR}/data/all/input/model
|
||||
)
|
||||
llvm_copy(${PROG} ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/args.an4)
|
||||
llvm_copy(${PROG} ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/beams.dat)
|
||||
llvm_copy(482.sphinx3 ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/args.an4)
|
||||
llvm_copy(482.sphinx3 ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/beams.dat)
|
||||
# Create ctlfile and copy .raw files depending on endianess
|
||||
if(IS_BIGENDIAN)
|
||||
file(GLOB files "${BENCHMARK_DIR}/data/${run_type}/input/*.be.raw")
|
||||
else()
|
||||
file(GLOB files "${BENCHMARK_DIR}/data/${run_type}/input/*.le.raw")
|
||||
endif()
|
||||
list(SORT files)
|
||||
set(CTLFILE "")
|
||||
foreach(f ${files})
|
||||
get_filename_component(basename ${f} NAME)
|
||||
string(REGEX REPLACE ".(be|le).raw$" "" basename "${basename}")
|
||||
llvm_copy(${PROG} ${DESTDIR}/${basename}.raw ${f})
|
||||
llvm_copy(482.sphinx3 ${DESTDIR}/${basename}.raw ${f})
|
||||
# Determine file size...
|
||||
file(READ ${f} content HEX)
|
||||
string(LENGTH ${content} content_length)
|
||||
|
@ -69,6 +71,11 @@ endmacro()
|
|||
prepare_data(test)
|
||||
prepare_data(train)
|
||||
prepare_data(ref)
|
||||
llvm_test_data_spec(482.sphinx3 MUST_COPY
|
||||
data/test/output
|
||||
data/train/output
|
||||
data/ref/output
|
||||
)
|
||||
|
||||
# Data comes with *.test files which should not be read by lit.
|
||||
file(GENERATE
|
||||
|
|
|
@ -1,42 +1,10 @@
|
|||
list(APPEND CPPFLAGS -DSPEC_CPU)
|
||||
|
||||
if(TARGET_OS STREQUAL "Darwin")
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_MACOSX)
|
||||
elseif(TARGET_OS STREQUAL "Linux")
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_LINUX)
|
||||
include(${CMAKE_SOURCE_DIR}/External/SPEC/SpecCPU2006.cmake)
|
||||
if(TEST_SUITE_SPEC2006_ROOT)
|
||||
cpu2006_subdir(433.milc)
|
||||
cpu2006_subdir(444.namd)
|
||||
cpu2006_subdir(447.dealII)
|
||||
cpu2006_subdir(450.soplex)
|
||||
cpu2006_subdir(453.povray)
|
||||
cpu2006_subdir(470.lbm)
|
||||
cpu2006_subdir(482.sphinx3)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "x86")
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_X64)
|
||||
else()
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_IA32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(IS_BIGENDIAN)
|
||||
if(IS_BIGENDIAN)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_BIGENDIAN)
|
||||
else()
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_LITTLEENDIAN)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_LP64)
|
||||
endif()
|
||||
|
||||
macro(cpu2006_subdir BENCHMARK)
|
||||
set(BENCHMARK_DIR ${TEST_SUITE_SPEC2006_ROOT}/benchspec/CPU2006/${BENCHMARK})
|
||||
set(PROG ${BENCHMARK})
|
||||
file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp ${BENCHMARK_DIR}/src/*.cc)
|
||||
add_subdirectory(${BENCHMARK})
|
||||
endmacro()
|
||||
|
||||
cpu2006_subdir(433.milc)
|
||||
cpu2006_subdir(444.namd)
|
||||
cpu2006_subdir(447.dealII)
|
||||
cpu2006_subdir(450.soplex)
|
||||
cpu2006_subdir(453.povray)
|
||||
cpu2006_subdir(470.lbm)
|
||||
cpu2006_subdir(482.sphinx3)
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/508.namd_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
add_definitions(-DNAMD_DISABLE_SSE)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
--input "${INPUT_all_DIR}/apoa1.input"
|
||||
--iterations 1 --output apoa1.test.output
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
--input "${INPUT_all_DIR}/apoa1.input"
|
||||
--iterations 7 --output apoa1.train.output
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
--input "${INPUT_all_DIR}/apoa1.input"
|
||||
--output apoa1.ref.output --iterations 65
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output(ABSOLUTE_TOLERANCE 0.00005)
|
||||
speccpu2017_add_executable()
|
|
@ -0,0 +1,270 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/510.parest_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
speccpu2017_add_include_dirs(include .)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_test_DIR}/test.prm"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_train_DIR}/train.prm"
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/ref.prm"
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output(ABSOLUTE_TOLERANCE 4e-3)
|
||||
speccpu2017_add_executable(
|
||||
source/base/auto_derivative_function.cc
|
||||
source/base/boost_threads.cc
|
||||
source/base/conditional_ostream.cc
|
||||
source/base/config.cc
|
||||
source/base/convergence_table.cc
|
||||
source/base/data_out_base.cc
|
||||
source/base/exceptions.cc
|
||||
source/base/flow_function.cc
|
||||
source/base/function.cc
|
||||
source/base/function_derivative.cc
|
||||
source/base/function_lib.cc
|
||||
source/base/function_lib_cutoff.cc
|
||||
source/base/function_parser.cc
|
||||
source/base/function_time.cc
|
||||
source/base/geometry_info.cc
|
||||
source/base/job_identifier.cc
|
||||
source/base/log.cc
|
||||
source/base/memory_consumption.cc
|
||||
source/base/multithread_info.cc
|
||||
source/base/parameter_handler.cc
|
||||
source/base/parsed_function.cc
|
||||
source/base/path_search.cc
|
||||
source/base/polynomial.cc
|
||||
source/base/polynomial_space.cc
|
||||
source/base/polynomials_abf.cc
|
||||
source/base/polynomials_bdm.cc
|
||||
source/base/polynomials_p.cc
|
||||
source/base/polynomials_raviart_thomas.cc
|
||||
source/base/quadrature.cc
|
||||
source/base/quadrature_lib.cc
|
||||
source/base/quadrature_selector.cc
|
||||
source/base/subscriptor.cc
|
||||
source/base/symmetric_tensor.cc
|
||||
source/base/table_handler.cc
|
||||
source/base/tensor.cc
|
||||
source/base/tensor_function.cc
|
||||
source/base/tensor_product_polynomials.cc
|
||||
source/base/thread_management.cc
|
||||
source/base/timer.cc
|
||||
source/base/utilities.cc
|
||||
source/dofs/dof_accessor.cc
|
||||
source/dofs/dof_faces.cc
|
||||
source/dofs/dof_handler.cc
|
||||
source/dofs/dof_levels.all_dimensions.cc
|
||||
source/dofs/dof_objects.all_dimensions.cc
|
||||
source/dofs/dof_objects.cc
|
||||
source/dofs/dof_renumbering.cc
|
||||
source/dofs/dof_tools.cc
|
||||
source/fe/fe.cc
|
||||
source/fe/fe_abf.cc
|
||||
source/fe/fe_data.cc
|
||||
source/fe/fe_dgp.cc
|
||||
source/fe/fe_dgp_monomial.cc
|
||||
source/fe/fe_dgp_nonparametric.cc
|
||||
source/fe/fe_dgq.cc
|
||||
source/fe/fe_nedelec.cc
|
||||
source/fe/fe_nedelec_1d.cc
|
||||
source/fe/fe_nedelec_2d.cc
|
||||
source/fe/fe_nedelec_3d.cc
|
||||
source/fe/fe_poly.cc
|
||||
source/fe/fe_poly_tensor.cc
|
||||
source/fe/fe_q.cc
|
||||
source/fe/fe_q_hierarchical.cc
|
||||
source/fe/fe_raviart_thomas.cc
|
||||
source/fe/fe_raviart_thomas_nodal.cc
|
||||
source/fe/fe_system.cc
|
||||
source/fe/fe_tools.all_dimensions.cc
|
||||
source/fe/fe_tools.cc
|
||||
source/fe/fe_values.cc
|
||||
source/fe/mapping.cc
|
||||
source/fe/mapping_c1.cc
|
||||
source/fe/mapping_cartesian.cc
|
||||
source/fe/mapping_q.cc
|
||||
source/fe/mapping_q1.cc
|
||||
source/fe/mapping_q1_eulerian.cc
|
||||
source/fe/mapping_q_eulerian.cc
|
||||
source/grid/grid_generator.cc
|
||||
source/grid/grid_in.cc
|
||||
source/grid/grid_out.all_dimensions.cc
|
||||
source/grid/grid_out.cc
|
||||
source/grid/grid_refinement.cc
|
||||
source/grid/grid_reordering.cc
|
||||
source/grid/grid_tools.cc
|
||||
source/grid/intergrid_map.cc
|
||||
source/grid/persistent_tria.cc
|
||||
source/grid/tria.all_dimensions.cc
|
||||
source/grid/tria.cc
|
||||
source/grid/tria_accessor.cc
|
||||
source/grid/tria_boundary.cc
|
||||
source/grid/tria_boundary_lib.cc
|
||||
source/grid/tria_faces.cc
|
||||
source/grid/tria_levels.cc
|
||||
source/grid/tria_objects.all_dimensions.cc
|
||||
source/grid/tria_objects.cc
|
||||
source/hp/dof_faces.cc
|
||||
source/hp/dof_handler.cc
|
||||
source/hp/dof_levels.all_dimensions.cc
|
||||
source/hp/dof_levels.cc
|
||||
source/hp/dof_objects.all_dimensions.cc
|
||||
source/hp/fe_collection.cc
|
||||
source/hp/fe_values.cc
|
||||
source/hp/mapping_collection.cc
|
||||
source/lac/block_matrix_array.cc
|
||||
source/lac/block_sparse_matrix.cc
|
||||
source/lac/block_sparse_matrix_ez.cc
|
||||
source/lac/block_sparsity_pattern.cc
|
||||
source/lac/block_vector.cc
|
||||
source/lac/chunk_sparse_matrix.cc
|
||||
source/lac/chunk_sparsity_pattern.cc
|
||||
source/lac/compressed_set_sparsity_pattern.cc
|
||||
source/lac/compressed_simple_sparsity_pattern.cc
|
||||
source/lac/compressed_sparsity_pattern.cc
|
||||
source/lac/constraint_matrix.cc
|
||||
source/lac/full_matrix.cc
|
||||
source/lac/lapack_full_matrix.cc
|
||||
source/lac/matrix_lib.cc
|
||||
source/lac/matrix_out.cc
|
||||
source/lac/petsc_block_sparse_matrix.cc
|
||||
source/lac/petsc_full_matrix.cc
|
||||
source/lac/petsc_matrix_base.cc
|
||||
source/lac/petsc_parallel_block_sparse_matrix.cc
|
||||
source/lac/petsc_parallel_block_vector.cc
|
||||
source/lac/petsc_parallel_sparse_matrix.cc
|
||||
source/lac/petsc_parallel_vector.cc
|
||||
source/lac/petsc_precondition.cc
|
||||
source/lac/petsc_solver.cc
|
||||
source/lac/petsc_sparse_matrix.cc
|
||||
source/lac/petsc_vector.cc
|
||||
source/lac/petsc_vector_base.cc
|
||||
source/lac/precondition_block.cc
|
||||
source/lac/precondition_block_ez.cc
|
||||
source/lac/solver.cc
|
||||
source/lac/solver_control.cc
|
||||
source/lac/sparse_decomposition.cc
|
||||
source/lac/sparse_direct.cc
|
||||
source/lac/sparse_ilu.cc
|
||||
source/lac/sparse_matrix.cc
|
||||
source/lac/sparse_matrix_ez.cc
|
||||
source/lac/sparse_mic.cc
|
||||
source/lac/sparse_vanka.cc
|
||||
source/lac/sparsity_pattern.cc
|
||||
source/lac/sparsity_tools.cc
|
||||
source/lac/swappable_vector.cc
|
||||
source/lac/tridiagonal_matrix.cc
|
||||
source/lac/trilinos_block_sparse_matrix.cc
|
||||
source/lac/trilinos_block_vector.cc
|
||||
source/lac/trilinos_precondition.cc
|
||||
source/lac/trilinos_precondition_block.cc
|
||||
source/lac/trilinos_solver.cc
|
||||
source/lac/trilinos_solver_block.cc
|
||||
source/lac/trilinos_sparse_matrix.cc
|
||||
source/lac/trilinos_sparsity_pattern.cc
|
||||
source/lac/trilinos_vector.cc
|
||||
source/lac/trilinos_vector_base.cc
|
||||
source/lac/vector.cc
|
||||
source/lac/vector_memory.cc
|
||||
source/lac/vector_view.cc
|
||||
source/libparest/global_parameters.cc
|
||||
source/libparest/graphical_display.cc
|
||||
source/libparest/grid_transfer.cc
|
||||
source/libparest/message_log.cc
|
||||
source/libparest/statistics.cc
|
||||
source/libparest/top_level.cc
|
||||
source/libparest/utilities.cc
|
||||
source/me-tomography/boundary_sources_phantom.cc
|
||||
source/me-tomography/boundary_sources_planarz8.cc
|
||||
source/me-tomography/coefficient.cc
|
||||
source/me-tomography/evaluations.cc
|
||||
source/me-tomography/experiment_description.cc
|
||||
source/me-tomography/factories.cc
|
||||
source/me-tomography/forward.cc
|
||||
source/me-tomography/forward_solver_evaluators.cc
|
||||
source/me-tomography/forward_solver_parameters.cc
|
||||
source/me-tomography/geometry.cc
|
||||
source/me-tomography/me_parameters.cc
|
||||
source/me-tomography/me_slave.cc
|
||||
source/me-tomography/me_tomography.cc
|
||||
source/me-tomography/measurement_weights.cc
|
||||
source/me-tomography/measurements.cc
|
||||
source/me-tomography/problem_description.cc
|
||||
source/me-tomography/solver.cc
|
||||
source/me-tomography/state_discretization.cc
|
||||
source/me-tomography/synthetic_data.cc
|
||||
source/me-tomography/targets.cc
|
||||
source/multigrid/mg_base.cc
|
||||
source/multigrid/mg_dof_accessor.cc
|
||||
source/multigrid/mg_dof_handler.cc
|
||||
source/multigrid/mg_dof_tools.cc
|
||||
source/multigrid/mg_smoother.cc
|
||||
source/multigrid/mg_tools.all_dimensions.cc
|
||||
source/multigrid/mg_transfer_block.cc
|
||||
source/multigrid/mg_transfer_component.cc
|
||||
source/multigrid/mg_transfer_prebuilt.cc
|
||||
source/multigrid/multigrid.all_dimensions.cc
|
||||
source/numerics/data_out.cc
|
||||
source/numerics/data_out_faces.cc
|
||||
source/numerics/data_out_rotation.cc
|
||||
source/numerics/data_out_stack.cc
|
||||
source/numerics/data_postprocessor.cc
|
||||
source/numerics/derivative_approximation.cc
|
||||
source/numerics/error_estimator.cc
|
||||
source/numerics/fe_field_function.cc
|
||||
source/numerics/histogram.cc
|
||||
source/numerics/matrices.all_dimensions.cc
|
||||
source/numerics/matrices.cc
|
||||
source/numerics/solution_transfer.cc
|
||||
source/numerics/time_dependent.cc
|
||||
source/numerics/vectors.all_dimensions.cc
|
||||
source/numerics/vectors.cc
|
||||
source/libparest/master/master.cc
|
||||
source/libparest/master/newton_method.cc
|
||||
source/libparest/master/step_length_control.cc
|
||||
source/libparest/parallel/control.cc
|
||||
source/libparest/parallel/message_log.cc
|
||||
source/libparest/parallel/multiple_experiments.cc
|
||||
source/libparest/parallel/tools.cc
|
||||
source/libparest/parameter/base.cc
|
||||
source/libparest/parameter/bounds.cc
|
||||
source/libparest/parameter/factory.cc
|
||||
source/libparest/parameter/field.cc
|
||||
source/libparest/parameter/field_discretization.cc
|
||||
source/libparest/parameter/regularization.cc
|
||||
source/libparest/slave/factory.cc
|
||||
source/libparest/slave/slave.cc
|
||||
source/libparest/slave/stationary/boundary_values.cc
|
||||
source/libparest/slave/stationary/evaluations.cc
|
||||
source/libparest/slave/stationary/global_matrix.cc
|
||||
source/libparest/slave/stationary/grid_refinement.cc
|
||||
source/libparest/slave/stationary/measurements.cc
|
||||
source/libparest/slave/stationary/problem_description.cc
|
||||
source/libparest/slave/stationary/slave.cc
|
||||
source/libparest/slave/stationary/state_discretization.cc
|
||||
source/libparest/slave/stationary/synthetic_data.cc
|
||||
)
|
||||
set_property(TARGET ${PROG} PROPERTY CXX_STANDARD 98)
|
|
@ -0,0 +1,152 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/511.povray_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
speccpu2017_add_include_dirs(frontend base . spec_qsort)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
SPEC-benchmark-test.ini
|
||||
RUN_TYPE test
|
||||
)
|
||||
speccpu2017_validate_image(
|
||||
SPEC-benchmark.tga SPEC-benchmark.org.tga imagevalidate_SPEC-benchmark.tga.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
SPEC-benchmark-train.ini
|
||||
RUN_TYPE train
|
||||
)
|
||||
speccpu2017_validate_image(
|
||||
SPEC-benchmark.tga SPEC-benchmark.org.tga imagevalidate_SPEC-benchmark.tga.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
SPEC-benchmark-ref.ini
|
||||
RUN_TYPE ref
|
||||
)
|
||||
speccpu2017_validate_image(
|
||||
SPEC-benchmark.tga SPEC-benchmark.org.tga imagevalidate_SPEC-benchmark.tga.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
# Using IGNORE_WHITESPACE because the reference output has CRLF line endings,
|
||||
# while the program output uses LF.
|
||||
speccpu2017_verify_output(RELATIVE_TOLERANCE 0.06 IGNORE_WHITESPACE)
|
||||
speccpu2017_add_executable(
|
||||
atmosph.cpp
|
||||
bbox.cpp
|
||||
bcyl.cpp
|
||||
benchmark.cpp
|
||||
bezier.cpp
|
||||
blob.cpp
|
||||
boxes.cpp
|
||||
bsphere.cpp
|
||||
camera.cpp
|
||||
chi2.cpp
|
||||
colour.cpp
|
||||
colutils.cpp
|
||||
cones.cpp
|
||||
csg.cpp
|
||||
discs.cpp
|
||||
express.cpp
|
||||
fncode.cpp
|
||||
fnintern.cpp
|
||||
fnpovfpu.cpp
|
||||
fnsyntax.cpp
|
||||
fpmetric.cpp
|
||||
fractal.cpp
|
||||
function.cpp
|
||||
hcmplx.cpp
|
||||
hfield.cpp
|
||||
histogra.cpp
|
||||
iff.cpp
|
||||
image.cpp
|
||||
interior.cpp
|
||||
isosurf.cpp
|
||||
lathe.cpp
|
||||
lbuffer.cpp
|
||||
lightgrp.cpp
|
||||
lighting.cpp
|
||||
mathutil.cpp
|
||||
matrices.cpp
|
||||
media.cpp
|
||||
mesh.cpp
|
||||
normal.cpp
|
||||
objects.cpp
|
||||
octree.cpp
|
||||
optout.cpp
|
||||
parse.cpp
|
||||
parsestr.cpp
|
||||
parstxtr.cpp
|
||||
pattern.cpp
|
||||
pgm.cpp
|
||||
photons.cpp
|
||||
pigment.cpp
|
||||
planes.cpp
|
||||
point.cpp
|
||||
poly.cpp
|
||||
polygon.cpp
|
||||
polysolv.cpp
|
||||
povmsend.cpp
|
||||
povmsrec.cpp
|
||||
povray.cpp
|
||||
pov_mem.cpp
|
||||
pov_util.cpp
|
||||
ppm.cpp
|
||||
prism.cpp
|
||||
quadrics.cpp
|
||||
quatern.cpp
|
||||
radiosit.cpp
|
||||
rad_data.cpp
|
||||
ray.cpp
|
||||
rendctrl.cpp
|
||||
render.cpp
|
||||
renderio.cpp
|
||||
reswords.cpp
|
||||
sor.cpp
|
||||
spheres.cpp
|
||||
sphsweep.cpp
|
||||
splines.cpp
|
||||
statspov.cpp
|
||||
super.cpp
|
||||
targa.cpp
|
||||
texture.cpp
|
||||
tokenize.cpp
|
||||
torus.cpp
|
||||
triangle.cpp
|
||||
truetype.cpp
|
||||
txttest.cpp
|
||||
userdisp.cpp
|
||||
userio.cpp
|
||||
vbuffer.cpp
|
||||
vlbuffer.cpp
|
||||
warps.cpp
|
||||
base/fileinputoutput.cpp
|
||||
base/povms.cpp
|
||||
base/povmscpp.cpp
|
||||
base/processoptions.cpp
|
||||
base/stringutilities.cpp
|
||||
base/textstream.cpp
|
||||
base/textstreambuffer.cpp
|
||||
frontend/defaultplatformbase.cpp
|
||||
frontend/defaultrenderfrontend.cpp
|
||||
frontend/messageoutput.cpp
|
||||
frontend/processrenderoptions.cpp
|
||||
frontend/renderfrontend.cpp
|
||||
spec_qsort/spec_qsort.c
|
||||
)
|
||||
speccpu2017_prepare_rundir()
|
|
@ -0,0 +1,46 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/519.lbm_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
link_libraries(-lm)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
20 reference.dat 0 1 100_100_130_cf_a.of
|
||||
STDOUT lbm.out
|
||||
WORKDIR input
|
||||
RUN_TYPE test
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
300 reference.dat 0 1 100_100_130_cf_b.of
|
||||
STDOUT lbm.out
|
||||
WORKDIR input
|
||||
RUN_TYPE train
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
3000 reference.dat 0 0 100_100_130_ldc.of
|
||||
STDOUT lbm.out
|
||||
WORKDIR input
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
# Using IGNORE_WHITESPACE because the reference output consistently uses tabs
|
||||
# while the program output also uses spaces for indention.
|
||||
speccpu2017_verify_output(ABSOLUTE_TOLERANCE 0.0000001 IGNORE_WHITESPACE)
|
||||
speccpu2017_add_executable()
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,155 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/538.imagick_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
speccpu2017_add_include_dirs(.)
|
||||
link_libraries(-lm)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-limit disk 0 "${INPUT_test_DIR}/test_input.tga" -shear 25 -resize 640x480
|
||||
-negate -alpha Off test_output.tga
|
||||
RUN_TYPE test
|
||||
)
|
||||
speccpu2017_validate_image(
|
||||
test_output.tga test_expected.tga test_validate.out
|
||||
-avg -threshold 0.95 -maxthreshold 0.001
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-limit disk 0 "${INPUT_train_DIR}/train_input.tga" -resize 320x240 -shear 31
|
||||
-edge 140 -negate -flop -resize 900x900 -edge 10 train_output.tga
|
||||
RUN_TYPE train
|
||||
)
|
||||
speccpu2017_validate_image(
|
||||
train_output.tga train_expected.tga train_validate.out
|
||||
-avg -threshold 0.95 -maxthreshold 0.001
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-limit disk 0 "${INPUT_ref_DIR}/refrate_input.tga" -edge 41
|
||||
-resample 181% -emboss 31 -colorspace YUV -mean-shift 19x19+15%
|
||||
-resize 30% refrate_output.tga
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
speccpu2017_validate_image(
|
||||
refrate_output.tga refrate_expected.tga refrate_validate.out
|
||||
-avg -threshold 0.95 -maxthreshold 0.001
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output(RELATIVE_TOLERANCE 0.01)
|
||||
speccpu2017_add_executable(
|
||||
coders/tga.c
|
||||
filters/analyze.c
|
||||
magick/accelerate.c
|
||||
magick/animate.c
|
||||
magick/annotate.c
|
||||
magick/artifact.c
|
||||
magick/attribute.c
|
||||
magick/blob.c
|
||||
magick/cache-view.c
|
||||
magick/cache.c
|
||||
magick/channel.c
|
||||
magick/cipher.c
|
||||
magick/client.c
|
||||
magick/coder.c
|
||||
magick/color.c
|
||||
magick/colormap.c
|
||||
magick/colorspace.c
|
||||
magick/compare.c
|
||||
magick/composite.c
|
||||
magick/compress.c
|
||||
magick/configure.c
|
||||
magick/constitute.c
|
||||
magick/decorate.c
|
||||
magick/delegate.c
|
||||
magick/display.c
|
||||
magick/distort.c
|
||||
magick/distribute-cache.c
|
||||
magick/draw.c
|
||||
magick/effect.c
|
||||
magick/enhance.c
|
||||
magick/exception.c
|
||||
magick/feature.c
|
||||
magick/fourier.c
|
||||
magick/fx.c
|
||||
magick/gem.c
|
||||
magick/geometry.c
|
||||
magick/hashmap.c
|
||||
magick/histogram.c
|
||||
magick/identify.c
|
||||
magick/image.c
|
||||
magick/layer.c
|
||||
magick/list.c
|
||||
magick/locale.c
|
||||
magick/log.c
|
||||
magick/magic.c
|
||||
magick/magick.c
|
||||
magick/matrix.c
|
||||
magick/memory.c
|
||||
magick/mime.c
|
||||
magick/module.c
|
||||
magick/monitor.c
|
||||
magick/montage.c
|
||||
magick/morphology.c
|
||||
magick/option.c
|
||||
magick/paint.c
|
||||
magick/pixel.c
|
||||
magick/policy.c
|
||||
magick/prepress.c
|
||||
magick/profile.c
|
||||
magick/property.c
|
||||
magick/quantize.c
|
||||
magick/quantum-export.c
|
||||
magick/quantum-import.c
|
||||
magick/quantum.c
|
||||
magick/random.c
|
||||
magick/registry.c
|
||||
magick/resample.c
|
||||
magick/resize.c
|
||||
magick/resource.c
|
||||
magick/segment.c
|
||||
magick/semaphore.c
|
||||
magick/shear.c
|
||||
magick/signature.c
|
||||
magick/splay-tree.c
|
||||
magick/static.c
|
||||
magick/statistic.c
|
||||
magick/stream.c
|
||||
magick/string.c
|
||||
magick/threshold.c
|
||||
magick/timer.c
|
||||
magick/token.c
|
||||
magick/transform.c
|
||||
magick/type.c
|
||||
magick/utility.c
|
||||
magick/version.c
|
||||
magick/xml-tree.c
|
||||
utilities/convert.c
|
||||
wand/convert.c
|
||||
wand/drawing-wand.c
|
||||
wand/magick-image.c
|
||||
wand/magick-wand.c
|
||||
wand/mogrify.c
|
||||
wand/pixel-wand.c
|
||||
wand/magick-property.c
|
||||
wand/pixel-iterator.c
|
||||
wand/wand.c
|
||||
magick/deprecate.c
|
||||
)
|
|
@ -0,0 +1,72 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/544.nab_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
add_definitions(-DNOPERFLIB -DNOREDUCE)
|
||||
speccpu2017_add_include_dirs(specrand regex-alpha)
|
||||
link_libraries(-lm)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
hkrdenq 1930344093 1000
|
||||
WORKDIR input
|
||||
STDOUT hkrdenq.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
aminos 391519156 1000
|
||||
WORKDIR input
|
||||
STDOUT aminos.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
gcn4dna 1850041461 300
|
||||
WORKDIR input
|
||||
STDOUT gcn4dna.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
1am0 1122214447 122
|
||||
WORKDIR input
|
||||
STDOUT 1am0.out
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output(RELATIVE_TOLERANCE 0.01)
|
||||
speccpu2017_add_executable(
|
||||
nabmd.c
|
||||
sff.c
|
||||
nblist.c
|
||||
prm.c
|
||||
memutil.c
|
||||
molio.c
|
||||
molutil.c
|
||||
errormsg.c
|
||||
binpos.c
|
||||
rand2.c
|
||||
select_atoms.c
|
||||
reslib.c
|
||||
database.c
|
||||
traceback.c
|
||||
chirvol.c
|
||||
specrand/specrand.c
|
||||
regex-alpha/regcomp.c
|
||||
regex-alpha/regerror.c
|
||||
regex-alpha/regexec.c
|
||||
regex-alpha/regfree.c
|
||||
)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/997.specrand_fr.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 999.specrand_ir)
|
||||
speccpu2017_inherit(../../CINT2017rate/999.specrand_ir)
|
|
@ -0,0 +1,15 @@
|
|||
#add_subdirectory(503.bwaves_r) # Fortran
|
||||
#add_subdirectory(507.cactuBSSN_r) # C++, C, Fortran
|
||||
add_subdirectory(508.namd_r) # C++
|
||||
add_subdirectory(510.parest_r) # C++
|
||||
add_subdirectory(511.povray_r) # C++, C
|
||||
add_subdirectory(519.lbm_r) # C
|
||||
#add_subdirectory(521.wrf_r) # Fortran, C
|
||||
add_subdirectory(526.blender_r) # C++, C
|
||||
#add_subdirectory(527.cam4_r) # Fortran, C
|
||||
add_subdirectory(538.imagick_r) # C
|
||||
add_subdirectory(544.nab_r) # C
|
||||
#add_subdirectory(549.fotonik3d_r) # Fortran
|
||||
#add_subdirectory(554.roms_r) # Fortran
|
||||
|
||||
add_subdirectory(997.specrand_fr) # C
|
|
@ -0,0 +1,43 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/619.lbm_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 519.lbm_r)
|
||||
|
||||
add_definitions(-DLARGE_WORKLOAD)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
20 reference.dat 0 1 200_200_260_ldc.of
|
||||
STDOUT lbm.out
|
||||
WORKDIR input
|
||||
RUN_TYPE test
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
300 reference.dat 0 1 200_200_260_ldc.of
|
||||
STDOUT lbm.out
|
||||
WORKDIR input
|
||||
RUN_TYPE train
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
2000 reference.dat 0 0 200_200_260_ldc.of
|
||||
STDOUT lbm.out
|
||||
WORKDIR input
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_inherit(../../CFP2017rate/519.lbm_r)
|
|
@ -0,0 +1,30 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/638.imagick_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 538.imagick_r)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-limit disk 0 "${INPUT_ref_DIR}/refspeed_input.tga" -resize 817%
|
||||
-rotate -2.76 -shave 540x375 -alpha remove -auto-level -contrast-stretch 1x1%
|
||||
-colorspace Lab -channel R -equalize +channel -colorspace sRGB
|
||||
-define histogram:unique-colors=false -adaptive-blur 0x5 -despeckle
|
||||
-auto-gamma -adaptive-sharpen 55 -enhance -brightness-contrast 10x10
|
||||
-resize 30% refspeed_output.tga
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
speccpu2017_validate_image(
|
||||
refspeed_output.tga refspeed_expected.tga refspeed_validate.out
|
||||
-avg -threshold 0.95 -maxthreshold 0.001
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_inherit(../../CFP2017rate/538.imagick_r)
|
|
@ -0,0 +1,21 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/644.nab_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 544.nab_r)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
3j1n 20140317 220
|
||||
WORKDIR input
|
||||
STDOUT 3j1n.out
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_inherit(../../CFP2017rate/544.nab_r)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/996.specrand_fs.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 999.specrand_ir)
|
||||
speccpu2017_inherit(../../CINT2017rate/999.specrand_ir)
|
|
@ -0,0 +1,12 @@
|
|||
#add_subdirectory(603.bwaves_s) # Fortran
|
||||
#add_subdirectory(607.cactuBSSN_s) # C++, C, Fortran
|
||||
add_subdirectory(619.lbm_s) # C
|
||||
#add_subdirectory(621.wrf_s) # Fortran, C
|
||||
#add_subdirectory(627.cam4_s) # Fortran, C
|
||||
#add_subdirectory(628.pop2_s) # Fortran, C
|
||||
add_subdirectory(638.imagick_s) # C
|
||||
add_subdirectory(644.nab_s) # C
|
||||
#add_subdirectory(649.fotonik3d_s) # Fortran
|
||||
#add_subdirectory(654.roms_s) # Fortran
|
||||
|
||||
add_subdirectory(996.specrand_fs) # C
|
|
@ -1,12 +1,9 @@
|
|||
macro(test_input run_type filename size)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/${filename}
|
||||
${size}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
data/${run_type}/input/${filename} ${size} > ${filename}.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${filename}.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${filename}.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${filename}.out ${filename}.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -18,4 +15,5 @@ test_input(ref input.graphic 60)
|
|||
test_input(ref input.random 60)
|
||||
test_input(ref input.program 60)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(164.gzip ${Source})
|
||||
llvm_test_data_spec_default(164.gzip)
|
||||
|
|
|
@ -2,19 +2,19 @@ list(APPEND CPPFLAGS -DNO_GRAPHICSS)
|
|||
list(APPEND LDFLAGS -lm)
|
||||
|
||||
macro(test_input run_type costs_tolerance)
|
||||
set(COSTS_OUT ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/costs.out)
|
||||
# The benchmark keeps appending to costs.out, so we have to make sure there
|
||||
# is none from previous runs
|
||||
llvm_test_prepare(RUN_TYPE ${run_type} rm -f ${COSTS_OUT})
|
||||
llvm_test_prepare(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
rm -f data/${run_type}/input/costs.out
|
||||
)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
net.in arch.in place.out dum.out
|
||||
-nodisp -place_only -init_t 5 -exit_t 0.005 -alpha_t 0.9412 -inner_num 2
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/place_log.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/place_log.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/place_log.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/place_log.out place_log.out
|
||||
)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
|
@ -22,20 +22,18 @@ macro(test_input run_type costs_tolerance)
|
|||
-nodisp -route_only -route_chan_width 15 -pres_fac_mult 2 -acc_fac 1 -first_iter_pres_fac 4 -initial_pres_fac 8
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/route_log.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.015
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/route_log.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/route_log.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.015 data/${run_type}/output/route_log.out route_log.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.015
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/route.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/route.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.015
|
||||
data/${run_type}/output/route.out
|
||||
data/${run_type}/input/route.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r ${costs_tolerance}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/costs.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/costs.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r ${costs_tolerance}
|
||||
data/${run_type}/output/costs.out
|
||||
data/${run_type}/input/costs.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -43,9 +41,5 @@ test_input(ref 0.05)
|
|||
test_input(train 0.05)
|
||||
test_input(test 0.10)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
|
||||
# The benchmark writes the output where the input files are, so we have to
|
||||
# copy the data over.
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(175.vpr ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)
|
||||
llvm_test_executable(175.vpr ${Source})
|
||||
llvm_test_data_spec(175.vpr MUST_COPY data)
|
||||
|
|
|
@ -10,13 +10,11 @@ list(APPEND CFLAGS -std=gnu89)
|
|||
list(APPEND CPPFLAGS -D__DATE__="XXX" -D__TIME__="XXX")
|
||||
|
||||
macro(test_input run_type ifile sfile)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/${ifile}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/${sfile}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
data/${run_type}/input/${ifile} -o ${sfile}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${sfile}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${sfile}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${sfile} ${sfile}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -28,4 +26,5 @@ test_input(ref scilab.i scilab.s)
|
|||
test_input(train cp-decl.i cp-decl.s)
|
||||
test_input(test cccp.i cccp.s)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(176.gcc ${Source})
|
||||
llvm_test_data_spec_default(176.gcc)
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/inp.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/inp.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
data/${run_type}/input/inp.in > inp.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/mcf.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mcf.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/mcf.out mcf.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/inp.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/inp.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/inp.out inp.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -18,4 +14,5 @@ test_input(ref)
|
|||
test_input(train)
|
||||
test_input(test)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(181.mcf ${Source})
|
||||
llvm_test_data_spec_default(181.mcf)
|
||||
|
|
|
@ -72,14 +72,11 @@ foreach(FILENAME ${SourceNames})
|
|||
endforeach()
|
||||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
< ${BENCHMARK_DIR}/data/${run_type}/input/crafty.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/crafty.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
< data/${run_type}/input/crafty.in > crafty.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/crafty.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/crafty.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/crafty.out crafty.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -87,4 +84,5 @@ test_input(ref)
|
|||
test_input(train)
|
||||
test_input(test)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(186.crafty ${Source})
|
||||
llvm_test_data_spec_default(186.crafty)
|
||||
|
|
|
@ -4,14 +4,13 @@ endif()
|
|||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
2.1.dict -batch
|
||||
< ${BENCHMARK_DIR}/data/${run_type}/input/${run_type}.in
|
||||
< ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${run_type}.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
WORKDIR ${BENCHMARK_DIR}/data/all/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${run_type}.out ${run_type}.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -19,4 +18,5 @@ test_input(ref)
|
|||
test_input(train)
|
||||
test_input(test)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(197.parser ${Source})
|
||||
llvm_test_data_spec_default(197.parser)
|
||||
|
|
|
@ -144,7 +144,7 @@ foreach(FILENAME ${SourceNames})
|
|||
endforeach()
|
||||
|
||||
macro(test_input run_type)
|
||||
set(INPUT_DIR ${BENCHMARK_DIR}/data/${run_type}/input)
|
||||
set(INPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input)
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${INPUT_DIR}
|
||||
chair.control.cook chair.camera chair.surfaces
|
||||
${CMAKE_CURRENT_BINARY_DIR}/chair.cook.ppm
|
||||
|
@ -164,20 +164,20 @@ macro(test_input run_type)
|
|||
${CMAKE_CURRENT_BINARY_DIR}/pixels_out.kajiya
|
||||
)
|
||||
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 0.005
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/pixels_out.cook
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pixels_out.cook
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 0.005
|
||||
data/${run_type}/output/pixels_out.cook
|
||||
pixels_out.cook
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 0.005
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/pixels_out.rushmeier
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pixels_out.rushmeier
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 0.005
|
||||
data/${run_type}/output/pixels_out.rushmeier
|
||||
pixels_out.rushmeier
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-a 0.005
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/pixels_out.kajiya
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pixels_out.kajiya
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -a 0.005
|
||||
data/${run_type}/output/pixels_out.kajiya
|
||||
pixels_out.kajiya
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -185,4 +185,5 @@ test_input(ref)
|
|||
test_input(train)
|
||||
test_input(test)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(252.eon ${Source})
|
||||
llvm_test_data_spec_default(252.eon)
|
||||
|
|
|
@ -72,96 +72,81 @@ endforeach()
|
|||
|
||||
macro(test_input run_type perlscript output)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
-I${BENCHMARK_DIR}/data/all/input/lib ${perlscript}
|
||||
-I${CMAKE_CURRENT_BINARY_DIR}/data/all/input/lib ${perlscript}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
${ARGN}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${output}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# (Parameters come from the respective XXX.in files)
|
||||
test_input(train
|
||||
${BENCHMARK_DIR}/data/all/input/diffmail.pl
|
||||
2.350.15.24.23.150.out
|
||||
2 350 15 24 23 150
|
||||
WORKDIR ${BENCHMARK_DIR}/data/all/input
|
||||
diffmail.pl 2.350.15.24.23.150.out 2 350 15 24 23 150
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
)
|
||||
test_input(train
|
||||
${BENCHMARK_DIR}/data/all/input/perfect.pl
|
||||
b.3.out
|
||||
b 3
|
||||
WORKDIR ${BENCHMARK_DIR}/data/all/input
|
||||
perfect.pl b.3.out b 3
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
)
|
||||
test_input(train
|
||||
${BENCHMARK_DIR}/data/train/input/scrabbl.pl
|
||||
scrabbl.out
|
||||
< ${BENCHMARK_DIR}/data/train/input/scrabbl.in
|
||||
WORKDIR ${BENCHMARK_DIR}/data/train/input
|
||||
scrabbl.pl scrabbl.out < scrabbl.in
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input
|
||||
)
|
||||
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/ref/input/splitmail.pl
|
||||
850.5.19.18.1500.out
|
||||
850 5 19 18 1500
|
||||
splitmail.pl 850.5.19.18.1500.out 850 5 19 18 1500
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/ref/input/splitmail.pl
|
||||
704.12.26.16.836.out
|
||||
704 12 26 16 836
|
||||
splitmail.pl 704.12.26.16.836.out 704 12 26 16 836
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/ref/input/splitmail.pl
|
||||
535.13.25.24.1091.out
|
||||
535 13 25 24 1091
|
||||
splitmail.pl 535.13.25.24.1091.out 535 13 25 24 1091
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/ref/input/splitmail.pl
|
||||
957.12.23.26.1014.out
|
||||
957 12 23 26 1014
|
||||
splitmail.pl 957.12.23.26.1014.out 957 12 23 26 1014
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/all/input/diffmail.pl
|
||||
2.550.15.24.23.100.out
|
||||
2 550 15 24 23 100
|
||||
WORKDIR ${BENCHMARK_DIR}/data/all/input
|
||||
diffmail.pl 2.550.15.24.23.100.out 2 550 15 24 23 100
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/all/input/perfect.pl
|
||||
b.3.m.4.out
|
||||
b 3 m 4
|
||||
WORKDIR ${BENCHMARK_DIR}/data/all/input
|
||||
perfect.pl b.3.m.4.out b 3 m 4
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/ref/input/makerand.pl
|
||||
makerand.out
|
||||
WORKDIR ${BENCHMARK_DIR}/data/all/input
|
||||
makerand.pl makerand.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
)
|
||||
|
||||
file(GLOB inputs ${BENCHMARK_DIR}/data/test/input/*.t)
|
||||
foreach(input ${inputs})
|
||||
get_filename_component(basename ${input} NAME_WE)
|
||||
test_input(test
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/test/input/${basename}.t
|
||||
${basename}.out
|
||||
${basename}.t ${basename}.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
|
||||
)
|
||||
endforeach()
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(253.perlbmk ${Source})
|
||||
llvm_test_data_spec(253.perlbmk MUST_COPY
|
||||
data/test/output
|
||||
data/train/input
|
||||
data/train/output
|
||||
data/ref/output
|
||||
data/all/input
|
||||
)
|
||||
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
|
||||
llvm_copy_dir(253.perlbmk ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
|
||||
${BENCHMARK_DIR}/data/all/input
|
||||
${BENCHMARK_DIR}/data/test/input
|
||||
)
|
||||
llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
llvm_copy_dir(253.perlbmk ${CMAKE_CURRENT_BINARY_DIR}/data/ref/input
|
||||
${BENCHMARK_DIR}/data/all/input
|
||||
${BENCHMARK_DIR}/data/ref/input
|
||||
)
|
||||
|
|
|
@ -13,15 +13,13 @@ endif()
|
|||
LIST(APPEND CFLAGS -fwrapv)
|
||||
|
||||
macro(test_input run_type heapsize)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
-l ${BENCHMARK_DIR}/data/all/input -q -m ${heapsize}
|
||||
< ${BENCHMARK_DIR}/data/${run_type}/input/${run_type}.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-l data/all/input -q -m ${heapsize}
|
||||
< data/${run_type}/input/${run_type}.in
|
||||
> ${run_type}.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.01
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.01 data/${run_type}/output/${run_type}.out ${run_type}.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -29,4 +27,5 @@ test_input(ref 192M)
|
|||
test_input(train 128M)
|
||||
test_input(test 64M)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(254.gap ${Source})
|
||||
llvm_test_data_spec_default(254.gap)
|
||||
|
|
|
@ -5,9 +5,10 @@ macro(test_input run_type input outfile)
|
|||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
${input}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${outfile}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${outfile}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP}
|
||||
data/${run_type}/output/${outfile}
|
||||
data/${run_type}/input/${outfile}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -25,9 +26,5 @@ test_input(ref ${endianname}1.raw vortex1.out)
|
|||
test_input(ref ${endianname}2.raw vortex2.out)
|
||||
test_input(ref ${endianname}3.raw vortex3.out)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
|
||||
# The benchmark writes the output where the input files are, so we have to
|
||||
# copy the data over.
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)
|
||||
llvm_test_executable(255.vortex ${Source})
|
||||
llvm_test_data_spec(255.vortex MUST_COPY data)
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
macro(test_input run_type filename size)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/${filename}
|
||||
${size}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${filename}.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
data/${run_type}/input/${filename} ${size} > ${filename}.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${filename}.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${filename}.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${filename}.out ${filename}.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -16,4 +14,5 @@ test_input(ref input.source 58)
|
|||
test_input(ref input.graphic 58)
|
||||
test_input(ref input.program 58)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(256.bzip2 ${Source})
|
||||
llvm_test_data_spec_default(256.bzip2)
|
||||
|
|
|
@ -5,13 +5,11 @@ list(APPEND CFLAGS -Wno-return-type)
|
|||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
${run_type}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${run_type}.stdout
|
||||
${run_type} > ${run_type}.stdout
|
||||
)
|
||||
foreach(file IN ITEMS ${run_type}.twf ${run_type}.pl2 ${run_type}.sav ${run_type}.pl1 ${run_type}.pl1 ${run_type}.pin ${run_type}.stdout ${run_type}.sv2 ${run_type}.out)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${file}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${file}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${file} data/${run_type}/input/${file}
|
||||
)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
@ -20,9 +18,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
|
||||
# The benchmark writes the output where the input files are, so we have to
|
||||
# copy the data over.
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)
|
||||
llvm_test_executable(300.twolf ${Source})
|
||||
llvm_test_data_spec(300.twolf MUST_COPY data)
|
||||
|
|
|
@ -1,24 +1,21 @@
|
|||
list(APPEND CPPFLAGS -DSPEC_CPU2000)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU2000_LP64)
|
||||
include(${CMAKE_SOURCE_DIR}/External/SPEC/SpecCPU2000.cmake)
|
||||
if(TEST_SUITE_SPEC2000_ROOT)
|
||||
macro(cint2000_subdir BENCHMARK)
|
||||
set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CINT2000/${BENCHMARK})
|
||||
file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
|
||||
add_subdirectory(${BENCHMARK})
|
||||
endmacro()
|
||||
|
||||
cint2000_subdir(164.gzip)
|
||||
cint2000_subdir(175.vpr)
|
||||
cint2000_subdir(176.gcc)
|
||||
cint2000_subdir(181.mcf)
|
||||
cint2000_subdir(186.crafty)
|
||||
cint2000_subdir(197.parser)
|
||||
cint2000_subdir(252.eon)
|
||||
cint2000_subdir(253.perlbmk)
|
||||
cint2000_subdir(254.gap)
|
||||
cint2000_subdir(255.vortex)
|
||||
cint2000_subdir(256.bzip2)
|
||||
cint2000_subdir(300.twolf)
|
||||
endif()
|
||||
|
||||
macro(cint2000_subdir BENCHMARK)
|
||||
set(BENCHMARK_DIR ${TEST_SUITE_SPEC2000_ROOT}/benchspec/CINT2000/${BENCHMARK})
|
||||
set(PROG ${BENCHMARK})
|
||||
file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
|
||||
add_subdirectory(${BENCHMARK})
|
||||
endmacro()
|
||||
|
||||
cint2000_subdir(164.gzip)
|
||||
cint2000_subdir(175.vpr)
|
||||
cint2000_subdir(176.gcc)
|
||||
cint2000_subdir(181.mcf)
|
||||
cint2000_subdir(186.crafty)
|
||||
cint2000_subdir(197.parser)
|
||||
cint2000_subdir(252.eon)
|
||||
cint2000_subdir(253.perlbmk)
|
||||
cint2000_subdir(254.gap)
|
||||
cint2000_subdir(255.vortex)
|
||||
cint2000_subdir(256.bzip2)
|
||||
cint2000_subdir(300.twolf)
|
||||
|
|
|
@ -74,56 +74,43 @@ macro(test_input run_type perlscript output)
|
|||
> ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
${ARGN}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${output}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# (Parameters come from the respective XXX.in files)
|
||||
test_input(train
|
||||
${BENCHMARK_DIR}/data/all/input/diffmail.pl
|
||||
diffmail.2.550.15.24.23.100.out
|
||||
2 550 15 24 23 100
|
||||
diffmail.pl diffmail.2.550.15.24.23.100.out 2 550 15 24 23 100
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
)
|
||||
test_input(train
|
||||
${BENCHMARK_DIR}/data/train/input/perfect.pl
|
||||
perfect.b.3.out
|
||||
b 3
|
||||
perfect.pl perfect.b.3.out b 3
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input
|
||||
)
|
||||
test_input(train
|
||||
${BENCHMARK_DIR}/data/all/input/splitmail.pl
|
||||
splitmail.535.13.25.24.1091.out
|
||||
535 13 25 24 1091
|
||||
splitmail.pl splitmail.535.13.25.24.1091.out 535 13 25 24 1091
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
)
|
||||
test_input(train
|
||||
${BENCHMARK_DIR}/data/train/input/suns.pl
|
||||
suns.out
|
||||
suns.pl suns.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/train/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE train ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/train/output/validate
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/train/input/validate
|
||||
llvm_test_verify(RUN_TYPE train WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/train/output/validate data/train/input/validate
|
||||
)
|
||||
#test_input(train scrabbl.pl scrabbl.in) # spec doesn't come with output files?
|
||||
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/all/input/diffmail.pl
|
||||
diffmail.4.800.10.17.19.300.out
|
||||
4 800 10 17 19 300
|
||||
diffmail.pl diffmail.4.800.10.17.19.300.out 4 800 10 17 19 300
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/all/input/splitmail.pl
|
||||
splitmail.1600.12.26.16.4500.out
|
||||
1600 12 26 16 4500
|
||||
splitmail.pl splitmail.1600.12.26.16.4500.out 1600 12 26 16 4500
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
)
|
||||
test_input(ref
|
||||
${BENCHMARK_DIR}/data/ref/input/checkspam.pl
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/ref/input/checkspam.pl
|
||||
checkspam.2500.5.25.11.150.1.1.1.1.out
|
||||
2500 5 25 11 150 1 1 1 1
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
|
@ -133,13 +120,10 @@ file(GLOB inputs ${BENCHMARK_DIR}/data/test/input/*.t)
|
|||
foreach(input ${inputs})
|
||||
get_filename_component(basename ${input} NAME_WE)
|
||||
test_input(test
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/test/input/${basename}.t
|
||||
${basename}.out
|
||||
${basename}.t ${basename}.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
|
||||
)
|
||||
endforeach()
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(${PROG} ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)
|
||||
llvm_test_executable(400.perlbench ${Source})
|
||||
llvm_test_data_spec(400.perlbench MUST_COPY data)
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
macro(test_input run_type input size output)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${input}
|
||||
${size}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${input} ${size} > ${output}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${output}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
test_input(test ${BENCHMARK_DIR}/data/all/input/input.program 5 input.program.out)
|
||||
test_input(test ${BENCHMARK_DIR}/data/test/input/dryer.jpg 2 dryer.jpg.out)
|
||||
test_input(test data/all/input/input.program 5 input.program.out)
|
||||
test_input(test data/test/input/dryer.jpg 2 dryer.jpg.out)
|
||||
|
||||
test_input(train ${BENCHMARK_DIR}/data/all/input/input.program 10 input.program.out)
|
||||
test_input(train ${BENCHMARK_DIR}/data/train/input/byoudoin.jpg 5 byoudoin.jpg.out)
|
||||
test_input(train ${BENCHMARK_DIR}/data/all/input/input.combined 80 input.combined.out)
|
||||
test_input(train data/all/input/input.program 10 input.program.out)
|
||||
test_input(train data/train/input/byoudoin.jpg 5 byoudoin.jpg.out)
|
||||
test_input(train data/all/input/input.combined 80 input.combined.out)
|
||||
|
||||
test_input(ref ${BENCHMARK_DIR}/data/ref/input/input.source 280 input.source.out)
|
||||
test_input(ref ${BENCHMARK_DIR}/data/ref/input/chicken.jpg 30 chicken.jpg.out)
|
||||
test_input(ref ${BENCHMARK_DIR}/data/ref/input/liberty.jpg 30 liberty.jpg.out)
|
||||
test_input(ref ${BENCHMARK_DIR}/data/all/input/input.program 280 input.program.out)
|
||||
test_input(ref ${BENCHMARK_DIR}/data/ref/input/text.html 280 text.html.out)
|
||||
test_input(ref ${BENCHMARK_DIR}/data/all/input/input.combined 200 input.combined.out)
|
||||
test_input(ref data/ref/input/input.source 280 input.source.out)
|
||||
test_input(ref data/ref/input/chicken.jpg 30 chicken.jpg.out)
|
||||
test_input(ref data/ref/input/liberty.jpg 30 liberty.jpg.out)
|
||||
test_input(ref data/all/input/input.program 280 input.program.out)
|
||||
test_input(ref data/ref/input/text.html 280 text.html.out)
|
||||
test_input(ref data/all/input/input.combined 200 input.combined.out)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(401.bzip2 ${Source})
|
||||
llvm_test_data_spec_default(401.bzip2)
|
||||
|
|
|
@ -11,13 +11,11 @@ endif()
|
|||
list(APPEND CPPFLAGS -DPOSIX -DSPEC_CPU_HAVE_BOOL)
|
||||
|
||||
macro(test_input run_type ifile sfile)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/${ifile}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/${sfile}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
data/${run_type}/input/${ifile} -o ${sfile}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${sfile}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${sfile}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${sfile} ${sfile}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -33,4 +31,5 @@ test_input(ref g23.in g23.s)
|
|||
test_input(ref s04.in s04.s)
|
||||
test_input(ref scilab.in scilab.s)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(403.gcc ${Source})
|
||||
llvm_test_data_spec_default(403.gcc)
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
list(APPEND CPPFLAS -DWANT_STDC_PROTO)
|
||||
list(APPEND CPPFLAGS -DWANT_STDC_PROTO)
|
||||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/inp.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/inp.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
data/${run_type}/input/inp.in > inp.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/inp.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/inp.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/inp.out inp.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/mcf.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mcf.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/mcf.out mcf.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -20,4 +16,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(429.mcf ${Source})
|
||||
llvm_test_data_spec_default(429.mcf)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
list(APPEND CPPFLAS -DWANT_STDC_PROTO)
|
||||
list(APPEND CPPFLAGS -DWANT_STDC_PROTO)
|
||||
list(APPEND LDFLAGS -lm)
|
||||
|
||||
set(Source "")
|
||||
|
@ -12,14 +12,13 @@ include_directories(${BENCHMARK_DIR}/src/include)
|
|||
|
||||
macro(test_input run_type tstfile outfile)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/all/input
|
||||
--quiet --mode gtp
|
||||
< ${BENCHMARK_DIR}/data/${run_type}/input/${tstfile}
|
||||
< ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${tstfile}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${outfile}
|
||||
WORKDIR ${BENCHMARK_DIR}/data/all/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${outfile}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${outfile}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${outfile} ${outfile}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -41,4 +40,5 @@ foreach(tstfile IN ITEMS
|
|||
test_input(ref ${tstfile} ${basename}.out)
|
||||
endforeach()
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(445.gobmk ${Source})
|
||||
llvm_test_data_spec_default(445.gobmk)
|
||||
|
|
|
@ -2,20 +2,14 @@ list(APPEND LDFLAGS -lm)
|
|||
|
||||
macro(test_input run_type input output)
|
||||
# The benchmark modifies the data file, need to copy a fresh one
|
||||
llvm_test_prepare(RUN_TYPE ${run_type}
|
||||
cp -f
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/${input}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${input}
|
||||
llvm_test_prepare(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
cp -f data/${run_type}/input/${input} ${input}
|
||||
)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${ARGN} ${input}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${ARGN} ${input} > ${output}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.002 -a 0.00001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${output}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.002 -a 0.00001 data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -26,10 +20,8 @@ test_input(train leng100.hmm leng100.out
|
|||
--fixed 0 --mean 425 --num 85000 --sd 300 --seed 0
|
||||
)
|
||||
# Copy nph3.hmm as well
|
||||
llvm_test_prepare(RUN_TYPE ref
|
||||
cp -f
|
||||
${BENCHMARK_DIR}/data/ref/input/nph3.hmm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nph3.hmm
|
||||
llvm_test_prepare(RUN_TYPE ref WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
cp -f data/ref/input/nph3.hmm nph3.hmm
|
||||
)
|
||||
test_input(ref swiss41 nph3.out
|
||||
nph3.hmm
|
||||
|
@ -38,4 +30,5 @@ test_input(ref retro.hmm retro.out
|
|||
--fixed 0 --mean 500 --num 500000 --sd 350 --seed 0
|
||||
)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(456.hmmer ${Source})
|
||||
llvm_test_data_spec_default(456.hmmer)
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${BENCHMARK_DIR}/data/${run_type}/input/${run_type}.txt
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
data/${run_type}/input/${run_type}.txt > ${run_type}.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${run_type}.out ${run_type}.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -13,4 +11,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(458.sjeng ${Source})
|
||||
llvm_test_data_spec_default(458.sjeng)
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
list(APPEND LDFLAGS -lm)
|
||||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${ARGN}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_run(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${ARGN} > ${run_type}.out
|
||||
)
|
||||
# Reference outputs for test+train have CRLF line endings so we have to use
|
||||
# diff --strip-trailing-cr
|
||||
# (This flag is a gnu extension, maybe we should rather extend fpcmp or
|
||||
# somehow copy+fix the reference outputs?)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} diff
|
||||
--strip-trailing-cr
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
diff --strip-trailing-cr
|
||||
data/${run_type}/output/${run_type}.out
|
||||
${run_type}.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -20,4 +19,5 @@ test_input(test 33 5)
|
|||
test_input(train 143 25)
|
||||
test_input(ref 1397 8)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(462.libquantum ${Source})
|
||||
llvm_test_data_spec_default(462.libquantum)
|
||||
|
|
|
@ -3,17 +3,19 @@ list(APPEND CFLAGS -fsigned-char)
|
|||
|
||||
macro(test_input run_type leading level)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
-d ${leading}encoder_${level}.cfg
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${leading}${level}_encodelog.out
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${leading}${level}_encodelog.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${leading}${level}_encodelog.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP}
|
||||
data/${run_type}/output/${leading}${level}_encodelog.out
|
||||
${leading}${level}_encodelog.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${leading}${level}_leakybucketparam.cfg
|
||||
${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/${leading}${level}_leakybucketparam.cfg
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP}
|
||||
data/${run_type}/output/${leading}${level}_leakybucketparam.cfg
|
||||
data/${run_type}/input/${leading}${level}_leakybucketparam.cfg
|
||||
)
|
||||
|
||||
endmacro()
|
||||
|
@ -24,10 +26,14 @@ test_input(ref foreman_ref_ baseline)
|
|||
test_input(ref foreman_ref_ main)
|
||||
test_input(ref sss_ main)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(464.h264ref ${Source})
|
||||
llvm_test_data_spec(464.h264ref
|
||||
data/test/output
|
||||
data/train/output
|
||||
data/ref/output
|
||||
)
|
||||
|
||||
# TODO: This will copy a bit more than 50M of data, maybe we should symlink it?
|
||||
include(CopyDir)
|
||||
llvm_copy_dir(464.h264ref ${CMAKE_CURRENT_BINARY_DIR}/data/test/input
|
||||
${BENCHMARK_DIR}/data/all/input
|
||||
${BENCHMARK_DIR}/data/test/input
|
||||
|
|
|
@ -97,19 +97,19 @@ endforeach()
|
|||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
-f ${BENCHMARK_DIR}/data/${run_type}/input/omnetpp.ini
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/omnetpp.log
|
||||
-f data/${run_type}/input/omnetpp.ini
|
||||
> omnetpp.log
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.00001 -a 0.000001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/omnetpp.log
|
||||
${CMAKE_CURRENT_BINARY_DIR}/omnetpp.log
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.00001 -a 0.000001
|
||||
data/${run_type}/output/omnetpp.log
|
||||
omnetpp.log
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.00001 -a 0.000001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/omnetpp.sca
|
||||
${CMAKE_CURRENT_BINARY_DIR}/omnetpp.sca
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.00001 -a 0.000001
|
||||
data/${run_type}/output/omnetpp.sca
|
||||
omnetpp.sca
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -117,4 +117,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(471.omnetpp ${Source})
|
||||
llvm_test_data_spec_default(471.omnetpp)
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
list(APPEND CPPFLAGS -std=c++98)
|
||||
|
||||
macro(test_input run_type input output)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
${input}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
${input} > ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${output}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.001 data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -17,4 +16,5 @@ test_input(train rivers1.cfg rivers1.out)
|
|||
test_input(ref BigLakes2048.cfg BigLakes2048.out)
|
||||
test_input(ref rivers.cfg rivers.out)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(473.astar ${Source})
|
||||
llvm_test_data_spec_default(473.astar)
|
||||
|
|
|
@ -11,6 +11,9 @@ add_definitions(
|
|||
-DXML_USE_NATIVE_TRANSCODER
|
||||
-DXML_USE_INMEM_MESSAGELOADER
|
||||
)
|
||||
|
||||
list(APPEND CXXFLAGS -std=gnu++98)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${BENCHMARK_DIR}/src
|
||||
|
@ -29,14 +32,12 @@ endif()
|
|||
|
||||
macro(test_input run_type input output)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
-v ${input} xalanc.xsl
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
-r 0.001
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${output}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} -r 0.001 data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -44,4 +45,5 @@ test_input(test test.xml test.out)
|
|||
test_input(train allbooks.xml train.out)
|
||||
test_input(ref t5.xml ref.out)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(483.xalancbmk ${Source})
|
||||
llvm_test_data_spec_default(483.xalancbmk)
|
||||
|
|
|
@ -20,6 +20,8 @@ CPPFLAGS += -DNDEBUG -DAPP_NO_THREADS -DXALAN_INMEM_MSG_LOADER \
|
|||
-I$(SPEC_BENCH_DIR)/src/xercesc/util/Transcoders/Iconv \
|
||||
-I$(SPEC_BENCH_DIR)/src/xalanc/include
|
||||
|
||||
CXXFLAGS += -std=gnu++98
|
||||
|
||||
ifeq ($(TARGET_OS),Darwin)
|
||||
CPPFLAGS += -DSPEC_CPU_MACOSX
|
||||
endif
|
||||
|
|
|
@ -1,47 +1,15 @@
|
|||
list(APPEND CPPFLAGS -DSPEC_CPU)
|
||||
|
||||
if(TARGET_OS STREQUAL "Darwin")
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_MACOSX)
|
||||
elseif(TARGET_OS STREQUAL "Linux")
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_LINUX)
|
||||
include(${CMAKE_SOURCE_DIR}/External/SPEC/SpecCPU2006.cmake)
|
||||
if(TEST_SUITE_SPEC2006_ROOT)
|
||||
cpu2006_subdir(400.perlbench)
|
||||
cpu2006_subdir(401.bzip2)
|
||||
cpu2006_subdir(403.gcc)
|
||||
cpu2006_subdir(429.mcf)
|
||||
cpu2006_subdir(445.gobmk)
|
||||
cpu2006_subdir(456.hmmer)
|
||||
cpu2006_subdir(458.sjeng)
|
||||
cpu2006_subdir(462.libquantum)
|
||||
cpu2006_subdir(464.h264ref)
|
||||
cpu2006_subdir(471.omnetpp)
|
||||
cpu2006_subdir(473.astar)
|
||||
cpu2006_subdir(483.xalancbmk)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "x86")
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_X64)
|
||||
else()
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_IA32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(IS_BIGENDIAN)
|
||||
if(IS_BIGENDIAN)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_BIGENDIAN)
|
||||
else()
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_LITTLEENDIAN)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND CPPFLAGS -DSPEC_CPU_LP64)
|
||||
endif()
|
||||
|
||||
macro(cpu2006_subdir BENCHMARK)
|
||||
set(BENCHMARK_DIR ${TEST_SUITE_SPEC2006_ROOT}/benchspec/CPU2006/${BENCHMARK})
|
||||
set(PROG ${BENCHMARK})
|
||||
file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
|
||||
add_subdirectory(${BENCHMARK})
|
||||
endmacro()
|
||||
|
||||
cpu2006_subdir(400.perlbench)
|
||||
cpu2006_subdir(401.bzip2)
|
||||
cpu2006_subdir(403.gcc)
|
||||
cpu2006_subdir(429.mcf)
|
||||
cpu2006_subdir(445.gobmk)
|
||||
cpu2006_subdir(456.hmmer)
|
||||
cpu2006_subdir(458.sjeng)
|
||||
cpu2006_subdir(462.libquantum)
|
||||
cpu2006_subdir(464.h264ref)
|
||||
cpu2006_subdir(471.omnetpp)
|
||||
cpu2006_subdir(473.astar)
|
||||
cpu2006_subdir(483.xalancbmk)
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/500.perlbench_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
add_definitions(
|
||||
-DPERL_CORE
|
||||
-DDOUBLE_SLASHES_SPECIAL=0
|
||||
-D_LARGE_FILES
|
||||
-D_LARGEFILE_SOURCE
|
||||
-D_FILE_OFFSET_BITS=64
|
||||
)
|
||||
speccpu2017_add_include_dirs(
|
||||
.
|
||||
dist/IO
|
||||
cpan/Time-HiRes
|
||||
cpan/HTML-Parser
|
||||
ext/re
|
||||
specrand
|
||||
)
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
link_libraries(-lm)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I. -I./lib makerand.pl
|
||||
STDOUT makerand.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I. -I./lib test.pl
|
||||
STDOUT test.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I./lib diffmail.pl 2 550 15 24 23 100
|
||||
STDOUT diffmail.2.550.15.24.23.100.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I./lib perfect.pl b 3
|
||||
STDOUT perfect.b.3.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I. -I./lib scrabbl.pl -i scrabbl.in -o scrabbl.out
|
||||
STDOUT scrabbl.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I./lib splitmail.pl 535 13 25 24 1091 1
|
||||
STDOUT splitmail.535.13.25.24.1091.1.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I. -I./lib suns.pl
|
||||
STDOUT suns.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I./lib checkspam.pl 2500 5 25 11 150 1 1 1 1
|
||||
STDOUT checkspam.2500.5.25.11.150.1.1.1.1.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I./lib diffmail.pl 4 800 10 17 19 300
|
||||
STDOUT diffmail.4.800.10.17.19.300.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
-I./lib splitmail.pl 6400 12 26 16 100 0
|
||||
STDOUT splitmail.6400.12.26.16.100.0.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable(
|
||||
av.c
|
||||
caretx.c
|
||||
deb.c
|
||||
doio.c
|
||||
doop.c
|
||||
dump.c
|
||||
globals.c
|
||||
gv.c
|
||||
hv.c
|
||||
keywords.c
|
||||
locale.c
|
||||
mg.c
|
||||
numeric.c
|
||||
op.c
|
||||
pad.c
|
||||
perl.c
|
||||
perlapi.c
|
||||
perlio.c
|
||||
perlmain.c
|
||||
perly.c
|
||||
pp.c
|
||||
pp_ctl.c
|
||||
pp_hot.c
|
||||
pp_pack.c
|
||||
pp_sort.c
|
||||
pp_sys.c
|
||||
regcomp.c
|
||||
regexec.c
|
||||
run.c
|
||||
scope.c
|
||||
sv.c
|
||||
taint.c
|
||||
toke.c
|
||||
universal.c
|
||||
utf8.c
|
||||
util.c
|
||||
reentr.c
|
||||
mro_core.c
|
||||
mathoms.c
|
||||
specrand/specrand.c
|
||||
dist/PathTools/Cwd.c
|
||||
dist/Data-Dumper/Dumper.c
|
||||
ext/Devel-Peek/Peek.c
|
||||
cpan/Digest-MD5/MD5.c
|
||||
cpan/Digest-SHA/SHA.c
|
||||
DynaLoader.c
|
||||
dist/IO/IO.c
|
||||
dist/IO/poll.c
|
||||
cpan/MIME-Base64/Base64.c
|
||||
Opcode.c
|
||||
dist/Storable/Storable.c
|
||||
ext/Sys-Hostname/Hostname.c
|
||||
cpan/Time-HiRes/HiRes.c
|
||||
ext/XS-Typemap/stdio.c
|
||||
ext/attributes/attributes.c
|
||||
cpan/HTML-Parser/Parser.c
|
||||
ext/mro/mro.c
|
||||
ext/re/re.c
|
||||
ext/re/re_comp.c
|
||||
ext/re/re_exec.c
|
||||
ext/arybase/arybase.c
|
||||
ext/PerlIO-scalar/scalar.c
|
||||
ext/PerlIO-via/via.c
|
||||
ext/File-Glob/bsd_glob.c
|
||||
ext/File-Glob/Glob.c
|
||||
ext/Hash-Util/Util.c
|
||||
ext/Hash-Util-FieldHash/FieldHash.c
|
||||
ext/Tie-Hash-NamedCapture/NamedCapture.c
|
||||
cpan/Scalar-List-Utils/ListUtil.c
|
||||
)
|
||||
speccpu2017_prepare_rundir()
|
|
@ -0,0 +1,460 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/502.gcc_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
add_definitions(-DSPEC_502 -DIN_GCC -DHAVE_CONFIG_H)
|
||||
speccpu2017_add_include_dirs(. include spec_qsort)
|
||||
add_compile_options(-fgnu89-inline)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_test_DIR}/t1.c" -O3 -finline-limit=50000 -o t1.opts-O3_-finline-limit_50000.s
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_train_DIR}/200.c" -O3 -finline-limit=50000 -o 200.opts-O3_-finline-limit_50000.s
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_train_DIR}/scilab.c" -O3 -finline-limit=50000 -o scilab.opts-O3_-finline-limit_50000.s
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_train_DIR}/train01.c" -O3 -finline-limit=50000 -o train01.opts-O3_-finline-limit_50000.s
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/gcc-pp.c" -O3 -finline-limit=0 -fif-conversion -fif-conversion2 -o gcc-pp.opts-O3_-finline-limit_0_-fif-conversion_-fif-conversion2.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/gcc-pp.c" -O2 -finline-limit=36000 -fpic -o gcc-pp.opts-O2_-finline-limit_36000_-fpic.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/gcc-smaller.c" -O3 -fipa-pta -o gcc-smaller.opts-O3_-fipa-pta.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/ref32.c" -O5 -o ref32.opts-O5.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/ref32.c" -O3 -fselective-scheduling -fselective-scheduling2 -o ref32.opts-O3_-fselective-scheduling_-fselective-scheduling2.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable(
|
||||
main.c
|
||||
cc1-checksum.c
|
||||
alias.c
|
||||
alloca.c
|
||||
alloc-pool.c
|
||||
argv.c
|
||||
attribs.c
|
||||
auto-inc-dec.c
|
||||
bb-reorder.c
|
||||
bid2dpd_dpd2bid.c
|
||||
bitmap.c
|
||||
bt-load.c
|
||||
c-lang.c
|
||||
c-errors.c
|
||||
c-lex.c
|
||||
c-pragma.c
|
||||
c-decl.c
|
||||
c-typeck.c
|
||||
c-convert.c
|
||||
c-aux-info.c
|
||||
c-common.c
|
||||
c-opts.c
|
||||
c-format.c
|
||||
c-semantics.c
|
||||
c-ppoutput.c
|
||||
c-objc-common.c
|
||||
c-dump.c
|
||||
c-parser.c
|
||||
c-gimplify.c
|
||||
c-pretty-print.c
|
||||
c-omp.c
|
||||
caller-save.c
|
||||
calls.c
|
||||
cfg.c
|
||||
cfganal.c
|
||||
cfgbuild.c
|
||||
cfgcleanup.c
|
||||
cfgexpand.c
|
||||
cfghooks.c
|
||||
cfglayout.c
|
||||
cfgloop.c
|
||||
cfgloopanal.c
|
||||
cfgloopmanip.c
|
||||
cfgrtl.c
|
||||
cgraph.c
|
||||
cgraphbuild.c
|
||||
cgraphunit.c
|
||||
combine.c
|
||||
combine-stack-adj.c
|
||||
concat.c
|
||||
convert.c
|
||||
coverage.c
|
||||
cp-demangle.c
|
||||
cp-demint.c
|
||||
cplus-dem.c
|
||||
cpp_directives.c
|
||||
cpp_lex.c
|
||||
cpp_errors.c
|
||||
cpp_expr.c
|
||||
cpp_charset.c
|
||||
cpp_macro.c
|
||||
cpp_traditional.c
|
||||
cpp_line-map.c
|
||||
cpp_symtab.c
|
||||
cpp_identifiers.c
|
||||
cpp_mkdeps.c
|
||||
cpp_pch.c
|
||||
cpp_directives-only.c
|
||||
crc32.c
|
||||
cse.c
|
||||
cselib.c
|
||||
dbxout.c
|
||||
dbgcnt.c
|
||||
dce.c
|
||||
ddg.c
|
||||
debug.c
|
||||
decContext.c
|
||||
decimal128.c
|
||||
decimal32.c
|
||||
decimal64.c
|
||||
decNumber.c
|
||||
df-byte-scan.c
|
||||
df-core.c
|
||||
df-problems.c
|
||||
df-scan.c
|
||||
dfp.c
|
||||
diagnostic.c
|
||||
dojump.c
|
||||
dominance.c
|
||||
domwalk.c
|
||||
double-int.c
|
||||
dse.c
|
||||
dwarf2asm.c
|
||||
dwarf2out.c
|
||||
dyn-string.c
|
||||
ebitmap.c
|
||||
emit-rtl.c
|
||||
et-forest.c
|
||||
except.c
|
||||
explow.c
|
||||
expmed.c
|
||||
expr.c
|
||||
fdmatch.c
|
||||
fibheap.c
|
||||
filename_cmp.c
|
||||
final.c
|
||||
fixed-value.c
|
||||
floatformat.c
|
||||
fold-const.c
|
||||
fopen_unlocked.c
|
||||
function.c
|
||||
fwprop.c
|
||||
gcse.c
|
||||
genrtl.c
|
||||
getopt1.c
|
||||
getopt.c
|
||||
getpwd.c
|
||||
getruntime.c
|
||||
ggc-common.c
|
||||
ggc-page.c
|
||||
gimple.c
|
||||
gimple-iterator.c
|
||||
gimple-low.c
|
||||
gimple-pretty-print.c
|
||||
gimplify.c
|
||||
graph.c
|
||||
graphds.c
|
||||
graphite.c
|
||||
graphite-blocking.c
|
||||
graphite-clast-to-gimple.c
|
||||
graphite-dependences.c
|
||||
graphite-interchange.c
|
||||
graphite-poly.c
|
||||
graphite-ppl.c
|
||||
graphite-scop-detection.c
|
||||
graphite-sese-to-poly.c
|
||||
gtype-desc.c
|
||||
haifa-sched.c
|
||||
hashtab.c
|
||||
hex.c
|
||||
hooks.c
|
||||
host-ieee128.c
|
||||
host-ieee32.c
|
||||
host-ieee64.c
|
||||
host-linux.c
|
||||
i386.c
|
||||
i386-c.c
|
||||
ifcvt.c
|
||||
incpath.c
|
||||
init-regs.c
|
||||
insn-attrtab.c
|
||||
insn-automata.c
|
||||
insn-emit.c
|
||||
insn-extract.c
|
||||
insn-modes.c
|
||||
insn-opinit.c
|
||||
insn-output.c
|
||||
insn-peep.c
|
||||
insn-preds.c
|
||||
insn-recog.c
|
||||
integrate.c
|
||||
ipa-cp.c
|
||||
ipa-inline.c
|
||||
ipa-prop.c
|
||||
ipa-pure-const.c
|
||||
ipa-reference.c
|
||||
ipa-struct-reorg.c
|
||||
ipa-type-escape.c
|
||||
ipa-utils.c
|
||||
ipa.c
|
||||
ira.c
|
||||
ira-build.c
|
||||
ira-costs.c
|
||||
ira-conflicts.c
|
||||
ira-color.c
|
||||
ira-emit.c
|
||||
ira-lives.c
|
||||
jump.c
|
||||
lambda-code.c
|
||||
lambda-mat.c
|
||||
lambda-trans.c
|
||||
langhooks.c
|
||||
lbasename.c
|
||||
lcm.c
|
||||
lists.c
|
||||
loop-doloop.c
|
||||
loop-init.c
|
||||
loop-invariant.c
|
||||
loop-iv.c
|
||||
loop-unroll.c
|
||||
loop-unswitch.c
|
||||
lower-subreg.c
|
||||
lrealpath.c
|
||||
lto-cgraph.c
|
||||
lto-streamer-in.c
|
||||
lto-streamer-out.c
|
||||
lto-section-in.c
|
||||
lto-section-out.c
|
||||
lto-symtab.c
|
||||
lto-opts.c
|
||||
lto-streamer.c
|
||||
lto-wpa-fixup.c
|
||||
make-relative-prefix.c
|
||||
make-temp-file.c
|
||||
partition.c
|
||||
matrix-reorg.c
|
||||
mcf.c
|
||||
md5.c
|
||||
mkstemps.c
|
||||
mode-switching.c
|
||||
modulo-sched.c
|
||||
objalloc.c
|
||||
obstack.c
|
||||
omega.c
|
||||
omp-low.c
|
||||
optabs.c
|
||||
options.c
|
||||
opts-common.c
|
||||
opts.c
|
||||
params.c
|
||||
passes.c
|
||||
physmem.c
|
||||
plugin.c
|
||||
pointer-set.c
|
||||
postreload-gcse.c
|
||||
postreload.c
|
||||
predict.c
|
||||
pretty-print.c
|
||||
print-rtl.c
|
||||
print-tree.c
|
||||
profile.c
|
||||
recog.c
|
||||
reg-stack.c
|
||||
regcprop.c
|
||||
regex.c
|
||||
reginfo.c
|
||||
regmove.c
|
||||
regrename.c
|
||||
regstat.c
|
||||
reload.c
|
||||
reload1.c
|
||||
reorg.c
|
||||
resource.c
|
||||
rtl-error.c
|
||||
rtl.c
|
||||
rtlanal.c
|
||||
rtlhooks.c
|
||||
safe-ctype.c
|
||||
sbitmap.c
|
||||
sched-deps.c
|
||||
sched-ebb.c
|
||||
sched-rgn.c
|
||||
sched-vis.c
|
||||
sdbout.c
|
||||
sel-sched-ir.c
|
||||
sel-sched-dump.c
|
||||
sel-sched.c
|
||||
sese.c
|
||||
sha1.c
|
||||
simplify-rtx.c
|
||||
sort.c
|
||||
spaces.c
|
||||
sparseset.c
|
||||
splay-tree.c
|
||||
sreal.c
|
||||
stack-ptr-mod.c
|
||||
statistics.c
|
||||
stmt.c
|
||||
stor-layout.c
|
||||
store-motion.c
|
||||
stringpool.c
|
||||
strsignal.c
|
||||
stub-objc.c
|
||||
targhooks.c
|
||||
timevar.c
|
||||
tracer.c
|
||||
tree-affine.c
|
||||
tree-call-cdce.c
|
||||
tree-cfg.c
|
||||
tree-cfgcleanup.c
|
||||
tree-chrec.c
|
||||
tree-complex.c
|
||||
tree-data-ref.c
|
||||
tree-dfa.c
|
||||
tree-dump.c
|
||||
tree-eh.c
|
||||
tree-if-conv.c
|
||||
tree-inline.c
|
||||
tree-into-ssa.c
|
||||
tree-iterator.c
|
||||
tree-loop-distribution.c
|
||||
tree-loop-linear.c
|
||||
tree-mudflap.c
|
||||
tree-nested.c
|
||||
tree-nrv.c
|
||||
tree-object-size.c
|
||||
tree-optimize.c
|
||||
tree-outof-ssa.c
|
||||
tree-parloops.c
|
||||
tree-phinodes.c
|
||||
tree-predcom.c
|
||||
tree-pretty-print.c
|
||||
tree-profile.c
|
||||
tree-scalar-evolution.c
|
||||
tree-sra.c
|
||||
tree-switch-conversion.c
|
||||
tree-ssa-address.c
|
||||
tree-ssa-alias.c
|
||||
tree-ssa-ccp.c
|
||||
tree-ssa-coalesce.c
|
||||
tree-ssa-copy.c
|
||||
tree-ssa-copyrename.c
|
||||
tree-ssa-dce.c
|
||||
tree-ssa-dom.c
|
||||
tree-ssa-dse.c
|
||||
tree-ssa-forwprop.c
|
||||
tree-ssa-ifcombine.c
|
||||
tree-ssa-live.c
|
||||
tree-ssa-loop-ch.c
|
||||
tree-ssa-loop-im.c
|
||||
tree-ssa-loop-ivcanon.c
|
||||
tree-ssa-loop-ivopts.c
|
||||
tree-ssa-loop-manip.c
|
||||
tree-ssa-loop-niter.c
|
||||
tree-ssa-loop-prefetch.c
|
||||
tree-ssa-loop-unswitch.c
|
||||
tree-ssa-loop.c
|
||||
tree-ssa-math-opts.c
|
||||
tree-ssa-operands.c
|
||||
tree-ssa-phiopt.c
|
||||
tree-ssa-phiprop.c
|
||||
tree-ssa-pre.c
|
||||
tree-ssa-propagate.c
|
||||
tree-ssa-reassoc.c
|
||||
tree-ssa-sccvn.c
|
||||
tree-ssa-sink.c
|
||||
tree-ssa-structalias.c
|
||||
tree-ssa-ter.c
|
||||
tree-ssa-threadedge.c
|
||||
tree-ssa-threadupdate.c
|
||||
tree-ssa-uncprop.c
|
||||
tree-ssa.c
|
||||
tree-ssanames.c
|
||||
tree-stdarg.c
|
||||
tree-tailcall.c
|
||||
tree-vect-generic.c
|
||||
tree-vect-patterns.c
|
||||
tree-vect-data-refs.c
|
||||
tree-vect-stmts.c
|
||||
tree-vect-loop.c
|
||||
tree-vect-loop-manip.c
|
||||
tree-vect-slp.c
|
||||
tree-vectorizer.c
|
||||
tree-vrp.c
|
||||
tree.c
|
||||
unlink-if-ordinary.c
|
||||
value-prof.c
|
||||
var-tracking.c
|
||||
varpool.c
|
||||
varasm.c
|
||||
varray.c
|
||||
vec.c
|
||||
vmsdbgout.c
|
||||
web.c
|
||||
xatexit.c
|
||||
xcoffout.c
|
||||
xexit.c
|
||||
xmalloc.c
|
||||
xmemdup.c
|
||||
xstrdup.c
|
||||
xstrerror.c
|
||||
xstrndup.c
|
||||
c-cppbuiltin.c
|
||||
c-pch.c
|
||||
cpp_files.c
|
||||
cpp_init.c
|
||||
cppdefault.c
|
||||
intl.c
|
||||
prefix.c
|
||||
strerror.c
|
||||
toplev.c
|
||||
vasprintf.c
|
||||
version.c
|
||||
builtins.c
|
||||
real.c
|
||||
mini-gmp.c
|
||||
spec_qsort/spec_qsort.c
|
||||
)
|
|
@ -0,0 +1,38 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/505.mcf_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
speccpu2017_add_include_dirs(spec_qsort)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_test_DIR}/inp.in"
|
||||
STDOUT inp.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_train_DIR}/inp.in"
|
||||
STDOUT inp.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/inp.in"
|
||||
STDOUT inp.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable()
|
|
@ -0,0 +1,44 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/520.omnetpp_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
add_definitions(-DWITH_NETBUILDER)
|
||||
speccpu2017_add_include_dirs(
|
||||
simulator/platdep
|
||||
simulator
|
||||
model
|
||||
)
|
||||
|
||||
# test #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-c General -r 0
|
||||
STDOUT omnetpp.General-0.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
# train ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-c General -r 0
|
||||
STDOUT omnetpp.General-0.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
# ref ##########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-c General -r 0
|
||||
STDOUT omnetpp.General-0.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output(RELATIVE_TOLERANCE 0.00001 ABSOLUTE_TOLERANCE 0.000001)
|
||||
speccpu2017_add_executable()
|
||||
speccpu2017_prepare_rundir()
|
|
@ -0,0 +1,821 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/523.xalancbmk_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
add_definitions(
|
||||
-DAPP_NO_THREADS
|
||||
-DXALAN_INMEM_MSG_LOADER
|
||||
-DPROJ_XMLPARSER
|
||||
-DPROJ_XMLUTIL
|
||||
-DPROJ_PARSERS
|
||||
-DPROJ_SAX4C
|
||||
-DPROJ_SAX2
|
||||
-DPROJ_DOM
|
||||
-DPROJ_VALIDATORS
|
||||
-DXML_USE_INMEM_MESSAGELOADER
|
||||
)
|
||||
speccpu2017_add_include_dirs(
|
||||
.
|
||||
xercesc
|
||||
xercesc/dom
|
||||
xercesc/dom/impl
|
||||
xercesc/sax
|
||||
xercesc/util/MsgLoaders/InMemory
|
||||
xercesc/util/Transcoders/Iconv
|
||||
xalanc/include
|
||||
)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-v test.xml xalanc.xsl
|
||||
STDOUT test-test.out
|
||||
WORKDIR input
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-v allbooks.xml xalanc.xsl
|
||||
STDOUT train-allbooks.out
|
||||
WORKDIR input
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
-v t5.xml xalanc.xsl
|
||||
STDOUT ref-t5.out
|
||||
WORKDIR input
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable(
|
||||
AIXPlatformUtils.cpp
|
||||
CSetDefs.cpp
|
||||
Win32PlatformUtils.cpp
|
||||
Win32MsgLoader.cpp
|
||||
Win32TransService.cpp
|
||||
Win32TransService2.cpp
|
||||
SunCCDefs.cpp
|
||||
SolarisPlatformUtils.cpp
|
||||
GCCDefs.cpp
|
||||
LinuxPlatformUtils.cpp
|
||||
MIPSproDefs.cpp
|
||||
IRIXPlatformUtils.cpp
|
||||
HPCCDefs.cpp
|
||||
HPPlatformUtils.cpp
|
||||
ASCIIRangeFactory.cpp
|
||||
AVT.cpp
|
||||
AVTPart.cpp
|
||||
AVTPartSimple.cpp
|
||||
AVTPartXPath.cpp
|
||||
AbstractDOMParser.cpp
|
||||
AbstractNumericFacetValidator.cpp
|
||||
AbstractNumericValidator.cpp
|
||||
AbstractStringValidator.cpp
|
||||
AllContentModel.cpp
|
||||
AnySimpleTypeDatatypeValidator.cpp
|
||||
AnyURIDatatypeValidator.cpp
|
||||
AttrImpl.cpp
|
||||
AttrMapImpl.cpp
|
||||
AttrNSImpl.cpp
|
||||
AttributeListImpl.cpp
|
||||
AttributesImpl.cpp
|
||||
BMPattern.cpp
|
||||
Base64.cpp
|
||||
Base64BinaryDatatypeValidator.cpp
|
||||
BinFileInputStream.cpp
|
||||
BinFileOutputStream.cpp
|
||||
BinInputStream.cpp
|
||||
BinMemInputStream.cpp
|
||||
BinMemOutputStream.cpp
|
||||
BinOutputStream.cpp
|
||||
BitSet.cpp
|
||||
BlockRangeFactory.cpp
|
||||
BooleanDatatypeValidator.cpp
|
||||
CDATASectionImpl.cpp
|
||||
CMAny.cpp
|
||||
CMBinaryOp.cpp
|
||||
CMUnaryOp.cpp
|
||||
CharToken.cpp
|
||||
CharacterDataImpl.cpp
|
||||
ChildNode.cpp
|
||||
ClosureToken.cpp
|
||||
CommentImpl.cpp
|
||||
ComplexTypeInfo.cpp
|
||||
ConcatToken.cpp
|
||||
ConditionToken.cpp
|
||||
Constants.cpp
|
||||
ContentLeafNameTypeVector.cpp
|
||||
ContentSpecNode.cpp
|
||||
CountersTable.cpp
|
||||
DFAContentModel.cpp
|
||||
DGXMLScanner.cpp
|
||||
DOMAttrImpl.cpp
|
||||
DOMAttrMapImpl.cpp
|
||||
DOMAttrNSImpl.cpp
|
||||
DOMBuilderImpl.cpp
|
||||
DOMCDATASectionImpl.cpp
|
||||
DOMCharacterDataImpl.cpp
|
||||
DOMChildNode.cpp
|
||||
DOMCommentImpl.cpp
|
||||
DOMConfigurationImpl.cpp
|
||||
DOMDeepNodeListImpl.cpp
|
||||
DOMDocumentFragmentImpl.cpp
|
||||
DOMDocumentImpl.cpp
|
||||
DOMDocumentTypeImpl.cpp
|
||||
DOMElementImpl.cpp
|
||||
DOMElementNSImpl.cpp
|
||||
DOMEntityImpl.cpp
|
||||
DOMEntityReferenceImpl.cpp
|
||||
DOMErrorImpl.cpp
|
||||
DOMException.cpp
|
||||
DOMImplementationImpl.cpp
|
||||
DOMImplementationRegistry.cpp
|
||||
DOMLocatorImpl.cpp
|
||||
DOMNamedNodeMapImpl.cpp
|
||||
DOMNodeIDMap.cpp
|
||||
DOMNodeImpl.cpp
|
||||
DOMNodeIteratorImpl.cpp
|
||||
DOMNodeListImpl.cpp
|
||||
DOMNodeVector.cpp
|
||||
DOMNormalizer.cpp
|
||||
DOMNotationImpl.cpp
|
||||
DOMParentNode.cpp
|
||||
DOMParser.cpp
|
||||
DOMProcessingInstructionImpl.cpp
|
||||
DOMRangeException.cpp
|
||||
DOMRangeImpl.cpp
|
||||
DOMServices.cpp
|
||||
DOMString.cpp
|
||||
DOMStringHelper.cpp
|
||||
DOMStringPool.cpp
|
||||
DOMStringPrintWriter.cpp
|
||||
DOMSupport.cpp
|
||||
DOMSupportDefault.cpp
|
||||
DOMSupportException.cpp
|
||||
DOMSupportInit.cpp
|
||||
DOMTextImpl.cpp
|
||||
DOMTreeWalkerImpl.cpp
|
||||
DOMTypeInfoImpl.cpp
|
||||
DOMWriterImpl.cpp
|
||||
DOMXPathException.cpp
|
||||
DOM_Attr.cpp
|
||||
DOM_CDATASection.cpp
|
||||
DOM_CharacterData.cpp
|
||||
DOM_Comment.cpp
|
||||
DOM_DOMException.cpp
|
||||
DOM_DOMImplementation.cpp
|
||||
DOM_Document.cpp
|
||||
DOM_DocumentFragment.cpp
|
||||
DOM_DocumentType.cpp
|
||||
DOM_Element.cpp
|
||||
DOM_Entity.cpp
|
||||
DOM_EntityReference.cpp
|
||||
DOM_NamedNodeMap.cpp
|
||||
DOM_Node.cpp
|
||||
DOM_NodeFilter.cpp
|
||||
DOM_NodeIterator.cpp
|
||||
DOM_NodeList.cpp
|
||||
DOM_Notation.cpp
|
||||
DOM_ProcessingInstruction.cpp
|
||||
DOM_Range.cpp
|
||||
DOM_RangeException.cpp
|
||||
DOM_Text.cpp
|
||||
DOM_TreeWalker.cpp
|
||||
DOM_XMLDecl.cpp
|
||||
DStringPool.cpp
|
||||
DTDAttDef.cpp
|
||||
DTDAttDefList.cpp
|
||||
DTDElementDecl.cpp
|
||||
DTDEntityDecl.cpp
|
||||
DTDGrammar.cpp
|
||||
DTDScanner.cpp
|
||||
DTDValidator.cpp
|
||||
DatatypeValidator.cpp
|
||||
DatatypeValidatorFactory.cpp
|
||||
DateDatatypeValidator.cpp
|
||||
DateTimeDatatypeValidator.cpp
|
||||
DateTimeValidator.cpp
|
||||
DayDatatypeValidator.cpp
|
||||
DecimalDatatypeValidator.cpp
|
||||
DeepNodeListImpl.cpp
|
||||
DefaultPanicHandler.cpp
|
||||
DocumentFragmentImpl.cpp
|
||||
DocumentImpl.cpp
|
||||
DocumentTypeImpl.cpp
|
||||
DomMemDebug.cpp
|
||||
DoubleDatatypeValidator.cpp
|
||||
DoubleSupport.cpp
|
||||
Dummy.cpp
|
||||
DurationDatatypeValidator.cpp
|
||||
ENTITYDatatypeValidator.cpp
|
||||
ElemApplyImport.cpp
|
||||
ElemApplyTemplates.cpp
|
||||
ElemAttribute.cpp
|
||||
ElemAttributeSet.cpp
|
||||
ElemCallTemplate.cpp
|
||||
ElemChoose.cpp
|
||||
ElemComment.cpp
|
||||
ElemCopy.cpp
|
||||
ElemCopyOf.cpp
|
||||
ElemDecimalFormat.cpp
|
||||
ElemElement.cpp
|
||||
ElemEmpty.cpp
|
||||
ElemExtensionCall.cpp
|
||||
ElemFallback.cpp
|
||||
ElemForEach.cpp
|
||||
ElemForwardCompatible.cpp
|
||||
ElemIf.cpp
|
||||
ElemLiteralResult.cpp
|
||||
ElemMessage.cpp
|
||||
ElemNumber.cpp
|
||||
ElemOtherwise.cpp
|
||||
ElemPI.cpp
|
||||
ElemParam.cpp
|
||||
ElemSort.cpp
|
||||
ElemStack.cpp
|
||||
ElemTemplate.cpp
|
||||
ElemTemplateElement.cpp
|
||||
ElemText.cpp
|
||||
ElemTextLiteral.cpp
|
||||
ElemUse.cpp
|
||||
ElemValueOf.cpp
|
||||
ElemVariable.cpp
|
||||
ElemWhen.cpp
|
||||
ElemWithParam.cpp
|
||||
ElementDefinitionImpl.cpp
|
||||
ElementImpl.cpp
|
||||
ElementNSImpl.cpp
|
||||
ElementPrefixResolverProxy.cpp
|
||||
EncodingValidator.cpp
|
||||
EntityImpl.cpp
|
||||
EntityReferenceImpl.cpp
|
||||
ExecutionContext.cpp
|
||||
ExtensionFunctionHandler.cpp
|
||||
ExtensionNSHandler.cpp
|
||||
FieldActivator.cpp
|
||||
FieldValueMap.cpp
|
||||
FileHandleImpl.cpp
|
||||
FloatDatatypeValidator.cpp
|
||||
FormatterListener.cpp
|
||||
FormatterStringLengthCounter.cpp
|
||||
FormatterToDOM.cpp
|
||||
FormatterToDeprecatedXercesDOM.cpp
|
||||
FormatterToHTML.cpp
|
||||
FormatterToNull.cpp
|
||||
FormatterToSourceTree.cpp
|
||||
FormatterToText.cpp
|
||||
FormatterToXML.cpp
|
||||
FormatterToXercesDOM.cpp
|
||||
FormatterTreeWalker.cpp
|
||||
Function.cpp
|
||||
FunctionConcat.cpp
|
||||
FunctionContains.cpp
|
||||
FunctionCurrent.cpp
|
||||
FunctionDifference.cpp
|
||||
FunctionDistinct.cpp
|
||||
FunctionDocument.cpp
|
||||
FunctionElementAvailable.cpp
|
||||
FunctionEvaluate.cpp
|
||||
FunctionFormatNumber.cpp
|
||||
FunctionFunctionAvailable.cpp
|
||||
FunctionGenerateID.cpp
|
||||
FunctionHasSameNodes.cpp
|
||||
FunctionID.cpp
|
||||
FunctionIntersection.cpp
|
||||
FunctionKey.cpp
|
||||
FunctionLang.cpp
|
||||
FunctionNamespaceURI.cpp
|
||||
FunctionNodeSet.cpp
|
||||
FunctionNormalizeSpace.cpp
|
||||
FunctionStartsWith.cpp
|
||||
FunctionString.cpp
|
||||
FunctionSubstring.cpp
|
||||
FunctionSubstringAfter.cpp
|
||||
FunctionSubstringBefore.cpp
|
||||
FunctionSystemProperty.cpp
|
||||
FunctionTranslate.cpp
|
||||
FunctionUnparsedEntityURI.cpp
|
||||
GeneralAttributeCheck.cpp
|
||||
GenerateEvent.cpp
|
||||
Grammar.cpp
|
||||
GrammarResolver.cpp
|
||||
HashPtr.cpp
|
||||
HashXMLCh.cpp
|
||||
HeaderDummy.cpp
|
||||
HexBin.cpp
|
||||
HexBinaryDatatypeValidator.cpp
|
||||
ICUResHandler.cpp
|
||||
IC_Field.cpp
|
||||
IC_Key.cpp
|
||||
IC_KeyRef.cpp
|
||||
IC_Selector.cpp
|
||||
IC_Unique.cpp
|
||||
IDDatatypeValidator.cpp
|
||||
IDREFDatatypeValidator.cpp
|
||||
IGXMLScanner.cpp
|
||||
IGXMLScanner2.cpp
|
||||
IconvTransService.cpp
|
||||
IdentityConstraint.cpp
|
||||
IdentityConstraintHandler.cpp
|
||||
InMemHandler.cpp
|
||||
InMemMsgLoader.cpp
|
||||
InputSource.cpp
|
||||
KVStringPair.cpp
|
||||
KeyTable.cpp
|
||||
ListDatatypeValidator.cpp
|
||||
LocalFileFormatTarget.cpp
|
||||
LocalFileInputSource.cpp
|
||||
Match.cpp
|
||||
MemBufFormatTarget.cpp
|
||||
MemBufInputSource.cpp
|
||||
MemoryManagerArrayImpl.cpp
|
||||
MemoryManagerImpl.cpp
|
||||
MixedContentModel.cpp
|
||||
ModifierToken.cpp
|
||||
MonthDatatypeValidator.cpp
|
||||
MonthDayDatatypeValidator.cpp
|
||||
MsgFileOutputStream.cpp
|
||||
MutableNodeRefList.cpp
|
||||
Mutexes.cpp
|
||||
NCNameDatatypeValidator.cpp
|
||||
NLSHandler.cpp
|
||||
NOTATIONDatatypeValidator.cpp
|
||||
NameDatatypeValidator.cpp
|
||||
NamedNodeMapAttributeList.cpp
|
||||
NamedNodeMapImpl.cpp
|
||||
NamespaceScope.cpp
|
||||
NamespacesHandler.cpp
|
||||
NodeIDMap.cpp
|
||||
NodeImpl.cpp
|
||||
NodeIteratorImpl.cpp
|
||||
NodeListImpl.cpp
|
||||
NodeNameTreeWalker.cpp
|
||||
NodeRefList.cpp
|
||||
NodeRefListBase.cpp
|
||||
NodeSortKey.cpp
|
||||
NodeSorter.cpp
|
||||
NodeVector.cpp
|
||||
NotationImpl.cpp
|
||||
NullPrintWriter.cpp
|
||||
Op.cpp
|
||||
OpFactory.cpp
|
||||
OutputContextStack.cpp
|
||||
PSVIAttribute.cpp
|
||||
PSVIAttributeList.cpp
|
||||
PSVIElement.cpp
|
||||
PSVIItem.cpp
|
||||
PanicHandler.cpp
|
||||
ParenToken.cpp
|
||||
ParentNode.cpp
|
||||
ParserForXMLSchema.cpp
|
||||
PlatformSupportInit.cpp
|
||||
PlatformUtils.cpp
|
||||
PrefixResolver.cpp
|
||||
PrintWriter.cpp
|
||||
ProblemListener.cpp
|
||||
ProblemListenerDefault.cpp
|
||||
ProcessingInstructionImpl.cpp
|
||||
QName.cpp
|
||||
QNameDatatypeValidator.cpp
|
||||
RangeFactory.cpp
|
||||
RangeImpl.cpp
|
||||
RangeToken.cpp
|
||||
RangeTokenMap.cpp
|
||||
ReaderMgr.cpp
|
||||
RefCountedImpl.cpp
|
||||
RegularExpression.cpp
|
||||
RegxParser.cpp
|
||||
RegxUtil.cpp
|
||||
Resettable.cpp
|
||||
ResultNamespacesStack.cpp
|
||||
SAX2Handler.cpp
|
||||
SAX2XMLFilterImpl.cpp
|
||||
SAX2XMLReaderImpl.cpp
|
||||
SAXException.cpp
|
||||
SAXParseException.cpp
|
||||
SAXParser.cpp
|
||||
SGXMLScanner.cpp
|
||||
SchemaAttDef.cpp
|
||||
SchemaAttDefList.cpp
|
||||
SchemaElementDecl.cpp
|
||||
SchemaGrammar.cpp
|
||||
SchemaInfo.cpp
|
||||
SchemaSymbols.cpp
|
||||
SchemaValidator.cpp
|
||||
SelectionEvent.cpp
|
||||
SimpleContentModel.cpp
|
||||
StdBinInputStream.cpp
|
||||
StdInInputSource.cpp
|
||||
StdOutFormatTarget.cpp
|
||||
StringDatatypeValidator.cpp
|
||||
StringPool.cpp
|
||||
StringToken.cpp
|
||||
StringTokenizer.cpp
|
||||
Stylesheet.cpp
|
||||
StylesheetConstructionContext.cpp
|
||||
StylesheetConstructionContextDefault.cpp
|
||||
StylesheetExecutionContext.cpp
|
||||
StylesheetExecutionContextDefault.cpp
|
||||
StylesheetHandler.cpp
|
||||
StylesheetRoot.cpp
|
||||
SubstitutionGroupComparator.cpp
|
||||
SynchronizedStringPool.cpp
|
||||
TextImpl.cpp
|
||||
TimeDatatypeValidator.cpp
|
||||
Token.cpp
|
||||
TokenFactory.cpp
|
||||
TopLevelArg.cpp
|
||||
TraceListener.cpp
|
||||
TraceListenerDefault.cpp
|
||||
TracerEvent.cpp
|
||||
TransService.cpp
|
||||
TraverseSchema.cpp
|
||||
TreeWalker.cpp
|
||||
TreeWalkerImpl.cpp
|
||||
URISupport.cpp
|
||||
URLInputSource.cpp
|
||||
UnicodeRangeFactory.cpp
|
||||
UnionDatatypeValidator.cpp
|
||||
UnionToken.cpp
|
||||
ValidationContextImpl.cpp
|
||||
ValueStore.cpp
|
||||
ValueStoreCache.cpp
|
||||
VariablesStack.cpp
|
||||
VecAttrListImpl.cpp
|
||||
VecAttributesImpl.cpp
|
||||
WFXMLScanner.cpp
|
||||
Wrapper4DOMInputSource.cpp
|
||||
Wrapper4InputSource.cpp
|
||||
Writer.cpp
|
||||
XBoolean.cpp
|
||||
XML256TableTranscoder.cpp
|
||||
XML256TableTranscoder390.cpp
|
||||
XML88591Transcoder.cpp
|
||||
XML88591Transcoder390.cpp
|
||||
XMLASCIITranscoder.cpp
|
||||
XMLASCIITranscoder390.cpp
|
||||
XMLAbstractDoubleFloat.cpp
|
||||
XMLAttDef.cpp
|
||||
XMLAttDefList.cpp
|
||||
XMLAttr.cpp
|
||||
XMLBigDecimal.cpp
|
||||
XMLBigInteger.cpp
|
||||
XMLBuffer.cpp
|
||||
XMLBufferMgr.cpp
|
||||
XMLCanRepGroup.cpp
|
||||
XMLChTranscoder.cpp
|
||||
XMLChar.cpp
|
||||
XMLContentModel.cpp
|
||||
XMLDTDDescription.cpp
|
||||
XMLDTDDescriptionImpl.cpp
|
||||
XMLDateTime.cpp
|
||||
XMLDeclImpl.cpp
|
||||
XMLDouble.cpp
|
||||
XMLEBCDICTranscoder.cpp
|
||||
XMLEBCDICTranscoder390.cpp
|
||||
XMLElementDecl.cpp
|
||||
XMLEntityDecl.cpp
|
||||
XMLException.cpp
|
||||
XMLFloat.cpp
|
||||
XMLFormatter.cpp
|
||||
XMLGrammarDescription.cpp
|
||||
XMLGrammarPoolImpl.cpp
|
||||
XMLIBM1047Transcoder.cpp
|
||||
XMLIBM1047Transcoder390.cpp
|
||||
XMLIBM1140Transcoder.cpp
|
||||
XMLIBM1140Transcoder390.cpp
|
||||
XMLInitializer.cpp
|
||||
XMLMsgLoader.cpp
|
||||
XMLNotationDecl.cpp
|
||||
XMLNumber.cpp
|
||||
XMLParserLiaison.cpp
|
||||
XMLRangeFactory.cpp
|
||||
XMLReader.cpp
|
||||
XMLRecognizer.cpp
|
||||
XMLRefInfo.cpp
|
||||
XMLRegisterCleanup.cpp
|
||||
XMLScanner.cpp
|
||||
XMLScannerResolver.cpp
|
||||
XMLSchemaDescription.cpp
|
||||
XMLSchemaDescriptionImpl.cpp
|
||||
XMLString.cpp
|
||||
XMLStringTokenizer.cpp
|
||||
XMLSupportException.cpp
|
||||
XMLSupportInit.cpp
|
||||
XMLUCSTranscoder.cpp
|
||||
XMLURL.cpp
|
||||
XMLUTF16Transcoder.cpp
|
||||
XMLUTF8Transcoder.cpp
|
||||
XMLUTF8Transcoder390.cpp
|
||||
XMLUni.cpp
|
||||
XMLUniCharacter.cpp
|
||||
XMLUri.cpp
|
||||
XMLValidator.cpp
|
||||
XMLWin1252Transcoder.cpp
|
||||
XMLWin1252Transcoder390.cpp
|
||||
XMemory.cpp
|
||||
XNodeSet.cpp
|
||||
XNodeSetAllocator.cpp
|
||||
XNodeSetBase.cpp
|
||||
XNodeSetNodeProxy.cpp
|
||||
XNodeSetNodeProxyAllocator.cpp
|
||||
XNodeSetResultTreeFragProxy.cpp
|
||||
XNull.cpp
|
||||
XNumber.cpp
|
||||
XNumberAllocator.cpp
|
||||
XNumberBase.cpp
|
||||
XObject.cpp
|
||||
XObjectFactory.cpp
|
||||
XObjectFactoryDefault.cpp
|
||||
XObjectResultTreeFragProxy.cpp
|
||||
XObjectResultTreeFragProxyBase.cpp
|
||||
XObjectResultTreeFragProxyText.cpp
|
||||
XObjectTypeCallback.cpp
|
||||
XPath.cpp
|
||||
XPathAllocator.cpp
|
||||
XPathCAPI.cpp
|
||||
XPathConstructionContext.cpp
|
||||
XPathConstructionContextDefault.cpp
|
||||
XPathEnvSupport.cpp
|
||||
XPathEnvSupportDefault.cpp
|
||||
XPathEvaluator.cpp
|
||||
XPathExecutionContext.cpp
|
||||
XPathExecutionContextDefault.cpp
|
||||
XPathExpression.cpp
|
||||
XPathFactory.cpp
|
||||
XPathFactoryBlock.cpp
|
||||
XPathFactoryDefault.cpp
|
||||
XPathFunctionTable.cpp
|
||||
XPathInit.cpp
|
||||
XPathMatcher.cpp
|
||||
XPathMatcherStack.cpp
|
||||
XPathParserException.cpp
|
||||
XPathProcessor.cpp
|
||||
XPathProcessorImpl.cpp
|
||||
XPathSymbols.cpp
|
||||
XProtoType.cpp
|
||||
XResultTreeFrag.cpp
|
||||
XResultTreeFragAllocator.cpp
|
||||
XSAXMLScanner.cpp
|
||||
XSAnnotation.cpp
|
||||
XSAttributeDeclaration.cpp
|
||||
XSAttributeGroupDefinition.cpp
|
||||
XSAttributeUse.cpp
|
||||
XSComplexTypeDefinition.cpp
|
||||
XSDDOMParser.cpp
|
||||
XSDElementNSImpl.cpp
|
||||
XSDErrorReporter.cpp
|
||||
XSDLocator.cpp
|
||||
XSElementDeclaration.cpp
|
||||
XSFacet.cpp
|
||||
XSIDCDefinition.cpp
|
||||
XSLException.cpp
|
||||
XSLTEngineImpl.cpp
|
||||
XSLTInit.cpp
|
||||
XSLTInputSource.cpp
|
||||
XSLTProcessor.cpp
|
||||
XSLTProcessorEnvSupport.cpp
|
||||
XSLTProcessorEnvSupportDefault.cpp
|
||||
XSLTProcessorException.cpp
|
||||
XSLTResultTarget.cpp
|
||||
XSModel.cpp
|
||||
XSModelGroup.cpp
|
||||
XSModelGroupDefinition.cpp
|
||||
XSMultiValueFacet.cpp
|
||||
XSNamespaceItem.cpp
|
||||
XSNotationDeclaration.cpp
|
||||
XSObject.cpp
|
||||
XSObjectFactory.cpp
|
||||
XSParticle.cpp
|
||||
XSSimpleTypeDefinition.cpp
|
||||
XSTypeDefinition.cpp
|
||||
XSValue.cpp
|
||||
XSWildcard.cpp
|
||||
XSerializeEngine.cpp
|
||||
XSpan.cpp
|
||||
XString.cpp
|
||||
XStringAdapter.cpp
|
||||
XStringAdapterAllocator.cpp
|
||||
XStringAllocator.cpp
|
||||
XStringBase.cpp
|
||||
XStringCached.cpp
|
||||
XStringCachedAllocator.cpp
|
||||
XStringReference.cpp
|
||||
XStringReferenceAllocator.cpp
|
||||
XTemplateSerializer.cpp
|
||||
XToken.cpp
|
||||
XTokenNumberAdapter.cpp
|
||||
XTokenNumberAdapterAllocator.cpp
|
||||
XTokenStringAdapter.cpp
|
||||
XTokenStringAdapterAllocator.cpp
|
||||
XUnknown.cpp
|
||||
XUtil.cpp
|
||||
XalanAVTAllocator.cpp
|
||||
XalanAVTPartSimpleAllocator.cpp
|
||||
XalanAVTPartXPathAllocator.cpp
|
||||
XalanAttr.cpp
|
||||
XalanBitmap.cpp
|
||||
XalanCAPI.cpp
|
||||
XalanCDataSection.cpp
|
||||
XalanCharacterData.cpp
|
||||
XalanComment.cpp
|
||||
XalanCompiledStylesheetDefault.cpp
|
||||
XalanDOMException.cpp
|
||||
XalanDOMImplementation.cpp
|
||||
XalanDOMInit.cpp
|
||||
XalanDOMString.cpp
|
||||
XalanDOMStringAllocator.cpp
|
||||
XalanDOMStringCache.cpp
|
||||
XalanDOMStringHashTable.cpp
|
||||
XalanDOMStringPool.cpp
|
||||
XalanDOMStringReusableAllocator.cpp
|
||||
XalanDecimalFormatSymbols.cpp
|
||||
XalanDefaultDocumentBuilder.cpp
|
||||
XalanDefaultParsedSource.cpp
|
||||
XalanDiagnosticMemoryManager.cpp
|
||||
XalanDocument.cpp
|
||||
XalanDocumentFragment.cpp
|
||||
XalanDocumentFragmentNodeRefListBaseProxy.cpp
|
||||
XalanDocumentPrefixResolver.cpp
|
||||
XalanDocumentType.cpp
|
||||
XalanEXSLTCommon.cpp
|
||||
XalanEXSLTDateTime.cpp
|
||||
XalanEXSLTDynamic.cpp
|
||||
XalanEXSLTMath.cpp
|
||||
XalanEXSLTSet.cpp
|
||||
XalanEXSLTString.cpp
|
||||
XalanElemApplyTemplatesAllocator.cpp
|
||||
XalanElemAttributeAllocator.cpp
|
||||
XalanElemAttributeSetAllocator.cpp
|
||||
XalanElemCallTemplateAllocator.cpp
|
||||
XalanElemElementAllocator.cpp
|
||||
XalanElemEmptyAllocator.cpp
|
||||
XalanElemLiteralResultAllocator.cpp
|
||||
XalanElemTemplateAllocator.cpp
|
||||
XalanElemTextAllocator.cpp
|
||||
XalanElemTextLiteralAllocator.cpp
|
||||
XalanElemValueOfAllocator.cpp
|
||||
XalanElemVariableAllocator.cpp
|
||||
XalanElement.cpp
|
||||
XalanEmptyNamedNodeMap.cpp
|
||||
XalanEncodingPropertyCache.cpp
|
||||
XalanEntity.cpp
|
||||
XalanEntityReference.cpp
|
||||
XalanExe.cpp
|
||||
XalanExtensions.cpp
|
||||
XalanFStreamOutputStream.cpp
|
||||
XalanFileOutputStream.cpp
|
||||
XalanFileUtility.cpp
|
||||
XalanHTMLElementsProperties.cpp
|
||||
XalanICUMessageLoader.cpp
|
||||
XalanInMemoryMessageLoader.cpp
|
||||
XalanMatchPatternData.cpp
|
||||
XalanMatchPatternDataAllocator.cpp
|
||||
XalanMemoryManagement.cpp
|
||||
XalanMemoryManagerDefault.cpp
|
||||
XalanMessageLoader.cpp
|
||||
XalanMsgLib.cpp
|
||||
XalanNLSMessageLoader.cpp
|
||||
XalanNamedNodeMap.cpp
|
||||
XalanNamespacesStack.cpp
|
||||
XalanNode.cpp
|
||||
XalanNodeList.cpp
|
||||
XalanNodeListDummy.cpp
|
||||
XalanNodeListSurrogate.cpp
|
||||
XalanNotation.cpp
|
||||
XalanNullOutputStream.cpp
|
||||
XalanNumberFormat.cpp
|
||||
XalanNumberingResourceBundle.cpp
|
||||
XalanOutputStream.cpp
|
||||
XalanOutputStreamPrintWriter.cpp
|
||||
XalanParsedSource.cpp
|
||||
XalanParsedURI.cpp
|
||||
XalanProcessingInstruction.cpp
|
||||
XalanQName.cpp
|
||||
XalanQNameByReference.cpp
|
||||
XalanQNameByValue.cpp
|
||||
XalanQNameByValueAllocator.cpp
|
||||
XalanReferenceCountedObject.cpp
|
||||
XalanSimplePrefixResolver.cpp
|
||||
XalanSourceTreeAttr.cpp
|
||||
XalanSourceTreeAttrNS.cpp
|
||||
XalanSourceTreeAttributeAllocator.cpp
|
||||
XalanSourceTreeAttributeNSAllocator.cpp
|
||||
XalanSourceTreeComment.cpp
|
||||
XalanSourceTreeCommentAllocator.cpp
|
||||
XalanSourceTreeContentHandler.cpp
|
||||
XalanSourceTreeDOMSupport.cpp
|
||||
XalanSourceTreeDocument.cpp
|
||||
XalanSourceTreeDocumentAllocator.cpp
|
||||
XalanSourceTreeDocumentFragment.cpp
|
||||
XalanSourceTreeDocumentFragmentAllocator.cpp
|
||||
XalanSourceTreeElement.cpp
|
||||
XalanSourceTreeElementA.cpp
|
||||
XalanSourceTreeElementAAllocator.cpp
|
||||
XalanSourceTreeElementANS.cpp
|
||||
XalanSourceTreeElementANSAllocator.cpp
|
||||
XalanSourceTreeElementNA.cpp
|
||||
XalanSourceTreeElementNAAllocator.cpp
|
||||
XalanSourceTreeElementNANS.cpp
|
||||
XalanSourceTreeElementNANSAllocator.cpp
|
||||
XalanSourceTreeHelper.cpp
|
||||
XalanSourceTreeInit.cpp
|
||||
XalanSourceTreeParserLiaison.cpp
|
||||
XalanSourceTreeProcessingInstruction.cpp
|
||||
XalanSourceTreeProcessingInstructionAllocator.cpp
|
||||
XalanSourceTreeText.cpp
|
||||
XalanSourceTreeTextAllocator.cpp
|
||||
XalanSourceTreeTextIWS.cpp
|
||||
XalanSourceTreeTextIWSAllocator.cpp
|
||||
XalanSourceTreeWrapperParsedSource.cpp
|
||||
XalanSpaceNodeTester.cpp
|
||||
XalanStdOutputStream.cpp
|
||||
XalanText.cpp
|
||||
XalanToXercesTranscoderWrapper.cpp
|
||||
XalanTranscodingServices.cpp
|
||||
XalanTransformer.cpp
|
||||
XalanTransformerOutputStream.cpp
|
||||
XalanTransformerProblemListener.cpp
|
||||
XalanUTF16Transcoder.cpp
|
||||
XalanUTF16Writer.cpp
|
||||
XalanUTF8Writer.cpp
|
||||
XalanXMLChar.cpp
|
||||
XalanXMLFileReporter.cpp
|
||||
XalanXMLSerializerBase.cpp
|
||||
XalanXMLSerializerFactory.cpp
|
||||
XalanXPathException.cpp
|
||||
XercesAttGroupInfo.cpp
|
||||
XercesAttrBridge.cpp
|
||||
XercesAttrWrapper.cpp
|
||||
XercesAttrWrapperAllocator.cpp
|
||||
XercesAttributeBridgeAllocator.cpp
|
||||
XercesBridgeHelper.cpp
|
||||
XercesBridgeNavigator.cpp
|
||||
XercesCDATASectionBridge.cpp
|
||||
XercesCDATASectionWrapper.cpp
|
||||
XercesCommentBridge.cpp
|
||||
XercesCommentWrapper.cpp
|
||||
XercesDOMException.cpp
|
||||
XercesDOMFormatterWalker.cpp
|
||||
XercesDOMImplementationBridge.cpp
|
||||
XercesDOMImplementationWrapper.cpp
|
||||
XercesDOMParsedSource.cpp
|
||||
XercesDOMParser.cpp
|
||||
XercesDOMSupport.cpp
|
||||
XercesDOMWalker.cpp
|
||||
XercesDOMWrapperException.cpp
|
||||
XercesDOMWrapperParsedSource.cpp
|
||||
XercesDOM_NodeHack.cpp
|
||||
XercesDocumentBridge.cpp
|
||||
XercesDocumentFragmentBridge.cpp
|
||||
XercesDocumentTypeBridge.cpp
|
||||
XercesDocumentTypeWrapper.cpp
|
||||
XercesDocumentWrapper.cpp
|
||||
XercesElementBridge.cpp
|
||||
XercesElementBridgeAllocator.cpp
|
||||
XercesElementWildcard.cpp
|
||||
XercesElementWrapper.cpp
|
||||
XercesElementWrapperAllocator.cpp
|
||||
XercesEntityBridge.cpp
|
||||
XercesEntityReferenceBridge.cpp
|
||||
XercesEntityReferenceWrapper.cpp
|
||||
XercesEntityWrapper.cpp
|
||||
XercesGroupInfo.cpp
|
||||
XercesLiaisonXalanDOMStringPool.cpp
|
||||
XercesNamedNodeMapAttributeList.cpp
|
||||
XercesNamedNodeMapBridge.cpp
|
||||
XercesNamedNodeMapWrapper.cpp
|
||||
XercesNodeListBridge.cpp
|
||||
XercesNodeListWrapper.cpp
|
||||
XercesNotationBridge.cpp
|
||||
XercesNotationWrapper.cpp
|
||||
XercesParserLiaison.cpp
|
||||
XercesProcessingInstructionBridge.cpp
|
||||
XercesProcessingInstructionWrapper.cpp
|
||||
XercesTextBridge.cpp
|
||||
XercesTextBridgeAllocator.cpp
|
||||
XercesTextWrapper.cpp
|
||||
XercesTextWrapperAllocator.cpp
|
||||
XercesToXalanNodeMap.cpp
|
||||
XercesTreeWalker.cpp
|
||||
XercesWrapperHelper.cpp
|
||||
XercesWrapperNavigator.cpp
|
||||
XercesWrapperNavigatorAllocator.cpp
|
||||
XercesWrapperToXalanNodeMap.cpp
|
||||
XercesXPath.cpp
|
||||
YearDatatypeValidator.cpp
|
||||
YearMonthDatatypeValidator.cpp
|
||||
)
|
||||
|
|
@ -0,0 +1,205 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/525.x264_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
speccpu2017_add_include_dirs(
|
||||
x264_src
|
||||
x264_src/extras
|
||||
x264_src/common
|
||||
)
|
||||
link_libraries(-lm)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
--dumpyuv 50 --frames 156 -o BuckBunny_New.264 BuckBunny.yuv 1280x720
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
foreach (_frame IN ITEMS 50 100 155)
|
||||
speccpu2017_validate_image(frame_${_frame}.yuv
|
||||
frame_${_frame}.org.tga imagevalidate_frame_${_frame}.out
|
||||
-avg -threshold 0.5 -maxthreshold 20
|
||||
RUN_TYPE test
|
||||
)
|
||||
endforeach()
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
--dumpyuv 50 --frames 142 -o BuckBunny_New.264 BuckBunny.yuv 1280x720
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
foreach (_frame IN ITEMS 50 100 141)
|
||||
speccpu2017_validate_image(frame_${_frame}.yuv
|
||||
frame_${_frame}.org.tga imagevalidate_frame_${_frame}.out
|
||||
-avg -threshold 0.5 -maxthreshold 20
|
||||
RUN_TYPE train
|
||||
)
|
||||
endforeach ()
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
--pass 1 --stats x264_stats.log --bitrate 1000 --frames 1000
|
||||
-o BuckBunny_New.264 BuckBunny.yuv 1280x720
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
--pass 2 --stats x264_stats.log --bitrate 1000 --dumpyuv 200 --frames 1000
|
||||
-o BuckBunny_New.264 BuckBunny.yuv 1280x720
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
--seek 500 --dumpyuv 200 --frames 1250
|
||||
-o BuckBunny_New.264 BuckBunny.yuv 1280x720
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
foreach (_frame IN ITEMS 200 400 600 700 800 900 999 1100 1249)
|
||||
speccpu2017_validate_image(frame_${_frame}.yuv
|
||||
frame_${_frame}.org.tga imagevalidate_frame_${_frame}.out
|
||||
-avg -threshold 0.5 -maxthreshold 20
|
||||
RUN_TYPE ref
|
||||
)
|
||||
endforeach ()
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output(RELATIVE_TOLERANCE 0.085)
|
||||
speccpu2017_add_executable(
|
||||
x264_src/common/mc.c
|
||||
x264_src/common/predict.c
|
||||
x264_src/common/pixel.c
|
||||
x264_src/common/macroblock.c
|
||||
x264_src/common/frame.c
|
||||
x264_src/common/dct.c
|
||||
x264_src/common/cpu.c
|
||||
x264_src/common/cabac.c
|
||||
x264_src/common/common.c
|
||||
x264_src/common/mdate.c
|
||||
x264_src/common/rectangle.c
|
||||
x264_src/common/set.c
|
||||
x264_src/common/quant.c
|
||||
x264_src/common/deblock.c
|
||||
x264_src/common/vlc.c
|
||||
x264_src/common/mvpred.c
|
||||
x264_src/encoder/analyse.c
|
||||
x264_src/encoder/me.c
|
||||
x264_src/encoder/ratecontrol.c
|
||||
x264_src/encoder/set.c
|
||||
x264_src/encoder/macroblock.c
|
||||
x264_src/encoder/cabac.c
|
||||
x264_src/encoder/cavlc.c
|
||||
x264_src/encoder/encoder.c
|
||||
x264_src/encoder/lookahead.c
|
||||
x264_src/input/timecode.c
|
||||
x264_src/input/yuv.c
|
||||
x264_src/input/y4m.c
|
||||
x264_src/output/raw.c
|
||||
x264_src/output/matroska.c
|
||||
x264_src/output/matroska_ebml.c
|
||||
x264_src/output/flv.c
|
||||
x264_src/output/flv_bytestream.c
|
||||
x264_src/input/thread.c
|
||||
x264_src/x264.c
|
||||
x264_src/extras/getopt.c
|
||||
)
|
||||
|
||||
set(ldecod_SourceNames
|
||||
ldecod_src/nal.c
|
||||
ldecod_src/mbuffer_mvc.c
|
||||
ldecod_src/image.c
|
||||
ldecod_src/mb_access.c
|
||||
ldecod_src/memalloc.c
|
||||
ldecod_src/mc_prediction.c
|
||||
ldecod_src/mb_prediction.c
|
||||
ldecod_src/intra4x4_pred_mbaff.c
|
||||
ldecod_src/loop_filter_mbaff.c
|
||||
ldecod_src/context_ini.c
|
||||
ldecod_src/configfile.c
|
||||
ldecod_src/cabac.c
|
||||
ldecod_src/sei.c
|
||||
ldecod_src/leaky_bucket.c
|
||||
ldecod_src/filehandle.c
|
||||
ldecod_src/errorconcealment.c
|
||||
ldecod_src/decoder_test.c
|
||||
ldecod_src/img_process.c
|
||||
ldecod_src/mv_prediction.c
|
||||
ldecod_src/fmo.c
|
||||
ldecod_src/output.c
|
||||
ldecod_src/mc_direct.c
|
||||
ldecod_src/rtp.c
|
||||
ldecod_src/nalucommon.c
|
||||
ldecod_src/config_common.c
|
||||
ldecod_src/intra_chroma_pred.c
|
||||
ldecod_src/transform8x8.c
|
||||
ldecod_src/blk_prediction.c
|
||||
ldecod_src/intra8x8_pred_mbaff.c
|
||||
ldecod_src/erc_do_i.c
|
||||
ldecod_src/io_tiff.c
|
||||
ldecod_src/mbuffer.c
|
||||
ldecod_src/block.c
|
||||
ldecod_src/intra4x4_pred.c
|
||||
ldecod_src/transform.c
|
||||
ldecod_src/annexb.c
|
||||
ldecod_src/ldecod.c
|
||||
ldecod_src/macroblock.c
|
||||
ldecod_src/vlc.c
|
||||
ldecod_src/parset.c
|
||||
ldecod_src/loop_filter_normal.c
|
||||
ldecod_src/parsetcommon.c
|
||||
ldecod_src/erc_do_p.c
|
||||
ldecod_src/loopFilter.c
|
||||
ldecod_src/intra16x16_pred_mbaff.c
|
||||
ldecod_src/intra4x4_pred_normal.c
|
||||
ldecod_src/intra16x16_pred_normal.c
|
||||
ldecod_src/win32.c
|
||||
ldecod_src/intra16x16_pred.c
|
||||
ldecod_src/intra8x8_pred_normal.c
|
||||
ldecod_src/io_raw.c
|
||||
ldecod_src/img_io.c
|
||||
ldecod_src/nalu.c
|
||||
ldecod_src/quant.c
|
||||
ldecod_src/intra8x8_pred.c
|
||||
ldecod_src/erc_api.c
|
||||
ldecod_src/header.c
|
||||
ldecod_src/biaridecod.c
|
||||
ldecod_src/input.c
|
||||
)
|
||||
set(ldecod_Sources)
|
||||
foreach (_file IN LISTS ldecod_SourceNames)
|
||||
list(APPEND ldecod_Sources "${SRC_DIR}/${_file}")
|
||||
endforeach ()
|
||||
llvm_add_host_executable(ldecod_${SUFFIX}-host
|
||||
ldecod_${SUFFIX} ${ldecod_Sources}
|
||||
CPPFLAGS -I "${SRC_DIR}/ldecod_src/inc" -DSPEC
|
||||
LDFLAGS -lm
|
||||
)
|
||||
|
||||
|
||||
# Prepare BuckBunny.yuv used for x264 as input.
|
||||
foreach (_run_type IN LISTS TEST_SUITE_RUN_TYPE)
|
||||
add_custom_command(
|
||||
OUTPUT "${RUN_${_run_type}_DIR}/BuckBunny.yuv"
|
||||
DEPENDS "${INPUT_${_run_type}_DIR}/BuckBunny.264"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ldecod_${SUFFIX}"
|
||||
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/ldecod_${SUFFIX}"
|
||||
-i "${INPUT_${_run_type}_DIR}/BuckBunny.264" -o BuckBunny.yuv
|
||||
> inputgen_ldecod_x264.out
|
||||
WORKING_DIRECTORY "${RUN_${_run_type}_DIR}"
|
||||
COMMENT "Decoding ${_run_type}/input/BuckBunny.264"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(BuckBunny_yuv_${_run_type}_${SUFFIX}
|
||||
DEPENDS "${RUN_${_run_type}_DIR}/BuckBunny.yuv"
|
||||
)
|
||||
add_dependencies(${PROG} BuckBunny_yuv_${_run_type}_${SUFFIX})
|
||||
endforeach ()
|
|
@ -0,0 +1,40 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/531.deepsjeng_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
if (RATE)
|
||||
add_definitions(-DSMALL_MEMORY)
|
||||
endif ()
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_test_DIR}/test.txt"
|
||||
STDOUT test.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_train_DIR}/train.txt"
|
||||
STDOUT train.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/ref.txt"
|
||||
STDOUT ref.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable()
|
|
@ -0,0 +1,38 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/541.leela_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
speccpu2017_add_include_dirs(.)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_test_DIR}/test.sgf"
|
||||
STDOUT test.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_train_DIR}/train.sgf"
|
||||
STDOUT train.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/ref.sgf"
|
||||
STDOUT ref.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable()
|
|
@ -0,0 +1,247 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/557.xz_r.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H=1 -DSPEC_MEM_IO -DSPEC_XZ)
|
||||
speccpu2017_add_include_dirs(
|
||||
.
|
||||
spec_mem_io
|
||||
sha-2
|
||||
common
|
||||
liblzma/api
|
||||
liblzma/lzma
|
||||
liblzma/common
|
||||
liblzma/check
|
||||
liblzma/simple
|
||||
liblzma/delta
|
||||
liblzma/lz
|
||||
liblzma/rangecoder
|
||||
)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1548636 1555348 0
|
||||
STDOUT cpu2006docs.tar-4-0.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1462248 -1 1
|
||||
STDOUT cpu2006docs.tar-4-1.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1428548 -1 2
|
||||
STDOUT cpu2006docs.tar-4-2.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1034828 -1 3e
|
||||
STDOUT cpu2006docs.tar-4-3e.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1061968 -1 4
|
||||
STDOUT cpu2006docs.tar-4-4.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1034588 -1 4e
|
||||
STDOUT cpu2006docs.tar-4-4e.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 650156 -1 0
|
||||
STDOUT cpu2006docs.tar-1-0.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 639996 -1 1
|
||||
STDOUT cpu2006docs.tar-1-1.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 637616 -1 2
|
||||
STDOUT cpu2006docs.tar-1-2.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 628996 -1 3e
|
||||
STDOUT cpu2006docs.tar-1-3e.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 631912 -1 4
|
||||
STDOUT cpu2006docs.tar-1-4.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 629064 -1 4e
|
||||
STDOUT cpu2006docs.tar-1-4e.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
input.combined.xz 40 a841f68f38572a49d86226b7ff5baeb31bd19dc637a922a972b2e6d1257a890f6a544ecab967c313e370478c74f760eb229d4eef8a8d2836d233d3e9dd1430bf 6356684 -1 8
|
||||
STDOUT input.combined-40-8.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
IMG_2560.cr2.xz 40 ec03e53b02deae89b6650f1de4bed76a012366fb3d4bdc791e8633d1a5964e03004523752ab008eff0d9e693689c53056533a05fc4b277f0086544c6c3cbbbf6 40822692 40824404 4
|
||||
STDOUT IMG_2560.cr2-40-4.out
|
||||
WORKDIR input
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
cld.tar.xz 160 19cf30ae51eddcbefda78dd06014b4b96281456e078ca7c13e1c0c9e6aaea8dff3efb4ad6b0456697718cede6bd5454852652806a657bb56e07d61128434b474 59796407 61004416 6
|
||||
STDOUT cld.tar-160-6.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 250 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 23047774 23513385 6e
|
||||
STDOUT cpu2006docs.tar-250-6e.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
input.combined.xz 250 a841f68f38572a49d86226b7ff5baeb31bd19dc637a922a972b2e6d1257a890f6a544ecab967c313e370478c74f760eb229d4eef8a8d2836d233d3e9dd1430bf 40401484 41217675 7
|
||||
STDOUT input.combined-250-7.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE rate
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable(
|
||||
spec.c
|
||||
spec_xz.c
|
||||
pxz.c
|
||||
common/tuklib_physmem.c
|
||||
liblzma/common/common.c
|
||||
liblzma/common/block_util.c
|
||||
liblzma/common/easy_preset.c
|
||||
liblzma/common/filter_common.c
|
||||
liblzma/common/hardware_physmem.c
|
||||
liblzma/common/index.c
|
||||
liblzma/common/stream_flags_common.c
|
||||
liblzma/common/vli_size.c
|
||||
liblzma/common/alone_encoder.c
|
||||
liblzma/common/block_buffer_encoder.c
|
||||
liblzma/common/block_encoder.c
|
||||
liblzma/common/block_header_encoder.c
|
||||
liblzma/common/easy_buffer_encoder.c
|
||||
liblzma/common/easy_encoder.c
|
||||
liblzma/common/easy_encoder_memusage.c
|
||||
liblzma/common/filter_buffer_encoder.c
|
||||
liblzma/common/filter_encoder.c
|
||||
liblzma/common/filter_flags_encoder.c
|
||||
liblzma/common/index_encoder.c
|
||||
liblzma/common/stream_buffer_encoder.c
|
||||
liblzma/common/stream_encoder.c
|
||||
liblzma/common/stream_flags_encoder.c
|
||||
liblzma/common/vli_encoder.c
|
||||
liblzma/common/alone_decoder.c
|
||||
liblzma/common/auto_decoder.c
|
||||
liblzma/common/block_buffer_decoder.c
|
||||
liblzma/common/block_decoder.c
|
||||
liblzma/common/block_header_decoder.c
|
||||
liblzma/common/easy_decoder_memusage.c
|
||||
liblzma/common/filter_buffer_decoder.c
|
||||
liblzma/common/filter_decoder.c
|
||||
liblzma/common/filter_flags_decoder.c
|
||||
liblzma/common/index_decoder.c
|
||||
liblzma/common/index_hash.c
|
||||
liblzma/common/stream_buffer_decoder.c
|
||||
liblzma/common/stream_decoder.c
|
||||
liblzma/common/stream_flags_decoder.c
|
||||
liblzma/common/vli_decoder.c
|
||||
liblzma/check/check.c
|
||||
liblzma/check/crc32_table.c
|
||||
liblzma/check/crc32_fast.c
|
||||
liblzma/check/crc64_table.c
|
||||
liblzma/check/crc64_fast.c
|
||||
liblzma/check/sha256.c
|
||||
liblzma/lz/lz_encoder.c
|
||||
liblzma/lz/lz_encoder_mf.c
|
||||
liblzma/lz/lz_decoder.c
|
||||
liblzma/lzma/lzma_encoder.c
|
||||
liblzma/lzma/lzma_encoder_presets.c
|
||||
liblzma/lzma/lzma_encoder_optimum_fast.c
|
||||
liblzma/lzma/lzma_encoder_optimum_normal.c
|
||||
liblzma/lzma/fastpos_table.c
|
||||
liblzma/lzma/lzma_decoder.c
|
||||
liblzma/lzma/lzma2_encoder.c
|
||||
liblzma/lzma/lzma2_decoder.c
|
||||
liblzma/rangecoder/price_table.c
|
||||
liblzma/delta/delta_common.c
|
||||
liblzma/delta/delta_encoder.c
|
||||
liblzma/delta/delta_decoder.c
|
||||
liblzma/simple/simple_coder.c
|
||||
liblzma/simple/simple_encoder.c
|
||||
liblzma/simple/simple_decoder.c
|
||||
liblzma/simple/x86.c
|
||||
liblzma/simple/powerpc.c
|
||||
liblzma/simple/ia64.c
|
||||
liblzma/simple/arm.c
|
||||
liblzma/simple/armthumb.c
|
||||
liblzma/simple/sparc.c
|
||||
xz/args.c
|
||||
xz/coder.c
|
||||
xz/file_io.c
|
||||
xz/hardware.c
|
||||
xz/list.c
|
||||
xz/main.c
|
||||
xz/message.c
|
||||
xz/options.c
|
||||
xz/signals.c
|
||||
xz/util.c
|
||||
common/tuklib_open_stdxxx.c
|
||||
common/tuklib_progname.c
|
||||
common/tuklib_exit.c
|
||||
common/tuklib_cpucores.c
|
||||
common/tuklib_mbstr_width.c
|
||||
common/tuklib_mbstr_fw.c
|
||||
spec_mem_io/spec_mem_io.c
|
||||
sha-2/sha512.c
|
||||
)
|
|
@ -0,0 +1,38 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/999.specrand_ir.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(RATE)
|
||||
|
||||
speccpu2017_add_include_dirs(specrand-common)
|
||||
|
||||
## test ########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
324342 24239
|
||||
STDOUT rand.24239.out
|
||||
RUN_TYPE test
|
||||
)
|
||||
|
||||
## train #######################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
1 11
|
||||
STDOUT rand.11.out
|
||||
RUN_TYPE train
|
||||
)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
1255432124 234923
|
||||
STDOUT rand.234923.out
|
||||
RUN_TYPE ref
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_verify_output()
|
||||
speccpu2017_add_executable()
|
|
@ -0,0 +1,12 @@
|
|||
add_subdirectory(500.perlbench_r) # C
|
||||
add_subdirectory(502.gcc_r) # C
|
||||
add_subdirectory(505.mcf_r) # C
|
||||
add_subdirectory(520.omnetpp_r) # C++
|
||||
add_subdirectory(523.xalancbmk_r) # C++
|
||||
add_subdirectory(525.x264_r) # C
|
||||
add_subdirectory(531.deepsjeng_r) # C++
|
||||
add_subdirectory(541.leela_r) # C++
|
||||
#add_subdirectory(548.exchange2_r) # Fortran
|
||||
add_subdirectory(557.xz_r) # C
|
||||
|
||||
add_subdirectory(999.specrand_ir) # C
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/600.perlbench_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 500.perlbench_r)
|
||||
speccpu2017_inherit(../../CINT2017rate/500.perlbench_r)
|
|
@ -0,0 +1,33 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/602.gcc_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 502.gcc_r)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/gcc-pp.c" -O5 -fipa-pta -o gcc-pp.opts-O5_-fipa-pta.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/gcc-pp.c" -O5 -finline-limit=1000 -fselective-scheduling
|
||||
-fselective-scheduling2 -o gcc-pp.opts-O5_-finline-limit_1000_-fselective-scheduling_-fselective-scheduling2.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
"${INPUT_ref_DIR}/gcc-pp.c" -O5 -finline-limit=24000 -fgcse -fgcse-las
|
||||
-fgcse-lm -fgcse-sm -o gcc-pp.opts-O5_-finline-limit_24000_-fgcse_-fgcse-las_-fgcse-lm_-fgcse-sm.s
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_inherit(../../CINT2017rate/502.gcc_r)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/605.mcf_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 505.mcf_r)
|
||||
speccpu2017_inherit(../../CINT2017rate/505.mcf_r)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/620.omnetpp_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 520.omnetpp_r)
|
||||
speccpu2017_inherit(../../CINT2017rate/520.omnetpp_r)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/623.xalancbmk_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 523.xalancbmk_r)
|
||||
speccpu2017_inherit(../../CINT2017rate/523.xalancbmk_r)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/625.x264_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 525.x264_r)
|
||||
speccpu2017_inherit(../../CINT2017rate/525.x264_r)
|
|
@ -0,0 +1,11 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/631.deepsjeng_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 531.deepsjeng_r)
|
||||
|
||||
add_definitions(-DBIG_MEMORY)
|
||||
|
||||
speccpu2017_inherit(../../CINT2017rate/531.deepsjeng_r)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/641.leela_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 541.leela_r)
|
||||
speccpu2017_inherit(../../CINT2017rate/541.leela_r)
|
|
@ -0,0 +1,29 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/657.xz_s.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 557.xz_r)
|
||||
|
||||
## ref #########################################################################
|
||||
|
||||
speccpu2017_run_test(
|
||||
cpu2006docs.tar.xz 6643 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1036078272 1111795472 4
|
||||
STDOUT cpu2006docs.tar-6643-4.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
speccpu2017_run_test(
|
||||
cld.tar.xz 1400 19cf30ae51eddcbefda78dd06014b4b96281456e078ca7c13e1c0c9e6aaea8dff3efb4ad6b0456697718cede6bd5454852652806a657bb56e07d61128434b474 536995164 539938872 8
|
||||
STDOUT cld.tar-1400-8.out
|
||||
WORKDIR "${INPUT_all_DIR}"
|
||||
RUN_TYPE ref
|
||||
SUITE_TYPE speed
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
speccpu2017_inherit(../../CINT2017rate/557.xz_r)
|
|
@ -0,0 +1,8 @@
|
|||
# https://www.spec.org/cpu2017/Docs/benchmarks/998.specrand_is.html
|
||||
include(../../SpecCPU2017.cmake)
|
||||
if (NOT TEST_SUITE_SPEC2017_ROOT)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
speccpu2017_benchmark(SPEED ORIGIN 999.specrand_ir)
|
||||
speccpu2017_inherit(../../CINT2017rate/999.specrand_ir)
|
|
@ -0,0 +1,12 @@
|
|||
add_subdirectory(600.perlbench_s) # C
|
||||
add_subdirectory(602.gcc_s) # C
|
||||
add_subdirectory(605.mcf_s) # C
|
||||
add_subdirectory(620.omnetpp_s) # C++
|
||||
add_subdirectory(623.xalancbmk_s) # C++
|
||||
add_subdirectory(625.x264_s) # C
|
||||
add_subdirectory(631.deepsjeng_s) # C++
|
||||
add_subdirectory(641.leela_s) # C++
|
||||
#add_subdirectory(648.exchange2_s) # Fortran
|
||||
add_subdirectory(657.xz_s) # C
|
||||
|
||||
add_subdirectory(998.specrand_is) # C
|
|
@ -1,12 +1,11 @@
|
|||
macro(test_input run_type input output size0 size1)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
${size0} ${size1} ${input}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${output}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${output} ${output}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -16,4 +15,5 @@ test_input(ref 5stone21.in 5stone21.out 50 21)
|
|||
test_input(ref 9stone21.in 9stone21.out 50 21)
|
||||
test_input(ref null.in null.out 50 21)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(099.go ${Source})
|
||||
llvm_test_data_spec_default(099.go)
|
||||
|
|
|
@ -111,13 +111,11 @@ endforeach()
|
|||
|
||||
macro(test_input run_type)
|
||||
llvm_test_run(RUN_TYPE ${run_type}
|
||||
-c < ${BENCHMARK_DIR}/data/${run_type}/input/${CTLFILE}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
|
||||
WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
|
||||
-c < ${CTLFILE} > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
)
|
||||
llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
|
||||
${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
|
||||
llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FPCMP} data/${run_type}/output/${run_type}.out ${run_type}.out
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@ -125,4 +123,5 @@ test_input(test)
|
|||
test_input(train)
|
||||
test_input(ref)
|
||||
|
||||
llvm_test_executable(${PROG} ${Source})
|
||||
llvm_test_executable(124.m88ksim ${Source})
|
||||
llvm_test_data_spec_default(124.m88ksim)
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче