Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
afefa69
Remove rocfile from formatter
derobins Nov 26, 2025
b54b3b3
Move rocFile code to hipFile source tree
derobins Nov 26, 2025
21a949d
Clean up CMake code
derobins Nov 26, 2025
19c7b6b
Remove the rocFile library target
derobins Nov 26, 2025
da18ec4
Remove the rocFile namespace
derobins Nov 26, 2025
745f6e9
Move test-hipfile* programs
derobins Nov 26, 2025
b9ddfb5
Remove hipfile-rocfile.cpp
derobins Nov 26, 2025
9c9d0ef
Move NVIDIA API compatibility tests
derobins Nov 26, 2025
dd1264c
Move test headers to test/common
derobins Nov 26, 2025
c2e2225
Add a README.md file that explains the test directory
derobins Nov 26, 2025
7250b53
Move magic-word.h/cpp to the test directory
derobins Nov 26, 2025
ba39b91
Move test-options.h and invalid-enum.h
derobins Nov 26, 2025
fa316da
Minor comment change in magic-word.h
derobins Nov 26, 2025
89a9bd8
Only use hipfile.h
derobins Nov 26, 2025
a78f562
Remove rocFile error macros
derobins Nov 26, 2025
cefb2ec
Remove misc commenting from rocfile.h
derobins Nov 26, 2025
c035343
Remove the rocFile properties API
derobins Nov 26, 2025
2f37a42
Remove the rocFile version API
derobins Nov 26, 2025
3fce02f
Rename rocfile-private.* to hipfile-private.*
derobins Nov 26, 2025
62531d8
Remove misc unimplemented rocFile getters
derobins Nov 26, 2025
06d244d
Remove ROCFILE_STREAM_* flags
derobins Nov 26, 2025
6ba6174
Remove rocFileOpStatusError()
derobins Nov 26, 2025
e76aa8d
Remove unused rocFile structs
derobins Nov 26, 2025
bcfd6e3
Minor comment fixes
derobins Nov 26, 2025
3c36d2e
Rename rocFileEnsureDriverInitPrivate()
derobins Nov 26, 2025
bb21cc5
Move rocFile errors to hipFile
derobins Nov 26, 2025
b00d81f
Migrate the driver API to hipFile
derobins Nov 26, 2025
8d16d3c
Rename rocFileIo --> hipFileIo
derobins Nov 26, 2025
1dc55e9
Minor comment fix
derobins Nov 26, 2025
761397c
Rename RocFileOpError and RocFileHipError
derobins Nov 26, 2025
ffd51b2
Rename everything RocFile* to HipFile*
derobins Nov 26, 2025
1d3c910
Rename opaque rocFile(Batch)Handle_t types
derobins Nov 26, 2025
388a787
Remove unused rocFile RDMA stuff
derobins Nov 26, 2025
c9ba828
Yank rocFileDriverProps_t
derobins Nov 26, 2025
c60c5ae
Yank rocFile file handle types
derobins Nov 26, 2025
7c81e7c
Get rid of the rest of the rocFile types
derobins Nov 26, 2025
438ed00
Moved async API to 100% hipFile
derobins Nov 26, 2025
057b066
Move rest of batch API to hipFile
derobins Nov 26, 2025
b77305e
Retires the last of the rocFile code
derobins Nov 26, 2025
51f0aac
Rename rocfile.cpp --> hipfile.cpp
derobins Nov 26, 2025
b49d030
Rename rocfile tests to internal
derobins Nov 26, 2025
8fdce79
Rename a few test files
derobins Nov 26, 2025
3e395eb
Updated the changelog
derobins Nov 26, 2025
5db6799
Update fastpath comment
derobins Nov 26, 2025
8633bcf
Remove rocfile from code coverage script
derobins Nov 26, 2025
723a0fd
Misc cleanup
derobins Nov 26, 2025
aaacc17
IWYU changes after rework
derobins Nov 26, 2025
cc640ae
Codespell change
derobins Nov 26, 2025
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
18 changes: 9 additions & 9 deletions .github/workflows/build-ais.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
cp -R /mnt/ais /ais
mkdir /ais/build
'
- name: Generate build files for hipFile and rocFile targeting the AMD platform (amdclang++)
- name: Generate build files for hipFile targeting the AMD platform (amdclang++)
run: |
docker exec \
-t \
Expand All @@ -70,7 +70,7 @@ jobs:
-DBUILD_CODE_COVERAGE=ON \
..
'
- name: Build hipFile and rocFile for the AMD platform (amdclang++)
- name: Build hipFile for the AMD platform (amdclang++)
run: |
docker exec \
-t \
Expand All @@ -79,7 +79,7 @@ jobs:
/bin/bash -c '
cmake --build . --parallel
'
- name: Test hipFile and rocFile for the AMD platform (amdclang++)
- name: Test hipFile for the AMD platform (amdclang++)
run: |
docker exec \
-t \
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
cp -R /mnt/ais /ais
mkdir /ais/build
'
- name: Generate build files for hipFile and rocFile targeting the AMD platform (${{ matrix.alternate_compilers }})
- name: Generate build files for hipFile targeting the AMD platform (${{ matrix.alternate_compilers }})
run: |
docker exec \
-t \
Expand All @@ -171,7 +171,7 @@ jobs:
-DBUILD_AIS_DOCS=ON \
..
'
- name: Build hipFile and rocFile for the AMD platform (${{ matrix.alternate_compilers }})
- name: Build hipFile for the AMD platform (${{ matrix.alternate_compilers }})
run: |
docker exec \
-t \
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
cp -R /mnt/ais /ais
mkdir /ais/build
'
- name: Generate build files for hipFile and rocFile targeting the AMD platform (amdclang++)
- name: Generate build files for hipFile targeting the AMD platform (amdclang++)
run: |
docker exec \
-t \
Expand All @@ -240,7 +240,7 @@ jobs:
-DBUILD_AIS_DOCS=ON \
..
'
- name: Build hipFile and rocFile for the AMD platform (amdclang++)
- name: Build hipFile for the AMD platform (amdclang++)
run: |
docker exec \
-t \
Expand All @@ -249,7 +249,7 @@ jobs:
/bin/bash -c '
cmake --build . --parallel
'
- name: Run hipFile and rocFile system tests for the AMD platform (amdclang++)
- name: Run hipFile system tests for the AMD platform (amdclang++)
run: |
docker exec \
-t \
Expand All @@ -258,7 +258,7 @@ jobs:
/bin/bash -c '
ctest -V -L "system" --parallel
'
- name: Stress tests for hipFile and rocFile targeting the AMD platform (amdclang++)
- name: Stress tests for hipFile targeting the AMD platform (amdclang++)
run: |
docker exec \
-t \
Expand Down
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Changelog for hipFile/rocFile
# Changelog for hipFile

## UNRELEASED - hipFile 0.2.0
### Added

### Changed

### Removed
* The rocFile library has been completely removed and the code is now a part of hipFile.
* The hipify patch was removed. You can get hipify with hipFile support at https://github.com/derobins/HIPIFY/tree/hipFile.

### Limitations
* The batch API calls are not supported w/ a rocFile backend
* The async API calls are not supported w/ a rocFile backend
* The batch API calls are not supported w/ an AMD backend
* The async API calls are not supported w/ an AMD backend

### Known issues
31 changes: 13 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ endif()

# Set the library version in a variable so we can use
# it in *.in files and avoid version mismatch.
#
# The versions number of rocFile and hipFile are identical
set(AIS_LIBRARY_MAJOR 0)
set(AIS_LIBRARY_MINOR 2)
set(AIS_LIBRARY_PATCH 0)
Expand Down Expand Up @@ -81,6 +79,15 @@ if(NOT CMAKE_HIP_PLATFORM STREQUAL "amd" AND NOT CMAKE_HIP_PLATFORM STREQUAL "nv
message(FATAL_ERROR "Invalid CMAKE_HIP_PLATFORM: '${CMAKE_HIP_PLATFORM}'. Allowed values are 'amd' or 'nvidia'.")
endif()

# Set the platform variable
if(CMAKE_HIP_PLATFORM STREQUAL "nvidia")
set(BUILD_AMD_DETAIL OFF)
set(BUILD_NVIDIA_DETAIL ON)
else()
set(BUILD_AMD_DETAIL ON)
set(BUILD_NVIDIA_DETAIL OFF)
endif()

#-----------------------------------------------------------------------------
# Include our custom CMake code in the module path
#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -119,7 +126,7 @@ include(AISAddLibraries)
#-----------------------------------------------------------------------------
# Code coverage (via llvm-cov)
#
# To use with the hipFile/rocFile libraries:
# To use with the hipFile library:
# - Build with BUILD_CODE_COVERAGE set to ON
# - Run `ctest .`
#
Expand Down Expand Up @@ -156,15 +163,6 @@ include(AISIWYU)
#-------------------
include(AISSanitizers)

#-------------------
# Platform defaults
#-------------------
if(CMAKE_HIP_PLATFORM STREQUAL "nvidia")
set(BUILD_ROCFILE OFF)
else()
set(BUILD_ROCFILE ON)
endif()

#-----------------------
# aiscp example program
#-----------------------
Expand All @@ -173,7 +171,7 @@ option(BUILD_AISCP "Build aiscp example program" ON)
#------
# docs
#------
option(BUILD_AIS_DOCS "Build the rocFile/hipFile docs (requires Doxygen)" OFF)
option(BUILD_AIS_DOCS "Build the hipFile docs (requires Doxygen)" OFF)

#-----------------------------------------------------------------------------
# Find important packages for building the software
Expand All @@ -194,10 +192,10 @@ else()
endif()

# Find the cuFile library and headers on NVIDIA
if(CMAKE_HIP_PLATFORM STREQUAL "nvidia")
if(BUILD_NVIDIA_DETAIL)
find_package(CUDAToolkit REQUIRED)

if(CMAKE_HIP_PLATFORM STREQUAL "nvidia" AND CMAKE_VERSION VERSION_LESS "3.28")
if(CMAKE_VERSION VERSION_LESS "3.28")
enable_language(CUDA)
# Set a default architecture if not provided.
if(NOT CMAKE_CUDA_ARCHITECTURES)
Expand All @@ -219,9 +217,6 @@ endif()
#-----------------------------------------------------------------------------
# Subdirectories to configure/build
#-----------------------------------------------------------------------------
if(BUILD_ROCFILE)
add_subdirectory(rocfile)
endif()
add_subdirectory(hipfile)
if(BUILD_AIS_DOCS)
add_subdirectory(docs)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to hipFile/rocFile
# Contributing to hipFile

Thank you for contributing! This guide outlines the development workflow,
contribution standards, and best practices when working on hipFile.
Expand Down
14 changes: 7 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install guide for hipFile / rocFile
# Install guide for hipFile

## Building hipFile and rocFile
## Building hipFile

> [!NOTE]
> hipFile is alpha software that has undergone testing on limited hardware. It may not work on your system at this time.
Expand Down Expand Up @@ -57,18 +57,18 @@ Sanitizer options

`ctest .` will run all tests.

You can filter on test labels using the `-L` option. We currently have `hipfile` and `rocfile` labels for each library and `unit`, `system`, and `stress` labels for the different test types. Multiple `-L` options form an *and*. A `|` can be used for an *or*.
You can filter on test labels using the `-L` option. We currently have `hipfile` and `internal` labels for the public API and its internals, respectively, and `unit`, `system`, and `stress` labels for the different test types. Multiple `-L` options form an *and*. A `|` can be used for an *or*.

`ctest . -L rocfile -L unit` runs all unit tests in the rocFile library.
`ctest . -L internal -L unit` runs all the internal library unit tests.
`ctest . -L 'system|unit'` runs all system or unit tests.

You can filter on test names using the `-R` option. This option supports wildcards.

`ctest . -R RocFileBuffer.get_buffer_makes_temporary_buffer` runs the specified test.
`ctest . -R 'RocFileBuffer*'` runs all tests that start with RocFileBuffer.
`ctest . -R HipFileBuffer.get_buffer_makes_temporary_buffer` runs the specified test.
`ctest . -R 'HipFileBuffer*'` runs all tests that start with HipFileBuffer.

### Install and package
The hipFile and rocFile libraries can be installed with CMake. The default
The hipFile library can be installed with CMake. The default
install prefix is still the CMake default of `/usr/local`.

`cmake --install .`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hipFile / rocFile
# hipFile

> [!CAUTION]
> This release is an *early-access* software technology preview. Running production workloads is *not* recommended.
Expand All @@ -9,7 +9,7 @@

AMD Infinity Storage library that supports IO directly to the GPU

## Building hipFile and rocFile
## Building hipFile

See the INSTALL.md file in the project root for a list of supported
hardware and compilers as well as build and install instructions.
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Security Policy

## Reporting a vulnerability
If you have discovered a security vulnerability in the hipFile or rocFile
libraries, please do NOT report it publicly using a GitHub issue. Instead,
If you have discovered a security vulnerability in the hipFile library,
please do NOT report it publicly using a GitHub issue. Instead,
you should report the issue via the AMD Product Security website:

https://www.amd.com/en/resources/product-security.html
2 changes: 1 addition & 1 deletion STYLEGUIDE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hipFile/rocFile Style Guide
# hipFile Style Guide

## File and Directory Structure
### Organization
Expand Down
6 changes: 3 additions & 3 deletions cmake/AISAddExecutable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ include(AISCompilerOptions)
# NOTE: Assumes AIS target libraries are named <foo>_(static|shared)
#
# NOTE: This isn't the most robust function. It's mainly intended
# to reduce code duplication in rocFile/hipFile. For example,
# DEPS is for passing the rocFile dependency to hipFile and
# won't work for passing general library dependencies.
# to reduce code duplication. For example, DEPS is for passing
# the hipFile shared/static dependency and won't work for passing
# general library dependencies.
function(ais_add_executable)

# Parse arguments
Expand Down
22 changes: 1 addition & 21 deletions cmake/AISAddLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,13 @@ include(CheckLinkerFlag)
# LIBINCL <path> Path to installed include files (e.g., hipfile.h)
# SYSINCLS [path1 [path2 ...]] Paths to other include dirs
# SRCS [src1 [src2 ...]] The source files
# DEPS [dependency1 [dependency2 ...]] List of AIS target library dependencies
# LIBS [lib1, [lib2 ...]] List of external library dependencies
#
# NOTE: Assumes internal library dependencies are named <foo>_(static|shared)
#
# NOTE: This isn't the most robust function. It's mainly intended to reduce
# code duplication in rocFile/hipFile. For example, DEPS is for passing
# the rocFile internal library dependency to hipFile and won't work for
# passing general library dependencies.
function(ais_add_libraries)

# Parse arguments
set(options) # None at this time
set(oneValueArgs NAME DETAIL LIBINCL)
set(multiValueArgs SRCS DEPS SYSINCLS LIBS)
set(multiValueArgs SRCS SYSINCLS LIBS)
cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

# Convenience names
Expand All @@ -48,18 +40,6 @@ function(ais_add_libraries)
set_target_properties(${shared_name} PROPERTIES VERSION ${AIS_LIBRARY_VERSION})
set_target_properties(${shared_name} PROPERTIES SOVERSION ${AIS_LIBRARY_SOVERSION})

# Add dependencies on internal targets
foreach(dep IN LISTS arg_DEPS)
add_dependencies(${static_name} "${dep}_static")
add_dependencies(${shared_name} "${dep}_shared")

target_link_libraries(${static_name} PRIVATE "${dep}_static")
target_link_libraries(${shared_name} PRIVATE "${dep}_shared")

# The object library needs to see the headers for any dependencies
target_link_libraries(${object_name} PUBLIC "${dep}_shared")
endforeach()

# Add dependencies on external libraries
foreach(lib IN LISTS arg_LIBS)
find_library(LIBRARY_PATH NAMES ${lib})
Expand Down
2 changes: 1 addition & 1 deletion cmake/AISCompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function(ais_set_compiler_flags target)
foreach(source IN LISTS sources)
get_source_file_property(language ${source} LANGUAGE)
# CMake HIP language prior to 3.28 only supports AMD, so change LANGUAGE to CUDA for HIP files
if(CMAKE_HIP_PLATFORM STREQUAL "nvidia" AND CMAKE_VERSION VERSION_LESS "3.28" AND language STREQUAL HIP)
if(BUILD_NVIDIA_DETAIL AND CMAKE_VERSION VERSION_LESS "3.28" AND language STREQUAL HIP)
set_source_files_properties(${source} PROPERTIES LANGUAGE "CUDA")
set(language CUDA)
message(STATUS "Setting ${source} LANGUAGE to CUDA because CMake < 3.28")
Expand Down
22 changes: 1 addition & 21 deletions cmake/AISInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,26 @@
#
# SPDX-License-Identifier: MIT

# Install hipFile and rocFile
# Install hipFile

# From the rocm-cmake repo
include(ROCMInstallTargets)
include(ROCMCreatePackage)


# Install the package
if(BUILD_ROCFILE)
rocm_install(TARGETS rocfile_static)
rocm_install(TARGETS rocfile_shared)
endif()
rocm_install(TARGETS hipfile_static)
rocm_install(TARGETS hipfile_shared)

# Install the headers
if(BUILD_ROCFILE)
rocm_install(
DIRECTORY ${CMAKE_SOURCE_DIR}/rocfile/include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
endif()
rocm_install(
DIRECTORY ${CMAKE_SOURCE_DIR}/hipfile/include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

# Always install the hipfile-types.h file
rocm_install(
FILES ${CMAKE_SOURCE_DIR}/shared/hipfile-types.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

# rocm_package_add_dependencies() line should go here
# when we have dependencies

# Export the targets
if(BUILD_ROCFILE)
set(target_list ${target_list} roc::rocfile_shared roc::rocfile_static)
endif()
set(target_list ${target_list} roc::hipfile_shared roc::hipfile_static)

rocm_export_targets(
Expand Down
3 changes: 0 additions & 3 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,3 @@ function(ais_add_docs_target AIS_DOC_PRETTY_NAME)
endfunction()

ais_add_docs_target("hipFile")
if(BUILD_ROCFILE)
ais_add_docs_target("rocFile")
endif()
Loading
Loading