diff --git a/.jenkins/performance.groovy b/.jenkins/performance.groovy index 3f3e59eb..5e7afa63 100644 --- a/.jenkins/performance.groovy +++ b/.jenkins/performance.groovy @@ -43,13 +43,13 @@ def runCompileCommand(platform, project, jobName, boolean debug=false, boolean b set -e mkdir -p build/${buildTypeDir} && pushd build/${buildTypeDir} ${auxiliary.gfxTargetParser()} - ${cmake} -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc -DCMAKE_C_COMPILER=/opt/rocm/bin/hipcc -DAMDGPU_TARGETS=\$gfx_arch -DSINGLELIB=on ${buildTypeArg} ${clientArgs} ${warningArgs} ${rtcBuildCache} ../.. + ${cmake} -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc -DCMAKE_C_COMPILER=/opt/rocm/bin/hipcc -DAMDGPU_TARGETS=\$gfx_arch ${buildTypeArg} ${clientArgs} ${warningArgs} ${rtcBuildCache} ../.. make -j\$(nproc) popd cd ref-repo mkdir -p build/${buildTypeDir} && pushd build/${buildTypeDir} ${auxiliary.gfxTargetParser()} - ${cmake} -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc -DCMAKE_C_COMPILER=/opt/rocm/bin/hipcc -DAMDGPU_TARGETS=\$gfx_arch -DSINGLELIB=on ${buildTypeArg} ${noclientArgs} ${warningArgs} ${rtcBuildCache} ../.. + ${cmake} -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc -DCMAKE_C_COMPILER=/opt/rocm/bin/hipcc -DAMDGPU_TARGETS=\$gfx_arch ${buildTypeArg} ${noclientArgs} ${warningArgs} ${rtcBuildCache} ../.. make -j\$(nproc) """ platform.runCommand(this, command) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97410883..57d5ce7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,16 +148,6 @@ rocm_check_target_ids(DEFAULT_AMDGPU_TARGETS set(AMDGPU_TARGETS "${DEFAULT_AMDGPU_TARGETS}" CACHE STRING "List of specific machine types for library to target") list(LENGTH AMDGPU_TARGETS AMDGPU_TARGETS_LENGTH) -if(SINGLELIB AND ${AMDGPU_TARGETS_LENGTH} GREATER 2 ) - message( - FATAL_ERROR - "SINGLELIB build requires at most two architecture in AMDGPU_TARGETS. " - "A multi-arch SINGLELIB library may exceed size limits and fail to build. " - "SINGLELIB builds are only for benchmarking and should be built for exactly " - "the architectures being benchmarked." - ) -endif() - # HIP is required - library and clients use HIP to access the device find_package( HIP REQUIRED ) diff --git a/library/src/device/CMakeLists.txt b/library/src/device/CMakeLists.txt index 5b6de5a9..ea969e0d 100644 --- a/library/src/device/CMakeLists.txt +++ b/library/src/device/CMakeLists.txt @@ -182,87 +182,3 @@ foreach( pool rocfft-function-pool ) add_dependencies(${pool} gen_headers_target) endforeach() -list( LENGTH rocfft_device_source rocfft_device_source_len ) -math(EXPR split_len "${rocfft_device_source_len} / 4") -math(EXPR split_idx_2 "${rocfft_device_source_len} / 4 * 2") -math(EXPR split_idx_3 "${rocfft_device_source_len} / 4 * 3") - -list( SUBLIST rocfft_device_source 0 ${split_len} rocfft_device_source_0 ) -list( SUBLIST rocfft_device_source ${split_len} ${split_len} rocfft_device_source_1 ) -list( SUBLIST rocfft_device_source ${split_idx_2} ${split_len} rocfft_device_source_2 ) -list( SUBLIST rocfft_device_source ${split_idx_3} -1 rocfft_device_source_3 ) - -foreach( sub RANGE 3 ) - set( rocfft_device_source_var rocfft_device_source_${sub} ) - if( NOT ${rocfft_device_source_var} ) - continue() - endif() - if(NOT SINGLELIB) - add_library( rocfft-device-${sub} - ${${rocfft_device_source_var}} ) - else() - # Compile the device lib as a static library, which is then linked - # into librocfft.so Useful for testing purposes. - add_library( rocfft-device-${sub} STATIC - ${${rocfft_device_source_var}} ) - - # if we're building singlelib, we don't want to export any of the - # device library symbols to the main library - set_target_properties( rocfft-device-${sub} PROPERTIES CXX_VISIBILITY_PRESET "hidden" VISIBILITY_INLINES_HIDDEN ON ) - endif() - - set_property(TARGET rocfft-device-${sub} PROPERTY POSITION_INDEPENDENT_CODE ON) - - if(ROCFFT_CALLBACKS_ENABLED) - target_compile_definitions( rocfft-device-${sub} PRIVATE ROCFFT_CALLBACKS_ENABLED ) - endif() - - add_library( roc::rocfft-device-${sub} ALIAS rocfft-device-${sub} ) - - # To help "make" to figure out the dependency, in which make sure - # the kernel generator runs only once. - add_dependencies(rocfft-device-${sub} gen_headers_target) - - if( NOT BUILD_SHARED_LIBS ) - target_link_libraries( rocfft-device-${sub} INTERFACE ${ROCFFT_HOST_LINK_LIBS} ) - endif() - target_link_libraries( rocfft-device-${sub} PRIVATE ${ROCFFT_DEVICE_LINK_LIBS} ${ROCFFT_HOST_LINK_LIBS} ) - - target_compile_options( rocfft-device-${sub} PRIVATE -fno-gpu-rdc ) - - # Set AMD GPU architecture options - - # Enable compilation of desired architectures - foreach( target ${AMDGPU_TARGETS} ) - target_compile_options( rocfft-device-${sub} PRIVATE --offload-arch=${target} ) - endforeach( ) - - target_include_directories( rocfft-device-${sub} - PRIVATE $ - $ - $ - $ - $ - $ - $ - ) - - rocm_set_soversion( rocfft-device-${sub} ${rocfft_SOVERSION} ) - set_target_properties( rocfft-device-${sub} PROPERTIES RUNTIME_OUTPUT_DIRECTORY - "${PROJECT_BINARY_DIR}/staging" ) - set_target_properties( rocfft-device-${sub} PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - ) - - # Following Boost conventions of prefixing 'lib' on static built - # libraries, across all platforms - if( NOT BUILD_SHARED_LIBS ) - set_target_properties( rocfft-device-${sub} PROPERTIES PREFIX "lib" ) - endif( ) - - rocm_install_targets( - TARGETS - rocfft-device-${sub} - ) -endforeach()