From 2bf019a44f51dee4a27c6b126799fa42e688abf2 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Sat, 14 Mar 2026 02:11:10 +0000 Subject: [PATCH] gpu_stream: remove ROCm build support, require CUDA with NVML gpu_stream depends on NVML (nvidia-ml) for GPU monitoring which is NVIDIA-specific and has no ROCm equivalent. Remove the ROCm/HIP build path and skip the build cleanly when CUDA is not found. --- .../gpu_stream/CMakeLists.txt | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/superbench/benchmarks/micro_benchmarks/gpu_stream/CMakeLists.txt b/superbench/benchmarks/micro_benchmarks/gpu_stream/CMakeLists.txt index 2c856f32a..4a8eb9171 100644 --- a/superbench/benchmarks/micro_benchmarks/gpu_stream/CMakeLists.txt +++ b/superbench/benchmarks/micro_benchmarks/gpu_stream/CMakeLists.txt @@ -31,30 +31,8 @@ if(CUDAToolkit_FOUND) target_include_directories(gpu_stream PRIVATE ${CUDAToolkit_INCLUDE_DIRS}) target_link_libraries(gpu_stream numa nvidia-ml) else() - # TODO: test for ROC - # ROCm environment - include(../rocm_common.cmake) - find_package(hip QUIET) - if(hip_FOUND) - message(STATUS "Found ROCm: " ${HIP_VERSION}) - - # Convert cuda code to hip code in cpp - execute_process(COMMAND hipify-perl -print-stats -o gpu_stream.cpp ${SOURCES} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/) - - # link hip device lib - add_executable(gpu_stream gpu_stream.cpp) - - include(CheckSymbolExists) - check_symbol_exists("hipDeviceMallocUncached" "hip/hip_runtime_api.h" HIP_UNCACHED_MEMORY) - if(${HIP_UNCACHED_MEMORY}) - target_compile_definitions(gpu_stream PRIVATE HIP_UNCACHED_MEMORY) - endif() - - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") - target_link_libraries(gpu_stream numa hip::device) - else() - message(FATAL_ERROR "No CUDA or ROCm environment found.") - endif() + message(WARNING "gpu_stream: CUDA not found, skipping build (requires NVIDIA GPU with NVML)") + return() endif() install(TARGETS gpu_stream RUNTIME DESTINATION bin)