././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4122756 hipblas-common/0000775000175100017510000000000015206065324013721 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4102757 hipblas-common/.azuredevops/0000775000175100017510000000000015206065324016346 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4102757 hipblas-common/.azuredevops/rocm-ci.yml0000664000175100017510000000103015206065324020414 0ustar00jenkinsjenkinsresources: 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 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4102757 hipblas-common/.github/0000775000175100017510000000000015206065324015261 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4102757 hipblas-common/.github/CODEOWNERS0000664000175100017510000000023515206065324016654 0ustar00jenkinsjenkins* @bnemanich @daineAMD @TorreZuk *.md @ROCm/rocm-documentation @bnemanich @daineAMD @TorreZuk *.rst @ROCm/rocm-documentation @bnemanich @daineAMD @TorreZuk ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/CMakeLists.txt0000664000175100017510000000410115206065324016455 0ustar00jenkinsjenkins# 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.4.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 ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/CMakePresets.json0000664000175100017510000000101415206065324017136 0ustar00jenkinsjenkins{ "version": 3, "configurePresets": [ { "name": "default:release", "displayName": "Configure release build with installation to /opt/rocm", "binaryDir": "${sourceDir}/build", "cacheVariables": { "CMAKE_CXX_COMPILER": "/opt/rocm/bin/amdclang++", "CMAKE_C_COMPILER": "/opt/rocm/bin/amdclang", "CMAKE_PREFIX_PATH": "/opt/rocm", "CMAKE_INSTALL_PREFIX": "/opt/rocm", "CMAKE_BUILD_TYPE": "Release", "HIPBLASLT_ENABLE_FETCH": "ON" } } ] } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/LICENSE.md0000664000175100017510000000207015206065324015324 0ustar00jenkinsjenkinsMIT 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. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/README.md0000664000175100017510000000243415206065324015203 0ustar00jenkinsjenkins# hipBLAS-common ## Introduction hipBLAS-common is a header-only library that provides common files for hipBLAS and hipBLASLt. ## 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. ### Using CMake presets > [!NOTE] > When using presets, assumptions are made about search paths, built-in CMake variables, and output directories. Consult [CMakePresets.json](./CMakePresets.json) to understand which variables are set, or refer to [Using CMake variables directly](#using-cmake-variables-directly) for a fully custom configuration. ```bash # show available presets cmake --list-presets # configure cmake --preset default:release # build cmake --build build # install cmake --install build ``` ### Using CMake variables directly ```bash # configure cmake -B build -S . -D CMAKE_INSTALL_PREFIX= # build cmake --build build ``` ### Using rmake script ```bash python3 ./rmake.py --install ``` ## CMake targets hipBLAS-common generates the following targets for consumption in internal and external projects. * `roc::hipblas-common` ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/cmake/0000775000175100017510000000000015206065324015001 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/cmake/dependencies.cmake0000664000175100017510000000413515206065324020434 0ustar00jenkinsjenkins# 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(ROCmCMakeBuildTools QUIET CONFIG) if(NOT ROCmCMakeBuildTools_FOUND) message(STATUS "ROCmCMakeBuildTools not found. Fetching from source...") include(FetchContent) FetchContent_Declare( rocm-cmake GIT_REPOSITORY https://github.com/ROCm/rocm-cmake.git GIT_TAG rocm-6.4.3 GIT_SHALLOW TRUE ) FetchContent_GetProperties(rocm-cmake) if(NOT rocm-cmake_POPULATED) FetchContent_Populate(rocm-cmake) message( STATUS "Added ROCm CMake modules path: ${rocm-cmake_SOURCE_DIR}/share/rocmcmakebuildtools/cmake" ) list(APPEND CMAKE_MODULE_PATH ${rocm-cmake_SOURCE_DIR}/share/rocmcmakebuildtools/cmake) endif() endif() include(ROCMSetupVersion) include(ROCMCreatePackage) include(ROCMInstallTargets) include(ROCMPackageConfigHelpers) include(ROCMInstallSymlinks) include(ROCMClients) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/cmake/hipblas-common-config.cmake.in0000664000175100017510000000252715206065324022571 0ustar00jenkinsjenkins# ######################################################################## # # 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") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/library/0000775000175100017510000000000015206065324015365 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/library/include/0000775000175100017510000000000015206065324017010 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/library/include/hipblas-common/0000775000175100017510000000000015206065324021720 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/library/include/hipblas-common/hipblas-common.h0000664000175100017510000001251215206065324025002 0ustar00jenkinsjenkins/* ************************************************************************ * 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 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4112756 hipblas-common/rmake.py0000775000175100017510000001325715206065324015405 0ustar00jenkinsjenkins#!/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() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4122756 hipblas-common/tests/0000775000175100017510000000000015206065324015063 5ustar00jenkinsjenkins././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4122756 hipblas-common/tests/CMakeLists.txt0000664000175100017510000000272715206065324017633 0ustar00jenkinsjenkins# ######################################################################## # # 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) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1779985108.4122756 hipblas-common/tests/main.cpp0000664000175100017510000000264115206065324016516 0ustar00jenkinsjenkins// ######################################################################## // // 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"); }