Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/build-rocm-examples-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
if: ${{ matrix.install_method == 'tarball' }}
id: install-tarball
run: |
LATEST_TARBALL=$(curl -s https://rocm.nightlies.amd.com/tarball/ \
LATEST_TARBALL=$(curl -s -H "Cache-Control: no-cache" -H "Pragma: no-cache" https://rocm.nightlies.amd.com/tarball/ \
| grep -oE "therock-dist-linux-${{ matrix.gpu_config.therock_family }}-[0-9]+\.[0-9]+\.\w+\.tar\.gz" \
| sort -V \
| tail -1)
Expand All @@ -107,6 +107,21 @@ jobs:
echo "ENABLE_OPENMP=ON" >> $GITHUB_ENV
echo "HIPCC_COMPILE_FLAGS_APPEND=--offload-arch=${{ matrix.gpu_config.gpu_target }}" >> $GITHUB_ENV

- name: Upgrade elfutils (SLES)
Comment thread
zichguan-amd marked this conversation as resolved.
Resolved
if: ${{ startsWith(inputs.distro, 'sles') && matrix.install_method == 'tarball' }}
run: |
zypper -qni install -y bzip2 m4 zlib-devel
wget https://sourceware.org/elfutils/ftp/0.186/elfutils-0.186.tar.bz2
tar -xjf elfutils-0.186.tar.bz2
cd elfutils-0.186
./configure --disable-debuginfod --disable-libdebuginfod
make -j$(nproc)
make install
ldconfig
cd ..
rm -rf elfutils-0.186*
echo "LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV

- name: Makefile build
run: |
./Scripts/configure.sh --rocm-path="${ROCM_PATH}"
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/build_applications_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ concurrency:
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
HIPSDK_INSTALLER_VERSION: 25.Q3
GLFW_DIR: C:\glfw-3.4.bin.WIN64\

Expand All @@ -30,7 +28,7 @@ jobs:
strategy:
matrix:
config: [Debug, Release]
runs-on: windows-latest
runs-on: windows-2022
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -58,14 +56,19 @@ jobs:
Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait
Write-Host "Installer log:"
Get-Content "installer_log.txt"
if (Test-Path -Path "${{ env.HIP_PATH }}") {
Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}"
$hip_path = [System.Environment]::GetEnvironmentVariable('HIP_PATH', 'Machine')
if (Test-Path -Path "$hip_path") {
Write-Host "HIP_PATH directory exists: $hip_path"
Write-Host "HIP SDK installed successfully"
} else {
Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}"
Write-Host "HIP_PATH directory DOES NOT exist: $hip_path"
Write-Host "HIP SDK installation failed"
Exit 1
}
$version = (Split-Path $hip_path -Leaf)
Write-Host "Detected HIP SDK version: $version"
echo "HIP_PATH=$hip_path" >> $env:GITHUB_ENV
echo "PLATFORM_TOOLSET_VERSION=$version" >> $env:GITHUB_ENV
- name: Build ${{ matrix.config }} x64
run: |
Write-Host "Replace toolset $((Get-ChildItem -Recurse -File | Get-Content | Select-String -Pattern 'HIP clang .\..' | Select-Object -First 1).Matches.Value) with HIP clang ${{ env.PLATFORM_TOOLSET_VERSION }}"
Expand All @@ -74,4 +77,4 @@ jobs:
}
msbuild Scripts\VisualStudio\build.proj -maxCpuCount -detailedSummary -property:"Category=Applications;Configuration=${{ matrix.config }};Platform=x64"
Write-Host "msbuild returned: $LastExitCode"
Exit $LastExitCode
Exit $LastExitCode
17 changes: 10 additions & 7 deletions .github/workflows/build_hip_basic_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ concurrency:
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
HIPSDK_INSTALLER_VERSION: 25.Q3
VULKAN_SDK: C:\VulkanSDK\1.4.313.2\
GLFW_DIR: C:\glfw-3.4.bin.WIN64\
Expand All @@ -31,7 +29,7 @@ jobs:
strategy:
matrix:
config: [Debug, Release]
runs-on: windows-latest
runs-on: windows-2022
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -63,14 +61,19 @@ jobs:
Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait
Write-Host "Installer log:"
Get-Content "installer_log.txt"
if (Test-Path -Path "${{ env.HIP_PATH }}") {
Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}"
$hip_path = [System.Environment]::GetEnvironmentVariable('HIP_PATH', 'Machine')
if (Test-Path -Path "$hip_path") {
Write-Host "HIP_PATH directory exists: $hip_path"
Write-Host "HIP SDK installed successfully"
} else {
Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}"
Write-Host "HIP_PATH directory DOES NOT exist: $hip_path"
Write-Host "HIP SDK installation failed"
Exit 1
}
$version = (Split-Path $hip_path -Leaf)
Write-Host "Detected HIP SDK version: $version"
echo "HIP_PATH=$hip_path" >> $env:GITHUB_ENV
echo "PLATFORM_TOOLSET_VERSION=$version" >> $env:GITHUB_ENV
- name: Apply patch
run: |
Write-Host "Applying patches $(Get-ChildItem -File Scripts\VisualStudio\*.patch)"
Expand All @@ -85,4 +88,4 @@ jobs:
}
msbuild Scripts\VisualStudio\build.proj -maxCpuCount -detailedSummary -property:"Category=HIP-Basic;Configuration=${{ matrix.config }};Platform=x64"
Write-Host "msbuild returned: $LastExitCode"
Exit $LastExitCode
Exit $LastExitCode
17 changes: 10 additions & 7 deletions .github/workflows/build_hip_documentation_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ concurrency:
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
HIPSDK_INSTALLER_VERSION: 25.Q3
VULKAN_SDK: C:\VulkanSDK\1.4.313.2\
GLFW_DIR: C:\glfw-3.4.bin.WIN64\
Expand All @@ -31,7 +29,7 @@ jobs:
strategy:
matrix:
config: [Debug, Release]
runs-on: windows-latest
runs-on: windows-2022
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -63,14 +61,19 @@ jobs:
Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait
Write-Host "Installer log:"
Get-Content "installer_log.txt"
if (Test-Path -Path "${{ env.HIP_PATH }}") {
Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}"
$hip_path = [System.Environment]::GetEnvironmentVariable('HIP_PATH', 'Machine')
if (Test-Path -Path "$hip_path") {
Write-Host "HIP_PATH directory exists: $hip_path"
Write-Host "HIP SDK installed successfully"
} else {
Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}"
Write-Host "HIP_PATH directory DOES NOT exist: $hip_path"
Write-Host "HIP SDK installation failed"
Exit 1
}
$version = (Split-Path $hip_path -Leaf)
Write-Host "Detected HIP SDK version: $version"
echo "HIP_PATH=$hip_path" >> $env:GITHUB_ENV
echo "PLATFORM_TOOLSET_VERSION=$version" >> $env:GITHUB_ENV
- name: Build ${{ matrix.config }} x64
run: |
Write-Host "Replace toolset $((Get-ChildItem -Recurse -File | Get-Content | Select-String -Pattern 'HIP clang .\..' | Select-Object -First 1).Matches.Value) with HIP clang ${{ env.PLATFORM_TOOLSET_VERSION }}"
Expand All @@ -79,4 +82,4 @@ jobs:
}
msbuild Scripts\VisualStudio\build.proj -maxCpuCount -detailedSummary -property:"Category=HIP-Doc;Configuration=${{ matrix.config }};Platform=x64"
Write-Host "msbuild returned: $LastExitCode"
Exit $LastExitCode
Exit $LastExitCode
17 changes: 10 additions & 7 deletions .github/workflows/build_libraries_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ concurrency:
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
HIPSDK_INSTALLER_VERSION: 25.Q3

jobs:
Expand All @@ -30,7 +28,7 @@ jobs:
matrix:
config: [Debug, Release]
vsversion: [2017, 2019, 2022]
runs-on: windows-latest
runs-on: windows-2022
defaults:
run:
shell: pwsh
Expand All @@ -52,14 +50,19 @@ jobs:
Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait
Write-Host "Installer log:"
Get-Content "installer_log.txt"
if (Test-Path -Path "${{ env.HIP_PATH }}") {
Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}"
$hip_path = [System.Environment]::GetEnvironmentVariable('HIP_PATH', 'Machine')
if (Test-Path -Path "$hip_path") {
Write-Host "HIP_PATH directory exists: $hip_path"
Write-Host "HIP SDK installed successfully"
} else {
Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}"
Write-Host "HIP_PATH directory DOES NOT exist: $hip_path"
Write-Host "HIP SDK installation failed"
Exit 1
}
$version = (Split-Path $hip_path -Leaf)
Write-Host "Detected HIP SDK version: $version"
echo "HIP_PATH=$hip_path" >> $env:GITHUB_ENV
echo "PLATFORM_TOOLSET_VERSION=$version" >> $env:GITHUB_ENV
- name: Apply patch
run: |
Write-Host "Applying patches $(Get-ChildItem -File Scripts\VisualStudio\0002-Revert-Rename-hipblas-dll-for-HIP-SDK-7.1.patch)"
Expand All @@ -74,4 +77,4 @@ jobs:
}
msbuild Scripts\VisualStudio\build.proj -maxCpuCount -detailedSummary -property:"Category=Libraries;Configuration=${{ matrix.config }};Platform=x64;VSVersion=${{ matrix.vsversion }}" -target:"Build"
Write-Host "msbuild returned: $LastExitCode"
Exit $LastExitCode
Exit $LastExitCode
15 changes: 9 additions & 6 deletions .github/workflows/build_portable_sln.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ concurrency:
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
HIPSDK_INSTALLER_VERSION: 25.Q3
CUDA_VERSION: 12.8.1
CUDA_INSTALLER_VERSION: 572.61
Expand All @@ -42,7 +40,7 @@ jobs:
strategy:
matrix:
config: [Debug, Release]
runs-on: windows-2025
runs-on: windows-2022
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -89,14 +87,19 @@ jobs:
Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait
Write-Host "Installer log:"
Get-Content "installer_log.txt"
if (Test-Path -Path "${{ env.HIP_PATH }}") {
Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}"
$hip_path = [System.Environment]::GetEnvironmentVariable('HIP_PATH', 'Machine')
if (Test-Path -Path "$hip_path") {
Write-Host "HIP_PATH directory exists: $hip_path"
Write-Host "HIP SDK installed successfully"
} else {
Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}"
Write-Host "HIP_PATH directory DOES NOT exist: $hip_path"
Write-Host "HIP SDK installation failed"
Exit 1
}
$version = (Split-Path $hip_path -Leaf)
Write-Host "Detected HIP SDK version: $version"
echo "HIP_PATH=$hip_path" >> $env:GITHUB_ENV
echo "PLATFORM_TOOLSET_VERSION=$version" >> $env:GITHUB_ENV
- name: Apply patch
run: |
Write-Host "Applying patches $(Get-ChildItem -File Scripts\VisualStudio\*.patch)"
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/build_programming_guide_vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ concurrency:
cancel-in-progress: true

env:
PLATFORM_TOOLSET_VERSION: 6.4
HIP_PATH: C:\Program Files\AMD\ROCm\6.4\
HIPSDK_INSTALLER_VERSION: 25.Q3
VULKAN_SDK: C:\VulkanSDK\1.4.313.2\
GLFW_DIR: C:\glfw-3.4.bin.WIN64\
Expand All @@ -31,7 +29,7 @@ jobs:
strategy:
matrix:
config: [Debug, Release]
runs-on: windows-latest
runs-on: windows-2022
defaults:
run:
shell: pwsh
Expand All @@ -53,14 +51,19 @@ jobs:
Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait
Write-Host "Installer log:"
Get-Content "installer_log.txt"
if (Test-Path -Path "${{ env.HIP_PATH }}") {
Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}"
$hip_path = [System.Environment]::GetEnvironmentVariable('HIP_PATH', 'Machine')
if (Test-Path -Path "$hip_path") {
Write-Host "HIP_PATH directory exists: $hip_path"
Write-Host "HIP SDK installed successfully"
} else {
Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}"
Write-Host "HIP_PATH directory DOES NOT exist: $hip_path"
Write-Host "HIP SDK installation failed"
Exit 1
}
$version = (Split-Path $hip_path -Leaf)
Write-Host "Detected HIP SDK version: $version"
echo "HIP_PATH=$hip_path" >> $env:GITHUB_ENV
echo "PLATFORM_TOOLSET_VERSION=$version" >> $env:GITHUB_ENV
- name: Build ${{ matrix.config }} x64
run: |
Write-Host "Replace toolset $((Get-ChildItem -Recurse -File | Get-Content | Select-String -Pattern 'HIP clang .\..' | Select-Object -First 1).Matches.Value) with HIP clang ${{ env.PLATFORM_TOOLSET_VERSION }}"
Expand All @@ -69,4 +72,4 @@ jobs:
}
msbuild Scripts\VisualStudio\build.proj -maxCpuCount -detailedSummary -property:"Category=Programming-Guide;Configuration=${{ matrix.config }};Platform=x64"
Write-Host "msbuild returned: $LastExitCode"
Exit $LastExitCode
Exit $LastExitCode
8 changes: 6 additions & 2 deletions Common/find_filesystem.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@
# Output variable:
# CXX_FS_LIB - either "-lstdc++fs" or empty.

_FS_OK_BARE := $(shell { echo '#include <experimental/filesystem>'; echo 'int main(){std::experimental::filesystem::path p; return 0;}'; } | $${CXX:-c++} -x c++ -std=c++17 - -o /dev/null 2>/dev/null && echo 1 || echo 0)
# GNU Make 4.2 treats '#' as a comment even inside $(shell), hiding the
# closing ')' from the parser. Expand it via a variable instead.
_FS_HASH := \#

_FS_OK_BARE := $(shell { echo '$(_FS_HASH)include <experimental/filesystem>'; echo 'int main(){return std::experimental::filesystem::current_path().empty();}'; } | $${CXX:-c++} -x c++ -std=c++17 - -o /dev/null 2>/dev/null && echo 1 || echo 0)
ifeq ($(_FS_OK_BARE),0)
_FS_OK_WITH_LIB := $(shell { echo '#include <experimental/filesystem>'; echo 'int main(){std::experimental::filesystem::path p; return 0;}'; } | $${CXX:-c++} -x c++ -std=c++17 - -lstdc++fs -o /dev/null 2>/dev/null && echo 1 || echo 0)
_FS_OK_WITH_LIB := $(shell { echo '$(_FS_HASH)include <experimental/filesystem>'; echo 'int main(){return std::experimental::filesystem::current_path().empty();}'; } | $${CXX:-c++} -x c++ -std=c++17 - -lstdc++fs -o /dev/null 2>/dev/null && echo 1 || echo 0)
ifeq ($(_FS_OK_WITH_LIB),1)
CXX_FS_LIB := -lstdc++fs
endif
Expand Down
4 changes: 2 additions & 2 deletions Common/hipblaslt_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ inline std::size_t real_datatype_size(hipDataType dtype)
{
// These types were not defined in older versions of ROCm, so need to be handled specially here.
auto const dtype_int = static_cast<int>(dtype);
if(dtype_int == HIP_R_4F_E2M1_EXT || dtype_int == HIP_R_6F_E2M3_EXT
|| dtype_int == HIP_R_6F_E3M2_EXT)
if(dtype_int == HIP_R_4F_E2M1 || dtype_int == HIP_R_6F_E2M3
|| dtype_int == HIP_R_6F_E3M2)
{
return 1;
}
Expand Down
16 changes: 15 additions & 1 deletion Libraries/hipSPARSELt/spmm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ EXAMPLE := hipsparselt_spmm
COMMON_INCLUDE_DIR := ../../../Common
GPU_RUNTIME ?= HIP

# Supported GPU architectures for hipSPARSELt
SUPPORTED_HIP_ARCHITECTURES := gfx942 gfx950
include $(COMMON_INCLUDE_DIR)/filter_hip_architectures.mk

# HIP variables
ROCM_PATH ?= /opt/rocm
CUDA_INSTALL_DIR ?= /usr/local/cuda
Expand Down Expand Up @@ -58,11 +62,21 @@ ICPPFLAGS += $(CPPFLAGS)
ILDFLAGS += $(LDFLAGS)
ILDLIBS += $(LDLIBS)

ifeq ($(SKIP_BUILD),1)
$(EXAMPLE):
@echo "Skipping $(EXAMPLE): no supported architectures"
else
$(EXAMPLE): main.cpp $(COMMON_INCLUDE_DIR)/example_utils.hpp $(COMMON_INCLUDE_DIR)/hipsparselt_utils.hpp
$(COMPILER) $(ICXXFLAGS) $(ICPPFLAGS) $(ILDFLAGS) -o $@ $< $(ILDLIBS)
$(COMPILER) $(ICXXFLAGS) $(ICPPFLAGS) $(OFFLOAD_ARCH_FLAGS) $(ILDFLAGS) -o $@ $< $(ILDLIBS)
endif

ifeq ($(SKIP_BUILD),1)
test:
@echo "Skipping $(EXAMPLE) test: no supported architectures"
else
test: $(EXAMPLE)
./$(EXAMPLE) $(TEST_ARGS)
endif

clean:
$(RM) $(EXAMPLE)
Expand Down
Loading
Loading