You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
zichguan-amd b4ee9992e8 Fix using CUID to host-only compilation 5 months ago
..
assembly_to_executable Fix using CUID to host-only compilation 5 months ago
bandwidth Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
bit_extract Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
cooperative_groups Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
device_globals Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
device_query Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
dynamic_shared Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
events Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
gpu_arch Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
hello_world Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
hello_world_cuda Modify cmake output directory of binaries 1 year ago
hipify Updated hipify-perl's directory (#197) 5 months ago
inline_assembly Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
llvm_ir_to_executable Fix using CUID to host-only compilation 5 months ago
matrix_multiplication Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
module_api Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
moving_average Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
multi_gpu_data_transfer Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
occupancy Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
opengl_interop Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
runtime_compilation Fixed missing cuda driver dependency error. (#195) 5 months ago
saxpy Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
shared_memory Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
static_device_library Add linting action for documentation (#119) 1 year ago
static_host_library Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
streams Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
texture_management Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
vulkan_interop Re-generated VS .vcxproj and .vcxproj.filters files 7 months ago
warp_shuffle Remove use of deprecated CUDA intrinsic __shfl 7 months ago
CMakeLists.txt Add CTest module to subdirectories' CMakeLists files (#191) 5 months ago
Makefile HIP "Basic" Example Suite (part 4) (#13) 3 years ago
README.md Update README.md 5 months ago

README.md

HIP-Basic Examples

Summary

The examples in this subdirectory showcase the functionality of the HIP runtime. The examples build on Linux for the ROCm (AMD GPU) backend. Some examples additionally support Windows, some examples additionally support the CUDA (NVIDIA GPU) backend.

Prerequisites

Linux

  • CMake (at least version 3.21)
  • OR GNU Make - available via the distribution's package manager
  • ROCm (at least version 6.x.x)

Windows

  • Visual Studio 2019 or 2022 with the "Desktop Development with C++" workload
  • ROCm toolchain for Windows (No public release yet)
    • The Visual Studio ROCm extension needs to be installed to build with the solution files.
  • CMake (optional, to build with CMake. Requires at least version 3.21)
  • Ninja (optional, to build with CMake)

Building

Linux

Make sure that the dependencies are installed, or use one of the provided Dockerfiles to build and run the examples in a containerized environment.

Using CMake

All examples in the HIP-Basic subdirectory can either be built by a single CMake project or be built independently.

  • $ cd HIP-Basic
  • $ cmake -S . -B build (on ROCm) or $ cmake -S . -B build -D GPU_RUNTIME=CUDA (on CUDA, when supported)
  • $ cmake --build build

Using Make

All examples can be built by a single invocation to Make or be built independently.

  • $ cd HIP-Basic
  • $ make (on ROCm) or $ make GPU_RUNTIME=CUDA (on CUDA, when supported)

Windows

Not all HIP runtime examples support building on Windows. See the README file in the directory of the example for more details.

Visual Studio

Visual Studio solution files are available for the individual examples. To build all supported HIP runtime examples open the top level solution file ROCm-Examples-VS2019.sln and filter for HIP-Basic.

For more detailed build instructions refer to the top level README.md.

CMake

All examples in the HIP-Basic subdirectory can either be built by a single CMake project or be built independently. For build instructions refer to the top-level README.md.