diff --git a/projects/hipblaslt/CMakeLists.txt b/projects/hipblaslt/CMakeLists.txt index a493a5dad0cc..96e6092bea28 100644 --- a/projects/hipblaslt/CMakeLists.txt +++ b/projects/hipblaslt/CMakeLists.txt @@ -271,13 +271,6 @@ if(NOT ROCM_LIBS_SUPERBUILD) endif() endif() -# INTERFACE library that owns the public hipblaslt API headers (the in-tree -# `library/include` subtree plus its build-tree counterpart, where -# `hipblaslt-export.h` and `hipblaslt-version.h` are generated). Routing the -# include directories through a target lets consumers pick them up via the -# build graph rather than via `target_include_directories( BEFORE -# PRIVATE .../library/include ...)`. `hip::host` is exposed as an INTERFACE -# link because the in-tree headers `#include `. add_library(hipblaslt-headers INTERFACE) add_library(hipblaslt::headers ALIAS hipblaslt-headers) target_include_directories(hipblaslt-headers @@ -336,7 +329,7 @@ if(HIPBLASLT_ENABLE_HOST) roc::${hipblas_target} PRIVATE hip::device - tensilelite::tensilelite-host + roc::tensilelite-host ${CMAKE_DL_LIBS} ${rocTracer} ) @@ -426,8 +419,12 @@ if(HIPBLASLT_ENABLE_HOST) rocm_install_targets(TARGETS hipblaslt) + set(_hipblaslt_export_targets roc::hipblaslt) + if(TENSILELITE_BUILD_SHARED_LIBS) + list(APPEND _hipblaslt_export_targets roc::tensilelite-host) + endif() rocm_export_targets( - TARGETS roc::hipblaslt + TARGETS ${_hipblaslt_export_targets} DEPENDS PACKAGE hip DEPENDS PACKAGE ${hipblas_target} NAMESPACE roc:: @@ -436,7 +433,13 @@ if(HIPBLASLT_ENABLE_HOST) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/hipblaslt-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/hipblaslt-config.cmake" - COPYONLY + @ONLY + ) + + install( + FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/HipBLASLtCodegen.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/hipblaslt" + COMPONENT devel ) if( LEGACY_HIPBLAS_DIRECT ) diff --git a/projects/hipblaslt/clients/CMakeLists.txt b/projects/hipblaslt/clients/CMakeLists.txt index 380feef6da62..16c88b7bb5c1 100755 --- a/projects/hipblaslt/clients/CMakeLists.txt +++ b/projects/hipblaslt/clients/CMakeLists.txt @@ -26,7 +26,7 @@ target_link_libraries(hipblaslt-clients-common ${LAPACK_LIBRARIES} PRIVATE hip::device - tensilelite::tensilelite-host + roc::tensilelite-host ) if(HIPBLASLT_ENABLE_MXDATAGENERATOR) @@ -111,7 +111,7 @@ if(BUILD_TESTING OR HIPBLASLT_BUILD_TESTING) PRIVATE hip::device hipblaslt::hipblaslt-clients-common - tensilelite::tensilelite-host + roc::tensilelite-host GTest::gtest OpenMP::OpenMP_CXX ${CMAKE_DL_LIBS} diff --git a/projects/hipblaslt/clients/tests/src/caching_library_gtest.cpp b/projects/hipblaslt/clients/tests/src/caching_library_gtest.cpp index ee07c99d40de..fe203ce0ed9c 100644 --- a/projects/hipblaslt/clients/tests/src/caching_library_gtest.cpp +++ b/projects/hipblaslt/clients/tests/src/caching_library_gtest.cpp @@ -59,7 +59,7 @@ // only C++ test binary TheRock builds, ships, and runs for hipBLASLt is this client // `hipblaslt-test` // (HIPBLASLT_BUILD_TESTING), executed by test/therock/test_hipblaslt.py. Because -// hipblaslt-test already links tensilelite::tensilelite-host (via +// hipblaslt-test already links roc::tensilelite-host (via // hipblaslt-clients-common), this white-box unit test can include // directly and run with no new build dependency. // Placing the regression here is what makes it actually execute in CI and guard diff --git a/projects/hipblaslt/cmake/HipBLASLtCodegen.cmake b/projects/hipblaslt/cmake/HipBLASLtCodegen.cmake new file mode 100644 index 000000000000..d4651bc766a1 --- /dev/null +++ b/projects/hipblaslt/cmake/HipBLASLtCodegen.cmake @@ -0,0 +1,126 @@ +# Copyright Advanced Micro Devices, Inc., or its affiliates. +# SPDX-License-Identifier: MIT + +include_guard(GLOBAL) + +function(hipblaslt_create_device_library) + set(_opts "") + set(_one + TARGET LOGIC_PATH OUTPUT_DIR CXX_COMPILER OFFLOAD_BUNDLER JOBS LOGIC_FILTER + ASAN YAML_FORMAT NO_COMPRESS EXPERIMENTAL LAZY_LOAD ASM_COMMENTS KEEP_BUILD_TMP ASM_DEBUG) + set(_multi ARCHES) + cmake_parse_arguments(_cdl "${_opts}" "${_one}" "${_multi}" ${ARGN}) + + if(_cdl_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "hipblaslt_create_device_library: unexpected arguments: ${_cdl_UNPARSED_ARGUMENTS}") + endif() + if(NOT _cdl_LOGIC_PATH) + message(FATAL_ERROR "hipblaslt_create_device_library: LOGIC_PATH is required") + endif() + if(NOT _cdl_OUTPUT_DIR) + message(FATAL_ERROR "hipblaslt_create_device_library: OUTPUT_DIR is required") + endif() + if(NOT HIPBLASLT_PYTHON_COMMAND) + message(FATAL_ERROR "hipblaslt_create_device_library: HIPBLASLT_PYTHON_COMMAND is not set") + endif() + + get_filename_component(_codegen_dir "${CMAKE_CURRENT_LIST_DIR}/../tensilelite" ABSOLUTE) + + if(NOT _cdl_TARGET) + set(_cdl_TARGET "tensilelite-device-libraries") + endif() + if(NOT _cdl_ARCHES) + set(_cdl_ARCHES ${GPU_TARGETS}) + endif() + if(NOT _cdl_ARCHES) + message(FATAL_ERROR "hipblaslt_create_device_library: no ARCHES given and GPU_TARGETS is empty") + endif() + if(NOT _cdl_CXX_COMPILER) + set(_cdl_CXX_COMPILER "${CMAKE_CXX_COMPILER}") + endif() + if(NOT DEFINED _cdl_LAZY_LOAD) + set(_cdl_LAZY_LOAD ON) + endif() + + file(MAKE_DIRECTORY "${_cdl_OUTPUT_DIR}/library") + + list(JOIN _cdl_ARCHES "$" _arches_semi) + set(_opts_list "--architecture=${_arches_semi}" "--cxx-compiler=${_cdl_CXX_COMPILER}") + if(_cdl_OFFLOAD_BUNDLER) + list(APPEND _opts_list "--offload-bundler=${_cdl_OFFLOAD_BUNDLER}") + endif() + if(_cdl_ASAN) + list(APPEND _opts_list "--address-sanitizer") + endif() + if(_cdl_JOBS) + list(APPEND _opts_list "--jobs=${_cdl_JOBS}") + endif() + if(_cdl_KEEP_BUILD_TMP) + list(APPEND _opts_list "--keep-build-tmp") + endif() + if(_cdl_ASM_DEBUG) + list(APPEND _opts_list "--asm-debug") + endif() + if(_cdl_YAML_FORMAT) + list(APPEND _opts_list "--library-format=yaml") + endif() + if(_cdl_LOGIC_FILTER) + list(APPEND _opts_list "--logic-filter=${_cdl_LOGIC_FILTER}") + endif() + if(_cdl_NO_COMPRESS) + list(APPEND _opts_list "--no-compress") + endif() + if(_cdl_EXPERIMENTAL) + list(APPEND _opts_list "--experimental") + endif() + if(NOT _cdl_LAZY_LOAD) + list(APPEND _opts_list "--no-lazy-library-loading") + endif() + if(NOT _cdl_ASM_COMMENTS) + list(APPEND _opts_list "--disable-asm-comments") + endif() + + set(_known_bugs "${_codegen_dir}/Tensile/TensileLogic/known_bugs.yaml") + set(_logic_stamp "${CMAKE_CURRENT_BINARY_DIR}/${_cdl_TARGET}-TensileLogic.stamp") + add_custom_command( + OUTPUT "${_logic_stamp}" + COMMENT "Validating library logic (TensileLogic --check-all) for ${_cdl_TARGET} ..." + COMMAND ${HIPBLASLT_PYTHON_COMMAND} + "${_codegen_dir}/Tensile/bin/TensileLogic" + "${_cdl_LOGIC_PATH}" + --known-bugs + "${_known_bugs}" + --check-all + COMMAND ${CMAKE_COMMAND} -E touch "${_logic_stamp}" + DEPENDS ${HIPBLASLT_PYTHON_DEPS} "${_known_bugs}" + VERBATIM + USES_TERMINAL + ) + + set(_output_stamp "${CMAKE_CURRENT_BINARY_DIR}/${_cdl_TARGET}.stamp") + set(_tcl_command + ${HIPBLASLT_PYTHON_COMMAND} -m Tensile.TensileCreateLibrary + ${_opts_list} + "${_cdl_LOGIC_PATH}" + "${_cdl_OUTPUT_DIR}" + HIP + ) + add_custom_command( + OUTPUT "${_output_stamp}" + COMMENT "Building device libraries to ${_cdl_OUTPUT_DIR} ..." + COMMAND ${_tcl_command} + COMMAND ${CMAKE_COMMAND} -E touch "${_output_stamp}" + DEPENDS ${HIPBLASLT_PYTHON_DEPS} "${_logic_stamp}" + VERBATIM + USES_TERMINAL + ) + + block(SCOPE_FOR VARIABLES) + list(JOIN _tcl_command " " _formatted_tcl) + message(STATUS "Device lib build command (${_cdl_TARGET}): ${_formatted_tcl}") + endblock() + + add_custom_target(${_cdl_TARGET} ALL + DEPENDS "${_output_stamp}" + ) +endfunction() diff --git a/projects/hipblaslt/cmake/hipblaslt-config.cmake.in b/projects/hipblaslt/cmake/hipblaslt-config.cmake.in index d24c3810c5bd..20eb46bd8ebe 100644 --- a/projects/hipblaslt/cmake/hipblaslt-config.cmake.in +++ b/projects/hipblaslt/cmake/hipblaslt-config.cmake.in @@ -18,3 +18,7 @@ block(SCOPE_FOR VARIABLES) message(FATAL_ERROR "Do not export targets with hip::device as an interface link library") endif() endblock() + +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/HipBLASLtCodegen.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/HipBLASLtCodegen.cmake") +endif() diff --git a/projects/hipblaslt/device-library/CMakeLists.txt b/projects/hipblaslt/device-library/CMakeLists.txt index eef2f31df5dd..faba194ecb09 100644 --- a/projects/hipblaslt/device-library/CMakeLists.txt +++ b/projects/hipblaslt/device-library/CMakeLists.txt @@ -1,6 +1,8 @@ # Copyright Advanced Micro Devices, Inc., or its affiliates. # SPDX-License-Identifier: MIT +include(HipBLASLtCodegen) + set(TENSILELITE_BUILD_PARALLEL_LEVEL "" CACHE STRING "Number of CPU cores to use for building device libraries (will use nproc if unset).") set(TENSILELITE_KEEP_BUILD_TMP OFF CACHE STRING "Keep temporary build directory for device libraries (turning this ON bloat the build size).") set(TENSILELITE_ASM_DEBUG "" CACHE STRING "Keep debug information for built code objects.") @@ -12,104 +14,28 @@ set(TENSILELITE_OFFLOADBUNDLER "" CACHE STRING "Path to clang-offload-bundler.") set(HIPBLASLT_LIBLOGIC_PATH "" CACHE STRING "Path to library logic files (will use 'library' if unset).") set(HIPBLASLT_TENSILE_LIBPATH "${hipblaslt_BINARY_DIR}/Tensile" CACHE STRING "Path to output the device gemm libraries.") -file(MAKE_DIRECTORY "${HIPBLASLT_TENSILE_LIBPATH}/library") - -list(JOIN GPU_TARGETS "$" TENSILELITE_GPU_TARGETS_SEMI_ESCAPED) - -set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--architecture=${TENSILELITE_GPU_TARGETS_SEMI_ESCAPED}") -set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--cxx-compiler=${CMAKE_CXX_COMPILER}") -if(TENSILELITE_OFFLOADBUNDLER) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--offload-bundler=${TENSILELITE_OFFLOADBUNDLER}") -endif() -if(HIPBLASLT_ENABLE_ASAN) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--address-sanitizer") -endif() -if(TENSILELITE_BUILD_PARALLEL_LEVEL) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--jobs=${TENSILELITE_BUILD_PARALLEL_LEVEL}") -endif() -if(TENSILELITE_KEEP_BUILD_TMP) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--keep-build-tmp") -endif() -if(TENSILELITE_ASM_DEBUG) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--asm-debug") -endif() -if(HIPBLASLT_ENABLE_YAML) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--library-format=yaml") -endif() -if(TENSILELITE_LOGIC_FILTER) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--logic-filter=${TENSILELITE_LOGIC_FILTER}") -endif() -if(TENSILELITE_NO_COMPRESS) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--no-compress") -endif() -if(TENSILELITE_EXPERIMENTAL) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--experimental") -endif() -if(NOT HIPBLASLT_ENABLE_LAZY_LOAD) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--no-lazy-library-loading") -endif() -if(NOT TENSILELITE_ENABLE_ASM_COMMENTS) - set(TENSILELITE_BUILD_OPTS ${TENSILELITE_BUILD_OPTS} "--disable-asm-comments") -endif() if(NOT HIPBLASLT_LIBLOGIC_PATH) set(HIPBLASLT_LIBLOGIC_PATH "${hipblaslt_SOURCE_DIR}/library") endif() -# Pre-build gate: validate all library logic YAMLs (WorkGroup, MatrixInstruction, -# WorkGroupMappingXCC vs CU count, etc.) before generating .dat files. Fails build -# if any solution fails validation so bad logic is never compiled. -set(HIPBLASLT_TENSILELOGIC_KNOWN_BUGS - "${hipblaslt_SOURCE_DIR}/tensilelite/Tensile/TensileLogic/known_bugs.yaml" -) -# Stamp DEPENDS include known_bugs.yaml but not every library logic YAML (thousands -# of files; CONFIGURE_DEPENDS globs are costly). After editing logic only, run -# scripts/run_tensile_logic_check.py or touch the stamp input to force re-validation. -set(TENSILELOGIC_STAMP "${CMAKE_CURRENT_BINARY_DIR}/TensileLogic.stamp") -add_custom_command( - OUTPUT "${TENSILELOGIC_STAMP}" - COMMENT "Validating library logic (TensileLogic --check-all) ..." - COMMAND ${HIPBLASLT_PYTHON_COMMAND} - "${hipblaslt_SOURCE_DIR}/tensilelite/Tensile/bin/TensileLogic" - "${HIPBLASLT_LIBLOGIC_PATH}" - --known-bugs - "${HIPBLASLT_TENSILELOGIC_KNOWN_BUGS}" - --check-all - COMMAND ${CMAKE_COMMAND} -E touch "${TENSILELOGIC_STAMP}" - DEPENDS ${HIPBLASLT_PYTHON_DEPS} "${HIPBLASLT_TENSILELOGIC_KNOWN_BUGS}" - VERBATIM - USES_TERMINAL -) - -set(output_stamp "${CMAKE_CURRENT_BINARY_DIR}/Tensile.stamp") -set(TENSILE_CREATE_LIBRARY_COMMAND - ${HIPBLASLT_PYTHON_COMMAND} -m Tensile.TensileCreateLibrary - ${TENSILELITE_BUILD_OPTS} - ${HIPBLASLT_LIBLOGIC_PATH} - "${HIPBLASLT_TENSILE_LIBPATH}" - HIP -) - -add_custom_command( - OUTPUT "${output_stamp}" - COMMENT "Building device libraries to ${HIPBLASLT_TENSILE_LIBPATH} ..." - COMMAND ${TENSILE_CREATE_LIBRARY_COMMAND} - COMMAND ${CMAKE_COMMAND} -E touch "${output_stamp}" - DEPENDS ${HIPBLASLT_PYTHON_DEPS} "${TENSILELOGIC_STAMP}" - # Because the command can contain special characters - VERBATIM - # Because this can be very long running and difficult to debug deadlocks - # without streaming. - USES_TERMINAL -) - -block(SCOPE_FOR VARIABLES) - list(JOIN TENSILE_CREATE_LIBRARY_COMMAND " " FORMATTED_TCL) - message(STATUS "Device lib build command: ${FORMATTED_TCL}") -endblock() - -add_custom_target(tensilelite-device-libraries ALL - DEPENDS "${output_stamp}" +hipblaslt_create_device_library( + TARGET tensilelite-device-libraries + LOGIC_PATH "${HIPBLASLT_LIBLOGIC_PATH}" + OUTPUT_DIR "${HIPBLASLT_TENSILE_LIBPATH}" + ARCHES ${GPU_TARGETS} + CXX_COMPILER "${CMAKE_CXX_COMPILER}" + OFFLOAD_BUNDLER "${TENSILELITE_OFFLOADBUNDLER}" + JOBS "${TENSILELITE_BUILD_PARALLEL_LEVEL}" + LOGIC_FILTER "${TENSILELITE_LOGIC_FILTER}" + ASAN "${HIPBLASLT_ENABLE_ASAN}" + YAML_FORMAT "${HIPBLASLT_ENABLE_YAML}" + NO_COMPRESS "${TENSILELITE_NO_COMPRESS}" + EXPERIMENTAL "${TENSILELITE_EXPERIMENTAL}" + LAZY_LOAD "${HIPBLASLT_ENABLE_LAZY_LOAD}" + ASM_COMMENTS "${TENSILELITE_ENABLE_ASM_COMMENTS}" + KEEP_BUILD_TMP "${TENSILELITE_KEEP_BUILD_TMP}" + ASM_DEBUG "${TENSILELITE_ASM_DEBUG}" ) if(HIPBLASLT_ENABLE_EXTOPS) diff --git a/projects/hipblaslt/library/src/amd_detail/rocblaslt/src/rocroller/CMakeLists.txt b/projects/hipblaslt/library/src/amd_detail/rocblaslt/src/rocroller/CMakeLists.txt index f3cbf2503dc3..26412d29a2f2 100644 --- a/projects/hipblaslt/library/src/amd_detail/rocblaslt/src/rocroller/CMakeLists.txt +++ b/projects/hipblaslt/library/src/amd_detail/rocblaslt/src/rocroller/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright Advanced Micro Devices, Inc., or its affiliates. # SPDX-License-Identifier: MIT -add_library(hipblaslt-rocroller OBJECT) +add_library(hipblaslt-rocroller STATIC) string(REGEX MATCHALL "gfx[a-z0-9]+" _rocroller_archs "${GPU_TARGETS}") if("gfx950" IN_LIST _rocroller_archs) @@ -38,4 +38,10 @@ target_include_directories(hipblaslt-rocroller "${PROJECT_SOURCE_DIR}/library/include" "${PROJECT_SOURCE_DIR}/tensilelite/include" ) -target_link_libraries(hipblaslt PRIVATE hipblaslt-rocroller) +target_link_libraries(hipblaslt PRIVATE $) + +if(NOT HIPBLASLT_BUILD_SHARED_LIBS) + install(TARGETS hipblaslt-rocroller + EXPORT hipblaslt-targets + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel) +endif() diff --git a/projects/hipblaslt/tensilelite/CMakeLists.txt b/projects/hipblaslt/tensilelite/CMakeLists.txt index ad98907ac6b0..39efd988e620 100644 --- a/projects/hipblaslt/tensilelite/CMakeLists.txt +++ b/projects/hipblaslt/tensilelite/CMakeLists.txt @@ -14,8 +14,10 @@ endif() if(TENSILELITE_ENABLE_HOST) find_package(ZLIB REQUIRED) - add_library(tensilelite-host OBJECT) - add_library(tensilelite::tensilelite-host ALIAS tensilelite-host) + option(TENSILELITE_BUILD_SHARED_LIBS "Build tensilelite-host as shared vs static" OFF) + set(BUILD_SHARED_LIBS ${TENSILELITE_BUILD_SHARED_LIBS}) + add_library(tensilelite-host) + add_library(roc::tensilelite-host ALIAS tensilelite-host) set_target_properties(tensilelite-host PROPERTIES @@ -23,12 +25,22 @@ if(TENSILELITE_ENABLE_HOST) CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) + rocm_set_soversion(tensilelite-host "1.0") + + if(BUILD_SHARED_LIBS AND NOT WIN32) + target_link_options(tensilelite-host PRIVATE "LINKER:--exclude-libs,ALL") + endif() target_compile_features(tensilelite-host PUBLIC cxx_std_17) + + include(GenerateExportHeader) + generate_export_header(tensilelite-host + BASE_NAME TENSILELITEHOST + EXPORT_MACRO_NAME TENSILELITEHOST_EXPORT + EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/include/tensilelitehost/export.h" + ) target_compile_definitions(tensilelite-host PUBLIC - $ - $ $ # if we don't have this we fail tests on 942_304cu ) @@ -44,15 +56,14 @@ if(TENSILELITE_ENABLE_HOST) target_include_directories(tensilelite-host PUBLIC $ - $ - PRIVATE - "${CMAKE_CURRENT_BINARY_DIR}/include" + $ ) target_link_libraries(tensilelite-host PUBLIC $ - roc::origami + $ + $ PRIVATE hip::device ZLIB::ZLIB @@ -81,6 +92,37 @@ if(TENSILELITE_ENABLE_HOST) add_subdirectory(src) add_subdirectory(include) + if(BUILD_SHARED_LIBS) + if(HIPBLASLT_ENABLE_HOST) + install(TARGETS tensilelite-host + EXPORT hipblaslt-targets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT runtime + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT runtime + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel + FILE_SET tensilelite_public_headers + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT devel + FILE_SET tensilelite_generated_headers + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT devel + FILE_SET rocisa_public_headers + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT devel + ) + elseif(DEFINED TENSILELITE_HOST_EXPORT_SET) + install(TARGETS tensilelite-host + EXPORT ${TENSILELITE_HOST_EXPORT_SET} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT runtime + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT runtime + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel + ) + else() + install(TARGETS tensilelite-host + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT runtime + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT runtime + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel + ) + endif() + set_property(TARGET tensilelite-host APPEND PROPERTY INSTALL_RPATH "$ORIGIN") + endif() + if(TENSILELITE_ENABLE_CLIENT) # mxDataGenerator bootstrap and `hipblaslt::mxdatagen` helper target # live in projects/hipblaslt/CMakeLists.txt and are guaranteed to be diff --git a/projects/hipblaslt/tensilelite/Tensile/Source/tensile_float8_bfloat8.h b/projects/hipblaslt/tensilelite/Tensile/Source/tensile_float8_bfloat8.h index fe7b92ba37dc..445c0bdb5aee 100644 --- a/projects/hipblaslt/tensilelite/Tensile/Source/tensile_float8_bfloat8.h +++ b/projects/hipblaslt/tensilelite/Tensile/Source/tensile_float8_bfloat8.h @@ -26,9 +26,7 @@ #pragma once -#ifdef TENSILE_USE_HIP #include -#endif // comment out following macro to disable FP8/BF8 types #define TENSILE_USE_FP8_BF8 diff --git a/projects/hipblaslt/tensilelite/Tensile/TensileCreateLibrary/Run.py b/projects/hipblaslt/tensilelite/Tensile/TensileCreateLibrary/Run.py index a8b712ea0cd8..35249f60228f 100644 --- a/projects/hipblaslt/tensilelite/Tensile/TensileCreateLibrary/Run.py +++ b/projects/hipblaslt/tensilelite/Tensile/TensileCreateLibrary/Run.py @@ -840,7 +840,7 @@ def libraryIter(lib: MasterSolutionLibrary): yield from libraryIter(lazyLib) for library in ParallelMap2( - LibraryIO.parseLibraryLogicFile, fIter, "Loading Logics...", return_as="generator_unordered" + LibraryIO.parseLibraryLogicFile, fIter, "Loading Logics...", return_as="generator" ): _, architectureName, _, _, _, newLibrary, typeMismatches = library mergeTypeMismatchCollector(typeMismatches) diff --git a/projects/hipblaslt/tensilelite/Tensile/cmake/TensileConfig.cmake b/projects/hipblaslt/tensilelite/Tensile/cmake/TensileConfig.cmake deleted file mode 100644 index 9728b7d565a5..000000000000 --- a/projects/hipblaslt/tensilelite/Tensile/cmake/TensileConfig.cmake +++ /dev/null @@ -1,269 +0,0 @@ -################################################################################ -# -# Copyright (C) 2022-2025 Advanced Micro Devices, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# -################################################################################ - -include(CMakeParseArguments) - -if(NOT DEFINED Tensile_ROOT) - # Compute the installation prefix relative to this file. - get_filename_component(Tensile_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) - get_filename_component(Tensile_PREFIX "${Tensile_PREFIX}" PATH) - - if (WIN32) - execute_process(COMMAND "${Tensile_PREFIX}/bin/TensileGetPath.exe" OUTPUT_VARIABLE Tensile_ROOT) - else() - execute_process(COMMAND "${Tensile_PREFIX}/bin/TensileGetPath" OUTPUT_VARIABLE Tensile_ROOT) - endif() -endif() -list(APPEND CMAKE_MODULE_PATH "${Tensile_ROOT}/Source/cmake/") -list(APPEND CMAKE_MODULE_PATH "${Tensile_ROOT}/Source/") - -if("HIP" IN_LIST Tensile_FIND_COMPONENTS) - set(TENSILE_USE_HIP ON CACHE BOOL "Use HIP") -else() - set(TENSILE_USE_HIP OFF CACHE BOOL "Use HIP") -endif() - -if("LLVM" IN_LIST Tensile_FIND_COMPONENTS) - set(TENSILE_USE_LLVM ON CACHE BOOL "Use LLVM") -else() - set(TENSILE_USE_LLVM OFF CACHE BOOL "Use LLVM") -endif() - -if("Client" IN_LIST Tensile_FIND_COMPONENTS) - if(TENSILE_USE_HIP AND TENSILE_USE_LLVM) - set(TENSILE_BUILD_CLIENT ON CACHE BOOL "Build Client") - elseif(Tensile_FIND_REQUIRED_Client) - message("Tensile client requires both Hip and LLVM.") - set(Tensile_FOUND false) - else() - set(TENSILE_BUILD_CLIENT OFF CACHE BOOL "Build Client") - endif() -else() - set(TENSILE_BUILD_CLIENT OFF CACHE BOOL "Build Client") -endif() - -if("STATIC_ONLY" IN_LIST Tensile_FIND_COMPONENTS) - set(TENSILE_STATIC_ONLY ON CACHE BOOL "Disable exporting symbols from shared library.") -else() - set(TENSILE_STATIC_ONLY OFF CACHE BOOL "Disable exporting symbols from shared library.") -endif() - -add_subdirectory("${Tensile_ROOT}/Source" "Tensile") -include("${Tensile_ROOT}/Source/TensileCreateLibrary.cmake") - -function(TensileCreateLibraryFiles - Tensile_LOGIC_PATH - Tensile_OUTPUT_PATH - Tensile_LIBRARY_TARGET - ) - - # Boolean options - set(options - SHORT_FILE_NAMES - PRINT_DEBUG - GENERATE_PACKAGE - SEPARATE_ARCHITECTURES - NO_LAZY_LIBRARY_LOADING - ASAN_BUILD - KEEP_BUILD_TMP - NO_COMPRESS - EXPERIMENTAL - ENABLE_MAKRER - ) - - # Single value settings - set(oneValueArgs - CODE_OBJECT_VERSION - COMPILER - COMPILER_PATH - EMBED_KEY - EMBED_LIBRARY - LIBRARY_FORMAT - TENSILE_ROOT - VAR_PREFIX - CPU_THREADS - VERBOSE - ) - - # Multi value settings - set(multiValueArgs - ARCHITECTURE - ) - - cmake_parse_arguments(Tensile "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(Tensile_UNPARSED_ARGUMENTS) - message(WARNING "Unrecognized arguments: ${Tensile_UNPARSED_ARGUMENTS}") - endif() - if(Tensile_KEYWORDS_MISSING_VALUES) - message(WARNING "Malformed arguments: ${Tensile_KEYWORDS_MISSING_VALUES}") - endif() - - # Parse incoming options - if(Tensile_TENSILE_ROOT) - set(Script "${Tensile_TENSILE_ROOT}/bin/TensileCreateLibrary") - else() - set(Script "${Tensile_ROOT}/bin/TensileCreateLibrary") - endif() - - message(STATUS "Tensile script: ${Script}") - - if(Tensile_NO_LAZY_LIBRARY_LOADING) - set(Options ${Options} "--no-lazy-library-loading") - endif() - - if(Tensile_ENABLE_MARKER) - set(Options ${Options} "--enable-marker") - endif() - - if(Tensile_KEEP_BUILD_TMP) - set(Options ${Options} "--keep-build-tmp") - endif() - - if(Tensile_NO_COMPRESS) - set(Options ${Options} "--no-compress") - endif() - - if(Tensile_EXPERIMENTAL) - set(Options ${Options} "--experimental") - endif() - - if(Tensile_ASAN_BUILD) - set(Options ${Options} "--address-sanitizer") - endif() - - if(Tensile_GENERATE_PACKAGE) - set(Options ${Options} "--package-library") - endif() - - if(Tensile_SHORT_FILE_NAMES) - set(Options ${Options} "--short-file-names") - endif() - - if(Tensile_EMBED_LIBRARY) - set(Options ${Options} "--embed-library=${Tensile_EMBED_LIBRARY}") - endif() - - if(Tensile_EMBED_KEY) - set(Options ${Options} "--embed-library-key=${Tensile_EMBED_KEY}") - endif() - - if(Tensile_CODE_OBJECT_VERSION) - set(Options ${Options} "--code-object-version=${Tensile_CODE_OBJECT_VERSION}") - endif() - - if(Tensile_COMPILER) - set(Options ${Options} "--cxx-compiler=${Tensile_COMPILER}") - endif() - - if(Tensile_COMPILER_PATH) - set(Options ${Options} "--cmake-cxx-compiler=${Tensile_COMPILER_PATH}") - endif() - - if(Tensile_CPU_THREADS) - set(Options ${Options} "--jobs=${Tensile_CPU_THREADS}") - endif() - - if(Tensile_VERBOSE) - set(Options ${Options} "--verbose=${Tensile_VERBOSE}") - endif() - - if(Tensile_ASM_DEBUG) - set(Options ${Options} "--asm-debug") - endif() - - if(Tensile_LOGIC_FILTER) - set(Options ${Options} "--logic-filter=${Tensile_LOGIC_FILTER}") - endif() - - if(Tensile_LIBRARY_FORMAT) - set(Options ${Options} "--library-format=${Tensile_LIBRARY_FORMAT}") - if(Tensile_LIBRARY_FORMAT MATCHES "yaml") - target_compile_definitions( TensileHost PUBLIC -DTENSILE_YAML=1) - endif() - endif() - - if(Tensile_ARCHITECTURE) - string (REPLACE ";" "_" archString "${Tensile_ARCHITECTURE}") - # uses _ separator to avoid cmake ; list interpretation, either ; or _ decoded in TensileCreateLibrary - set(Options ${Options} "--architecture=${archString}") - endif() - - if(Tensile_BUILD_ID) - set(Options ${Options} "--build-id=${Tensile_BUILD_ID}") - endif() - - set(CommandLine ${CMAKE_COMMAND} -E env PYTHONPATH=${PROJECT_BINARY_DIR}/lib -- ${VIRTUALENV_BIN_DIR}/${VIRTUALENV_PYTHON_EXENAME} ${Script} ${Options} ${Tensile_LOGIC_PATH} ${Tensile_OUTPUT_PATH} HIP) - message(STATUS "Tensile_CREATE_COMMAND: ${CommandLine}") - - if(Tensile_EMBED_LIBRARY) - set(Tensile_EMBED_LIBRARY_SOURCE "${Tensile_OUTPUT_PATH}/library/${Tensile_EMBED_LIBRARY}.cpp") - endif() - - if(Tensile_SKIP_BUILD) - message(STATUS "Skipping build of ${Tensile_OUTPUT_PATH}") - else() - if($ENV{ENABLE_ADDRESS_SANITIZER}) - # Must populate LD_PRELOAD with ASAN runtime if ASAN is being used. - # Find the ASAN RT with compiler and update env for Tensile call. - execute_process( - COMMAND ${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.asan-x86_64.so - OUTPUT_VARIABLE ASAN_LIB_PATH - COMMAND_ECHO STDOUT) - string(STRIP ${ASAN_LIB_PATH} ASAN_LIB_PATH) - set(CommandLine env LD_PRELOAD=${LD_PRELOAD}:${ASAN_LIB_PATH} ${CommandLine}) - elseif($ENV{ENABLE_THREAD_SANITIZER}) - # Must populate LD_PRELOAD with TSAN runtime if TSAN is being used. - # Find the TSAN RT with compiler and update env for Tensile call. - execute_process( - COMMAND ${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.tsan-x86_64.so - OUTPUT_VARIABLE TSAN_LIB_PATH - COMMAND_ECHO STDOUT) - string(STRIP ${TSAN_LIB_PATH} TSAN_LIB_PATH) - set(CommandLine env LD_PRELOAD=${LD_PRELOAD}:${TSAN_LIB_PATH} ${CommandLine}) - endif() - - add_custom_command( - COMMENT "Generating Tensile Libraries" - USES_TERMINAL - OUTPUT ${Tensile_OUTPUT_PATH}/library - COMMAND ${CommandLine} - ) - - add_custom_target( - ${Tensile_LIBRARY_TARGET} ALL - COMMENT "${Tensile_LIBRARY_TARGET}" - DEPENDS ${Tensile_OUTPUT_PATH}/library - ) - - endif() - - if(Tensile_EMBED_LIBRARY) - - add_library(${Tensile_EMBED_LIBRARY} ${Tensile_EMBED_LIBRARY_SOURCE}) - target_link_libraries(${Tensile_EMBED_LIBRARY} PUBLIC TensileHost) - - endif() - -endfunction() diff --git a/projects/hipblaslt/tensilelite/Tensile/cmake/TensileConfigVersion.cmake b/projects/hipblaslt/tensilelite/Tensile/cmake/TensileConfigVersion.cmake deleted file mode 100644 index 5cc909d8cbcc..000000000000 --- a/projects/hipblaslt/tensilelite/Tensile/cmake/TensileConfigVersion.cmake +++ /dev/null @@ -1,92 +0,0 @@ -################################################################################ -# -# Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# -################################################################################ - -# hardcoded tensile version; also in Tensile/__init__.py -set(TENSILE_VERSION_MAJOR 5) -set(TENSILE_VERSION_MINOR 0) -set(TENSILE_VERSION_PATCH 0) - -# export version -set(PACKAGE_VERSION "${TENSILE_VERSION_MAJOR}.${TENSILE_VERSION_MINOR}.${TENSILE_VERSION_PATCH}") - -if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) -else() - set(PACKAGE_VERSION_EXACT FALSE) -endif() - -if(PACKAGE_VERSION_EXACT} OR (PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)) - set(PACKAGE_VERSION_COMPATIBLE TRUE) -else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) -endif() - -if(PACKAGE_VERSION_COMPATIBLE) - set(PACKAGE_VERSION_UNSUTABLE FALSE) -else() - set(PACKAGE_VERSION_UNSUTABLE TRUE) -endif() - -if(false) -# set to compatible, and switch to false below if necessary -set(PACKAGE_VERSION_EXACT TRUE) -set(PACKAGE_VERSION_COMPATIBLE TRUE) -set(PACKAGE_VERSION_UNSUITABLE FALSE) - -# if major doesn't match -if (NOT PACKAGE_FIND_VERSION_MAJOR STREQUAL TENSILE_VERSION_MAJOR) - - set(PACKAGE_VERSION_EXACT FALSE) - set(PACKAGE_VERSION_COMPATIBLE FALSE) - set(PACKAGE_VERSION_UNSUITABLE TRUE) - return() -endif() - -# if minor insufficient -if (PACKAGE_FIND_VERSION_MINOR STRGREATER TENSILE_VERSION_MINOR) - - set(PACKAGE_VERSION_EXACT FALSE) - set(PACKAGE_VERSION_COMPATIBLE FALSE) - set(PACKAGE_VERSION_UNSUITABLE TRUE) - return() -endif() - -# if minor==minor but patch insufficient -if (PACKAGE_FIND_VERSION_MINOR STREQUAL TENSILE_VERSION_MINOR) - if (PACKAGE_FIND_VERSION_PATCH STRGREATER TENSILE_VERSION_PATCH) - - set(PACKAGE_VERSION_EXACT FALSE) - set(PACKAGE_VERSION_COMPATIBLE FALSE) - set(PACKAGE_VERSION_UNSUITABLE TRUE) - return() - endif() -endif() - -# check exactness -if (NOT (PACKAGE_FIND_VERSION_MINOR STREQUAL TENSILE_VERSION_MINOR - AND PACKAGE_FIND_VERSION_MINOR STREQUAL TENSILE_VERSION_MINOR) ) - - set(PACKAGE_VERSION_EXACT FALSE) -endif() -endif() diff --git a/projects/hipblaslt/tensilelite/client/CMakeLists.txt b/projects/hipblaslt/tensilelite/client/CMakeLists.txt index ecd591a3dddd..b313e1276e72 100644 --- a/projects/hipblaslt/tensilelite/client/CMakeLists.txt +++ b/projects/hipblaslt/tensilelite/client/CMakeLists.txt @@ -25,7 +25,7 @@ target_link_libraries(tensilelite-client-common PUBLIC hip::device hip::host - tensilelite::tensilelite-host + roc::tensilelite-host rocisa::rocisa-cpp OpenMP::OpenMP_CXX ) @@ -47,11 +47,6 @@ target_include_directories(tensilelite-client-common $ ) -target_compile_definitions(tensilelite-client-common - PUBLIC - TENSILE_DEFAULT_SERIALIZATION -) - set_target_properties(tensilelite-client-common PROPERTIES POSITION_INDEPENDENT_CODE ON diff --git a/projects/hipblaslt/tensilelite/include/CMakeLists.txt b/projects/hipblaslt/tensilelite/include/CMakeLists.txt index 5776210af616..6c1032f395aa 100644 --- a/projects/hipblaslt/tensilelite/include/CMakeLists.txt +++ b/projects/hipblaslt/tensilelite/include/CMakeLists.txt @@ -1,104 +1,145 @@ # Copyright Advanced Micro Devices, Inc., or its affiliates. # SPDX-License-Identifier: MIT +if(HIPBLASLT_ENABLE_HOST) + set(_tensilelite_header_scope PUBLIC) +else() + set(_tensilelite_header_scope PRIVATE) +endif() + target_sources(tensilelite-host + ${_tensilelite_header_scope} + FILE_SET tensilelite_public_headers TYPE HEADERS + BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}" + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPU.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPUPredicates.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPU_Detail.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Activation.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/CachingLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Comparison.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblem.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblemPredicates.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblemProperties.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblem_Detail.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblem_fwd.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionSolution.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionSolution_fwd.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionTaskPredicates.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Contractions.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_BFloat16.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_BFloat6.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_E5M3.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_E8.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Float4.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Float6.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Float8_BFloat8.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Half.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Int8.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Int8x4.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_XFloat32.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Debug.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Distance.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DistinctType.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/EmbeddedLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ExactLogicLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/FreeSizeLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/GranularitySelectionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/KernelArguments.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/KernelLanguageTypes.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MLFeatures.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MLPClassification.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MLPClassificationLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MapLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MasterSolutionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MatchingLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PerformanceMetricTypes.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PlaceholderLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PredicateDebugger.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Predicates.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PredictionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ProblemKey.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Properties.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PropertyMatching.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ScalarValueTypes.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Base.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Containers.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/ContractionPredicates.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/ContractionSolution.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/ExactLogicLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/FreeSizeLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/GranularitySelectionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/HasTraits.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MLFeatures.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MLPClassificationLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MapLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MatchingLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/PlaceholderLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Predicates.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/PredictionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Properties.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/SolutionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SingleSolutionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Singleton.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionLibrary_fwd.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Task.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Tensile.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Tensile_fwd.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorDescriptor.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorDescriptor_Detail.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorDescriptor_fwd.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorOps.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorOps_fwd.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Utils.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/UtilsOrigami.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/geom.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/hip/HipHardware.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/hip/HipSolutionAdapter.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/hip/HipUtils.hpp" PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/hip/HipHardware.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/hip/HipSolutionAdapter.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/hip/HipUtils.hpp" - - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Base.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Containers.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/ContractionPredicates.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/ContractionSolution.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/ExactLogicLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/FreeSizeLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/GranularitySelectionLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/HasTraits.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MLFeatures.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MLPClassificationLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MapLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/MatchingLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/PlaceholderLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Predicates.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/Properties.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization/SolutionLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionValidation.hpp" - - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPU.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPUPredicates.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPU_Detail.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Activation.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ArithmeticUnitTypes.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/CachingLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Comparison.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblem.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblemPredicates.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblemProperties.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblem_Detail.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionProblem_fwd.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionSolution.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionSolution_fwd.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Contractions.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_BFloat16.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Float8_BFloat8.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Half.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Int8.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_Int8x4.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DataTypes_XFloat32.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Debug.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Distance.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/DistinctType.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/EmbeddedData.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/EmbeddedLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ExactLogicLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/FreeSizeLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/GranularitySelectionLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/KernelArguments.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/KernelLanguageTypes.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MLFeatures.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MLPClassification.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MLPClassificationLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Macros.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MapLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MasterSolutionLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/MatchingLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PerformanceMetricTypes.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PlaceholderLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Predicates.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ProblemKey.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Properties.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/PropertyMatching.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ScalarValueTypes.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Serialization.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SingleSolutionLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Singleton.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionLibrary_fwd.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionMapLibrary.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Tensile.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Tensile_fwd.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorDescriptor.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorDescriptor_Detail.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorDescriptor_fwd.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorOps.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/TensorOps_fwd.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Utils.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/geom.hpp" + FILE_SET tensilelite_private_headers TYPE HEADERS + BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}" + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ArithmeticUnitTypes.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/EmbeddedData.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionMapLibrary.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/SolutionValidation.hpp" ) if(HIPBLASLT_ENABLE_YAML) target_sources(tensilelite-host PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/llvm/Loading.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/llvm/YAML.hpp" + FILE_SET tensilelite_private_headers TYPE HEADERS + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/llvm/Loading.hpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/llvm/YAML.hpp" ) else() target_sources(tensilelite-host + ${_tensilelite_header_scope} + FILE_SET tensilelite_public_headers TYPE HEADERS + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/msgpack/MessagePack.hpp" PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/msgpack/Loading.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/msgpack/MessagePack.hpp" + FILE_SET tensilelite_private_headers TYPE HEADERS + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/Tensile/msgpack/Loading.hpp" + ) +endif() + +if(HIPBLASLT_ENABLE_HOST) + get_filename_component(_rocisa_include_root "${CMAKE_CURRENT_SOURCE_DIR}/../rocisa" ABSOLUTE) + target_sources(tensilelite-host + ${_tensilelite_header_scope} + FILE_SET tensilelite_generated_headers TYPE HEADERS + BASE_DIRS "${CMAKE_CURRENT_BINARY_DIR}" + FILES "${CMAKE_CURRENT_BINARY_DIR}/tensilelitehost/export.h" + FILE_SET rocisa_public_headers TYPE HEADERS + BASE_DIRS "${_rocisa_include_root}" + FILES "${_rocisa_include_root}/rocisa/include/enum.hpp" ) endif() diff --git a/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU.hpp b/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU.hpp index 03baade27c27..6e945b5b252b 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU.hpp @@ -29,7 +29,6 @@ #include #include -TENSILE_HIDDEN_BEGIN namespace TensileLite { /** @@ -40,7 +39,7 @@ namespace TensileLite * See subclass in `hip` directory which can create an instance * automatically. */ - struct TENSILE_API AMDGPU : public Hardware + struct TENSILELITEHOST_EXPORT AMDGPU : public Hardware { static std::string Type() { @@ -412,7 +411,6 @@ namespace TensileLite return static_cast(l) >= static_cast(r); } - TENSILE_API std::ostream& operator<<(std::ostream& stream, AMDGPU::Processor p); - TENSILE_API std::ostream& operator<<(std::ostream& stream, AMDGPU g); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, AMDGPU::Processor p); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, AMDGPU g); } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/AMDGPUPredicates.hpp b/projects/hipblaslt/tensilelite/include/Tensile/AMDGPUPredicates.hpp index b5be8e17c436..90ec5bd32870 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/AMDGPUPredicates.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/AMDGPUPredicates.hpp @@ -35,9 +35,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -318,4 +316,3 @@ namespace TensileLite } // namespace Predicates } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU_Detail.hpp b/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU_Detail.hpp index 4336047d5006..680d8466d36c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU_Detail.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/AMDGPU_Detail.hpp @@ -29,9 +29,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace std { @@ -45,4 +43,3 @@ namespace std }; } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Activation.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Activation.hpp index 9746a3c5e8c6..92fa4ac20ad8 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Activation.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Activation.hpp @@ -34,9 +34,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -77,11 +75,10 @@ namespace TensileLite Count }; - std::string ToString(ActivationType d); - std::ostream& operator<<(std::ostream& stream, const ActivationType& t); - std::istream& operator>>(std::istream& stream, ActivationType& t); + TENSILELITEHOST_EXPORT std::string ToString(ActivationType d); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, const ActivationType& t); + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, ActivationType& t); - int getAdditionalArgNum(ActivationType d); + TENSILELITEHOST_EXPORT int getAdditionalArgNum(ActivationType d); } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ArithmeticUnitTypes.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ArithmeticUnitTypes.hpp index 367f75ea0d84..c5f5c388bd29 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ArithmeticUnitTypes.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ArithmeticUnitTypes.hpp @@ -32,9 +32,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -150,4 +148,3 @@ namespace std }; } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/CachingLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/CachingLibrary.hpp index aea53614a7bd..e58e0692b727 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/CachingLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/CachingLibrary.hpp @@ -37,9 +37,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -352,4 +350,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Comparison.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Comparison.hpp index d1bcd19908b7..9b6814178663 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Comparison.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Comparison.hpp @@ -28,9 +28,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -236,4 +234,3 @@ namespace std }; } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionLibrary.hpp index fe782a93a913..3d2cb324de98 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionLibrary.hpp @@ -38,9 +38,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -66,4 +64,3 @@ namespace TensileLite = GranularitySelectionLibrary; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem.hpp index 0e91852bb1be..57dc0a3c584f 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem.hpp @@ -39,7 +39,6 @@ #include #include -TENSILE_HIDDEN_BEGIN namespace TensileLite { /** @@ -47,7 +46,7 @@ namespace TensileLite * @{ */ // These are parameters that are used in predicate, and also are kernel arguments. - class TENSILE_API ContractionProblemParameters + class TENSILELITEHOST_EXPORT ContractionProblemParameters { public: void setGSU(int16_t gsu) @@ -202,7 +201,7 @@ namespace TensileLite * \addtogroup Problem * @{ */ - class TENSILE_API ContractionProblemGemm; + class TENSILELITEHOST_EXPORT ContractionProblemGemm; struct ConstantDescriptor { @@ -210,7 +209,7 @@ namespace TensileLite rocisa::DataType dataType; }; - class TENSILE_API ContractionProblem : public Problem + class TENSILELITEHOST_EXPORT ContractionProblem : public Problem { public: ContractionProblem(size_t size, size_t workspaceSize = 0); @@ -327,7 +326,7 @@ namespace TensileLite * summations, etc. This is decoupled from any particular pointers, which * are provided in ContractionInputs objects. */ - class TENSILE_API ContractionProblemGemm : public ContractionProblem + class TENSILELITEHOST_EXPORT ContractionProblemGemm : public ContractionProblem { public: enum TENSOR : int @@ -1526,7 +1525,7 @@ namespace TensileLite } }; - struct TENSILE_API ContractionInputs : public ProblemInputs + struct TENSILELITEHOST_EXPORT ContractionInputs : public ProblemInputs { ContractionInputs(); virtual ~ContractionInputs(); @@ -1601,7 +1600,7 @@ namespace TensileLite bool gpu = false; }; - struct TENSILE_API ContractionGroupedInputs : public ProblemInputs + struct TENSILELITEHOST_EXPORT ContractionGroupedInputs : public ProblemInputs { std::vector grouped; void* ws = nullptr; @@ -1618,25 +1617,24 @@ namespace TensileLite { }; - TENSILE_API std::ostream& operator<<(std::ostream& stream, + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ContractionProblemGemm const& contraction); - TENSILE_API std::ostream& operator<<(std::ostream& stream, + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ContractionProblemGemm::FreeIndex const& free); - TENSILE_API std::ostream& operator<<(std::ostream& stream, + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ContractionProblemGemm::BatchIndex const& batch); - TENSILE_API std::ostream& operator<<(std::ostream& stream, + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ContractionProblemGemm::BoundIndex const& bound); - TENSILE_API std::istream& operator>>(std::istream& stream, + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, ContractionProblemGemm::FreeIndex& free); - TENSILE_API std::istream& operator>>(std::istream& stream, + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, ContractionProblemGemm::BatchIndex& batch); - TENSILE_API std::istream& operator>>(std::istream& stream, + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, ContractionProblemGemm::BoundIndex& bound); /** * @} */ } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemPredicates.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemPredicates.hpp index 97e2268ee31a..31d28532f252 100755 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemPredicates.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemPredicates.hpp @@ -43,9 +43,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -3098,4 +3096,3 @@ namespace TensileLite } // namespace Predicates } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemProperties.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemProperties.hpp index da8d44b5bf9f..dc11837e3e05 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemProperties.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblemProperties.hpp @@ -31,9 +31,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -229,4 +227,3 @@ namespace TensileLite */ } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_Detail.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_Detail.hpp index 877ce5188b97..9429193b2f5e 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_Detail.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_Detail.hpp @@ -31,9 +31,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -255,4 +253,3 @@ namespace std } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_fwd.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_fwd.hpp index 5af5ea825032..081544cf4e01 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_fwd.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionProblem_fwd.hpp @@ -26,16 +26,14 @@ #pragma once -#include +#include -TENSILE_HIDDEN_BEGIN namespace TensileLite { - class TENSILE_API ContractionProblemParameters; - class TENSILE_API ContractionProblem; - class TENSILE_API ContractionProblemGemm; - class TENSILE_API ContractionProblemGroupedGemm; - struct TENSILE_API ContractionInputs; - struct TENSILE_API ContractionGroupedInputs; + class TENSILELITEHOST_EXPORT ContractionProblemParameters; + class TENSILELITEHOST_EXPORT ContractionProblem; + class TENSILELITEHOST_EXPORT ContractionProblemGemm; + class TENSILELITEHOST_EXPORT ContractionProblemGroupedGemm; + struct TENSILELITEHOST_EXPORT ContractionInputs; + struct TENSILELITEHOST_EXPORT ContractionGroupedInputs; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution.hpp index f2fc1d8fa5c3..e85995673b0f 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution.hpp @@ -46,9 +46,7 @@ #include "origami/origami.hpp" #include "origami/streamk.hpp" -#include - -TENSILE_HIDDEN_BEGIN +#include #define TENSILE_COMMON_KERNEL_ARGS_SIZE 16 @@ -105,7 +103,7 @@ namespace TensileLite int CUs = 0; }; - extern PerfModel perf; + extern TENSILELITEHOST_EXPORT PerfModel perf; struct BufferLoadCheckPacket { @@ -223,7 +221,7 @@ namespace TensileLite * Can generate `KernelInvocation` objects to solve a particular problem * given a set of `ContractionInputs`. */ - class ContractionSolution : public Solution + class TENSILELITEHOST_EXPORT ContractionSolution : public Solution { public: using Problem = ContractionProblemGemm; @@ -708,15 +706,14 @@ namespace TensileLite }; template - void setDeviceUserArgs(std::vector const& problems, + TENSILELITEHOST_EXPORT void setDeviceUserArgs(std::vector const& problems, ContractionSolution::GroupedInputs const& inputs, DeviceUserArguments* args); - std::ostream& operator<<(std::ostream& stream, + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ContractionSolution::StaticPerformanceModel const& spm); - std::ostream& operator<<(std::ostream& stream, + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ContractionSolution::ProjectedPerformance const& spm); - std::ostream& operator<<(std::ostream& stream, BufferLoadCheckPacket const& st); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, BufferLoadCheckPacket const& st); } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution_fwd.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution_fwd.hpp index 7816dd02a970..d702409428d5 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution_fwd.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionSolution_fwd.hpp @@ -26,9 +26,7 @@ #pragma once -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -36,4 +34,3 @@ namespace TensileLite struct SizeMapping; } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ContractionTaskPredicates.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ContractionTaskPredicates.hpp index 9f7b19caf39d..75a4c89d4c78 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ContractionTaskPredicates.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ContractionTaskPredicates.hpp @@ -36,9 +36,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -197,4 +195,3 @@ namespace TensileLite } // namespace Predicates } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Contractions.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Contractions.hpp index 0f822164b044..2ea3f16dd63d 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Contractions.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Contractions.hpp @@ -31,9 +31,6 @@ #include #include #include -#include +#include -TENSILE_HIDDEN_BEGIN - -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes.hpp index e98c36cf9688..2c18ec1ad54a 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes.hpp @@ -38,7 +38,7 @@ #include #include // Using hip header for both NANOO and OCP data types -#include +#include #if defined(__HIPCC__) #include @@ -55,8 +55,6 @@ #include #include -TENSILE_HIDDEN_BEGIN - namespace rocisa { /** @@ -71,21 +69,21 @@ namespace rocisa * @{ */ - std::string TypeAbbrev(rocisa::DataType d); - float GetElementSize(rocisa::DataType d); - std::ostream& operator<<(std::ostream& stream, rocisa::DataType const& t); - std::istream& operator>>(std::istream& stream, rocisa::DataType& t); + TENSILELITEHOST_EXPORT std::string TypeAbbrev(rocisa::DataType d); + TENSILELITEHOST_EXPORT float GetElementSize(rocisa::DataType d); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, rocisa::DataType const& t); + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, rocisa::DataType& t); } // namespace rocisa namespace TensileLite { - std::string ToString(rocisa::DataType d); + TENSILELITEHOST_EXPORT std::string ToString(rocisa::DataType d); /** * \ingroup DataTypes * \brief Runtime accessible data type metadata */ - struct DataTypeInfo + struct TENSILELITEHOST_EXPORT DataTypeInfo { static DataTypeInfo const& Get(int index); static DataTypeInfo const& Get(rocisa::DataType t); @@ -492,14 +490,13 @@ namespace TensileLite } #endif // !_WIN32 && TENSILE_USE_FP4 - std::string ToString(ConstantVariant d); - bool CompareValue(const ConstantVariant& d, double value); + TENSILELITEHOST_EXPORT std::string ToString(ConstantVariant d); + TENSILELITEHOST_EXPORT bool CompareValue(const ConstantVariant& d, double value); - size_t multiplyElementSize(size_t element, float elementSize); + TENSILELITEHOST_EXPORT size_t multiplyElementSize(size_t element, float elementSize); /** * @} */ } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat16.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat16.hpp index f6ef9335d9a1..a5537b8d6ecf 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat16.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat16.hpp @@ -30,9 +30,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include #define TENSILE_USE_BF16 @@ -327,4 +325,3 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat6.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat6.hpp index 8a65e26b6dda..46730b37337e 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat6.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_BFloat6.hpp @@ -26,7 +26,7 @@ #pragma once -#include +#include #define TENSILE_USE_BF6 @@ -43,9 +43,7 @@ namespace TensileLite #else // _WIN32 -#ifdef TENSILE_USE_HIP #include -#endif #define HIP_HOST_DEVICE __host__ __device__ #define HIP_HOST __host__ @@ -55,8 +53,6 @@ namespace TensileLite #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { enum class hip_bf6_rounding_mode @@ -311,8 +307,6 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END - #endif // _WIN32 #endif // TENSILE_USE_BF6 diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E5M3.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E5M3.hpp index bb3c55ce0150..40f4afa72f6a 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E5M3.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E5M3.hpp @@ -28,9 +28,7 @@ #include // __half_raw -#include - -TENSILE_HIDDEN_BEGIN +#include #define HIP_HOST_DEVICE __host__ __device__ #define HIP_HOST __host__ @@ -372,4 +370,3 @@ HIP_DEVICE static float cast_to_f32_from_uf8(uint8_t v) { } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E8.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E8.hpp index 2abe2868ad10..97da3361c38f 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E8.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_E8.hpp @@ -26,9 +26,7 @@ #pragma once -#include - -TENSILE_HIDDEN_BEGIN +#include #define TENSILE_USE_MX_SCALE @@ -168,4 +166,3 @@ namespace std #endif // TENSILE_USE_MX_SCALE -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float4.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float4.hpp index 8072aae676bf..0dbd544cac15 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float4.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float4.hpp @@ -26,7 +26,7 @@ #pragma once -#include +#include #define TENSILE_USE_FP4 @@ -41,9 +41,7 @@ namespace TensileLite #else // _WIN32 -#ifdef TENSILE_USE_HIP #include -#endif #define HIP_HOST_DEVICE __host__ __device__ #define HIP_HOST __host__ @@ -51,8 +49,6 @@ namespace TensileLite #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { enum class hip_f4_rounding_mode @@ -158,8 +154,6 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END - #endif // _WIN32 #endif // TENSILE_USE_FP4 diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float6.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float6.hpp index fdeb6317a200..da47e78803b5 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float6.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float6.hpp @@ -26,7 +26,7 @@ #pragma once -#include +#include #define TENSILE_USE_FP6 @@ -43,9 +43,7 @@ namespace TensileLite #else // _WIN32 -#ifdef TENSILE_USE_HIP #include -#endif #define HIP_HOST_DEVICE __host__ __device__ #define HIP_HOST __host__ @@ -55,8 +53,6 @@ namespace TensileLite #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { enum class hip_f6_rounding_mode @@ -311,8 +307,6 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END - #endif // _WIN32 #endif // TENSILE_USE_FP6 diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float8_BFloat8.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float8_BFloat8.hpp index 1de6a1d576f4..0ab02b04f0fe 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float8_BFloat8.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Float8_BFloat8.hpp @@ -26,11 +26,9 @@ #pragma once -#include +#include -#ifdef TENSILE_USE_HIP #include -#endif // comment out following macro to disable FP8/BF8 types #define TENSILE_USE_FP8_BF8 @@ -39,8 +37,6 @@ #define HIP_HOST __host__ #define HIP_DEVICE __device__ -TENSILE_HIDDEN_BEGIN - namespace TensileLite { @@ -532,4 +528,3 @@ namespace std } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Half.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Half.hpp index a0360759a841..688c49aa57f3 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Half.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Half.hpp @@ -26,32 +26,19 @@ #pragma once -#include +#include -#ifdef TENSILE_USE_HIP #include -#endif #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { -#if defined(TENSILE_USE_HIP) || defined(TENSILE_USE_FLOAT16_BUILTIN) /** * \ingroup DataTypes */ using Half = _Float16; #define TENSILE_USE_HALF -#else - /** - * \ingroup DataTypes - */ - struct Half : public DistinctType - { - }; -#endif } // namespace TensileLite namespace std @@ -67,4 +54,3 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8.hpp index e84b1a7c3baf..ab46a9bb1eb3 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8.hpp @@ -26,16 +26,12 @@ #pragma once -#include +#include -#ifdef TENSILE_USE_HIP #include -#endif #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { /** @@ -54,4 +50,3 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8x4.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8x4.hpp index f6d361ed9c81..1edc968043aa 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8x4.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_Int8x4.hpp @@ -26,9 +26,7 @@ #pragma once -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -89,4 +87,3 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_XFloat32.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_XFloat32.hpp index 67d90b9c13b0..b3e55b6972d5 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_XFloat32.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DataTypes_XFloat32.hpp @@ -30,9 +30,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include #define TENSILE_USE_XF32 @@ -239,4 +237,3 @@ namespace std } } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Debug.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Debug.hpp index b7a95ec4c7a1..a7ef7c194f1b 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Debug.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Debug.hpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #ifdef Tensile_ENABLE_MARKER #include @@ -37,8 +37,6 @@ #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { using StringSet = std::set; @@ -46,7 +44,7 @@ namespace TensileLite /** * @brief Common place for defining flags which enable debug behaviour. */ - class Debug : public LazySingleton + class TENSILELITEHOST_EXPORT Debug : public LazySingleton { public: bool printPropertyEvaluation() const; @@ -175,4 +173,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Distance.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Distance.hpp index aacb534a4b87..d6630767b423 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Distance.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Distance.hpp @@ -28,9 +28,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -415,4 +413,3 @@ namespace TensileLite } // namespace Matching } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/DistinctType.hpp b/projects/hipblaslt/tensilelite/include/Tensile/DistinctType.hpp index 4dc767faa9e7..b63f8d9d7cd9 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/DistinctType.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/DistinctType.hpp @@ -33,9 +33,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -110,4 +108,3 @@ namespace TensileLite */ } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedData.hpp b/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedData.hpp index f91856e5a1e3..08a6840895d3 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedData.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedData.hpp @@ -33,11 +33,9 @@ #include #include -#include +#include #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { /** @@ -58,7 +56,7 @@ namespace TensileLite * registered with EmbedData. */ template - class TENSILE_API EmbeddedData : public LazySingleton> + class TENSILELITEHOST_EXPORT EmbeddedData : public LazySingleton> { public: using Base = LazySingleton>; @@ -111,7 +109,7 @@ namespace TensileLite * @brief Object which registers embedded data when it's instantiated. */ template - struct TENSILE_API EmbedData + struct TENSILELITEHOST_EXPORT EmbedData { EmbedData(std::initializer_list data) { @@ -142,4 +140,3 @@ namespace TensileLite #define TENSILE_EMBED_SYMBOL_NAME TENSILE_CONCATENATE_SYMBOLS(TensileEmbeddedData, __LINE__) -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedLibrary.hpp index 9a3355ffda51..ba9f586ae85f 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/EmbeddedLibrary.hpp @@ -26,15 +26,11 @@ #pragma once -#include - -#ifdef TENSILE_DEFAULT_SERIALIZATION +#include #include #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { /** @@ -45,7 +41,7 @@ namespace TensileLite * stored in the executable via EmbedData/EmbeddedData. */ template - class TENSILE_API EmbeddedLibrary : public LazySingleton> + class TENSILELITEHOST_EXPORT EmbeddedLibrary : public LazySingleton> { public: using Singleton = LazySingleton>; @@ -103,6 +99,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END - -#endif diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ExactLogicLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ExactLogicLibrary.hpp index 1669c81ccd9c..e4f6968f3670 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ExactLogicLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ExactLogicLibrary.hpp @@ -37,9 +37,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -514,4 +512,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/FreeSizeLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/FreeSizeLibrary.hpp index 1e3c63717f88..2e5499e5528c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/FreeSizeLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/FreeSizeLibrary.hpp @@ -29,9 +29,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -163,4 +161,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/GranularitySelectionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/GranularitySelectionLibrary.hpp index 52fff2c97503..72c672a781a9 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/GranularitySelectionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/GranularitySelectionLibrary.hpp @@ -36,9 +36,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -288,4 +286,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/KernelArguments.hpp b/projects/hipblaslt/tensilelite/include/Tensile/KernelArguments.hpp index c4a1518bf2dc..f10ba6817bd0 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/KernelArguments.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/KernelArguments.hpp @@ -33,9 +33,8 @@ #include #include -#include +#include -TENSILE_HIDDEN_BEGIN namespace TensileLite { template @@ -132,7 +131,7 @@ namespace TensileLite std::vector m_vec_data; }; - class TENSILE_API KernelArguments + class TENSILELITEHOST_EXPORT KernelArguments { public: KernelArguments(bool log = true); @@ -237,8 +236,8 @@ namespace TensileLite bool m_log; }; - TENSILE_API KernelArguments::const_iterator begin(KernelArguments const&); - TENSILE_API KernelArguments::const_iterator end(KernelArguments const&); + TENSILELITEHOST_EXPORT KernelArguments::const_iterator begin(KernelArguments const&); + TENSILELITEHOST_EXPORT KernelArguments::const_iterator end(KernelArguments const&); inline void KernelArguments::append(std::string const& name, ConstantVariant const& value, @@ -753,4 +752,3 @@ namespace TensileLite size_t counter = 0; }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/KernelLanguageTypes.hpp b/projects/hipblaslt/tensilelite/include/Tensile/KernelLanguageTypes.hpp index 93e9e80084b6..a52f4831b022 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/KernelLanguageTypes.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/KernelLanguageTypes.hpp @@ -32,9 +32,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -61,10 +59,10 @@ namespace TensileLite Count }; - std::string ToString(KernelLanguage d); - std::string TypeAbbrev(KernelLanguage d); - std::ostream& operator<<(std::ostream& stream, KernelLanguage const& t); - std::istream& operator>>(std::istream& stream, KernelLanguage& t); + TENSILELITEHOST_EXPORT std::string ToString(KernelLanguage d); + TENSILELITEHOST_EXPORT std::string TypeAbbrev(KernelLanguage d); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, KernelLanguage const& t); + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, KernelLanguage& t); /** * \ingroup KernelLanguages @@ -151,4 +149,3 @@ namespace std }; } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/MLFeatures.hpp b/projects/hipblaslt/tensilelite/include/Tensile/MLFeatures.hpp index 3e00d90d37d3..84dde1bdf58c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/MLFeatures.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/MLFeatures.hpp @@ -32,9 +32,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -260,4 +258,3 @@ namespace TensileLite } // namespace MLFeatures } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/MLPClassification.hpp b/projects/hipblaslt/tensilelite/include/Tensile/MLPClassification.hpp index af6cd16e871a..ecea84559d6c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/MLPClassification.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/MLPClassification.hpp @@ -32,9 +32,7 @@ #include "DataTypes_Half.hpp" -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -120,4 +118,3 @@ namespace TensileLite } // namespace MLPClassification } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/MLPClassificationLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/MLPClassificationLibrary.hpp index eb0a747b9152..c454dc21f4c2 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/MLPClassificationLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/MLPClassificationLibrary.hpp @@ -38,9 +38,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -197,4 +195,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Macros.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Macros.hpp deleted file mode 100644 index eacf65fa810b..000000000000 --- a/projects/hipblaslt/tensilelite/include/Tensile/Macros.hpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright Advanced Micro Devices, Inc., or its affiliates. -// SPDX-License-Identifier: MIT - -#pragma once - -// TENSILE_API controls C++ symbol visibility for TensileLite types and free -// functions whose declarations appear in this directory's public headers. -// -// TensileLite is built as an OBJECT library (`tensilelite-host`) and is -// statically composed into consumer shared libraries -- libhipblaslt.so today, -// and historically libhipsparselt.so as well. The exported ABI of those -// consumer DSOs is their own C surface (e.g. hipblasLt*); TensileLite's class -// and template definitions are deliberately NOT part of that ABI. -// -// CMake's `CXX_VISIBILITY_PRESET hidden` on `tensilelite-host` only governs -// the visibility of symbols emitted from TensileLite's own translation units. -// It does NOT govern what consumer translation units emit when they `#include` -// these headers. Inline methods, implicit template instantiations, and the -// vtable / typeinfo for any class used as a complete type in a consumer TU -// will be emitted into the consumer's object files under the CONSUMER's -// per-TU `-fvisibility=` setting. -// -// When two consumer DSOs both export the same TensileLite-internal C++ -// mangled name with incompatible class layouts, ELF flat-namespace -// interposition causes one DSO's calls to resolve into the other DSO's -// definition and crash. This is the failure mode that was observed in -// March 2026 when libhipsparselt.so first shipped alongside libhipblaslt.so -// with a divergent ContractionProblemGemm layout. -// -// To prevent this at the source, TENSILE_API is defined as a class- and -// function-level hidden-visibility attribute. Class-level visibility -// attributes travel through the header into every consuming TU and OVERRIDE -// the consumer's per-TU `-fvisibility=` fallback for the marked type -- -// including its vtable, typeinfo, inline method bodies, and implicit -// template instantiations. -// -// On compilers without the GCC visibility attribute (notably MSVC), this -// expands to nothing and visibility falls back to the platform default; on -// those platforms the relevant ABI hazard does not exist in the same form. - -#if defined(__GNUC__) || defined(__clang__) -#define TENSILE_API __attribute__((visibility("hidden"))) -#else -#define TENSILE_API -#endif - -// TENSILE_HIDDEN_BEGIN / TENSILE_HIDDEN_END wrap a region of declarations -// (typically a `namespace TensileLite { ... }` block in a public header) and -// apply hidden visibility to every declaration inside, regardless of whether -// the declaration carries an explicit attribute. This is belt-and-braces for -// the per-symbol TENSILE_API marker above: it ensures that types added in the -// future without explicit annotation -- and the implicit weak symbols every -// class with virtual functions emits (vtable, typeinfo, typeinfo name) -- -// also receive hidden visibility in consumer translation units. -// -// Use as: -// -// TENSILE_HIDDEN_BEGIN -// namespace TensileLite { /* declarations */ } -// TENSILE_HIDDEN_END -// -// On compilers without GCC visibility pragmas, both macros expand to nothing. - -#if defined(__GNUC__) || defined(__clang__) -#define TENSILE_HIDDEN_BEGIN _Pragma("GCC visibility push(hidden)") -#define TENSILE_HIDDEN_END _Pragma("GCC visibility pop") -#else -#define TENSILE_HIDDEN_BEGIN -#define TENSILE_HIDDEN_END -#endif diff --git a/projects/hipblaslt/tensilelite/include/Tensile/MapLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/MapLibrary.hpp index 54e6f6175658..e8a1d292517c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/MapLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/MapLibrary.hpp @@ -31,9 +31,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -227,4 +225,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/MasterSolutionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/MasterSolutionLibrary.hpp index 0c4eeb634721..cc281c007383 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/MasterSolutionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/MasterSolutionLibrary.hpp @@ -37,9 +37,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace fs = std::filesystem; @@ -398,4 +396,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/MatchingLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/MatchingLibrary.hpp index fbb8d49fe850..1a4e7168058b 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/MatchingLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/MatchingLibrary.hpp @@ -32,9 +32,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -193,4 +191,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/PerformanceMetricTypes.hpp b/projects/hipblaslt/tensilelite/include/Tensile/PerformanceMetricTypes.hpp index c94b8fc9d87e..9a5659e09b39 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/PerformanceMetricTypes.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/PerformanceMetricTypes.hpp @@ -32,9 +32,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -74,10 +72,10 @@ namespace TensileLite Count }; - std::string ToString(PerformanceMetric d); - std::string TypeAbbrev(PerformanceMetric d); - std::ostream& operator<<(std::ostream& stream, PerformanceMetric const& t); - std::istream& operator>>(std::istream& stream, PerformanceMetric& t); + TENSILELITEHOST_EXPORT std::string ToString(PerformanceMetric d); + TENSILELITEHOST_EXPORT std::string TypeAbbrev(PerformanceMetric d); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, PerformanceMetric const& t); + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, PerformanceMetric& t); /** * \ingroup PerformanceMetrics @@ -174,4 +172,3 @@ namespace std }; } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/PlaceholderLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/PlaceholderLibrary.hpp index 805d6b4371cb..21283a95c202 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/PlaceholderLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/PlaceholderLibrary.hpp @@ -35,9 +35,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -366,4 +364,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/PredicateDebugger.hpp b/projects/hipblaslt/tensilelite/include/Tensile/PredicateDebugger.hpp index eb10faddf622..8c130efad7e4 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/PredicateDebugger.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/PredicateDebugger.hpp @@ -33,9 +33,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -133,4 +131,3 @@ class PredicateDebugger }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Predicates.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Predicates.hpp index 0362a5b08df1..d8ae5f6b3d5c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Predicates.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Predicates.hpp @@ -35,9 +35,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -333,4 +331,3 @@ namespace TensileLite } // namespace Predicates } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/PredictionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/PredictionLibrary.hpp index 102c66860a67..86815357c3f5 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/PredictionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/PredictionLibrary.hpp @@ -32,9 +32,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -223,4 +221,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ProblemKey.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ProblemKey.hpp index a80a3d20c2a5..7668da3bb435 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ProblemKey.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ProblemKey.hpp @@ -29,9 +29,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -88,4 +86,3 @@ namespace TensileLite } } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Properties.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Properties.hpp index 830f4e024937..dc0b6fbed71a 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Properties.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Properties.hpp @@ -33,9 +33,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -231,4 +229,3 @@ namespace TensileLite */ } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/PropertyMatching.hpp b/projects/hipblaslt/tensilelite/include/Tensile/PropertyMatching.hpp index a114f0c44044..3559d13150df 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/PropertyMatching.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/PropertyMatching.hpp @@ -41,9 +41,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -1436,4 +1434,3 @@ namespace TensileLite } // namespace Matching } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ScalarValueTypes.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ScalarValueTypes.hpp index fb879372c9ee..f83930268a2e 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ScalarValueTypes.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ScalarValueTypes.hpp @@ -34,9 +34,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -63,10 +61,10 @@ namespace TensileLite Count }; - std::string ToString(ScalarValue d); - std::string TypeAbbrev(ScalarValue d); - std::ostream& operator<<(std::ostream& stream, ScalarValue const& t); - std::istream& operator>>(std::istream& stream, ScalarValue& t); + TENSILELITEHOST_EXPORT std::string ToString(ScalarValue d); + TENSILELITEHOST_EXPORT std::string TypeAbbrev(ScalarValue d); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ScalarValue const& t); + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, ScalarValue& t); /** * \ingroup ScalarValue @@ -192,4 +190,3 @@ namespace std }; } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization.hpp index 69bb579e91f2..3777afe33185 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization.hpp @@ -43,9 +43,6 @@ #include #include #include -#include +#include -TENSILE_HIDDEN_BEGIN - -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Base.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Base.hpp index 119834ba7468..696dc557ecfd 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Base.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Base.hpp @@ -39,9 +39,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -417,4 +415,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Containers.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Containers.hpp index b0907a51920e..b7a4524b7316 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Containers.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Containers.hpp @@ -40,9 +40,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -244,4 +242,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionPredicates.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionPredicates.hpp index 48bc6ca60b01..4af7211d5ba7 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionPredicates.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionPredicates.hpp @@ -32,9 +32,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -601,4 +599,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionSolution.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionSolution.hpp index 35871bf1d126..9aaba8d9bd2f 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionSolution.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ContractionSolution.hpp @@ -31,9 +31,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -262,4 +260,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ExactLogicLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ExactLogicLibrary.hpp index 63d84eddf45e..da99c7b5b66c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ExactLogicLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/ExactLogicLibrary.hpp @@ -34,9 +34,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -141,4 +139,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/FreeSizeLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/FreeSizeLibrary.hpp index b138f538bd45..bd08f11eaca0 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/FreeSizeLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/FreeSizeLibrary.hpp @@ -30,9 +30,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -113,4 +111,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/GranularitySelectionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/GranularitySelectionLibrary.hpp index e08cb4002e22..cc3548faa834 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/GranularitySelectionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/GranularitySelectionLibrary.hpp @@ -30,9 +30,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -130,4 +128,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/HasTraits.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/HasTraits.hpp index a317104e5a99..e15b8b9d7283 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/HasTraits.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/HasTraits.hpp @@ -30,9 +30,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -136,4 +134,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLFeatures.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLFeatures.hpp index 40c784f95a3b..cd3e38127eda 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLFeatures.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLFeatures.hpp @@ -33,9 +33,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -164,4 +162,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLPClassificationLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLPClassificationLibrary.hpp index fcb817bc86f3..afb1116dd4c0 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLPClassificationLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MLPClassificationLibrary.hpp @@ -32,9 +32,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -190,4 +188,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MapLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MapLibrary.hpp index c84561afc63e..90f31c53719d 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MapLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MapLibrary.hpp @@ -32,9 +32,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -67,4 +65,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MatchingLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MatchingLibrary.hpp index 8b81944b0f7b..dbb61c8b21a9 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MatchingLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/MatchingLibrary.hpp @@ -35,9 +35,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -365,4 +363,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PlaceholderLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PlaceholderLibrary.hpp index ce44609476ca..cd728d1f3ef9 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PlaceholderLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PlaceholderLibrary.hpp @@ -32,7 +32,7 @@ #include #include //Replace std::regex, as it crashes when matching long lines(GCC Bug #86164). -#include +#include #ifdef _WIN32 #include "shlwapi.h" @@ -41,8 +41,6 @@ #include #endif -TENSILE_HIDDEN_BEGIN - namespace TensileLite { namespace Serialization @@ -108,4 +106,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Predicates.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Predicates.hpp index 0160c949e8a7..d5c6eda589c5 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Predicates.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Predicates.hpp @@ -32,9 +32,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -296,4 +294,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PredictionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PredictionLibrary.hpp index f013bd95afa0..fd3d37f8cc1b 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PredictionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/PredictionLibrary.hpp @@ -31,11 +31,9 @@ #include #include -#include +#include #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { namespace Serialization @@ -144,4 +142,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Properties.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Properties.hpp index 4b09c84accc5..de4410c45e0b 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Properties.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/Properties.hpp @@ -33,9 +33,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -166,4 +164,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/SolutionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/SolutionLibrary.hpp index 2aad7bd7232b..27bc5acc7727 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Serialization/SolutionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Serialization/SolutionLibrary.hpp @@ -46,9 +46,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -204,4 +202,3 @@ namespace TensileLite } // namespace Serialization } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/SingleSolutionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/SingleSolutionLibrary.hpp index 4fb1179dc6c2..ba8a8a7c5351 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/SingleSolutionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/SingleSolutionLibrary.hpp @@ -29,9 +29,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -300,4 +298,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Singleton.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Singleton.hpp index 9af071a373d3..40acc3cc049c 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Singleton.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Singleton.hpp @@ -28,9 +28,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -49,4 +47,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary.hpp index 04e199be7efc..689785b7b612 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary.hpp @@ -34,9 +34,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -127,7 +125,7 @@ namespace TensileLite * */ template - struct TENSILE_API SolutionLibrary + struct TENSILELITEHOST_EXPORT SolutionLibrary { virtual ~SolutionLibrary() = default; @@ -223,4 +221,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary_fwd.hpp b/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary_fwd.hpp index 3e749beb0500..504971f91312 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary_fwd.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/SolutionLibrary_fwd.hpp @@ -26,9 +26,7 @@ #pragma once -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -36,4 +34,3 @@ namespace TensileLite struct SolutionLibrary; } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/SolutionMapLibrary.hpp b/projects/hipblaslt/tensilelite/include/Tensile/SolutionMapLibrary.hpp index ffa25dd7376c..19e093122f1d 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/SolutionMapLibrary.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/SolutionMapLibrary.hpp @@ -28,9 +28,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -40,4 +38,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Task.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Task.hpp index a40215335898..980670692aa6 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Task.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Task.hpp @@ -30,9 +30,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -52,4 +50,3 @@ namespace TensileLite }; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Tensile.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Tensile.hpp index 8b3a6e0ce99f..61b6ef3fe0d7 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Tensile.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Tensile.hpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include @@ -75,7 +75,6 @@ /** * @brief Primary namespace for Tensile host code. */ -TENSILE_HIDDEN_BEGIN namespace TensileLite { /** @@ -91,7 +90,7 @@ namespace TensileLite * be solved including the type of problem, all sizes and strides, but not * including actual pointers to data. */ - class TENSILE_API Problem + class TENSILELITEHOST_EXPORT Problem { public: virtual ~Problem(); @@ -103,7 +102,7 @@ namespace TensileLite * Base class for problem inputs. This stores the actual pointers to the * data. */ - class TENSILE_API ProblemInputs + class TENSILELITEHOST_EXPORT ProblemInputs { public: virtual ~ProblemInputs(); @@ -119,7 +118,7 @@ namespace TensileLite * Describes a single kernel invocation including kernel name, launch * bounds, and arguments. */ - struct TENSILE_API KernelInvocation + struct TENSILELITEHOST_EXPORT KernelInvocation { public: std::string kernelName; @@ -146,7 +145,7 @@ namespace TensileLite * \ingroup Hardware * Abstract base class for describing hardware capabilities and properties. */ - class TENSILE_API Hardware + class TENSILELITEHOST_EXPORT Hardware { public: Hardware(); @@ -163,7 +162,7 @@ namespace TensileLite * Generally encapsulates a single kernel or set of kernels that can be * used to solve a particular problem. */ - class TENSILE_API Solution + class TENSILELITEHOST_EXPORT Solution { public: virtual ~Solution(); @@ -178,7 +177,7 @@ namespace TensileLite * Base class for objects capable of launching kernels based on * KernelArguments objects. */ - class TENSILE_API SolutionAdapter + class TENSILELITEHOST_EXPORT SolutionAdapter { public: virtual ~SolutionAdapter(); @@ -186,28 +185,25 @@ namespace TensileLite virtual std::string name() const = 0; }; -#ifdef TENSILE_DEFAULT_SERIALIZATION /** * Interface for deserializing a library file. */ enum class LazyLoadingInit; - TENSILE_API std::map LoadLibraryMapping(std::string const& filename); + TENSILELITEHOST_EXPORT std::map LoadLibraryMapping(std::string const& filename); template - TENSILE_API std::shared_ptr> + TENSILELITEHOST_EXPORT std::shared_ptr> LoadLibraryFile(std::string const& filename); template - TENSILE_API std::shared_ptr> + TENSILELITEHOST_EXPORT std::shared_ptr> LoadLibraryFilePreload(std::string const& filename, const std::vector& preload); template std::shared_ptr> LoadLibraryData(std::vector const& data); -#endif } // namespace TensileLite -TENSILE_HIDDEN_END /** @} */ diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Tensile_fwd.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Tensile_fwd.hpp index 5fe1d02e128e..f167d344e5cb 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Tensile_fwd.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Tensile_fwd.hpp @@ -26,9 +26,7 @@ #pragma once -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -41,4 +39,3 @@ namespace TensileLite class SolutionAdapter; } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor.hpp b/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor.hpp index 0fc5c04074db..92a48c207a7a 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor.hpp @@ -37,10 +37,9 @@ #include #include -#include +#include #include -TENSILE_HIDDEN_BEGIN namespace TensileLite { template @@ -157,7 +156,7 @@ namespace TensileLite * * Provides functions for indexing and otherwise iterating through a tensor. */ - class TENSILE_API TensorDescriptor + class TENSILELITEHOST_EXPORT TensorDescriptor { public: static const size_t UseDefaultStride; @@ -429,7 +428,8 @@ namespace TensileLite std::string ToString() const; - friend std::ostream& operator<<(std::ostream& stream, const TensorDescriptor& t); + friend TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, + const TensorDescriptor& t); private: std::string m_name; @@ -444,7 +444,7 @@ namespace TensileLite bool m_isOutput = false; }; - std::ostream& operator<<(std::ostream& stream, const TensorDescriptor& t); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, const TensorDescriptor& t); template void WriteTensor1D(std::ostream& stream, @@ -545,4 +545,3 @@ namespace TensileLite } } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_Detail.hpp b/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_Detail.hpp index f372cbf7d986..4441ed0fc477 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_Detail.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_Detail.hpp @@ -29,9 +29,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -72,4 +70,3 @@ namespace std }; } // namespace std -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_fwd.hpp b/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_fwd.hpp index d17a3c2461e8..c28c4aa62efe 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_fwd.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/TensorDescriptor_fwd.hpp @@ -26,9 +26,7 @@ #pragma once -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -38,4 +36,3 @@ namespace TensileLite } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/TensorOps.hpp b/projects/hipblaslt/tensilelite/include/Tensile/TensorOps.hpp index 01f9041d52f9..716a22bd9131 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/TensorOps.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/TensorOps.hpp @@ -30,9 +30,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -48,7 +46,7 @@ namespace TensileLite * For now can represent a complex conjugate but this could be where we * represent inline activation layers later. */ - class TENSILE_API TensorOp + class TENSILELITEHOST_EXPORT TensorOp { public: enum class Type : int @@ -108,18 +106,17 @@ namespace TensileLite static std::map typeNames; }; - std::string ToString(TensorOp::Type t); - std::string Suffix(TensorOp::Type t); + TENSILELITEHOST_EXPORT std::string ToString(TensorOp::Type t); + TENSILELITEHOST_EXPORT std::string Suffix(TensorOp::Type t); - std::ostream& operator<<(std::ostream& stream, TensorOp const& t); - std::istream& operator>>(std::istream& stream, TensorOp& t); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, TensorOp const& t); + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, TensorOp& t); - std::ostream& operator<<(std::ostream& stream, TensorOp::Type const& t); - std::istream& operator>>(std::istream& stream, TensorOp::Type& t); + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, TensorOp::Type const& t); + TENSILELITEHOST_EXPORT std::istream& operator>>(std::istream& stream, TensorOp::Type& t); /** * @} */ } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/TensorOps_fwd.hpp b/projects/hipblaslt/tensilelite/include/Tensile/TensorOps_fwd.hpp index 1ac9455bb6b1..e3736c8f1bda 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/TensorOps_fwd.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/TensorOps_fwd.hpp @@ -26,13 +26,10 @@ #pragma once -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { class TensorOp; } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/Utils.hpp b/projects/hipblaslt/tensilelite/include/Tensile/Utils.hpp index a9603201d10e..05e4f1a37057 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/Utils.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/Utils.hpp @@ -35,9 +35,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -307,9 +305,9 @@ namespace TensileLite } }; - std::vector generateArgNameList(size_t length, const char* name = ""); + TENSILELITEHOST_EXPORT std::vector generateArgNameList(size_t length, const char* name = ""); - size_t greekToIndex(std::string name); + TENSILELITEHOST_EXPORT size_t greekToIndex(std::string name); /** * @} */ @@ -337,4 +335,3 @@ namespace TensileLite * @} */ -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/UtilsOrigami.hpp b/projects/hipblaslt/tensilelite/include/Tensile/UtilsOrigami.hpp index 6dc0ed3ddca2..f9d401a893bd 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/UtilsOrigami.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/UtilsOrigami.hpp @@ -30,9 +30,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -92,4 +90,3 @@ namespace TensileLite } } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/geom.hpp b/projects/hipblaslt/tensilelite/include/Tensile/geom.hpp index 459ad5d443d3..f97d7965e007 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/geom.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/geom.hpp @@ -30,9 +30,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -42,7 +40,7 @@ namespace TensileLite * @{ */ template - struct TENSILE_API vector2 + struct TENSILELITEHOST_EXPORT vector2 { vector2() = default; vector2(T _x, T _y) @@ -60,19 +58,19 @@ namespace TensileLite }; template - TENSILE_API inline bool operator==(vector2 const& l, vector2 const& r) + TENSILELITEHOST_EXPORT inline bool operator==(vector2 const& l, vector2 const& r) { return (l.x == r.x) && (l.y == r.y); } template - TENSILE_API inline std::ostream& operator<<(std::ostream& stream, vector2 const& v) + TENSILELITEHOST_EXPORT inline std::ostream& operator<<(std::ostream& stream, vector2 const& v) { return stream << "(" << v.x << ", " << v.y << ")"; } template - struct TENSILE_API vector3 + struct TENSILELITEHOST_EXPORT vector3 { vector3() = default; vector3(T _x, T _y, T _z) @@ -93,19 +91,19 @@ namespace TensileLite }; template - inline TENSILE_API bool operator==(vector3 const& l, vector3 const& r) + inline TENSILELITEHOST_EXPORT bool operator==(vector3 const& l, vector3 const& r) { return (l.x == r.x) && (l.y == r.y) && (l.z == r.z); } template - inline TENSILE_API std::ostream& operator<<(std::ostream& stream, vector3 const& v) + inline TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, vector3 const& v) { return stream << "(" << v.x << ", " << v.y << ", " << v.z << ")"; } template - struct TENSILE_API vector4 + struct TENSILELITEHOST_EXPORT vector4 { vector4() = default; vector4(T _x, T _y, T _z, T _w) @@ -128,13 +126,13 @@ namespace TensileLite }; template - inline TENSILE_API bool operator==(vector4 const& l, vector4 const& r) + inline TENSILELITEHOST_EXPORT bool operator==(vector4 const& l, vector4 const& r) { return (l.x == r.x) && (l.y == r.y) && (l.z == r.z) && (l.w == r.w); } template - inline TENSILE_API std::ostream& operator<<(std::ostream& stream, vector4 const& v) + inline TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, vector4 const& v) { return stream << "(" << v.x << ", " << v.y << ", " << v.z << ", " << v.w << ")"; } @@ -147,4 +145,3 @@ namespace TensileLite */ } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/hip/HipHardware.hpp b/projects/hipblaslt/tensilelite/include/Tensile/hip/HipHardware.hpp index 7a7fbf646779..e577ff477ebc 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/hip/HipHardware.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/hip/HipHardware.hpp @@ -32,15 +32,13 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { namespace hip { - struct HipAMDGPU : public AMDGPU + struct TENSILELITEHOST_EXPORT HipAMDGPU : public AMDGPU { HipAMDGPU() = default; HipAMDGPU(hipDeviceProp_t const& prop, @@ -61,10 +59,9 @@ namespace TensileLite virtual std::string archName() const override; }; - std::shared_ptr GetCurrentDevice(); - std::shared_ptr GetDevice(int deviceId); - std::shared_ptr GetDevice(hipDeviceProp_t const& prop, int deviceId); + TENSILELITEHOST_EXPORT std::shared_ptr GetCurrentDevice(); + TENSILELITEHOST_EXPORT std::shared_ptr GetDevice(int deviceId); + TENSILELITEHOST_EXPORT std::shared_ptr GetDevice(hipDeviceProp_t const& prop, int deviceId); } // namespace hip } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/hip/HipSolutionAdapter.hpp b/projects/hipblaslt/tensilelite/include/Tensile/hip/HipSolutionAdapter.hpp index 88aa512af2f2..5bcd5caba2b9 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/hip/HipSolutionAdapter.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/hip/HipSolutionAdapter.hpp @@ -34,15 +34,13 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { namespace hip { - class SolutionAdapter : public TensileLite::SolutionAdapter + class TENSILELITEHOST_EXPORT SolutionAdapter : public TensileLite::SolutionAdapter { public: SolutionAdapter(); @@ -153,4 +151,3 @@ namespace TensileLite } // namespace hip } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/hip/HipUtils.hpp b/projects/hipblaslt/tensilelite/include/Tensile/hip/HipUtils.hpp index a4363887c486..ad12487f6b19 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/hip/HipUtils.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/hip/HipUtils.hpp @@ -36,9 +36,7 @@ #include #include -#include - -TENSILE_HIDDEN_BEGIN +#include #define HIP_CHECK_EXC(expr) \ do \ @@ -269,4 +267,3 @@ namespace TensileLite } // namespace hip } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/llvm/Loading.hpp b/projects/hipblaslt/tensilelite/include/Tensile/llvm/Loading.hpp index 08ee93a9073b..5be81a88121f 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/llvm/Loading.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/llvm/Loading.hpp @@ -28,9 +28,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -44,4 +42,3 @@ namespace TensileLite LLVMLoadLibraryData(std::vector const& data, std::string filename = ""); } // namespace TensileLite -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/llvm/YAML.hpp b/projects/hipblaslt/tensilelite/include/Tensile/llvm/YAML.hpp index 4a1cdde2341b..bcfff63f31cd 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/llvm/YAML.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/llvm/YAML.hpp @@ -33,9 +33,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(rocisa::DataType) LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(TensileLite::ActivationType) @@ -317,4 +315,3 @@ namespace llvm } // namespace yaml } // namespace llvm -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/msgpack/Loading.hpp b/projects/hipblaslt/tensilelite/include/Tensile/msgpack/Loading.hpp index 77f3eed56afa..19b4248c0de9 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/msgpack/Loading.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/msgpack/Loading.hpp @@ -34,13 +34,12 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { - bool fileToMsgObject(std::string const& filename, msgpack::object_handle& result); + TENSILELITEHOST_EXPORT bool fileToMsgObject(std::string const& filename, + msgpack::object_handle& result); std::map MessagePackLoadLibraryMapping(std::string const& filename); @@ -54,4 +53,3 @@ namespace TensileLite MessagePackLoadLibraryData(std::vector const& data); } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/msgpack/MessagePack.hpp b/projects/hipblaslt/tensilelite/include/Tensile/msgpack/MessagePack.hpp index 6e379a0b859c..3d7e1c54938f 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/msgpack/MessagePack.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/msgpack/MessagePack.hpp @@ -34,9 +34,7 @@ #include -#include - -TENSILE_HIDDEN_BEGIN +#include namespace TensileLite { @@ -94,7 +92,7 @@ namespace TensileLite static const bool value = true; }; - void objectToMap(const msgpack::object& object, + TENSILELITEHOST_EXPORT void objectToMap(const msgpack::object& object, std::unordered_map& map); struct MessagePackInput @@ -382,4 +380,3 @@ namespace TensileLite } } -TENSILE_HIDDEN_END diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclFwd.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclFwd.hpp index 3d5ed3aadc76..4bc6035e02c1 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclFwd.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclFwd.hpp @@ -35,9 +35,7 @@ * where they are needed. */ -#include - -TENSILE_HIDDEN_BEGIN +#include // Fwd declarations namespace cl @@ -48,6 +46,4 @@ namespace cl class Buffer; } // namespace cl -TENSILE_HIDDEN_END - #endif // OCL_FWD_HPP diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclHardware.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclHardware.hpp index debbbb0a29b2..46067b85c084 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclHardware.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclHardware.hpp @@ -28,11 +28,9 @@ #define OCL_HARDWARE_HPP #include -#include +#include #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { namespace ocl @@ -69,6 +67,4 @@ namespace TensileLite } // namespace ocl } // namespace TensileLite -TENSILE_HIDDEN_END - #endif // OCL_HARDWARE_HPP diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclSolutionAdapter.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclSolutionAdapter.hpp index b76aaf54538f..3c7e85336e67 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclSolutionAdapter.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclSolutionAdapter.hpp @@ -27,14 +27,12 @@ #ifndef OCL_SOLUTION_ADAPTER_HPP #define OCL_SOLUTION_ADAPTER_HPP -#include +#include #include #include #include -TENSILE_HIDDEN_BEGIN - namespace TensileLite { namespace ocl @@ -101,6 +99,4 @@ namespace TensileLite } // namespace ocl } // namespace TensileLite -TENSILE_HIDDEN_END - #endif //OCL_SOLUTION_ADAPTER_HPP diff --git a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclUtils.hpp b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclUtils.hpp index 98eefd9dc395..17960a93779e 100644 --- a/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclUtils.hpp +++ b/projects/hipblaslt/tensilelite/include/Tensile/ocl/OclUtils.hpp @@ -35,12 +35,10 @@ * executable kernels */ -#include +#include #include #include -TENSILE_HIDDEN_BEGIN - #define CL_CHECK(x) \ if(CL_SUCCESS != (x)) \ { \ @@ -76,6 +74,4 @@ namespace cl std::ostream& operator<<(std::ostream& stream, Buffer buffer); } -TENSILE_HIDDEN_END - #endif // OCL_UTILS_HPP diff --git a/projects/hipblaslt/tensilelite/src/AMDGPU.cpp b/projects/hipblaslt/tensilelite/src/AMDGPU.cpp index 8d4940458a99..c2c47f715d37 100644 --- a/projects/hipblaslt/tensilelite/src/AMDGPU.cpp +++ b/projects/hipblaslt/tensilelite/src/AMDGPU.cpp @@ -40,14 +40,14 @@ namespace TensileLite return StandardCU_XCC; } - TENSILE_API std::string AMDGPU::type() const + TENSILELITEHOST_EXPORT std::string AMDGPU::type() const { return Type(); } - TENSILE_API AMDGPU::AMDGPU() {} + TENSILELITEHOST_EXPORT AMDGPU::AMDGPU() {} - TENSILE_API AMDGPU::AMDGPU(AMDGPU::Processor p, int cus, std::string const& name, std::optional pciChipId) + TENSILELITEHOST_EXPORT AMDGPU::AMDGPU(AMDGPU::Processor p, int cus, std::string const& name, std::optional pciChipId) : processor(p) , computeUnitCount(cus) , deviceName(name) @@ -69,9 +69,9 @@ namespace TensileLite { } - TENSILE_API AMDGPU::~AMDGPU() = default; + TENSILELITEHOST_EXPORT AMDGPU::~AMDGPU() = default; - TENSILE_API bool AMDGPU::isStandardCU() const + TENSILELITEHOST_EXPORT bool AMDGPU::isStandardCU() const { // return the result if we already tested it. if(isStandardCUs != -1) @@ -92,7 +92,7 @@ namespace TensileLite return (isStandardCUs == 1); } - TENSILE_API bool AMDGPU::runsKernelTargeting(AMDGPU::Processor other) const + TENSILELITEHOST_EXPORT bool AMDGPU::runsKernelTargeting(AMDGPU::Processor other) const { if(other > this->processor) return false; @@ -114,7 +114,7 @@ namespace TensileLite return stream; } - TENSILE_API std::string AMDGPU::description() const + TENSILELITEHOST_EXPORT std::string AMDGPU::description() const { std::ostringstream rv; @@ -126,7 +126,7 @@ namespace TensileLite return rv.str(); } - TENSILE_API std::ostream& operator<<(std::ostream& stream, AMDGPU g) + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, AMDGPU g) { return stream << g.description(); } diff --git a/projects/hipblaslt/tensilelite/src/ContractionProblem.cpp b/projects/hipblaslt/tensilelite/src/ContractionProblem.cpp index d7fdc28a2f32..f04d213cb1e9 100644 --- a/projects/hipblaslt/tensilelite/src/ContractionProblem.cpp +++ b/projects/hipblaslt/tensilelite/src/ContractionProblem.cpp @@ -1688,7 +1688,7 @@ namespace TensileLite return problem; } - TENSILE_API std::ostream& operator<<(std::ostream& stream, + TENSILELITEHOST_EXPORT std::ostream& operator<<(std::ostream& stream, ContractionProblemGemm const& contraction) { return stream << contraction.description(); @@ -1731,7 +1731,7 @@ namespace TensileLite return stream >> bound.a >> comma >> bound.b; } - TENSILE_API ProblemInputs::~ProblemInputs() = default; + TENSILELITEHOST_EXPORT ProblemInputs::~ProblemInputs() = default; ContractionInputs::ContractionInputs() = default; ContractionInputs::~ContractionInputs() = default; diff --git a/projects/hipblaslt/tensilelite/src/ContractionSolution.cpp b/projects/hipblaslt/tensilelite/src/ContractionSolution.cpp index 9a60778d3580..bee43fa6447f 100644 --- a/projects/hipblaslt/tensilelite/src/ContractionSolution.cpp +++ b/projects/hipblaslt/tensilelite/src/ContractionSolution.cpp @@ -310,10 +310,16 @@ namespace TensileLite } } +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC visibility push(default) +#endif template void setDeviceUserArgs(std::vector const& problems, ContractionSolution::GroupedInputs const& inputs, DeviceUserArguments* args); +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC visibility pop +#endif PerfModel perf; diff --git a/projects/hipblaslt/tensilelite/src/EmbeddedLibrary.cpp b/projects/hipblaslt/tensilelite/src/EmbeddedLibrary.cpp index 49cd2accd226..ab06f8060f55 100644 --- a/projects/hipblaslt/tensilelite/src/EmbeddedLibrary.cpp +++ b/projects/hipblaslt/tensilelite/src/EmbeddedLibrary.cpp @@ -24,8 +24,6 @@ * *******************************************************************************/ -#ifdef TENSILE_DEFAULT_SERIALIZATION - #include #include @@ -50,5 +48,3 @@ namespace TensileLite EmbeddedLibrary::NewLibrary( std::string const&); } // namespace TensileLite - -#endif diff --git a/projects/hipblaslt/tensilelite/src/Tensile.cpp b/projects/hipblaslt/tensilelite/src/Tensile.cpp index b755dbcf2162..3ecc72887201 100644 --- a/projects/hipblaslt/tensilelite/src/Tensile.cpp +++ b/projects/hipblaslt/tensilelite/src/Tensile.cpp @@ -29,7 +29,6 @@ #include #include -#ifdef TENSILE_DEFAULT_SERIALIZATION #ifdef TENSILE_YAML #include #endif @@ -37,18 +36,16 @@ #ifdef TENSILE_MSGPACK #include #endif -#endif namespace TensileLite { - TENSILE_API Problem::~Problem() = default; - TENSILE_API Hardware::Hardware() = default; - TENSILE_API Hardware::~Hardware() = default; - TENSILE_API Solution::~Solution() = default; - TENSILE_API SolutionAdapter::~SolutionAdapter() = default; + TENSILELITEHOST_EXPORT Problem::~Problem() = default; + TENSILELITEHOST_EXPORT Hardware::Hardware() = default; + TENSILELITEHOST_EXPORT Hardware::~Hardware() = default; + TENSILELITEHOST_EXPORT Solution::~Solution() = default; + TENSILELITEHOST_EXPORT SolutionAdapter::~SolutionAdapter() = default; -#ifdef TENSILE_DEFAULT_SERIALIZATION #ifdef TENSILE_MSGPACK std::map LoadLibraryMapping(std::string const& filename) { @@ -108,6 +105,9 @@ namespace TensileLite return nullptr; } +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC visibility push(default) +#endif template std::shared_ptr> LoadLibraryFile(std::string const& filename); @@ -118,5 +118,7 @@ namespace TensileLite template std::shared_ptr> LoadLibraryData( std::vector const& data); +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC visibility pop #endif } // namespace TensileLite diff --git a/projects/hipblaslt/tensilelite/tests/CMakeLists.txt b/projects/hipblaslt/tensilelite/tests/CMakeLists.txt index 2e3296d9b2d3..d3753313fe62 100644 --- a/projects/hipblaslt/tensilelite/tests/CMakeLists.txt +++ b/projects/hipblaslt/tensilelite/tests/CMakeLists.txt @@ -59,7 +59,7 @@ target_include_directories(tensilelite-tests PRIVATE "${CMAKE_CURRENT_SOURCE_DIR target_link_libraries(tensilelite-tests PUBLIC - tensilelite::tensilelite-host + roc::tensilelite-host PRIVATE hip::device tensilelite::client-common diff --git a/projects/hipsparselt/CMakeLists.txt b/projects/hipsparselt/CMakeLists.txt index 97a57fca6963..7e7f0eb0964b 100644 --- a/projects/hipsparselt/CMakeLists.txt +++ b/projects/hipsparselt/CMakeLists.txt @@ -157,8 +157,8 @@ if(HIPSPARSELT_ENABLE_HIP) set(HIPBLASLT_ENABLE_CLIENT OFF CACHE BOOL "" FORCE) # Builds tensilelite's device libraries (.co/.dat) set(HIPBLASLT_ENABLE_DEVICE ${HIPSPARSELT_ENABLE_DEVICE} CACHE BOOL "" FORCE) - # Builds tensilelite::tensilelite-host target set(TENSILELITE_ENABLE_HOST ON CACHE BOOL "" FORCE) + set(TENSILELITE_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) set(HIPBLASLT_ENABLE_ASAN ${HIPSPARSELT_ENABLE_ASAN} CACHE BOOL "" FORCE) set(HIPBLASLT_DEVICE_LIBRARY_PATH "${CMAKE_BINARY_DIR}/Tensile" CACHE PATH "" FORCE) # hipSPARSELt does not use ExtOp or MatrixTransform artifacts @@ -184,8 +184,6 @@ if(HIPSPARSELT_ENABLE_HIP) endif() add_subdirectory("${HIPBLASLT_PATH}" hipblaslt) - # Hide TensileLite symbols to prevent interposition with hipblaslt's copy - target_compile_definitions(tensilelite-host PRIVATE TENSILE_STATIC_ONLY) endblock() endif() diff --git a/projects/hipsparselt/library/src/hcc_detail/rocsparselt/CMakeLists.txt b/projects/hipsparselt/library/src/hcc_detail/rocsparselt/CMakeLists.txt index e56ed2aa8381..16a99623a081 100644 --- a/projects/hipsparselt/library/src/hcc_detail/rocsparselt/CMakeLists.txt +++ b/projects/hipsparselt/library/src/hcc_detail/rocsparselt/CMakeLists.txt @@ -28,4 +28,4 @@ target_include_directories(hipsparselt PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/ set(tensile_source_files "${CMAKE_CURRENT_SOURCE_DIR}/src/tensile_host.cpp") list(APPEND hipsparselt_source_backend ${tensile_source_files}) -target_link_libraries(hipsparselt PRIVATE tensilelite::tensilelite-host) +target_link_libraries(hipsparselt PRIVATE roc::tensilelite-host) diff --git a/shared/origami/CMakeLists.txt b/shared/origami/CMakeLists.txt index e263640a25a0..7542903a3a3d 100644 --- a/shared/origami/CMakeLists.txt +++ b/shared/origami/CMakeLists.txt @@ -91,6 +91,8 @@ set_target_properties(origami-headers PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON target_link_libraries(origami PUBLIC roc::origami-headers) +add_dependencies(origami origami-headers_verify_interface_header_sets) + target_sources( origami PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/origami/attention.cpp"