- In the install script, determine the build platform by querying [
hipconfig --platform
][4]- This is necessary, as the install script needs to know the build platform so it can to choose what dependencies to install.
hipconfig --platform
determines the platform by reading the contents of the .hipInfo file installed as part of the hip runtime.- If the platform is autodetected incorrectly, [it can be be set explicitly via an environment
variable][1], e.g.,
export HIP_PLATFORM=amd
orexport HIP_PLATFORM=nvidia
.
- In CMake,
find_package(hip REQUIRED)
will be used for both the AMD and NVIDIA platforms.- There will be no need for a different find_package call on each platform; the same call will be used for both platforms.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From fd158ca247274b593ec59892385a1e66c96fb9a6 Mon Sep 17 00:00:00 2001 | |
From: Cordell Bloor <Cordell.Bloor@amd.com> | |
Date: Thu, 13 Apr 2023 17:55:03 -0600 | |
Subject: [PATCH] Guard use of OpenMP to make it optional | |
This change allows rocBLAS to compile and run even when OpenMP is not | |
available. | |
--- | |
clients/common/blis_interface.cpp | 4 +- | |
clients/common/cblas_interface.cpp | 20 ++++++++++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ************************************************************************ | |
* Copyright (c) 2023 Advanced Micro Devices, Inc. | |
* ************************************************************************ */ | |
#include <new> | |
#include "rocsolver_rfinfo.hpp" | |
extern "C" rocblas_status rocsolver_create_rfinfo(rocsolver_rfinfo* rfinfo, rocblas_handle handle) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ************************************************************************ | |
* Copyright (c) 2023 Advanced Micro Devices, Inc. | |
* ************************************************************************ */ | |
#include <stdlib.h> | |
#include <rocblas/rocblas.h> | |
#include <rocsparse/rocsparse.h> | |
#include "rocsolver_rfinfo.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(example LANGUAGES CXX) | |
find_package(hip REQUIRED) | |
add_executable(example main.cpp) | |
target_link_libraries(example PRIVATE hip::device) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(rocblas-init-benchmark) | |
find_package(rocblas REQUIRED) | |
add_executable(rbi main.c) | |
target_link_libraries(rbi PRIVATE roc::rocblas) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(rocblas-init-benchmark) | |
find_package(rocblas REQUIRED) | |
add_executable(rbi main.c) | |
target_link_libraries(rbi PRIVATE roc::rocblas) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Build rocBLAS for ROCm 5.4.2 on Ubuntu 20.04 | |
set -exuo pipefail | |
apt-get -qq update | |
apt-get -qq upgrade | |
apt-get -qq install build-essential cmake wget | |
WORKSPACE=$HOME # where to download and build the sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/opt/rocm/llvm/bin/clang++ --offload-arch=gfx906:xnack- -L/opt/rocm/hip/lib -lamdhip64 ex.hip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt-get update -y | |
apt-get upgrade -y | |
apt-get install -y build-essential devscripts packaging-dev git vim | |
useradd -G sudo,video --shell /bin/bash --create-home cgmb | |
echo 'cgmb ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers | |
gbp clone https://salsa.debian.org/rocm-team/rocm-hipamd.git | |
cd rocm-hipamd |