pax_global_header00006660000000000000000000000064150603754760014527gustar00rootroot0000000000000052 comment=ea8c935e59651ee37e11ca18d85a1222d30b5edd ROCm-hipBLAS-common-52e19a6/000077500000000000000000000000001506037547600153735ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/.azuredevops/000077500000000000000000000000001506037547600200205ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/.azuredevops/rocm-ci.yml000066400000000000000000000010301506037547600220660ustar00rootroot00000000000000resources: repositories: - repository: pipelines_repo type: github endpoint: ROCm name: ROCm/ROCm variables: - group: common - template: /.azuredevops/variables-global.yml@pipelines_repo trigger: batch: true branches: include: - develop - mainline paths: exclude: - '*.md' pr: autoCancel: true branches: include: - develop - mainline paths: exclude: - '*.md' drafts: false jobs: - template: ${{ variables.CI_COMPONENT_PATH }}/hipBLAS-common.yml@pipelines_repo ROCm-hipBLAS-common-52e19a6/.github/000077500000000000000000000000001506037547600167335ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/.github/CODEOWNERS000066400000000000000000000002351506037547600203260ustar00rootroot00000000000000* @bnemanich @daineAMD @TorreZuk *.md @ROCm/rocm-documentation @bnemanich @daineAMD @TorreZuk *.rst @ROCm/rocm-documentation @bnemanich @daineAMD @TorreZuk ROCm-hipBLAS-common-52e19a6/CMakeLists.txt000066400000000000000000000041011506037547600201270ustar00rootroot00000000000000# Copyright Advanced Micro Devices, Inc., or its affiliates. # SPDX-License-Identifier: MIT cmake_minimum_required(VERSION 3.11) project(hipblas-common LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(dependencies) include(GNUInstallDirs) include(CMakePackageConfigHelpers) set(VERSION_STRING "1.3.0") rocm_setup_version(VERSION ${VERSION_STRING}) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if(WIN32) set(CMAKE_INSTALL_PREFIX "C:/hipSDK" CACHE PATH "Install path prefix" FORCE) else() set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Install path prefix" FORCE) endif() endif() add_library(hipblas-common INTERFACE) add_library(roc::hipblas-common ALIAS hipblas-common) target_sources( hipblas-common INTERFACE $ ) target_include_directories( hipblas-common INTERFACE $ $ ) rocm_install_targets(TARGETS hipblas-common INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/library/include) rocm_export_targets(TARGETS roc::hipblas-common NAMESPACE roc::) if(WIN32) set(CPACK_SOURCE_GENERATOR "ZIP") set(CPACK_GENERATOR "ZIP") set(CPACK_SET_DESTDIR FALSE) set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) elseif(NOT CPACK_PACKAGING_INSTALL_PREFIX) set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") endif() set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "\${CPACK_PACKAGING_INSTALL_PREFIX}") set(HIPBLAS_CONFIG_DIR "\${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Path placed into ldconfig file" ) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md") set(CPACK_RPM_PACKAGE_LICENSE "MIT") rocm_create_package( NAME hipblas-common DESCRIPTION "Common files for hipBLAS libraries" MAINTAINER "hipBLAS Maintainer " LDCONFIG LDCONFIG_DIR ${HIPBLAS_CONFIG_DIR} HEADER_ONLY ) ROCm-hipBLAS-common-52e19a6/LICENSE.md000066400000000000000000000020701506037547600167760ustar00rootroot00000000000000MIT License Copyright (C) Advanced Micro Devices, Inc. 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. ROCm-hipBLAS-common-52e19a6/README.md000066400000000000000000000016521506037547600166560ustar00rootroot00000000000000# hipBLAS-common ## Quick Start Guide hipBLAS-common is a header-only library that provides common files for hipBLAS and hipBLASLt. This section describes how to configure and build the hipBLAS-common project. ### Configure and build hipBLAS-common provides modern CMake support and relies on native CMake functionality, with the exception of some project specific options. As such, users are advised to consult the CMake documentation for general usage questions. Below are usage examples to get started. For details on all configuration options, see the options section. ``` cd hipBLAS-common CXX=/opt/rocm/bin/amdclang++ \ cmake -B build \ -S . \ -D CMAKE_INSTALL_PREFIX= cmake --build build --target install ``` ### CMake targets * `roc::hipblas-common` ### Using rmake script ``` python3 ./rmake.py --install ``` ROCm-hipBLAS-common-52e19a6/README.rst000066400000000000000000000025601506037547600170650ustar00rootroot00000000000000.. highlight:: rst .. |project_name| replace:: hipBLAS-common ============== |project_name| ============== ----------------- Quick Start Guide ----------------- |project_name| is a header-only library that provides common files for hipBLAS and hipBLASLt. This section describes how to configure and build the |project_name| project. It assumes the user has a ROCm installation, Python 3.8 or later, and CMake 3.25.0 or later. ^^^^^^^^^^^^^^^^^^^ Configure and build ^^^^^^^^^^^^^^^^^^^ |project_name| provides modern CMake support and relies on native CMake functionality, with the exception of some project specific options. As such, users are advised to consult the CMake documentation for general usage questions. Below are usage examples to get started. For details on all configuration options, see the options section. Build and install |project_name| -------------------------------- .. code-block:: bash :linenos: cd hipBLAS-common CXX=/opt/rocm/bin/amdclang++ \ cmake -B build \ -S . \ -D CMAKE_INSTALL_PREFIX= cmake --build build --target install CMake targets ------------- * ``roc::hipblas-common`` Using rmake script ------------------ .. code-block:: bash :linenos: python3 ./rmake.py --install ROCm-hipBLAS-common-52e19a6/cmake/000077500000000000000000000000001506037547600164535ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/cmake/dependencies.cmake000066400000000000000000000042731506037547600221110ustar00rootroot00000000000000# MIT License # # Copyright (C) 2023-2024 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. # ########################### # ROCm dependencies # ########################### include(FetchContent) find_package(ROCM 0.11.0 CONFIG QUIET PATHS "${ROCM_PATH}") # First version with Sphinx doc gen improvement if(NOT ROCM_FOUND) message(STATUS "ROCm CMake not found. Fetching...") set(rocm_cmake_tag "c044bb52ba85058d28afe2313be98d9fed02e293" # develop@2023.09.12. (move to 6.0 tag when released) CACHE STRING "rocm-cmake tag to download") FetchContent_Declare( rocm-cmake GIT_REPOSITORY https://github.com/ROCm/rocm-cmake.git GIT_TAG ${rocm_cmake_tag} SOURCE_SUBDIR "DISABLE ADDING TO BUILD" # We don't really want to consume the build and test targets of ROCm CMake. ) FetchContent_MakeAvailable(rocm-cmake) find_package(ROCM CONFIG REQUIRED NO_DEFAULT_PATH PATHS "${rocm-cmake_SOURCE_DIR}") else() find_package(ROCM 0.11.0 CONFIG REQUIRED PATHS "${ROCM_PATH}") endif() include(ROCMSetupVersion) include(ROCMCreatePackage) include(ROCMInstallTargets) include(ROCMPackageConfigHelpers) include(ROCMInstallSymlinks) include(ROCMClients) ROCm-hipBLAS-common-52e19a6/cmake/hipblas-common-config.cmake.in000066400000000000000000000025271506037547600242430ustar00rootroot00000000000000# ######################################################################## # # MIT License # # Copyright (C) 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 cop- # ies 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 IM- # PLIED, 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 CONNE- # CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ######################################################################## include("${CMAKE_CURRENT_LIST_DIR}/hipblas-common-targets.cmake") ROCm-hipBLAS-common-52e19a6/library/000077500000000000000000000000001506037547600170375ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/library/include/000077500000000000000000000000001506037547600204625ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/library/include/hipblas-common/000077500000000000000000000000001506037547600233725ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/library/include/hipblas-common/hipblas-common.h000066400000000000000000000125121506037547600264540ustar00rootroot00000000000000/* ************************************************************************ * Copyright (C) 2016-2024 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. * * ************************************************************************ */ //! HIP = Heterogeneous-compute Interface for Portability //! //! Define an extremely thin runtime layer that allows source code to be compiled unmodified //! through either AMD HCC or NVCC. Key features tend to be in the spirit //! and terminology of CUDA, but with a portable path to other accelerators as well. //! //! This is the master include file for hipblas-common, providing shared functionality //! between hipBLAS and hipBLASLt. #ifndef HIPBLAS_COMMON_H #define HIPBLAS_COMMON_H /*! \brief hipblas status codes definition */ typedef enum { HIPBLAS_STATUS_SUCCESS = 0, /**< Function succeeds */ HIPBLAS_STATUS_NOT_INITIALIZED = 1, /**< HIPBLAS library not initialized */ HIPBLAS_STATUS_ALLOC_FAILED = 2, /**< resource allocation failed */ HIPBLAS_STATUS_INVALID_VALUE = 3, /**< unsupported numerical value was passed to function */ HIPBLAS_STATUS_MAPPING_ERROR = 4, /**< access to GPU memory space failed */ HIPBLAS_STATUS_EXECUTION_FAILED = 5, /**< GPU program failed to execute */ HIPBLAS_STATUS_INTERNAL_ERROR = 6, /**< an internal HIPBLAS operation failed */ HIPBLAS_STATUS_NOT_SUPPORTED = 7, /**< function not implemented */ HIPBLAS_STATUS_ARCH_MISMATCH = 8, /**< architecture mismatch */ HIPBLAS_STATUS_HANDLE_IS_NULLPTR = 9, /**< hipBLAS handle is null pointer */ HIPBLAS_STATUS_INVALID_ENUM = 10, /**< unsupported enum value was passed to function */ HIPBLAS_STATUS_UNKNOWN = 11, /**< back-end returned an unsupported status code */ } hipblasStatus_t; #ifndef HIPBLAS_OPERATION_DECLARED #define HIPBLAS_OPERATION_DECLARED /*! \brief Used to specify whether the matrix is to be transposed or not. */ typedef enum { HIPBLAS_OP_N = 111, /**< Operate with the matrix. */ HIPBLAS_OP_T = 112, /**< Operate with the transpose of the matrix. */ HIPBLAS_OP_C = 113 /**< Operate with the conjugate transpose of the matrix. */ } hipblasOperation_t; #elif __cplusplus >= 201103L static_assert(HIPBLAS_OP_N == 111, "Inconsistent declaration of HIPBLAS_OP_N"); static_assert(HIPBLAS_OP_T == 112, "Inconsistent declaration of HIPBLAS_OP_T"); static_assert(HIPBLAS_OP_C == 113, "Inconsistent declaration of HIPBLAS_OP_C"); #endif // HIPBLAS_OPERATION_DECLARED /*! \brief The compute type to be used. Currently only used with GemmEx with the HIPBLAS_V2 interface. * Note that support for compute types is largely dependent on backend. */ typedef enum { // Note that these types are taken from cuBLAS. With the rocBLAS backend, currently hipBLAS will // convert to rocBLAS types to get equivalent functionality where supported. HIPBLAS_COMPUTE_16F = 0, /**< compute will be at least 16-bit precision */ HIPBLAS_COMPUTE_16F_PEDANTIC = 1, /**< compute will be exactly 16-bit precision */ HIPBLAS_COMPUTE_32F = 2, /**< compute will be at least 32-bit precision */ HIPBLAS_COMPUTE_32F_PEDANTIC = 3, /**< compute will be exactly 32-bit precision */ HIPBLAS_COMPUTE_32F_FAST_16F = 4, /**< 32-bit input can use 16-bit compute */ HIPBLAS_COMPUTE_32F_FAST_16BF = 5, /**< 32-bit input can is bf16 compute */ HIPBLAS_COMPUTE_32F_FAST_TF32 = 6, /**< 32-bit input can use tensor cores w/ TF32 compute. Only supported with cuBLAS and hipBLASLT backend currently */ HIPBLAS_COMPUTE_64F = 7, /**< compute will be at least 64-bit precision */ HIPBLAS_COMPUTE_64F_PEDANTIC = 8, /**< compute will be exactly 64-bit precision */ HIPBLAS_COMPUTE_32I = 9, /**< compute will be at least 32-bit integer precision */ HIPBLAS_COMPUTE_32I_PEDANTIC = 10, /**< compute will be exactly 32-bit integer precision */ HIPBLAS_COMPUTE_32F_FAST_8F_FNUZ = 100, /**< 32-bit compute using fp8 mfma instruction */ HIPBLAS_COMPUTE_32F_FAST_8BF_FNUZ = 101, /**< 32-bit compute using bf8 mfma instruction */ HIPBLAS_COMPUTE_32F_FAST_8F8BF_FNUZ = 102, /**< 32-bit compute using f8bf8 mfma instruction */ HIPBLAS_COMPUTE_32F_FAST_8BF8F_FNUZ = 103, /**< 32-bit compute using bf8f8 mfma instruction */ } hipblasComputeType_t; #endif ROCm-hipBLAS-common-52e19a6/rmake.py000077500000000000000000000132571506037547600170570ustar00rootroot00000000000000#!/usr/bin/python3 """Copyright (C) 2020-2024 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 cop- ies 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 IM- PLIED, 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 CONNE- CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ import os import platform import subprocess import argparse import pathlib args = {} OS_info = {} # yapf: disable def parse_args(): """Parse command-line arguments""" global OS_info parser = argparse.ArgumentParser(description="""Checks build arguments""") general_opts = parser.add_argument_group('General Build Options') general_opts.add_argument( '--build_dir', type=str, required=False, default = "build", help='Specify path to configure & build process output directory.(optional, default: ./build)') general_opts.add_argument('-i', '--install', required=False, default=False, dest='install', action='store_true', help='Generate and install library package after build. Windows only. Linux use install.sh (optional, default: False)') return parser.parse_args() # yapf: enable def os_detect(): global OS_info if os.name == "nt": OS_info["ID"] = platform.system() else: inf_file = "/etc/os-release" if os.path.exists(inf_file): with open(inf_file) as f: for line in f: if "=" in line: k, v = line.strip().split("=") OS_info[k] = v.replace('"', '') def create_dir(dir_path): full_path = "" if os.path.isabs(dir_path): full_path = dir_path else: full_path = os.path.join(os.getcwd(), dir_path) pathlib.Path(full_path).mkdir(parents=True, exist_ok=True) return def delete_dir(dir_path): if (not os.path.exists(dir_path)): return if os.name == "nt": run_cmd("RMDIR", f"/S /Q {dir_path}") else: run_cmd("rm", f"-rf {dir_path}") def cmake_path(os_path): if os.name == "nt": return os_path.replace("\\", "/") else: return os.path.realpath(os_path) def config_cmd(): global args global OS_info cwd_path = os.getcwd() cmake_executable = "cmake" cmake_options = [] src_path = cmake_path(cwd_path) cmake_platform_opts = [] if os.name == "nt": generator = f"-G Ninja" cmake_options.append(generator) # CMAKE_PREFIX_PATH set to rocm_path and HIP_PATH set BY SDK Installer raw_rocm_path = cmake_path(os.getenv('HIP_PATH', "C:/hip")) rocm_path = f'"{raw_rocm_path}"' # guard against spaces in path # CPACK_PACKAGING_INSTALL_PREFIX= defined as blank as it is appended to end of path for archive creation cmake_platform_opts.append(f"-DCPACK_PACKAGING_INSTALL_PREFIX=") cmake_platform_opts.append(f'-DCMAKE_INSTALL_PREFIX="C:/hipSDK"') else: rocm_raw_path = os.getenv('ROCM_PATH', "/opt/rocm") rocm_path = rocm_raw_path cmake_platform_opts.append(f"-DROCM_DIR:PATH={rocm_path} -DCPACK_PACKAGING_INSTALL_PREFIX={rocm_path}") print(f"Build source path: {src_path}") cmake_options.extend(cmake_platform_opts) cmake_base_options = f"-DROCM_PATH={rocm_path} -DCMAKE_PREFIX_PATH:PATH={rocm_path}" cmake_options.append(cmake_base_options) # packaging options cmake_pack_options = f"-DCPACK_SET_DESTDIR=OFF" cmake_options.append(cmake_pack_options) # build type cmake_config = "" build_path = os.path.realpath(args.build_dir) # clean delete_dir(build_path) create_dir(os.path.join(build_path)) os.chdir(build_path) cmake_options.append(f"{src_path}") cmd_opts = " ".join(cmake_options) return cmake_executable, cmd_opts def make_cmd(): global args global OS_info make_options = [] if os.name == "nt": make_executable = f"ninja.exe" make_options.append("all") # for cmake "--target all" ) if args.install: make_options.append("package install") # for cmake "--target package --target install" ) else: make_executable = f"make package" if args.install: make_options.append("install") cmd_opts = " ".join(make_options) return make_executable, cmd_opts def run_cmd(exe, opts): program = f"{exe} {opts}" print(program) proc = subprocess.run(program, check=True, stderr=subprocess.STDOUT, shell=True) return proc.returncode def main(): global args os_detect() args = parse_args() print(OS_info) root_dir = os.curdir # configure exe, opts = config_cmd() if run_cmd(exe, opts): fatal("Configuration failed. Not continuing.") # make exe, opts = make_cmd() if run_cmd(exe, opts): fatal("Build failed. Not continuing.") if __name__ == '__main__': main() ROCm-hipBLAS-common-52e19a6/tests/000077500000000000000000000000001506037547600165355ustar00rootroot00000000000000ROCm-hipBLAS-common-52e19a6/tests/CMakeLists.txt000066400000000000000000000027271506037547600213050ustar00rootroot00000000000000# ######################################################################## # # MIT License # # Copyright (C) 2025 Advanced Micro Devices, Inc. # # 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. # # ######################################################################## cmake_minimum_required(VERSION 3.11.0) project(installation-tests LANGUAGES CXX) find_package(hipblas-common REQUIRED) add_executable(hello-roc main.cpp) target_link_libraries(hello-roc PRIVATE roc::hipblas-common) ROCm-hipBLAS-common-52e19a6/tests/main.cpp000066400000000000000000000026411506037547600201700ustar00rootroot00000000000000// ######################################################################## // // MIT License // // Copyright (C) 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 cop- // ies 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 IM- // PLIED, 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 CONNE- // CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ######################################################################## #include "hipblas-common/hipblas-common.h" #include int main(){ std::puts("Hello hipblas-common"); }