From f645865a85919c0f4ab08cdca81fc8253b874c0e Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 2 Mar 2026 13:41:21 -0500 Subject: [PATCH 01/38] remove hardcoded makefiles and add workflow testing --- .github/workflows/build-rocm-examples-reusable.yml | 6 ++++++ HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile | 2 +- .../Programming-Patterns/histogram_atomics/Makefile | 2 +- .../Programming-Patterns/image_convolution/Makefile | 2 +- HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile | 2 +- .../Programming-Patterns/matrix_multiplication/Makefile | 2 +- Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile | 2 +- Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile | 2 +- Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile | 2 +- .../MIGraphX/migraphx/custom_op_miopen_kernel/Makefile | 2 +- .../MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile | 2 +- Libraries/MIGraphX/vision/cpp_mnist/Makefile | 2 +- Libraries/MIVisionX/canny/Makefile | 2 +- Libraries/MIVisionX/mv_objdetect/Makefile | 2 +- Libraries/MIVisionX/opencv_orb/Makefile | 2 +- Libraries/RCCL/allgather/Makefile | 2 +- Libraries/RCCL/allreduce/Makefile | 2 +- Libraries/RCCL/broadcast/Makefile | 2 +- Libraries/RCCL/buffer_registration/Makefile | 2 +- Libraries/RCCL/device_api/Makefile | 2 +- Libraries/RCCL/gradient_allreduce/Makefile | 2 +- Libraries/RCCL/reduce/Makefile | 2 +- Libraries/RCCL/reducescatter/Makefile | 2 +- Libraries/RCCL/send_recv/Makefile | 2 +- Libraries/RPP/box_filter/Makefile | 2 +- Libraries/RPP/brightness/Makefile | 2 +- Libraries/RPP/contrast/Makefile | 2 +- Libraries/RPP/flip/Makefile | 2 +- Libraries/RPP/gamma_correction/Makefile | 2 +- Libraries/RPP/resize/Makefile | 2 +- Libraries/hipBLASLt/gemm_clamp_bias/Makefile | 2 +- Libraries/rocAL/basic/Makefile | 2 +- Libraries/rocAL/dataloader/Makefile | 2 +- Libraries/rocAL/image_augmentation/Makefile | 2 +- Libraries/rocAL/video/Makefile | 2 +- Libraries/rocCV/bilateral_filter/Makefile | 2 +- Libraries/rocCV/bnd_box/Makefile | 2 +- Libraries/rocCV/center_crop/Makefile | 2 +- Libraries/rocCV/composite/Makefile | 2 +- Libraries/rocCV/copy_make_border/Makefile | 2 +- Libraries/rocCV/cropandresize/Makefile | 2 +- Libraries/rocCV/custom_crop/Makefile | 2 +- Libraries/rocCV/gamma_contrast/Makefile | 2 +- Libraries/rocCV/normalize/Makefile | 2 +- Libraries/rocCV/warp_perspective/Makefile | 2 +- Libraries/rocFFT/multi_gpu/Makefile | 2 +- Libraries/rocJPEG/rocjpeg_decode/Makefile | 2 +- Libraries/rocJPEG/rocjpeg_decode_batched/Makefile | 2 +- Libraries/rocJPEG/rocjpeg_decode_perf/Makefile | 2 +- Tools/ROCgdb/Makefile | 2 +- 50 files changed, 55 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 47cdfdc8f2..4207283087 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -68,6 +68,7 @@ jobs: run: | ROCM_PATH=$(rocm-sdk path --root) echo "ROCM_PATH=${ROCM_PATH}" >> $GITHUB_ENV + echo "ROCM_INSTALL_DIR=${ROCM_PATH}" >> $GITHUB_ENV echo "HIP_PATH=${ROCM_PATH}" >> $GITHUB_ENV echo "HIP_PLATFORM=amd" >> $GITHUB_ENV echo "HIP_DEVICE_LIB_PATH=${ROCM_PATH}/lib/llvm/amdgcn/bitcode" >> $GITHUB_ENV @@ -98,6 +99,7 @@ jobs: run: | ROCM_PATH=/therock-tarball/install echo "ROCM_PATH=${ROCM_PATH}" >> $GITHUB_ENV + echo "ROCM_INSTALL_DIR=${ROCM_PATH}" >> $GITHUB_ENV echo "HIP_PATH=${ROCM_PATH}" >> $GITHUB_ENV echo "HIP_PLATFORM=amd" >> $GITHUB_ENV echo "HIP_DEVICE_LIB_PATH=${ROCM_PATH}/lib/llvm/amdgcn/bitcode" >> $GITHUB_ENV @@ -217,6 +219,10 @@ jobs: name: ctest-logs-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} path: build/Testing/Temporary/ + - name: Makefile build + run: | + make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" + - name: Clean the workspace if: always() run: find "$GITHUB_WORKSPACE" -mindepth 1 -delete diff --git a/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile index 86c8d8249f..fb703da93a 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile @@ -25,7 +25,7 @@ GRAPHGEN := graphgen GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile index f18d30eafd..2c798735fc 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_histogram_atomics GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile index 2501e77589..b893a97306 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_image_convolution GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile index 4b9de33796..be78ebad15 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_kmeans GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile index 184f6edf7f..24224e9ce2 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_matrix_multiply GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile b/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile index 5374a7e8af..0219596940 100644 --- a/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile +++ b/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile b/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile index 1b1077bdc4..3a9b2df101 100644 --- a/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile +++ b/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile b/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile index cb199d05a9..0a6af2900c 100644 --- a/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile +++ b/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile b/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile index ab9ae3dfc1..e7de8040a8 100644 --- a/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile +++ b/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile b/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile index e7e9abfc19..d57f4db005 100644 --- a/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile +++ b/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/vision/cpp_mnist/Makefile b/Libraries/MIGraphX/vision/cpp_mnist/Makefile index 817b1a4eb7..e12fc8e77f 100644 --- a/Libraries/MIGraphX/vision/cpp_mnist/Makefile +++ b/Libraries/MIGraphX/vision/cpp_mnist/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIVisionX/canny/Makefile b/Libraries/MIVisionX/canny/Makefile index 069228f79d..2267b588aa 100644 --- a/Libraries/MIVisionX/canny/Makefile +++ b/Libraries/MIVisionX/canny/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External # ROCm installation directory -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm # MIVisionX and OpenCV include directories MIVISIONX_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include/mivisionx diff --git a/Libraries/MIVisionX/mv_objdetect/Makefile b/Libraries/MIVisionX/mv_objdetect/Makefile index 7628119f04..cb22fdd892 100644 --- a/Libraries/MIVisionX/mv_objdetect/Makefile +++ b/Libraries/MIVisionX/mv_objdetect/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External # ROCm installation directory -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm # Batch size configuration (can be overridden: make BATCH_SIZE=4) BATCH_SIZE := 1 diff --git a/Libraries/MIVisionX/opencv_orb/Makefile b/Libraries/MIVisionX/opencv_orb/Makefile index 0b13afb67c..2848d8280f 100644 --- a/Libraries/MIVisionX/opencv_orb/Makefile +++ b/Libraries/MIVisionX/opencv_orb/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External # ROCm installation directory -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm # MIVisionX and OpenCV include directories MIVISIONX_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include/mivisionx diff --git a/Libraries/RCCL/allgather/Makefile b/Libraries/RCCL/allgather/Makefile index c87929faea..45f3f38b55 100644 --- a/Libraries/RCCL/allgather/Makefile +++ b/Libraries/RCCL/allgather/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/allreduce/Makefile b/Libraries/RCCL/allreduce/Makefile index 10af8260c0..93b3342899 100644 --- a/Libraries/RCCL/allreduce/Makefile +++ b/Libraries/RCCL/allreduce/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/broadcast/Makefile b/Libraries/RCCL/broadcast/Makefile index 8c84548ae5..d4397b217e 100644 --- a/Libraries/RCCL/broadcast/Makefile +++ b/Libraries/RCCL/broadcast/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/buffer_registration/Makefile b/Libraries/RCCL/buffer_registration/Makefile index 1f80328a78..fe82d4a1d2 100644 --- a/Libraries/RCCL/buffer_registration/Makefile +++ b/Libraries/RCCL/buffer_registration/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/device_api/Makefile b/Libraries/RCCL/device_api/Makefile index b0041dff12..752a2e9bb5 100644 --- a/Libraries/RCCL/device_api/Makefile +++ b/Libraries/RCCL/device_api/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/gradient_allreduce/Makefile b/Libraries/RCCL/gradient_allreduce/Makefile index 2b75db86c6..1f8cce63e9 100644 --- a/Libraries/RCCL/gradient_allreduce/Makefile +++ b/Libraries/RCCL/gradient_allreduce/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/reduce/Makefile b/Libraries/RCCL/reduce/Makefile index 51faf584f4..56a40791f8 100644 --- a/Libraries/RCCL/reduce/Makefile +++ b/Libraries/RCCL/reduce/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/reducescatter/Makefile b/Libraries/RCCL/reducescatter/Makefile index 223ec082c4..8ce5af696c 100644 --- a/Libraries/RCCL/reducescatter/Makefile +++ b/Libraries/RCCL/reducescatter/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/send_recv/Makefile b/Libraries/RCCL/send_recv/Makefile index ced19fc222..2da563bb67 100644 --- a/Libraries/RCCL/send_recv/Makefile +++ b/Libraries/RCCL/send_recv/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/box_filter/Makefile b/Libraries/RPP/box_filter/Makefile index 28459a4e7d..00fb5cc5e7 100644 --- a/Libraries/RPP/box_filter/Makefile +++ b/Libraries/RPP/box_filter/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/brightness/Makefile b/Libraries/RPP/brightness/Makefile index f651586d69..6f83583eae 100644 --- a/Libraries/RPP/brightness/Makefile +++ b/Libraries/RPP/brightness/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/contrast/Makefile b/Libraries/RPP/contrast/Makefile index bab22245e0..d277922f67 100644 --- a/Libraries/RPP/contrast/Makefile +++ b/Libraries/RPP/contrast/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/flip/Makefile b/Libraries/RPP/flip/Makefile index a198138bfc..3f51cfdd91 100644 --- a/Libraries/RPP/flip/Makefile +++ b/Libraries/RPP/flip/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/gamma_correction/Makefile b/Libraries/RPP/gamma_correction/Makefile index b1f31b40e9..a7ac06eb6f 100644 --- a/Libraries/RPP/gamma_correction/Makefile +++ b/Libraries/RPP/gamma_correction/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/resize/Makefile b/Libraries/RPP/resize/Makefile index 038e59a33a..19d2a68d1c 100644 --- a/Libraries/RPP/resize/Makefile +++ b/Libraries/RPP/resize/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_clamp_bias/Makefile b/Libraries/hipBLASLt/gemm_clamp_bias/Makefile index b680902ac6..6d966918c7 100644 --- a/Libraries/hipBLASLt/gemm_clamp_bias/Makefile +++ b/Libraries/hipBLASLt/gemm_clamp_bias/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocAL/basic/Makefile b/Libraries/rocAL/basic/Makefile index d20a6d1157..1a811b629f 100644 --- a/Libraries/rocAL/basic/Makefile +++ b/Libraries/rocAL/basic/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocAL/dataloader/Makefile b/Libraries/rocAL/dataloader/Makefile index 75c7431017..f9104cbae6 100644 --- a/Libraries/rocAL/dataloader/Makefile +++ b/Libraries/rocAL/dataloader/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocAL/image_augmentation/Makefile b/Libraries/rocAL/image_augmentation/Makefile index 08e847d0ba..063b6099cb 100644 --- a/Libraries/rocAL/image_augmentation/Makefile +++ b/Libraries/rocAL/image_augmentation/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocAL/video/Makefile b/Libraries/rocAL/video/Makefile index 414b0dad62..c29a454dd6 100644 --- a/Libraries/rocAL/video/Makefile +++ b/Libraries/rocAL/video/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocCV/bilateral_filter/Makefile b/Libraries/rocCV/bilateral_filter/Makefile index 172db1c793..16b0521d30 100644 --- a/Libraries/rocCV/bilateral_filter/Makefile +++ b/Libraries/rocCV/bilateral_filter/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/bnd_box/Makefile b/Libraries/rocCV/bnd_box/Makefile index 8c5fddb1f4..69ff742c85 100644 --- a/Libraries/rocCV/bnd_box/Makefile +++ b/Libraries/rocCV/bnd_box/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/center_crop/Makefile b/Libraries/rocCV/center_crop/Makefile index 4f0e411acd..45da94da34 100644 --- a/Libraries/rocCV/center_crop/Makefile +++ b/Libraries/rocCV/center_crop/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/composite/Makefile b/Libraries/rocCV/composite/Makefile index d740fbbc22..69184cc88f 100644 --- a/Libraries/rocCV/composite/Makefile +++ b/Libraries/rocCV/composite/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/copy_make_border/Makefile b/Libraries/rocCV/copy_make_border/Makefile index 96b4a2aba7..0f3f204b96 100644 --- a/Libraries/rocCV/copy_make_border/Makefile +++ b/Libraries/rocCV/copy_make_border/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/cropandresize/Makefile b/Libraries/rocCV/cropandresize/Makefile index 8e319c98e6..3aa2c7d32d 100644 --- a/Libraries/rocCV/cropandresize/Makefile +++ b/Libraries/rocCV/cropandresize/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/custom_crop/Makefile b/Libraries/rocCV/custom_crop/Makefile index ff36c725aa..e4a1ec24e0 100644 --- a/Libraries/rocCV/custom_crop/Makefile +++ b/Libraries/rocCV/custom_crop/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/gamma_contrast/Makefile b/Libraries/rocCV/gamma_contrast/Makefile index de414254d2..c48a948dac 100644 --- a/Libraries/rocCV/gamma_contrast/Makefile +++ b/Libraries/rocCV/gamma_contrast/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/normalize/Makefile b/Libraries/rocCV/normalize/Makefile index 0a0fd4d685..70f0266909 100644 --- a/Libraries/rocCV/normalize/Makefile +++ b/Libraries/rocCV/normalize/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/warp_perspective/Makefile b/Libraries/rocCV/warp_perspective/Makefile index 25779d31a5..542997824b 100644 --- a/Libraries/rocCV/warp_perspective/Makefile +++ b/Libraries/rocCV/warp_perspective/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocFFT/multi_gpu/Makefile b/Libraries/rocFFT/multi_gpu/Makefile index bf914cc840..d2fe816afb 100644 --- a/Libraries/rocFFT/multi_gpu/Makefile +++ b/Libraries/rocFFT/multi_gpu/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCFFT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocJPEG/rocjpeg_decode/Makefile b/Libraries/rocJPEG/rocjpeg_decode/Makefile index 1e2b5eef4f..f6af66a8f2 100644 --- a/Libraries/rocJPEG/rocjpeg_decode/Makefile +++ b/Libraries/rocJPEG/rocjpeg_decode/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCJPEG_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile b/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile index 4c1143bf0a..7a45a90f32 100644 --- a/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile +++ b/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCJPEG_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile b/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile index b16f075dec..11e10f58c5 100644 --- a/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile +++ b/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCJPEG_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Tools/ROCgdb/Makefile b/Tools/ROCgdb/Makefile index 1c27483ca4..2d725b73b2 100644 --- a/Tools/ROCgdb/Makefile +++ b/Tools/ROCgdb/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR := /opt/rocm +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc From 70cfcedb1ea4ce7f0cea34e73216a81ccd070c9b Mon Sep 17 00:00:00 2001 From: zichguan-amd Date: Tue, 3 Feb 2026 10:53:45 -0500 Subject: [PATCH 02/38] Disable MIVisionX OpenCV example Signed-off-by: zichguan-amd (cherry picked from commit b185e37f25d9ab33cdbf97ea634948ac475dfe52) --- Libraries/MIVisionX/CMakeLists.txt | 6 +++++- Libraries/MIVisionX/Makefile | 4 ++-- Libraries/MIVisionX/opencv_orb/README.md | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Libraries/MIVisionX/CMakeLists.txt b/Libraries/MIVisionX/CMakeLists.txt index 4b453b8525..eb8ebb3e59 100644 --- a/Libraries/MIVisionX/CMakeLists.txt +++ b/Libraries/MIVisionX/CMakeLists.txt @@ -58,4 +58,8 @@ endif() add_subdirectory(canny) # Disable this test until Jira ticket ROCM-1771 is resolved #add_subdirectory(mv_objdetect) -add_subdirectory(opencv_orb) + +# OpenCV support will be removed in future releases +# this example will only work on ubuntu 22.04 with MIVisionX built from source with OpenCV support +# see https://github.com/ROCm/MIVisionX/pull/1575 +# add_subdirectory(opencv_orb) diff --git a/Libraries/MIVisionX/Makefile b/Libraries/MIVisionX/Makefile index a71666407f..127284ef8b 100644 --- a/Libraries/MIVisionX/Makefile +++ b/Libraries/MIVisionX/Makefile @@ -22,8 +22,8 @@ EXAMPLES := \ canny \ - mv_objdetect \ - opencv_orb + mv_objdetect +# opencv_orb all: $(EXAMPLES) diff --git a/Libraries/MIVisionX/opencv_orb/README.md b/Libraries/MIVisionX/opencv_orb/README.md index 108ada7279..7b419c3636 100644 --- a/Libraries/MIVisionX/opencv_orb/README.md +++ b/Libraries/MIVisionX/opencv_orb/README.md @@ -1,5 +1,8 @@ # MIVisionX ORB Feature Detection +> [!WARNING] +> This example is deprecated. OpenCV support from MIVisionX will be removed in future releases, this example will only work on Ubuntu 22.04 with MIVisionX built from source with OpenCV support. For more details on how to build MIVisionX, please see https://github.com/ROCm/MIVisionX and https://github.com/ROCm/MIVisionX/pull/1575 + ## Description This example demonstrates ORB (Oriented FAST and Rotated BRIEF) feature detection using OpenVX with OpenCV extensions. The example processes images or live camera feeds to detect and extract keypoint features, which are useful for object recognition, image matching, and tracking applications. From 4a471ca9c2afcea540616f4cd5ea4e4df62e401a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Mar 2026 21:30:25 +0000 Subject: [PATCH 03/38] Fix Makefile build step: correct GPU arch flag and add cancelled guard - Replace HIP_ARCHITECTURES (unused by individual example Makefiles) with CXXFLAGS="--offload-arch=..." which is how hipcc receives the target arch - Add if: cancelled guard so Makefile build runs even when ctest fails, preventing test failures from masking Makefile build results Co-Authored-By: Claude Opus 4.6 --- .github/workflows/build-rocm-examples-reusable.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 4207283087..e78b86ea4e 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -220,8 +220,9 @@ jobs: path: build/Testing/Temporary/ - name: Makefile build + if: ${{ !cancelled() }} run: | - make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" + make -j ROCM_INSTALL_DIR="${ROCM_PATH}" CXXFLAGS="--offload-arch=${{ matrix.gpu_config.gpu_target }}" - name: Clean the workspace if: always() From 36dc947ce562c986fac679338c8c2e739f9fbd9e Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 10 Mar 2026 15:43:02 +0000 Subject: [PATCH 04/38] Use ROCM_PATH env variable for Makefile ROCm install directory Replace hardcoded `ROCM_INSTALL_DIR ?= /opt/rocm` with `ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm)` across all 378 leaf Makefiles. This allows TheRock CI to set ROCM_PATH in the environment while preserving /opt/rocm as the default fallback. Co-Authored-By: Claude Opus 4.6 --- Applications/bitonic_sort/Makefile | 2 +- Applications/convolution/Makefile | 2 +- Applications/fdtd/Makefile | 2 +- Applications/floyd_warshall/Makefile | 2 +- Applications/histogram/Makefile | 2 +- Applications/monte_carlo_pi/Makefile | 2 +- Applications/prefix_sum/Makefile | 2 +- Applications/sobel_filter/Makefile | 2 +- HIP-Basic/assembly_to_executable/Makefile | 2 +- HIP-Basic/bandwidth/Makefile | 2 +- HIP-Basic/bit_extract/Makefile | 2 +- HIP-Basic/cooperative_groups/Makefile | 2 +- HIP-Basic/device_globals/Makefile | 2 +- HIP-Basic/device_query/Makefile | 2 +- HIP-Basic/dynamic_shared/Makefile | 2 +- HIP-Basic/events/Makefile | 2 +- HIP-Basic/gpu_arch/Makefile | 2 +- HIP-Basic/hello_world/Makefile | 2 +- HIP-Basic/hipify/Makefile | 2 +- HIP-Basic/inline_assembly/Makefile | 2 +- HIP-Basic/llvm_ir_to_executable/Makefile | 2 +- HIP-Basic/matrix_multiplication/Makefile | 2 +- HIP-Basic/module_api/Makefile | 2 +- HIP-Basic/moving_average/Makefile | 2 +- HIP-Basic/multi_gpu_data_transfer/Makefile | 2 +- HIP-Basic/occupancy/Makefile | 2 +- HIP-Basic/opengl_interop/Makefile | 2 +- HIP-Basic/runtime_compilation/Makefile | 2 +- HIP-Basic/saxpy/Makefile | 2 +- HIP-Basic/shared_memory/Makefile | 2 +- HIP-Basic/static_device_library/Makefile | 2 +- HIP-Basic/static_host_library/Makefile | 2 +- HIP-Basic/streams/Makefile | 2 +- HIP-Basic/texture_management/Makefile | 2 +- HIP-Basic/vulkan_interop/Makefile | 2 +- HIP-Basic/warp_shuffle/Makefile | 2 +- .../calling_global_functions/Makefile | 2 +- .../HIP-C++-Language-Extensions/extern_shared_memory/Makefile | 2 +- .../HIP-C++-Language-Extensions/launch_bounds/Makefile | 2 +- .../HIP-C++-Language-Extensions/set_constant_memory/Makefile | 2 +- .../template_warp_size_reduction/Makefile | 2 +- .../HIP-C++-Language-Extensions/timer/Makefile | 2 +- .../HIP-C++-Language-Extensions/warp_size_reduction/Makefile | 2 +- .../add_kernel/Makefile | 2 +- .../Porting-CUDA-code-to-HIP/address_retrieval/Makefile | 2 +- .../device_code_feature_identification/Makefile | 2 +- .../host_code_feature_identification/Makefile | 2 +- .../identifying_compilation_target_platform/Makefile | 2 +- .../identifying_host_device_compilation_pass/Makefile | 2 +- .../Porting-CUDA-code-to-HIP/load_module/Makefile | 2 +- .../Porting-CUDA-code-to-HIP/load_module_ex/Makefile | 2 +- .../Porting-CUDA-code-to-HIP/load_module_ex_cuda/Makefile | 2 +- .../Porting-CUDA-code-to-HIP/per_thread_default_stream/Makefile | 2 +- .../Porting-CUDA-code-to-HIP/pointer_memory_type/Makefile | 2 +- .../compilation_apis/Makefile | 2 +- .../Programming-for-HIP-Runtime-Compiler/linker_apis/Makefile | 2 +- .../linker_apis_file/Makefile | 2 +- .../linker_apis_options/Makefile | 2 +- .../Programming-for-HIP-Runtime-Compiler/lowered_names/Makefile | 2 +- .../rtc_error_handling/Makefile | 2 +- .../async_kernel_execution/Makefile | 2 +- .../event_based_synchronization/Makefile | 2 +- .../sequential_kernel_execution/Makefile | 2 +- .../Call-Stack/call_stack_management/Makefile | 2 +- .../Using-HIP-Runtime-API/Call-Stack/device_recursion/Makefile | 2 +- .../Error-Handling/error_handling/Makefile | 2 +- .../Using-HIP-Runtime-API/HIP-Graphs/graph_capture/Makefile | 2 +- .../Using-HIP-Runtime-API/HIP-Graphs/graph_creation/Makefile | 2 +- .../Initialization/simple_device_query/Makefile | 2 +- .../Memory-Management/Device-Memory/constant_memory/Makefile | 2 +- .../Device-Memory/dynamic_shared_memory/Makefile | 2 +- .../Memory-Management/Device-Memory/explicit_copy/Makefile | 2 +- .../Device-Memory/kernel_memory_allocation/Makefile | 2 +- .../Device-Memory/static_shared_memory/Makefile | 2 +- .../Memory-Management/Host-Memory/pageable_host_memory/Makefile | 2 +- .../Memory-Management/Host-Memory/pinned_host_memory/Makefile | 2 +- .../Memory-Management/SOMA/memory_pool/Makefile | 2 +- .../SOMA/memory_pool_resource_usage_statistics/Makefile | 2 +- .../Memory-Management/SOMA/memory_pool_threshold/Makefile | 2 +- .../Memory-Management/SOMA/memory_pool_trim/Makefile | 2 +- .../Memory-Management/SOMA/ordinary_memory_allocation/Makefile | 2 +- .../SOMA/stream_ordered_memory_allocation/Makefile | 2 +- .../Unified-Memory-Management/data_prefetching/Makefile | 2 +- .../Unified-Memory-Management/dynamic_unified_memory/Makefile | 2 +- .../Unified-Memory-Management/explicit_memory/Makefile | 2 +- .../Unified-Memory-Management/memory_range_attributes/Makefile | 2 +- .../Unified-Memory-Management/standard_unified_memory/Makefile | 2 +- .../Unified-Memory-Management/static_unified_memory/Makefile | 2 +- .../Unified-Memory-Management/unified_memory_advice/Makefile | 2 +- .../Virtual-Memory-Management/virtual_memory/Makefile | 2 +- .../Multi-Device-Management/device_enumeration/Makefile | 2 +- .../Multi-Device-Management/device_selection/Makefile | 2 +- .../multi_device_synchronization/Makefile | 2 +- .../Multi-Device-Management/p2p_memory_access/Makefile | 2 +- .../p2p_memory_access_host_staging/Makefile | 2 +- .../block_reduction/Makefile | 2 +- HIP-Doc/Reference/HIP-Complex-Math-API/complex_math/Makefile | 2 +- HIP-Doc/Reference/HIP-Math-API/math/Makefile | 2 +- .../low_precision_float_fp16/Makefile | 2 +- .../low_precision_float_fp8/Makefile | 2 +- HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile | 2 +- .../Tutorials/Programming-Patterns/histogram_atomics/Makefile | 2 +- .../Tutorials/Programming-Patterns/image_convolution/Makefile | 2 +- HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile | 2 +- .../Programming-Patterns/matrix_multiplication/Makefile | 2 +- Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile | 2 +- Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile | 2 +- Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile | 2 +- Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile | 2 +- Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile | 2 +- Libraries/MIGraphX/vision/cpp_mnist/Makefile | 2 +- Libraries/MIVisionX/canny/Makefile | 2 +- Libraries/MIVisionX/mv_objdetect/Makefile | 2 +- Libraries/MIVisionX/opencv_orb/Makefile | 2 +- Libraries/RCCL/allgather/Makefile | 2 +- Libraries/RCCL/allreduce/Makefile | 2 +- Libraries/RCCL/broadcast/Makefile | 2 +- Libraries/RCCL/buffer_registration/Makefile | 2 +- Libraries/RCCL/device_api/Makefile | 2 +- Libraries/RCCL/gradient_allreduce/Makefile | 2 +- Libraries/RCCL/reduce/Makefile | 2 +- Libraries/RCCL/reducescatter/Makefile | 2 +- Libraries/RCCL/send_recv/Makefile | 2 +- Libraries/RPP/box_filter/Makefile | 2 +- Libraries/RPP/brightness/Makefile | 2 +- Libraries/RPP/contrast/Makefile | 2 +- Libraries/RPP/flip/Makefile | 2 +- Libraries/RPP/gamma_correction/Makefile | 2 +- Libraries/RPP/resize/Makefile | 2 +- Libraries/hipBLAS/gemm_strided_batched/Makefile | 2 +- Libraries/hipBLAS/her/Makefile | 2 +- Libraries/hipBLAS/scal/Makefile | 2 +- Libraries/hipBLASLt/ext_op_amax/Makefile | 2 +- Libraries/hipBLASLt/ext_op_layernorm/Makefile | 2 +- Libraries/hipBLASLt/gemm/Makefile | 2 +- Libraries/hipBLASLt/gemm_alphavec_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_amax/Makefile | 2 +- Libraries/hipBLASLt/gemm_amax_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_amax_with_scale/Makefile | 2 +- Libraries/hipBLASLt/gemm_amax_with_scale_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_attr_tciA_tciB/Makefile | 2 +- Libraries/hipBLASLt/gemm_batched/Makefile | 2 +- Libraries/hipBLASLt/gemm_batched_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_bgradb/Makefile | 2 +- Libraries/hipBLASLt/gemm_bias/Makefile | 2 +- Libraries/hipBLASLt/gemm_bias_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_bias_swizzle_a_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_clamp_bias/Makefile | 2 +- Libraries/hipBLASLt/gemm_dgelu_bgradb/Makefile | 2 +- Libraries/hipBLASLt/gemm_dgelu_bgradb_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_ext_bgradb/Makefile | 2 +- Libraries/hipBLASLt/gemm_gelu_aux_bias/Makefile | 2 +- Libraries/hipBLASLt/gemm_gelu_aux_bias_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_get_algo_by_index_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_get_all_algos/Makefile | 2 +- Libraries/hipBLASLt/gemm_get_all_algos_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_is_tuned_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_mix_precision/Makefile | 2 +- Libraries/hipBLASLt/gemm_mix_precision_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_mix_precision_with_amax_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_swish_bias/Makefile | 2 +- Libraries/hipBLASLt/gemm_swizzle_a/Makefile | 2 +- Libraries/hipBLASLt/gemm_swizzle_b/Makefile | 2 +- Libraries/hipBLASLt/gemm_tuning_splitk_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_tuning_wgm_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_with_TF32/Makefile | 2 +- Libraries/hipBLASLt/gemm_with_scale_a_b/Makefile | 2 +- Libraries/hipBLASLt/gemm_with_scale_a_b_ext/Makefile | 2 +- Libraries/hipBLASLt/gemm_with_scale_a_b_vector/Makefile | 2 +- Libraries/hipBLASLt/groupedgemm_ext/Makefile | 2 +- Libraries/hipBLASLt/groupedgemm_fixed_mk_ext/Makefile | 2 +- Libraries/hipBLASLt/groupedgemm_get_all_algos_ext/Makefile | 2 +- Libraries/hipBLASLt/weight_swizzle_padding/Makefile | 2 +- Libraries/hipCUB/device_radix_sort/Makefile | 2 +- Libraries/hipCUB/device_sum/Makefile | 2 +- Libraries/hipFFT/callback/Makefile | 2 +- Libraries/hipFFT/multi_gpu/Makefile | 2 +- Libraries/hipFFT/plan_d2z/Makefile | 2 +- Libraries/hipFFT/plan_many_2d_r2c/Makefile | 2 +- Libraries/hipFFT/plan_many_2d_z2z/Makefile | 2 +- Libraries/hipFFT/plan_z2z/Makefile | 2 +- Libraries/hipFFT/setworkarea/Makefile | 2 +- Libraries/hipRAND/c_cpp_api/simple_distributions_cpp/Makefile | 2 +- Libraries/hipRAND/device_api/pseudorandom_generations/Makefile | 2 +- Libraries/hipRAND/device_api/quasirandom_generations/Makefile | 2 +- Libraries/hipSOLVER/gels/Makefile | 2 +- Libraries/hipSOLVER/geqrf/Makefile | 2 +- Libraries/hipSOLVER/gesvd/Makefile | 2 +- Libraries/hipSOLVER/getrf/Makefile | 2 +- Libraries/hipSOLVER/potrf/Makefile | 2 +- Libraries/hipSOLVER/syevd/Makefile | 2 +- Libraries/hipSOLVER/syevdx/Makefile | 2 +- Libraries/hipSOLVER/syevj/Makefile | 2 +- Libraries/hipSOLVER/syevj_batched/Makefile | 2 +- Libraries/hipSOLVER/sygvd/Makefile | 2 +- Libraries/hipSOLVER/sygvj/Makefile | 2 +- Libraries/hipSPARSE/axpyi/Makefile | 2 +- Libraries/hipSPARSE/csrmv/Makefile | 2 +- Libraries/hipSPARSE/handle/Makefile | 2 +- Libraries/hipSPARSE/hybmv/Makefile | 2 +- Libraries/hipSPARSELt/spmm/Makefile | 2 +- Libraries/hipSPARSELt/spmm_advanced/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/bf16_f32/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/cf32_cf32/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/f16_f32/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/f32_bf16/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/f32_f16/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/f32_f32/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/f64_f32/Makefile | 2 +- Libraries/hipTensor/contraction/bilinear/f64_f64/Makefile | 2 +- Libraries/hipTensor/contraction/scale/bf16_f32/Makefile | 2 +- Libraries/hipTensor/contraction/scale/cf32_cf32/Makefile | 2 +- Libraries/hipTensor/contraction/scale/f16_f32/Makefile | 2 +- Libraries/hipTensor/contraction/scale/f32_bf16/Makefile | 2 +- Libraries/hipTensor/contraction/scale/f32_f16/Makefile | 2 +- Libraries/hipTensor/contraction/scale/f32_f32/Makefile | 2 +- Libraries/hipTensor/contraction/scale/f64_f32/Makefile | 2 +- Libraries/hipTensor/contraction/scale/f64_f64/Makefile | 2 +- Libraries/hipTensor/elementwise/binary/Makefile | 2 +- Libraries/hipTensor/elementwise/permute/Makefile | 2 +- Libraries/hipTensor/elementwise/trinary/Makefile | 2 +- Libraries/hipTensor/reduction/Makefile | 2 +- Libraries/rocAL/basic/Makefile | 2 +- Libraries/rocAL/dataloader/Makefile | 2 +- Libraries/rocAL/image_augmentation/Makefile | 2 +- Libraries/rocAL/video/Makefile | 2 +- Libraries/rocALUTION/amg/Makefile | 2 +- Libraries/rocALUTION/as_precond/Makefile | 2 +- Libraries/rocALUTION/async/Makefile | 2 +- Libraries/rocALUTION/benchmark/Makefile | 2 +- Libraries/rocALUTION/bicgstab/Makefile | 2 +- Libraries/rocALUTION/block_precond/Makefile | 2 +- Libraries/rocALUTION/cg/Makefile | 2 +- Libraries/rocALUTION/cg_amg/Makefile | 2 +- Libraries/rocALUTION/cg_rsamg/Makefile | 2 +- Libraries/rocALUTION/cg_saamg/Makefile | 2 +- Libraries/rocALUTION/cmk/Makefile | 2 +- Libraries/rocALUTION/complex/Makefile | 2 +- Libraries/rocALUTION/direct/Makefile | 2 +- Libraries/rocALUTION/fcg/Makefile | 2 +- Libraries/rocALUTION/fgmres/Makefile | 2 +- Libraries/rocALUTION/fixed_point/Makefile | 2 +- Libraries/rocALUTION/gmres/Makefile | 2 +- Libraries/rocALUTION/idr/Makefile | 2 +- Libraries/rocALUTION/itsolve/Makefile | 2 +- Libraries/rocALUTION/key/Makefile | 2 +- Libraries/rocALUTION/me_preconditioner/Makefile | 2 +- Libraries/rocALUTION/mixed_precision/Makefile | 2 +- Libraries/rocALUTION/power_method/Makefile | 2 +- Libraries/rocALUTION/sa_amg/Makefile | 2 +- Libraries/rocALUTION/simple_spmv/Makefile | 2 +- Libraries/rocALUTION/stencil/Makefile | 2 +- Libraries/rocALUTION/tns/Makefile | 2 +- Libraries/rocALUTION/ua_amg/Makefile | 2 +- Libraries/rocALUTION/var_precond/Makefile | 2 +- Libraries/rocBLAS/level_1/axpy/Makefile | 2 +- Libraries/rocBLAS/level_1/dot/Makefile | 2 +- Libraries/rocBLAS/level_1/nrm2/Makefile | 2 +- Libraries/rocBLAS/level_1/scal/Makefile | 2 +- Libraries/rocBLAS/level_1/swap/Makefile | 2 +- Libraries/rocBLAS/level_2/gemv/Makefile | 2 +- Libraries/rocBLAS/level_2/her/Makefile | 2 +- Libraries/rocBLAS/level_3/gemm/Makefile | 2 +- Libraries/rocBLAS/level_3/gemm_strided_batched/Makefile | 2 +- Libraries/rocCV/bilateral_filter/Makefile | 2 +- Libraries/rocCV/bnd_box/Makefile | 2 +- Libraries/rocCV/center_crop/Makefile | 2 +- Libraries/rocCV/composite/Makefile | 2 +- Libraries/rocCV/copy_make_border/Makefile | 2 +- Libraries/rocCV/cropandresize/Makefile | 2 +- Libraries/rocCV/custom_crop/Makefile | 2 +- Libraries/rocCV/gamma_contrast/Makefile | 2 +- Libraries/rocCV/normalize/Makefile | 2 +- Libraries/rocCV/warp_perspective/Makefile | 2 +- Libraries/rocDecode/rocdec_decode/Makefile | 2 +- Libraries/rocDecode/video_decode/Makefile | 2 +- Libraries/rocDecode/video_decode_batch/Makefile | 2 +- Libraries/rocDecode/video_decode_mem/Makefile | 2 +- Libraries/rocDecode/video_decode_multi_files/Makefile | 2 +- Libraries/rocDecode/video_decode_perf/Makefile | 2 +- Libraries/rocDecode/video_decode_pic_files/Makefile | 2 +- Libraries/rocDecode/video_decode_raw/Makefile | 2 +- Libraries/rocDecode/video_decode_rgb/Makefile | 2 +- Libraries/rocDecode/video_to_sequence/Makefile | 2 +- Libraries/rocFFT/Makefile | 2 +- Libraries/rocFFT/callback/Makefile | 2 +- Libraries/rocFFT/complex_complex/Makefile | 2 +- Libraries/rocFFT/complex_real/Makefile | 2 +- Libraries/rocFFT/multi_gpu/Makefile | 2 +- Libraries/rocFFT/real_complex/Makefile | 2 +- Libraries/rocJPEG/rocjpeg_decode/Makefile | 2 +- Libraries/rocJPEG/rocjpeg_decode_batched/Makefile | 2 +- Libraries/rocJPEG/rocjpeg_decode_perf/Makefile | 2 +- Libraries/rocPRIM/block_sum/Makefile | 2 +- Libraries/rocPRIM/device_sum/Makefile | 2 +- Libraries/rocProfiler-SDK/api_buffered_tracing/Makefile | 2 +- Libraries/rocProfiler-SDK/api_callback_tracing/Makefile | 2 +- Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile | 2 +- Libraries/rocProfiler-SDK/code_object_tracing/Makefile | 2 +- Libraries/rocProfiler-SDK/counter_collection/buffer/Makefile | 2 +- .../counter_collection/buffer_device_serialization/Makefile | 2 +- Libraries/rocProfiler-SDK/counter_collection/callback/Makefile | 2 +- .../counter_collection/device_profiling/Makefile | 2 +- .../counter_collection/device_profiling_sync/Makefile | 2 +- .../counter_collection/print_functional_counters/Makefile | 2 +- .../rocProfiler-SDK/external_correlation_id_request/Makefile | 2 +- Libraries/rocProfiler-SDK/intercept_table/Makefile | 2 +- Libraries/rocProfiler-SDK/openmp_target/Makefile | 2 +- Libraries/rocProfiler-SDK/pc_sampling/Makefile | 2 +- Libraries/rocProfiler-SDK/thread_trace/Makefile | 2 +- Libraries/rocRAND/c_cpp_api/simple_distributions_cpp/Makefile | 2 +- Libraries/rocRAND/device_api/pseudorandom_generations/Makefile | 2 +- Libraries/rocRAND/device_api/quasirandom_generations/Makefile | 2 +- Libraries/rocSOLVER/getf2/Makefile | 2 +- Libraries/rocSOLVER/getri/Makefile | 2 +- Libraries/rocSOLVER/syev/Makefile | 2 +- Libraries/rocSOLVER/syev_batched/Makefile | 2 +- Libraries/rocSOLVER/syev_strided_batched/Makefile | 2 +- Libraries/rocSPARSE/level_1/axpyi/Makefile | 2 +- Libraries/rocSPARSE/level_1/doti/Makefile | 2 +- Libraries/rocSPARSE/level_1/gthr/Makefile | 2 +- Libraries/rocSPARSE/level_1/roti/Makefile | 2 +- Libraries/rocSPARSE/level_1/sctr/Makefile | 2 +- Libraries/rocSPARSE/level_2/bsrmv/Makefile | 2 +- Libraries/rocSPARSE/level_2/bsrsv/Makefile | 2 +- Libraries/rocSPARSE/level_2/bsrxmv/Makefile | 2 +- Libraries/rocSPARSE/level_2/coomv/Makefile | 2 +- Libraries/rocSPARSE/level_2/csritsv/Makefile | 2 +- Libraries/rocSPARSE/level_2/csrmv/Makefile | 2 +- Libraries/rocSPARSE/level_2/csrsv/Makefile | 2 +- Libraries/rocSPARSE/level_2/ellmv/Makefile | 2 +- Libraries/rocSPARSE/level_2/gebsrmv/Makefile | 2 +- Libraries/rocSPARSE/level_2/gemvi/Makefile | 2 +- Libraries/rocSPARSE/level_2/spitsv/Makefile | 2 +- Libraries/rocSPARSE/level_2/spmv/Makefile | 2 +- Libraries/rocSPARSE/level_2/spsv/Makefile | 2 +- Libraries/rocSPARSE/level_3/bsrmm/Makefile | 2 +- Libraries/rocSPARSE/level_3/bsrsm/Makefile | 2 +- Libraries/rocSPARSE/level_3/csrmm/Makefile | 2 +- Libraries/rocSPARSE/level_3/csrsm/Makefile | 2 +- Libraries/rocSPARSE/level_3/gebsrmm/Makefile | 2 +- Libraries/rocSPARSE/level_3/gemmi/Makefile | 2 +- Libraries/rocSPARSE/level_3/sddmm/Makefile | 2 +- Libraries/rocSPARSE/level_3/spmm/Makefile | 2 +- Libraries/rocSPARSE/level_3/spsm/Makefile | 2 +- Libraries/rocSPARSE/preconditioner/bsric0/Makefile | 2 +- Libraries/rocSPARSE/preconditioner/bsrilu0/Makefile | 2 +- Libraries/rocSPARSE/preconditioner/csric0/Makefile | 2 +- Libraries/rocSPARSE/preconditioner/csrilu0/Makefile | 2 +- Libraries/rocSPARSE/preconditioner/csritilu0/Makefile | 2 +- Libraries/rocSPARSE/preconditioner/gpsv/Makefile | 2 +- Libraries/rocSPARSE/preconditioner/gtsv/Makefile | 2 +- Libraries/rocThrust/device_ptr/Makefile | 2 +- Libraries/rocThrust/norm/Makefile | 2 +- Libraries/rocThrust/reduce_sum/Makefile | 2 +- Libraries/rocThrust/remove_points/Makefile | 2 +- Libraries/rocThrust/saxpy/Makefile | 2 +- Libraries/rocThrust/vectors/Makefile | 2 +- Libraries/rocWMMA/hiprtc_gemm/Makefile | 2 +- Libraries/rocWMMA/perf_dgemm/Makefile | 2 +- Libraries/rocWMMA/perf_hgemm/Makefile | 2 +- Libraries/rocWMMA/perf_i8gemm/Makefile | 2 +- Libraries/rocWMMA/perf_sgemm/Makefile | 2 +- Libraries/rocWMMA/simple_dgemm/Makefile | 2 +- Libraries/rocWMMA/simple_dgemv/Makefile | 2 +- Libraries/rocWMMA/simple_dlrm/Makefile | 2 +- Libraries/rocWMMA/simple_hgemm/Makefile | 2 +- Libraries/rocWMMA/simple_sgemm/Makefile | 2 +- Libraries/rocWMMA/simple_sgemv/Makefile | 2 +- .../basic_image_gamma_correction/Makefile | 2 +- .../grid_stride_image_gamma_correction/Makefile | 2 +- .../Performance-Optimization/tiling_matrix_multiply/Makefile | 2 +- .../Performance-Optimization/tiling_matrix_transpose/Makefile | 2 +- Tools/ROCgdb/Makefile | 2 +- Tools/rocprof-compute/Makefile | 2 +- Tools/rocprof-systems/Makefile | 2 +- Tools/rocprofv3/Makefile | 2 +- 378 files changed, 378 insertions(+), 378 deletions(-) diff --git a/Applications/bitonic_sort/Makefile b/Applications/bitonic_sort/Makefile index bac31b5d6a..555b1d4b43 100644 --- a/Applications/bitonic_sort/Makefile +++ b/Applications/bitonic_sort/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Applications/convolution/Makefile b/Applications/convolution/Makefile index 480e0e7c92..8f61002bae 100644 --- a/Applications/convolution/Makefile +++ b/Applications/convolution/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Applications/fdtd/Makefile b/Applications/fdtd/Makefile index da1e6c75dd..357f489405 100644 --- a/Applications/fdtd/Makefile +++ b/Applications/fdtd/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Applications/floyd_warshall/Makefile b/Applications/floyd_warshall/Makefile index 4f31dc93b6..53cd48bf0e 100644 --- a/Applications/floyd_warshall/Makefile +++ b/Applications/floyd_warshall/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Applications/histogram/Makefile b/Applications/histogram/Makefile index 1db9adfb43..3db8867b87 100644 --- a/Applications/histogram/Makefile +++ b/Applications/histogram/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Applications/monte_carlo_pi/Makefile b/Applications/monte_carlo_pi/Makefile index eb259f86f2..5ead86e0d1 100644 --- a/Applications/monte_carlo_pi/Makefile +++ b/Applications/monte_carlo_pi/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Applications/prefix_sum/Makefile b/Applications/prefix_sum/Makefile index c5f200e68c..eee1fbe126 100644 --- a/Applications/prefix_sum/Makefile +++ b/Applications/prefix_sum/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Applications/sobel_filter/Makefile b/Applications/sobel_filter/Makefile index a4ca5c0ca5..0205fdb0ee 100644 --- a/Applications/sobel_filter/Makefile +++ b/Applications/sobel_filter/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/assembly_to_executable/Makefile b/HIP-Basic/assembly_to_executable/Makefile index 1b4b8a7c18..ce803aaddd 100644 --- a/HIP-Basic/assembly_to_executable/Makefile +++ b/HIP-Basic/assembly_to_executable/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/bandwidth/Makefile b/HIP-Basic/bandwidth/Makefile index 46321e780b..549512fa5e 100644 --- a/HIP-Basic/bandwidth/Makefile +++ b/HIP-Basic/bandwidth/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/bit_extract/Makefile b/HIP-Basic/bit_extract/Makefile index 89570ca3a6..ced26ab891 100644 --- a/HIP-Basic/bit_extract/Makefile +++ b/HIP-Basic/bit_extract/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/cooperative_groups/Makefile b/HIP-Basic/cooperative_groups/Makefile index 4b2634d3a5..e7a9d3f9c3 100644 --- a/HIP-Basic/cooperative_groups/Makefile +++ b/HIP-Basic/cooperative_groups/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/device_globals/Makefile b/HIP-Basic/device_globals/Makefile index 842f90817b..bfedd8f38c 100644 --- a/HIP-Basic/device_globals/Makefile +++ b/HIP-Basic/device_globals/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/device_query/Makefile b/HIP-Basic/device_query/Makefile index 2af0d59e50..408e4063c3 100644 --- a/HIP-Basic/device_query/Makefile +++ b/HIP-Basic/device_query/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/dynamic_shared/Makefile b/HIP-Basic/dynamic_shared/Makefile index 267f33bbac..9ea0a57364 100644 --- a/HIP-Basic/dynamic_shared/Makefile +++ b/HIP-Basic/dynamic_shared/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/events/Makefile b/HIP-Basic/events/Makefile index 934a566e15..aef65d01ea 100644 --- a/HIP-Basic/events/Makefile +++ b/HIP-Basic/events/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/gpu_arch/Makefile b/HIP-Basic/gpu_arch/Makefile index c3017f5a10..7c7aeb83c2 100644 --- a/HIP-Basic/gpu_arch/Makefile +++ b/HIP-Basic/gpu_arch/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/hello_world/Makefile b/HIP-Basic/hello_world/Makefile index 5e78036fca..26cd5ca0ae 100644 --- a/HIP-Basic/hello_world/Makefile +++ b/HIP-Basic/hello_world/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/hipify/Makefile b/HIP-Basic/hipify/Makefile index ea61e62d89..ac5b019617 100644 --- a/HIP-Basic/hipify/Makefile +++ b/HIP-Basic/hipify/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_hipify GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/inline_assembly/Makefile b/HIP-Basic/inline_assembly/Makefile index 6d03c4342a..297dc042d0 100644 --- a/HIP-Basic/inline_assembly/Makefile +++ b/HIP-Basic/inline_assembly/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/llvm_ir_to_executable/Makefile b/HIP-Basic/llvm_ir_to_executable/Makefile index 96914c46d9..2ff02ba629 100644 --- a/HIP-Basic/llvm_ir_to_executable/Makefile +++ b/HIP-Basic/llvm_ir_to_executable/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/matrix_multiplication/Makefile b/HIP-Basic/matrix_multiplication/Makefile index 131e17691f..251231bf13 100644 --- a/HIP-Basic/matrix_multiplication/Makefile +++ b/HIP-Basic/matrix_multiplication/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/module_api/Makefile b/HIP-Basic/module_api/Makefile index 6d0e3d6853..4236dcb17b 100644 --- a/HIP-Basic/module_api/Makefile +++ b/HIP-Basic/module_api/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/moving_average/Makefile b/HIP-Basic/moving_average/Makefile index 5b3ecdb51b..6cc909f0ff 100644 --- a/HIP-Basic/moving_average/Makefile +++ b/HIP-Basic/moving_average/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/multi_gpu_data_transfer/Makefile b/HIP-Basic/multi_gpu_data_transfer/Makefile index 197d9861e5..1e0a911a66 100644 --- a/HIP-Basic/multi_gpu_data_transfer/Makefile +++ b/HIP-Basic/multi_gpu_data_transfer/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/occupancy/Makefile b/HIP-Basic/occupancy/Makefile index 864868841d..932c994dc7 100644 --- a/HIP-Basic/occupancy/Makefile +++ b/HIP-Basic/occupancy/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/opengl_interop/Makefile b/HIP-Basic/opengl_interop/Makefile index 1643f092bf..a8a76681c2 100644 --- a/HIP-Basic/opengl_interop/Makefile +++ b/HIP-Basic/opengl_interop/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/runtime_compilation/Makefile b/HIP-Basic/runtime_compilation/Makefile index 222bddc129..32ca4289cf 100644 --- a/HIP-Basic/runtime_compilation/Makefile +++ b/HIP-Basic/runtime_compilation/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/saxpy/Makefile b/HIP-Basic/saxpy/Makefile index 7a52b3b201..683a7b5a8c 100644 --- a/HIP-Basic/saxpy/Makefile +++ b/HIP-Basic/saxpy/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/shared_memory/Makefile b/HIP-Basic/shared_memory/Makefile index d557d1c3f9..4c046da150 100644 --- a/HIP-Basic/shared_memory/Makefile +++ b/HIP-Basic/shared_memory/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/static_device_library/Makefile b/HIP-Basic/static_device_library/Makefile index 618236c6ca..fe14521aac 100644 --- a/HIP-Basic/static_device_library/Makefile +++ b/HIP-Basic/static_device_library/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/static_host_library/Makefile b/HIP-Basic/static_host_library/Makefile index 6e9e00144d..50603bc079 100644 --- a/HIP-Basic/static_host_library/Makefile +++ b/HIP-Basic/static_host_library/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/HIP-Basic/streams/Makefile b/HIP-Basic/streams/Makefile index 879e0e2ccb..f283ce0170 100644 --- a/HIP-Basic/streams/Makefile +++ b/HIP-Basic/streams/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/texture_management/Makefile b/HIP-Basic/texture_management/Makefile index 8e2765bd1f..f61d2f4230 100644 --- a/HIP-Basic/texture_management/Makefile +++ b/HIP-Basic/texture_management/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Basic/vulkan_interop/Makefile b/HIP-Basic/vulkan_interop/Makefile index d80c1d9c7a..e5b94a81ee 100644 --- a/HIP-Basic/vulkan_interop/Makefile +++ b/HIP-Basic/vulkan_interop/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/HIP-Basic/warp_shuffle/Makefile b/HIP-Basic/warp_shuffle/Makefile index 890db9bcee..d52484fa47 100644 --- a/HIP-Basic/warp_shuffle/Makefile +++ b/HIP-Basic/warp_shuffle/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/calling_global_functions/Makefile b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/calling_global_functions/Makefile index cf306747d0..b5c4cfcc91 100644 --- a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/calling_global_functions/Makefile +++ b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/calling_global_functions/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_calling_global_functions GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/extern_shared_memory/Makefile b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/extern_shared_memory/Makefile index 9a077de916..65deced323 100644 --- a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/extern_shared_memory/Makefile +++ b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/extern_shared_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_extern_shared_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/launch_bounds/Makefile b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/launch_bounds/Makefile index e40c49c4ed..813ec8f95a 100644 --- a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/launch_bounds/Makefile +++ b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/launch_bounds/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_launch_bounds GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/set_constant_memory/Makefile b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/set_constant_memory/Makefile index af53b7d343..22728efdf3 100644 --- a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/set_constant_memory/Makefile +++ b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/set_constant_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_set_constant_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/template_warp_size_reduction/Makefile b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/template_warp_size_reduction/Makefile index 1a9cb2818e..0cd9d811eb 100644 --- a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/template_warp_size_reduction/Makefile +++ b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/template_warp_size_reduction/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_template_warp_size_reduction GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/timer/Makefile b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/timer/Makefile index 3557e6368d..fd91a3473a 100644 --- a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/timer/Makefile +++ b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/timer/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_timer GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/warp_size_reduction/Makefile b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/warp_size_reduction/Makefile index f22fdf5cbc..5f67c77f74 100644 --- a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/warp_size_reduction/Makefile +++ b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/warp_size_reduction/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_warp_size_reduction GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Introduction-to-the-HIP-Programming-Model/add_kernel/Makefile b/HIP-Doc/Programming-Guide/Introduction-to-the-HIP-Programming-Model/add_kernel/Makefile index e2c710d331..f0f6c94755 100644 --- a/HIP-Doc/Programming-Guide/Introduction-to-the-HIP-Programming-Model/add_kernel/Makefile +++ b/HIP-Doc/Programming-Guide/Introduction-to-the-HIP-Programming-Model/add_kernel/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/address_retrieval/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/address_retrieval/Makefile index 5d30b8f641..80d34ee9a3 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/address_retrieval/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/address_retrieval/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_address_retrieval GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/device_code_feature_identification/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/device_code_feature_identification/Makefile index 770b8db270..5a3ee689aa 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/device_code_feature_identification/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/device_code_feature_identification/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_device_code_feature_identification GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/host_code_feature_identification/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/host_code_feature_identification/Makefile index 6791e4e800..45b67ece3c 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/host_code_feature_identification/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/host_code_feature_identification/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_host_code_feature_identification GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_compilation_target_platform/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_compilation_target_platform/Makefile index d7f3835bad..73b7545e6c 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_compilation_target_platform/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_compilation_target_platform/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_identifying_compilation_target_platform GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_host_device_compilation_pass/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_host_device_compilation_pass/Makefile index cf306747d0..b5c4cfcc91 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_host_device_compilation_pass/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_host_device_compilation_pass/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_calling_global_functions GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module/Makefile index 3c54edc530..f13bd72781 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex/Makefile index f3aa716b17..454415848d 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex_cuda/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex_cuda/Makefile index 822ba596bb..e3a6822c94 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex_cuda/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/load_module_ex_cuda/Makefile @@ -24,7 +24,7 @@ EXAMPLE := cuda_load_module_ex GPU_RUNTIME ?= CUDA # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/per_thread_default_stream/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/per_thread_default_stream/Makefile index 908dc032cd..30701a8b8c 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/per_thread_default_stream/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/per_thread_default_stream/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_per_thread_default_stream GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/pointer_memory_type/Makefile b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/pointer_memory_type/Makefile index f5ca405fa3..e39ad5a9c4 100644 --- a/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/pointer_memory_type/Makefile +++ b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/pointer_memory_type/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_pointer_memory_type GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/compilation_apis/Makefile b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/compilation_apis/Makefile index 61c135f83c..861478b277 100644 --- a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/compilation_apis/Makefile +++ b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/compilation_apis/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_compilation_apis GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis/Makefile b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis/Makefile index 73fc47bb7f..ac8f7a7676 100644 --- a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis/Makefile +++ b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_linker_apis GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_file/Makefile b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_file/Makefile index 97efc48b0a..1ba38e3c78 100644 --- a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_file/Makefile +++ b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_file/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_linker_apis_file GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_options/Makefile b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_options/Makefile index 64b5d0212c..e6bfffdea6 100644 --- a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_options/Makefile +++ b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/linker_apis_options/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_linker_apis_options GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/lowered_names/Makefile b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/lowered_names/Makefile index e2f9a150da..e4957ecd7e 100644 --- a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/lowered_names/Makefile +++ b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/lowered_names/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_lowered_names GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/rtc_error_handling/Makefile b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/rtc_error_handling/Makefile index 88afb4ee56..fcc4f168c1 100644 --- a/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/rtc_error_handling/Makefile +++ b/HIP-Doc/Programming-Guide/Programming-for-HIP-Runtime-Compiler/rtc_error_handling/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_rtc_error_handling GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/async_kernel_execution/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/async_kernel_execution/Makefile index 58b50b34a9..c1900d3ce4 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/async_kernel_execution/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/async_kernel_execution/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_async_kernel_execution GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/event_based_synchronization/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/event_based_synchronization/Makefile index 434e66773d..eabb4bc5b4 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/event_based_synchronization/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/event_based_synchronization/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_event_based_synchronization GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/sequential_kernel_execution/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/sequential_kernel_execution/Makefile index d6214e8a82..973ae644ad 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/sequential_kernel_execution/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Asynchronous-Concurrent-Execution/sequential_kernel_execution/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_sequential_kernel_execution GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/call_stack_management/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/call_stack_management/Makefile index 4397d586a4..61823cf36e 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/call_stack_management/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/call_stack_management/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_call_stack_management GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/device_recursion/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/device_recursion/Makefile index 014dab5a51..3f9f7ad995 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/device_recursion/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Call-Stack/device_recursion/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_device_recursion GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Error-Handling/error_handling/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Error-Handling/error_handling/Makefile index 61d88e3f69..ea72d1a3c4 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Error-Handling/error_handling/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Error-Handling/error_handling/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_error_handling GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_capture/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_capture/Makefile index a125738603..0a971f8160 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_capture/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_capture/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_graph_capture GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_creation/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_creation/Makefile index ddb1ce26b4..07feebdbc3 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_creation/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/HIP-Graphs/graph_creation/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_graph_creation GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Initialization/simple_device_query/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Initialization/simple_device_query/Makefile index 6f5a74ee57..8368183a45 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Initialization/simple_device_query/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Initialization/simple_device_query/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_simple_device_query GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/constant_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/constant_memory/Makefile index b5afb44b52..569f732956 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/constant_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/constant_memory/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/dynamic_shared_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/dynamic_shared_memory/Makefile index d1d602a44e..56d6db5435 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/dynamic_shared_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/dynamic_shared_memory/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/explicit_copy/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/explicit_copy/Makefile index 9aaddef21c..3d11cdef6a 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/explicit_copy/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/explicit_copy/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/kernel_memory_allocation/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/kernel_memory_allocation/Makefile index bca050c386..a4e977396e 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/kernel_memory_allocation/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/kernel_memory_allocation/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/static_shared_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/static_shared_memory/Makefile index bcde1903c6..6cb392c94c 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/static_shared_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Device-Memory/static_shared_memory/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pageable_host_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pageable_host_memory/Makefile index dd70f7b300..2b056f41e3 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pageable_host_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pageable_host_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_pageable_host_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pinned_host_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pinned_host_memory/Makefile index 3736327fe5..8f6356c8dd 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pinned_host_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Host-Memory/pinned_host_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_pinned_host_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool/Makefile index f745837fb8..9e3fe20351 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_memory_pool GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_resource_usage_statistics/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_resource_usage_statistics/Makefile index ffc87f725c..4c5896f91c 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_resource_usage_statistics/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_resource_usage_statistics/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_memory_pool_resource_usage_statistics GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_threshold/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_threshold/Makefile index 98679bfff9..7a77b53949 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_threshold/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_threshold/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_memory_pool_threshold GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_trim/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_trim/Makefile index 22469ece92..43df179601 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_trim/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/memory_pool_trim/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_memory_pool_trim GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/ordinary_memory_allocation/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/ordinary_memory_allocation/Makefile index eac4d90dd2..cdf6fa3952 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/ordinary_memory_allocation/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/ordinary_memory_allocation/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_ordinary_memory_allocation GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/stream_ordered_memory_allocation/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/stream_ordered_memory_allocation/Makefile index b3da075b84..9d81efcc59 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/stream_ordered_memory_allocation/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/SOMA/stream_ordered_memory_allocation/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_stream_ordered_memory_allocation GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/data_prefetching/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/data_prefetching/Makefile index bebf310573..064ab182f0 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/data_prefetching/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/data_prefetching/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_data_prefetching GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/dynamic_unified_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/dynamic_unified_memory/Makefile index 96140061a8..6fb13d329a 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/dynamic_unified_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/dynamic_unified_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_dynamic_unified_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/explicit_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/explicit_memory/Makefile index ac5bc2df3c..2e0d28318b 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/explicit_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/explicit_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_explicit_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/memory_range_attributes/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/memory_range_attributes/Makefile index c57819d615..ccd0e690e9 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/memory_range_attributes/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/memory_range_attributes/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_memory_range_attributes GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/standard_unified_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/standard_unified_memory/Makefile index 30c69ad833..61fe00455c 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/standard_unified_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/standard_unified_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_standard_unified_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/static_unified_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/static_unified_memory/Makefile index 19cb33ab32..a947e1a397 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/static_unified_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/static_unified_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_static_unified_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/unified_memory_advice/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/unified_memory_advice/Makefile index a8596b91be..ab951099f9 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/unified_memory_advice/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Unified-Memory-Management/unified_memory_advice/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_unified_memory_advice GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Virtual-Memory-Management/virtual_memory/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Virtual-Memory-Management/virtual_memory/Makefile index 2bbb1a4436..e50f242b30 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Virtual-Memory-Management/virtual_memory/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Memory-Management/Virtual-Memory-Management/virtual_memory/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_virtual_memory GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_enumeration/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_enumeration/Makefile index 9a714f40b9..820e53a9f1 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_enumeration/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_enumeration/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_device_enumeration GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_selection/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_selection/Makefile index 354b505021..981946ea7a 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_selection/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/device_selection/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_device_selection GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/multi_device_synchronization/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/multi_device_synchronization/Makefile index d227dd6d77..4ec423d86c 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/multi_device_synchronization/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/multi_device_synchronization/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_multi_device_synchronization GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access/Makefile index 99a2b12240..8b7f400cb4 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_p2p_memory_access GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access_host_staging/Makefile b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access_host_staging/Makefile index 88e95fa69b..399cfccfeb 100644 --- a/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access_host_staging/Makefile +++ b/HIP-Doc/Programming-Guide/Using-HIP-Runtime-API/Multi-Device-Management/p2p_memory_access_host_staging/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_p2p_memory_access_host_staging GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Reference/CUDA-to-HIP-API-Function-Comparison/block_reduction/Makefile b/HIP-Doc/Reference/CUDA-to-HIP-API-Function-Comparison/block_reduction/Makefile index 2317bc96c2..5c6aecaeb0 100644 --- a/HIP-Doc/Reference/CUDA-to-HIP-API-Function-Comparison/block_reduction/Makefile +++ b/HIP-Doc/Reference/CUDA-to-HIP-API-Function-Comparison/block_reduction/Makefile @@ -24,7 +24,7 @@ EXAMPLE := cuda_block_reduction GPU_RUNTIME ?= CUDA # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Reference/HIP-Complex-Math-API/complex_math/Makefile b/HIP-Doc/Reference/HIP-Complex-Math-API/complex_math/Makefile index d1d61394b9..07b55a8740 100644 --- a/HIP-Doc/Reference/HIP-Complex-Math-API/complex_math/Makefile +++ b/HIP-Doc/Reference/HIP-Complex-Math-API/complex_math/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_complex_math GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Reference/HIP-Math-API/math/Makefile b/HIP-Doc/Reference/HIP-Math-API/math/Makefile index 2481e83c1d..3a65fa637b 100644 --- a/HIP-Doc/Reference/HIP-Math-API/math/Makefile +++ b/HIP-Doc/Reference/HIP-Math-API/math/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_math GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp16/Makefile b/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp16/Makefile index 059fc2561f..793b32042f 100644 --- a/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp16/Makefile +++ b/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp16/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_low_precision_float_fp16 GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp8/Makefile b/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp8/Makefile index 269540df4a..fbbabc0028 100644 --- a/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp8/Makefile +++ b/HIP-Doc/Reference/Low-Precision-Floating-Point-Types/low_precision_float_fp8/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_low_precision_float_fp8 GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile index fb703da93a..9f16b7e810 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile @@ -25,7 +25,7 @@ GRAPHGEN := graphgen GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile index 2c798735fc..387d5c0bcc 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/histogram_atomics/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_histogram_atomics GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile index b893a97306..19e78bcc20 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/image_convolution/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_image_convolution GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile index be78ebad15..e9512e9f52 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/kmeans/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_kmeans GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile index 24224e9ce2..6be8588415 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/matrix_multiplication/Makefile @@ -24,7 +24,7 @@ EXAMPLE := hip_matrix_multiply GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile b/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile index 0219596940..401663d69d 100644 --- a/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile +++ b/Libraries/MIGraphX/migraphx/cpp_dynamic_batch/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile b/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile index 3a9b2df101..68ace8156f 100644 --- a/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile +++ b/Libraries/MIGraphX/migraphx/cpp_parse_load_save/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile b/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile index 0a6af2900c..3f9266d5c1 100644 --- a/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile +++ b/Libraries/MIGraphX/migraphx/custom_op_hip_kernel/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile b/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile index e7de8040a8..5fb52a3392 100644 --- a/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile +++ b/Libraries/MIGraphX/migraphx/custom_op_miopen_kernel/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile b/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile index d57f4db005..cf5849d16d 100644 --- a/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile +++ b/Libraries/MIGraphX/migraphx/custom_op_rocblas_kernel/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIGraphX/vision/cpp_mnist/Makefile b/Libraries/MIGraphX/vision/cpp_mnist/Makefile index e12fc8e77f..3bb8471c9b 100644 --- a/Libraries/MIGraphX/vision/cpp_mnist/Makefile +++ b/Libraries/MIGraphX/vision/cpp_mnist/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include MIGRAPHX_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/MIVisionX/canny/Makefile b/Libraries/MIVisionX/canny/Makefile index 2267b588aa..d87116bb8e 100644 --- a/Libraries/MIVisionX/canny/Makefile +++ b/Libraries/MIVisionX/canny/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External # ROCm installation directory -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) # MIVisionX and OpenCV include directories MIVISIONX_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include/mivisionx diff --git a/Libraries/MIVisionX/mv_objdetect/Makefile b/Libraries/MIVisionX/mv_objdetect/Makefile index cb22fdd892..1b0ab45a54 100644 --- a/Libraries/MIVisionX/mv_objdetect/Makefile +++ b/Libraries/MIVisionX/mv_objdetect/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External # ROCm installation directory -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) # Batch size configuration (can be overridden: make BATCH_SIZE=4) BATCH_SIZE := 1 diff --git a/Libraries/MIVisionX/opencv_orb/Makefile b/Libraries/MIVisionX/opencv_orb/Makefile index 2848d8280f..2ad162f869 100644 --- a/Libraries/MIVisionX/opencv_orb/Makefile +++ b/Libraries/MIVisionX/opencv_orb/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External # ROCm installation directory -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) # MIVisionX and OpenCV include directories MIVISIONX_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include/mivisionx diff --git a/Libraries/RCCL/allgather/Makefile b/Libraries/RCCL/allgather/Makefile index 45f3f38b55..df331b664d 100644 --- a/Libraries/RCCL/allgather/Makefile +++ b/Libraries/RCCL/allgather/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/allreduce/Makefile b/Libraries/RCCL/allreduce/Makefile index 93b3342899..937fbae9e3 100644 --- a/Libraries/RCCL/allreduce/Makefile +++ b/Libraries/RCCL/allreduce/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/broadcast/Makefile b/Libraries/RCCL/broadcast/Makefile index d4397b217e..636d9d9497 100644 --- a/Libraries/RCCL/broadcast/Makefile +++ b/Libraries/RCCL/broadcast/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/buffer_registration/Makefile b/Libraries/RCCL/buffer_registration/Makefile index fe82d4a1d2..8c4d40a145 100644 --- a/Libraries/RCCL/buffer_registration/Makefile +++ b/Libraries/RCCL/buffer_registration/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/device_api/Makefile b/Libraries/RCCL/device_api/Makefile index 752a2e9bb5..2e65c80241 100644 --- a/Libraries/RCCL/device_api/Makefile +++ b/Libraries/RCCL/device_api/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/gradient_allreduce/Makefile b/Libraries/RCCL/gradient_allreduce/Makefile index 1f8cce63e9..1c53a9b526 100644 --- a/Libraries/RCCL/gradient_allreduce/Makefile +++ b/Libraries/RCCL/gradient_allreduce/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/reduce/Makefile b/Libraries/RCCL/reduce/Makefile index 56a40791f8..60e7773c94 100644 --- a/Libraries/RCCL/reduce/Makefile +++ b/Libraries/RCCL/reduce/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/reducescatter/Makefile b/Libraries/RCCL/reducescatter/Makefile index 8ce5af696c..c2c1448144 100644 --- a/Libraries/RCCL/reducescatter/Makefile +++ b/Libraries/RCCL/reducescatter/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RCCL/send_recv/Makefile b/Libraries/RCCL/send_recv/Makefile index 2da563bb67..a30a538d37 100644 --- a/Libraries/RCCL/send_recv/Makefile +++ b/Libraries/RCCL/send_recv/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RCCL_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/box_filter/Makefile b/Libraries/RPP/box_filter/Makefile index 00fb5cc5e7..a16745bc10 100644 --- a/Libraries/RPP/box_filter/Makefile +++ b/Libraries/RPP/box_filter/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/brightness/Makefile b/Libraries/RPP/brightness/Makefile index 6f83583eae..90db33979a 100644 --- a/Libraries/RPP/brightness/Makefile +++ b/Libraries/RPP/brightness/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/contrast/Makefile b/Libraries/RPP/contrast/Makefile index d277922f67..74e01b4d73 100644 --- a/Libraries/RPP/contrast/Makefile +++ b/Libraries/RPP/contrast/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/flip/Makefile b/Libraries/RPP/flip/Makefile index 3f51cfdd91..a0481b4d6e 100644 --- a/Libraries/RPP/flip/Makefile +++ b/Libraries/RPP/flip/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/gamma_correction/Makefile b/Libraries/RPP/gamma_correction/Makefile index a7ac06eb6f..623d56d877 100644 --- a/Libraries/RPP/gamma_correction/Makefile +++ b/Libraries/RPP/gamma_correction/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/RPP/resize/Makefile b/Libraries/RPP/resize/Makefile index 19d2a68d1c..af0553553e 100644 --- a/Libraries/RPP/resize/Makefile +++ b/Libraries/RPP/resize/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLAS/gemm_strided_batched/Makefile b/Libraries/hipBLAS/gemm_strided_batched/Makefile index 4ea62e69ca..c1108bd415 100644 --- a/Libraries/hipBLAS/gemm_strided_batched/Makefile +++ b/Libraries/hipBLAS/gemm_strided_batched/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLAS/her/Makefile b/Libraries/hipBLAS/her/Makefile index 0dc08e1495..dd7b01d835 100644 --- a/Libraries/hipBLAS/her/Makefile +++ b/Libraries/hipBLAS/her/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLAS/scal/Makefile b/Libraries/hipBLAS/scal/Makefile index 18a0ac1f1f..aebd65e4c6 100644 --- a/Libraries/hipBLAS/scal/Makefile +++ b/Libraries/hipBLAS/scal/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/ext_op_amax/Makefile b/Libraries/hipBLASLt/ext_op_amax/Makefile index 3b74bf22de..2aef0f6cc5 100644 --- a/Libraries/hipBLASLt/ext_op_amax/Makefile +++ b/Libraries/hipBLASLt/ext_op_amax/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/ext_op_layernorm/Makefile b/Libraries/hipBLASLt/ext_op_layernorm/Makefile index 040c026ff6..de94c0f3b7 100644 --- a/Libraries/hipBLASLt/ext_op_layernorm/Makefile +++ b/Libraries/hipBLASLt/ext_op_layernorm/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm/Makefile b/Libraries/hipBLASLt/gemm/Makefile index bf3732e6e5..1aea20cc3c 100644 --- a/Libraries/hipBLASLt/gemm/Makefile +++ b/Libraries/hipBLASLt/gemm/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_alphavec_ext/Makefile b/Libraries/hipBLASLt/gemm_alphavec_ext/Makefile index 2814b2a19f..fe9309d6e1 100644 --- a/Libraries/hipBLASLt/gemm_alphavec_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_alphavec_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_amax/Makefile b/Libraries/hipBLASLt/gemm_amax/Makefile index 9748b0cc43..438a7bbde6 100644 --- a/Libraries/hipBLASLt/gemm_amax/Makefile +++ b/Libraries/hipBLASLt/gemm_amax/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_amax_ext/Makefile b/Libraries/hipBLASLt/gemm_amax_ext/Makefile index bcb2f2e6b0..faee18f4e6 100644 --- a/Libraries/hipBLASLt/gemm_amax_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_amax_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_amax_with_scale/Makefile b/Libraries/hipBLASLt/gemm_amax_with_scale/Makefile index 45cb417fab..1571c4cd5a 100644 --- a/Libraries/hipBLASLt/gemm_amax_with_scale/Makefile +++ b/Libraries/hipBLASLt/gemm_amax_with_scale/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_amax_with_scale_ext/Makefile b/Libraries/hipBLASLt/gemm_amax_with_scale_ext/Makefile index 503ba31647..1e25991bdb 100644 --- a/Libraries/hipBLASLt/gemm_amax_with_scale_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_amax_with_scale_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_attr_tciA_tciB/Makefile b/Libraries/hipBLASLt/gemm_attr_tciA_tciB/Makefile index 4746758478..b7dd978304 100644 --- a/Libraries/hipBLASLt/gemm_attr_tciA_tciB/Makefile +++ b/Libraries/hipBLASLt/gemm_attr_tciA_tciB/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_batched/Makefile b/Libraries/hipBLASLt/gemm_batched/Makefile index 229edc54b0..fac07f5ba2 100644 --- a/Libraries/hipBLASLt/gemm_batched/Makefile +++ b/Libraries/hipBLASLt/gemm_batched/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_batched_ext/Makefile b/Libraries/hipBLASLt/gemm_batched_ext/Makefile index 8946d844d3..d780f925e1 100644 --- a/Libraries/hipBLASLt/gemm_batched_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_batched_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_bgradb/Makefile b/Libraries/hipBLASLt/gemm_bgradb/Makefile index f3aa29d752..541ff98393 100644 --- a/Libraries/hipBLASLt/gemm_bgradb/Makefile +++ b/Libraries/hipBLASLt/gemm_bgradb/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_bias/Makefile b/Libraries/hipBLASLt/gemm_bias/Makefile index 65f0f9ef7f..5ccf39e5e2 100644 --- a/Libraries/hipBLASLt/gemm_bias/Makefile +++ b/Libraries/hipBLASLt/gemm_bias/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_bias_ext/Makefile b/Libraries/hipBLASLt/gemm_bias_ext/Makefile index 3c8c2a0322..c16b2f25db 100644 --- a/Libraries/hipBLASLt/gemm_bias_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_bias_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_bias_swizzle_a_ext/Makefile b/Libraries/hipBLASLt/gemm_bias_swizzle_a_ext/Makefile index ddce7b4cd6..61fa38ac75 100644 --- a/Libraries/hipBLASLt/gemm_bias_swizzle_a_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_bias_swizzle_a_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_clamp_bias/Makefile b/Libraries/hipBLASLt/gemm_clamp_bias/Makefile index 6d966918c7..a1a02a15cd 100644 --- a/Libraries/hipBLASLt/gemm_clamp_bias/Makefile +++ b/Libraries/hipBLASLt/gemm_clamp_bias/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_dgelu_bgradb/Makefile b/Libraries/hipBLASLt/gemm_dgelu_bgradb/Makefile index 4e3dd86bd4..7a89bcb662 100644 --- a/Libraries/hipBLASLt/gemm_dgelu_bgradb/Makefile +++ b/Libraries/hipBLASLt/gemm_dgelu_bgradb/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_dgelu_bgradb_ext/Makefile b/Libraries/hipBLASLt/gemm_dgelu_bgradb_ext/Makefile index faadb5db55..4973c4af99 100644 --- a/Libraries/hipBLASLt/gemm_dgelu_bgradb_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_dgelu_bgradb_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_ext/Makefile b/Libraries/hipBLASLt/gemm_ext/Makefile index c375fa87c3..a18ba4cfaf 100644 --- a/Libraries/hipBLASLt/gemm_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_ext_bgradb/Makefile b/Libraries/hipBLASLt/gemm_ext_bgradb/Makefile index 376dfbce2d..99f5f98f59 100644 --- a/Libraries/hipBLASLt/gemm_ext_bgradb/Makefile +++ b/Libraries/hipBLASLt/gemm_ext_bgradb/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_gelu_aux_bias/Makefile b/Libraries/hipBLASLt/gemm_gelu_aux_bias/Makefile index 75575f331e..dbe0c86f9c 100644 --- a/Libraries/hipBLASLt/gemm_gelu_aux_bias/Makefile +++ b/Libraries/hipBLASLt/gemm_gelu_aux_bias/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_gelu_aux_bias_ext/Makefile b/Libraries/hipBLASLt/gemm_gelu_aux_bias_ext/Makefile index 87ade4d2f9..10bda01431 100644 --- a/Libraries/hipBLASLt/gemm_gelu_aux_bias_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_gelu_aux_bias_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_get_algo_by_index_ext/Makefile b/Libraries/hipBLASLt/gemm_get_algo_by_index_ext/Makefile index 950dc3b1b6..233da61242 100644 --- a/Libraries/hipBLASLt/gemm_get_algo_by_index_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_get_algo_by_index_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_get_all_algos/Makefile b/Libraries/hipBLASLt/gemm_get_all_algos/Makefile index 879d85bd9c..6eba40c8c4 100644 --- a/Libraries/hipBLASLt/gemm_get_all_algos/Makefile +++ b/Libraries/hipBLASLt/gemm_get_all_algos/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_get_all_algos_ext/Makefile b/Libraries/hipBLASLt/gemm_get_all_algos_ext/Makefile index 7c402edf43..37f4615446 100644 --- a/Libraries/hipBLASLt/gemm_get_all_algos_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_get_all_algos_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_is_tuned_ext/Makefile b/Libraries/hipBLASLt/gemm_is_tuned_ext/Makefile index 16da7aa302..de8dfeab66 100644 --- a/Libraries/hipBLASLt/gemm_is_tuned_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_is_tuned_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_mix_precision/Makefile b/Libraries/hipBLASLt/gemm_mix_precision/Makefile index 9c30f6f838..e431ee4b7a 100644 --- a/Libraries/hipBLASLt/gemm_mix_precision/Makefile +++ b/Libraries/hipBLASLt/gemm_mix_precision/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_mix_precision_ext/Makefile b/Libraries/hipBLASLt/gemm_mix_precision_ext/Makefile index 53714a1fd7..4175c645ee 100644 --- a/Libraries/hipBLASLt/gemm_mix_precision_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_mix_precision_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_mix_precision_with_amax_ext/Makefile b/Libraries/hipBLASLt/gemm_mix_precision_with_amax_ext/Makefile index 4dd22b785a..db5466d361 100644 --- a/Libraries/hipBLASLt/gemm_mix_precision_with_amax_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_mix_precision_with_amax_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_swish_bias/Makefile b/Libraries/hipBLASLt/gemm_swish_bias/Makefile index 3f47b84134..cb5cf11d34 100644 --- a/Libraries/hipBLASLt/gemm_swish_bias/Makefile +++ b/Libraries/hipBLASLt/gemm_swish_bias/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_swizzle_a/Makefile b/Libraries/hipBLASLt/gemm_swizzle_a/Makefile index 813eb76675..fdc9277c08 100644 --- a/Libraries/hipBLASLt/gemm_swizzle_a/Makefile +++ b/Libraries/hipBLASLt/gemm_swizzle_a/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_swizzle_b/Makefile b/Libraries/hipBLASLt/gemm_swizzle_b/Makefile index 09a3aaa9ba..4b2f77c8b4 100644 --- a/Libraries/hipBLASLt/gemm_swizzle_b/Makefile +++ b/Libraries/hipBLASLt/gemm_swizzle_b/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_tuning_splitk_ext/Makefile b/Libraries/hipBLASLt/gemm_tuning_splitk_ext/Makefile index bdb1a4f8b8..ca99ebfa7b 100644 --- a/Libraries/hipBLASLt/gemm_tuning_splitk_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_tuning_splitk_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_tuning_wgm_ext/Makefile b/Libraries/hipBLASLt/gemm_tuning_wgm_ext/Makefile index c206dbfae1..59361679c8 100644 --- a/Libraries/hipBLASLt/gemm_tuning_wgm_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_tuning_wgm_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_with_TF32/Makefile b/Libraries/hipBLASLt/gemm_with_TF32/Makefile index b0b5689729..5845c88150 100644 --- a/Libraries/hipBLASLt/gemm_with_TF32/Makefile +++ b/Libraries/hipBLASLt/gemm_with_TF32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_with_scale_a_b/Makefile b/Libraries/hipBLASLt/gemm_with_scale_a_b/Makefile index 2e54a9f881..886a95a242 100644 --- a/Libraries/hipBLASLt/gemm_with_scale_a_b/Makefile +++ b/Libraries/hipBLASLt/gemm_with_scale_a_b/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_with_scale_a_b_ext/Makefile b/Libraries/hipBLASLt/gemm_with_scale_a_b_ext/Makefile index 6980503bd3..cc1fdba02d 100644 --- a/Libraries/hipBLASLt/gemm_with_scale_a_b_ext/Makefile +++ b/Libraries/hipBLASLt/gemm_with_scale_a_b_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/gemm_with_scale_a_b_vector/Makefile b/Libraries/hipBLASLt/gemm_with_scale_a_b_vector/Makefile index eaf0675edd..5a5856849f 100644 --- a/Libraries/hipBLASLt/gemm_with_scale_a_b_vector/Makefile +++ b/Libraries/hipBLASLt/gemm_with_scale_a_b_vector/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/groupedgemm_ext/Makefile b/Libraries/hipBLASLt/groupedgemm_ext/Makefile index 38a3f3d822..55e4812077 100644 --- a/Libraries/hipBLASLt/groupedgemm_ext/Makefile +++ b/Libraries/hipBLASLt/groupedgemm_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/groupedgemm_fixed_mk_ext/Makefile b/Libraries/hipBLASLt/groupedgemm_fixed_mk_ext/Makefile index 3265a59902..f1bb5b68dd 100644 --- a/Libraries/hipBLASLt/groupedgemm_fixed_mk_ext/Makefile +++ b/Libraries/hipBLASLt/groupedgemm_fixed_mk_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/groupedgemm_get_all_algos_ext/Makefile b/Libraries/hipBLASLt/groupedgemm_get_all_algos_ext/Makefile index 7f213cda1d..270ca7f49f 100644 --- a/Libraries/hipBLASLt/groupedgemm_get_all_algos_ext/Makefile +++ b/Libraries/hipBLASLt/groupedgemm_get_all_algos_ext/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipBLASLt/weight_swizzle_padding/Makefile b/Libraries/hipBLASLt/weight_swizzle_padding/Makefile index 8edcb99aaa..04baeb89d2 100644 --- a/Libraries/hipBLASLt/weight_swizzle_padding/Makefile +++ b/Libraries/hipBLASLt/weight_swizzle_padding/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipCUB/device_radix_sort/Makefile b/Libraries/hipCUB/device_radix_sort/Makefile index bd13bab59c..b18dd91ab2 100644 --- a/Libraries/hipCUB/device_radix_sort/Makefile +++ b/Libraries/hipCUB/device_radix_sort/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipCUB/device_sum/Makefile b/Libraries/hipCUB/device_sum/Makefile index 1349509833..1efcea6c0c 100644 --- a/Libraries/hipCUB/device_sum/Makefile +++ b/Libraries/hipCUB/device_sum/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipFFT/callback/Makefile b/Libraries/hipFFT/callback/Makefile index a74c788b21..a73d55e69a 100644 --- a/Libraries/hipFFT/callback/Makefile +++ b/Libraries/hipFFT/callback/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCFFT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipFFT/multi_gpu/Makefile b/Libraries/hipFFT/multi_gpu/Makefile index 71f7913b03..694e5302ae 100644 --- a/Libraries/hipFFT/multi_gpu/Makefile +++ b/Libraries/hipFFT/multi_gpu/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipFFT/plan_d2z/Makefile b/Libraries/hipFFT/plan_d2z/Makefile index 9acdae6cac..173bd369ec 100644 --- a/Libraries/hipFFT/plan_d2z/Makefile +++ b/Libraries/hipFFT/plan_d2z/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipFFT/plan_many_2d_r2c/Makefile b/Libraries/hipFFT/plan_many_2d_r2c/Makefile index c4a72c6471..3cbc33f4cf 100644 --- a/Libraries/hipFFT/plan_many_2d_r2c/Makefile +++ b/Libraries/hipFFT/plan_many_2d_r2c/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipFFT/plan_many_2d_z2z/Makefile b/Libraries/hipFFT/plan_many_2d_z2z/Makefile index 6109ecbd09..7656872f8a 100644 --- a/Libraries/hipFFT/plan_many_2d_z2z/Makefile +++ b/Libraries/hipFFT/plan_many_2d_z2z/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipFFT/plan_z2z/Makefile b/Libraries/hipFFT/plan_z2z/Makefile index c574222b9a..974ced8c81 100644 --- a/Libraries/hipFFT/plan_z2z/Makefile +++ b/Libraries/hipFFT/plan_z2z/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipFFT/setworkarea/Makefile b/Libraries/hipFFT/setworkarea/Makefile index 89425bccd5..5a553a0c00 100644 --- a/Libraries/hipFFT/setworkarea/Makefile +++ b/Libraries/hipFFT/setworkarea/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipRAND/c_cpp_api/simple_distributions_cpp/Makefile b/Libraries/hipRAND/c_cpp_api/simple_distributions_cpp/Makefile index 0944254641..e5b6b00164 100644 --- a/Libraries/hipRAND/c_cpp_api/simple_distributions_cpp/Makefile +++ b/Libraries/hipRAND/c_cpp_api/simple_distributions_cpp/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipRAND/device_api/pseudorandom_generations/Makefile b/Libraries/hipRAND/device_api/pseudorandom_generations/Makefile index 650ddf7d8b..44c6fe9eed 100644 --- a/Libraries/hipRAND/device_api/pseudorandom_generations/Makefile +++ b/Libraries/hipRAND/device_api/pseudorandom_generations/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipRAND/device_api/quasirandom_generations/Makefile b/Libraries/hipRAND/device_api/quasirandom_generations/Makefile index 01840cf06b..265c74dfa3 100644 --- a/Libraries/hipRAND/device_api/quasirandom_generations/Makefile +++ b/Libraries/hipRAND/device_api/quasirandom_generations/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/gels/Makefile b/Libraries/hipSOLVER/gels/Makefile index ea7d01e844..f696656b05 100644 --- a/Libraries/hipSOLVER/gels/Makefile +++ b/Libraries/hipSOLVER/gels/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/geqrf/Makefile b/Libraries/hipSOLVER/geqrf/Makefile index 951c39485b..c626cea70b 100644 --- a/Libraries/hipSOLVER/geqrf/Makefile +++ b/Libraries/hipSOLVER/geqrf/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/gesvd/Makefile b/Libraries/hipSOLVER/gesvd/Makefile index 439aeeff7f..91496e69cd 100644 --- a/Libraries/hipSOLVER/gesvd/Makefile +++ b/Libraries/hipSOLVER/gesvd/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/getrf/Makefile b/Libraries/hipSOLVER/getrf/Makefile index 9969856286..dd4cc1feac 100644 --- a/Libraries/hipSOLVER/getrf/Makefile +++ b/Libraries/hipSOLVER/getrf/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/potrf/Makefile b/Libraries/hipSOLVER/potrf/Makefile index b54298d823..7c87f6b856 100644 --- a/Libraries/hipSOLVER/potrf/Makefile +++ b/Libraries/hipSOLVER/potrf/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/syevd/Makefile b/Libraries/hipSOLVER/syevd/Makefile index a97157b47e..9c5e08e28d 100644 --- a/Libraries/hipSOLVER/syevd/Makefile +++ b/Libraries/hipSOLVER/syevd/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/syevdx/Makefile b/Libraries/hipSOLVER/syevdx/Makefile index 3967f52777..b17be2ccdb 100644 --- a/Libraries/hipSOLVER/syevdx/Makefile +++ b/Libraries/hipSOLVER/syevdx/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/syevj/Makefile b/Libraries/hipSOLVER/syevj/Makefile index 00feef2614..14c4a8f41f 100644 --- a/Libraries/hipSOLVER/syevj/Makefile +++ b/Libraries/hipSOLVER/syevj/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/syevj_batched/Makefile b/Libraries/hipSOLVER/syevj_batched/Makefile index 6014e9343f..d33155a0ca 100644 --- a/Libraries/hipSOLVER/syevj_batched/Makefile +++ b/Libraries/hipSOLVER/syevj_batched/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/sygvd/Makefile b/Libraries/hipSOLVER/sygvd/Makefile index a614217f06..d1f5303d01 100644 --- a/Libraries/hipSOLVER/sygvd/Makefile +++ b/Libraries/hipSOLVER/sygvd/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSOLVER/sygvj/Makefile b/Libraries/hipSOLVER/sygvj/Makefile index 3aa2c71efc..0bf97891fc 100644 --- a/Libraries/hipSOLVER/sygvj/Makefile +++ b/Libraries/hipSOLVER/sygvj/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSPARSE/axpyi/Makefile b/Libraries/hipSPARSE/axpyi/Makefile index 7f553f8ecf..b7eec991c3 100644 --- a/Libraries/hipSPARSE/axpyi/Makefile +++ b/Libraries/hipSPARSE/axpyi/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipSPARSE/csrmv/Makefile b/Libraries/hipSPARSE/csrmv/Makefile index 1404ac904d..c38d1fd694 100644 --- a/Libraries/hipSPARSE/csrmv/Makefile +++ b/Libraries/hipSPARSE/csrmv/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipSPARSE/handle/Makefile b/Libraries/hipSPARSE/handle/Makefile index ba4aff62c2..be0cf4a77e 100644 --- a/Libraries/hipSPARSE/handle/Makefile +++ b/Libraries/hipSPARSE/handle/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipSPARSE/hybmv/Makefile b/Libraries/hipSPARSE/hybmv/Makefile index a2fa5865d5..872c2ff4a4 100644 --- a/Libraries/hipSPARSE/hybmv/Makefile +++ b/Libraries/hipSPARSE/hybmv/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipSPARSELt/spmm/Makefile b/Libraries/hipSPARSELt/spmm/Makefile index 1a01825f10..9a7354f7ea 100644 --- a/Libraries/hipSPARSELt/spmm/Makefile +++ b/Libraries/hipSPARSELt/spmm/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipSPARSELt/spmm_advanced/Makefile b/Libraries/hipSPARSELt/spmm_advanced/Makefile index 9e263c13dd..d7fbabaea2 100644 --- a/Libraries/hipSPARSELt/spmm_advanced/Makefile +++ b/Libraries/hipSPARSELt/spmm_advanced/Makefile @@ -25,7 +25,7 @@ COMMON_INCLUDE_DIR := ../../../Common GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/hipTensor/contraction/bilinear/bf16_f32/Makefile b/Libraries/hipTensor/contraction/bilinear/bf16_f32/Makefile index 7600fea4c6..8ae7610816 100644 --- a/Libraries/hipTensor/contraction/bilinear/bf16_f32/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/bf16_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/bilinear/cf32_cf32/Makefile b/Libraries/hipTensor/contraction/bilinear/cf32_cf32/Makefile index 108802523c..f8550538c6 100644 --- a/Libraries/hipTensor/contraction/bilinear/cf32_cf32/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/cf32_cf32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/bilinear/f16_f32/Makefile b/Libraries/hipTensor/contraction/bilinear/f16_f32/Makefile index 36ae53e445..04c343634c 100644 --- a/Libraries/hipTensor/contraction/bilinear/f16_f32/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/f16_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/bilinear/f32_bf16/Makefile b/Libraries/hipTensor/contraction/bilinear/f32_bf16/Makefile index bfc796888a..c22d35dc83 100644 --- a/Libraries/hipTensor/contraction/bilinear/f32_bf16/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/f32_bf16/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/bilinear/f32_f16/Makefile b/Libraries/hipTensor/contraction/bilinear/f32_f16/Makefile index c9dc871b38..5fcf029528 100644 --- a/Libraries/hipTensor/contraction/bilinear/f32_f16/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/f32_f16/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/bilinear/f32_f32/Makefile b/Libraries/hipTensor/contraction/bilinear/f32_f32/Makefile index eb2b7c50d5..8887d38705 100644 --- a/Libraries/hipTensor/contraction/bilinear/f32_f32/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/f32_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/bilinear/f64_f32/Makefile b/Libraries/hipTensor/contraction/bilinear/f64_f32/Makefile index 557eb50a73..4004e6578a 100644 --- a/Libraries/hipTensor/contraction/bilinear/f64_f32/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/f64_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/bilinear/f64_f64/Makefile b/Libraries/hipTensor/contraction/bilinear/f64_f64/Makefile index 7a910b9311..5ce5cca58e 100644 --- a/Libraries/hipTensor/contraction/bilinear/f64_f64/Makefile +++ b/Libraries/hipTensor/contraction/bilinear/f64_f64/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/bf16_f32/Makefile b/Libraries/hipTensor/contraction/scale/bf16_f32/Makefile index 0ba60ffcea..49c3d9dac6 100644 --- a/Libraries/hipTensor/contraction/scale/bf16_f32/Makefile +++ b/Libraries/hipTensor/contraction/scale/bf16_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/cf32_cf32/Makefile b/Libraries/hipTensor/contraction/scale/cf32_cf32/Makefile index 69b72f577a..f608188fee 100644 --- a/Libraries/hipTensor/contraction/scale/cf32_cf32/Makefile +++ b/Libraries/hipTensor/contraction/scale/cf32_cf32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/f16_f32/Makefile b/Libraries/hipTensor/contraction/scale/f16_f32/Makefile index e9a556a326..fa8f5e94b3 100644 --- a/Libraries/hipTensor/contraction/scale/f16_f32/Makefile +++ b/Libraries/hipTensor/contraction/scale/f16_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/f32_bf16/Makefile b/Libraries/hipTensor/contraction/scale/f32_bf16/Makefile index 93efce6ab7..e4aba45a92 100644 --- a/Libraries/hipTensor/contraction/scale/f32_bf16/Makefile +++ b/Libraries/hipTensor/contraction/scale/f32_bf16/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/f32_f16/Makefile b/Libraries/hipTensor/contraction/scale/f32_f16/Makefile index c21220f549..2e88d2d9e0 100644 --- a/Libraries/hipTensor/contraction/scale/f32_f16/Makefile +++ b/Libraries/hipTensor/contraction/scale/f32_f16/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/f32_f32/Makefile b/Libraries/hipTensor/contraction/scale/f32_f32/Makefile index fb49a8fb7b..a313226833 100644 --- a/Libraries/hipTensor/contraction/scale/f32_f32/Makefile +++ b/Libraries/hipTensor/contraction/scale/f32_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/f64_f32/Makefile b/Libraries/hipTensor/contraction/scale/f64_f32/Makefile index 95e1bcd209..2f35357b8b 100644 --- a/Libraries/hipTensor/contraction/scale/f64_f32/Makefile +++ b/Libraries/hipTensor/contraction/scale/f64_f32/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/contraction/scale/f64_f64/Makefile b/Libraries/hipTensor/contraction/scale/f64_f64/Makefile index 6bd439ba0a..b5c612dabf 100644 --- a/Libraries/hipTensor/contraction/scale/f64_f64/Makefile +++ b/Libraries/hipTensor/contraction/scale/f64_f64/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/elementwise/binary/Makefile b/Libraries/hipTensor/elementwise/binary/Makefile index d9a9cda08b..7a77bdaca9 100644 --- a/Libraries/hipTensor/elementwise/binary/Makefile +++ b/Libraries/hipTensor/elementwise/binary/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/elementwise/permute/Makefile b/Libraries/hipTensor/elementwise/permute/Makefile index 300c1447bf..3d96e9ce8e 100644 --- a/Libraries/hipTensor/elementwise/permute/Makefile +++ b/Libraries/hipTensor/elementwise/permute/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/elementwise/trinary/Makefile b/Libraries/hipTensor/elementwise/trinary/Makefile index 21645464d8..6ce9025480 100644 --- a/Libraries/hipTensor/elementwise/trinary/Makefile +++ b/Libraries/hipTensor/elementwise/trinary/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/hipTensor/reduction/Makefile b/Libraries/hipTensor/reduction/Makefile index 0e561c4b95..305d2822ae 100644 --- a/Libraries/hipTensor/reduction/Makefile +++ b/Libraries/hipTensor/reduction/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPBLASLT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocAL/basic/Makefile b/Libraries/rocAL/basic/Makefile index 1a811b629f..b91ee16c0d 100644 --- a/Libraries/rocAL/basic/Makefile +++ b/Libraries/rocAL/basic/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocAL/dataloader/Makefile b/Libraries/rocAL/dataloader/Makefile index f9104cbae6..e2bd576872 100644 --- a/Libraries/rocAL/dataloader/Makefile +++ b/Libraries/rocAL/dataloader/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocAL/image_augmentation/Makefile b/Libraries/rocAL/image_augmentation/Makefile index 063b6099cb..93ac3767ac 100644 --- a/Libraries/rocAL/image_augmentation/Makefile +++ b/Libraries/rocAL/image_augmentation/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocAL/video/Makefile b/Libraries/rocAL/video/Makefile index c29a454dd6..58fa578bd7 100644 --- a/Libraries/rocAL/video/Makefile +++ b/Libraries/rocAL/video/Makefile @@ -25,7 +25,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCAL_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/rocal diff --git a/Libraries/rocALUTION/amg/Makefile b/Libraries/rocALUTION/amg/Makefile index a052f680d9..728f8bb8e7 100644 --- a/Libraries/rocALUTION/amg/Makefile +++ b/Libraries/rocALUTION/amg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/as_precond/Makefile b/Libraries/rocALUTION/as_precond/Makefile index 6996d37279..052bf1b53a 100644 --- a/Libraries/rocALUTION/as_precond/Makefile +++ b/Libraries/rocALUTION/as_precond/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/async/Makefile b/Libraries/rocALUTION/async/Makefile index 239c439426..edcf81c74b 100644 --- a/Libraries/rocALUTION/async/Makefile +++ b/Libraries/rocALUTION/async/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/benchmark/Makefile b/Libraries/rocALUTION/benchmark/Makefile index 4fc0eef397..703d4d009a 100644 --- a/Libraries/rocALUTION/benchmark/Makefile +++ b/Libraries/rocALUTION/benchmark/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/bicgstab/Makefile b/Libraries/rocALUTION/bicgstab/Makefile index 346f75afe1..00be867035 100644 --- a/Libraries/rocALUTION/bicgstab/Makefile +++ b/Libraries/rocALUTION/bicgstab/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/block_precond/Makefile b/Libraries/rocALUTION/block_precond/Makefile index 6dc1343995..fe414ec14b 100644 --- a/Libraries/rocALUTION/block_precond/Makefile +++ b/Libraries/rocALUTION/block_precond/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/cg/Makefile b/Libraries/rocALUTION/cg/Makefile index 44218da153..284790cfcf 100644 --- a/Libraries/rocALUTION/cg/Makefile +++ b/Libraries/rocALUTION/cg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/cg_amg/Makefile b/Libraries/rocALUTION/cg_amg/Makefile index c623e47b68..81b22c268a 100644 --- a/Libraries/rocALUTION/cg_amg/Makefile +++ b/Libraries/rocALUTION/cg_amg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/cg_rsamg/Makefile b/Libraries/rocALUTION/cg_rsamg/Makefile index 6ce1d4e4f1..ae1f9bd5fd 100644 --- a/Libraries/rocALUTION/cg_rsamg/Makefile +++ b/Libraries/rocALUTION/cg_rsamg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/cg_saamg/Makefile b/Libraries/rocALUTION/cg_saamg/Makefile index 17c8b613cf..e3fea1e6f2 100644 --- a/Libraries/rocALUTION/cg_saamg/Makefile +++ b/Libraries/rocALUTION/cg_saamg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/cmk/Makefile b/Libraries/rocALUTION/cmk/Makefile index afc62a0470..8a968a1cad 100644 --- a/Libraries/rocALUTION/cmk/Makefile +++ b/Libraries/rocALUTION/cmk/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/complex/Makefile b/Libraries/rocALUTION/complex/Makefile index 2840bcaa5a..18382cac18 100644 --- a/Libraries/rocALUTION/complex/Makefile +++ b/Libraries/rocALUTION/complex/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/direct/Makefile b/Libraries/rocALUTION/direct/Makefile index 7ca946e7bf..687b3d8ed4 100644 --- a/Libraries/rocALUTION/direct/Makefile +++ b/Libraries/rocALUTION/direct/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/fcg/Makefile b/Libraries/rocALUTION/fcg/Makefile index db044adca0..04c65c33c2 100644 --- a/Libraries/rocALUTION/fcg/Makefile +++ b/Libraries/rocALUTION/fcg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/fgmres/Makefile b/Libraries/rocALUTION/fgmres/Makefile index 1ba9de1e42..228ebe4b12 100644 --- a/Libraries/rocALUTION/fgmres/Makefile +++ b/Libraries/rocALUTION/fgmres/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/fixed_point/Makefile b/Libraries/rocALUTION/fixed_point/Makefile index 50f0c712fc..80c2064340 100644 --- a/Libraries/rocALUTION/fixed_point/Makefile +++ b/Libraries/rocALUTION/fixed_point/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/gmres/Makefile b/Libraries/rocALUTION/gmres/Makefile index dd15615c6e..0283b361f5 100644 --- a/Libraries/rocALUTION/gmres/Makefile +++ b/Libraries/rocALUTION/gmres/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/idr/Makefile b/Libraries/rocALUTION/idr/Makefile index 0a09b177a8..bc6b0d4b39 100644 --- a/Libraries/rocALUTION/idr/Makefile +++ b/Libraries/rocALUTION/idr/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/itsolve/Makefile b/Libraries/rocALUTION/itsolve/Makefile index 6a7bccdc31..d2fa17797d 100644 --- a/Libraries/rocALUTION/itsolve/Makefile +++ b/Libraries/rocALUTION/itsolve/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/key/Makefile b/Libraries/rocALUTION/key/Makefile index 83ef5906ad..fa975b348e 100644 --- a/Libraries/rocALUTION/key/Makefile +++ b/Libraries/rocALUTION/key/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/me_preconditioner/Makefile b/Libraries/rocALUTION/me_preconditioner/Makefile index 7746f921c9..55f0cf9bc9 100644 --- a/Libraries/rocALUTION/me_preconditioner/Makefile +++ b/Libraries/rocALUTION/me_preconditioner/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/mixed_precision/Makefile b/Libraries/rocALUTION/mixed_precision/Makefile index 2ec6d96fcd..e90bb23353 100644 --- a/Libraries/rocALUTION/mixed_precision/Makefile +++ b/Libraries/rocALUTION/mixed_precision/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/power_method/Makefile b/Libraries/rocALUTION/power_method/Makefile index ffa256fa07..2cd7e4bea3 100644 --- a/Libraries/rocALUTION/power_method/Makefile +++ b/Libraries/rocALUTION/power_method/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/sa_amg/Makefile b/Libraries/rocALUTION/sa_amg/Makefile index c228755dbb..4a6523a703 100644 --- a/Libraries/rocALUTION/sa_amg/Makefile +++ b/Libraries/rocALUTION/sa_amg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/simple_spmv/Makefile b/Libraries/rocALUTION/simple_spmv/Makefile index 0d6e2cd705..091d646e48 100644 --- a/Libraries/rocALUTION/simple_spmv/Makefile +++ b/Libraries/rocALUTION/simple_spmv/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/stencil/Makefile b/Libraries/rocALUTION/stencil/Makefile index 2e628be9b2..d06da1460a 100644 --- a/Libraries/rocALUTION/stencil/Makefile +++ b/Libraries/rocALUTION/stencil/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/tns/Makefile b/Libraries/rocALUTION/tns/Makefile index b72601ffe8..65c62246b2 100644 --- a/Libraries/rocALUTION/tns/Makefile +++ b/Libraries/rocALUTION/tns/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/ua_amg/Makefile b/Libraries/rocALUTION/ua_amg/Makefile index 907d6c4f3b..39b2da79ea 100644 --- a/Libraries/rocALUTION/ua_amg/Makefile +++ b/Libraries/rocALUTION/ua_amg/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocALUTION/var_precond/Makefile b/Libraries/rocALUTION/var_precond/Makefile index 907b66b781..78662a4a54 100644 --- a/Libraries/rocALUTION/var_precond/Makefile +++ b/Libraries/rocALUTION/var_precond/Makefile @@ -31,7 +31,7 @@ endif # Common variables and flags CXX ?= g++ -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) ROCALUTION_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocBLAS/level_1/axpy/Makefile b/Libraries/rocBLAS/level_1/axpy/Makefile index 929a45c977..a72e95eb08 100644 --- a/Libraries/rocBLAS/level_1/axpy/Makefile +++ b/Libraries/rocBLAS/level_1/axpy/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_1/dot/Makefile b/Libraries/rocBLAS/level_1/dot/Makefile index cdf2b511e7..233c256a9d 100644 --- a/Libraries/rocBLAS/level_1/dot/Makefile +++ b/Libraries/rocBLAS/level_1/dot/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_1/nrm2/Makefile b/Libraries/rocBLAS/level_1/nrm2/Makefile index 1dd1365307..8ba6d003a6 100644 --- a/Libraries/rocBLAS/level_1/nrm2/Makefile +++ b/Libraries/rocBLAS/level_1/nrm2/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_1/scal/Makefile b/Libraries/rocBLAS/level_1/scal/Makefile index d23156d893..f23bb9180f 100644 --- a/Libraries/rocBLAS/level_1/scal/Makefile +++ b/Libraries/rocBLAS/level_1/scal/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_1/swap/Makefile b/Libraries/rocBLAS/level_1/swap/Makefile index a988a47f1f..fed5377333 100644 --- a/Libraries/rocBLAS/level_1/swap/Makefile +++ b/Libraries/rocBLAS/level_1/swap/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_2/gemv/Makefile b/Libraries/rocBLAS/level_2/gemv/Makefile index 1c6d8b59b3..4a2e063416 100644 --- a/Libraries/rocBLAS/level_2/gemv/Makefile +++ b/Libraries/rocBLAS/level_2/gemv/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_2/her/Makefile b/Libraries/rocBLAS/level_2/her/Makefile index cf393b4f53..fb86d02c5d 100644 --- a/Libraries/rocBLAS/level_2/her/Makefile +++ b/Libraries/rocBLAS/level_2/her/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_3/gemm/Makefile b/Libraries/rocBLAS/level_3/gemm/Makefile index 689be72929..e98594c29a 100644 --- a/Libraries/rocBLAS/level_3/gemm/Makefile +++ b/Libraries/rocBLAS/level_3/gemm/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocBLAS/level_3/gemm_strided_batched/Makefile b/Libraries/rocBLAS/level_3/gemm_strided_batched/Makefile index 2ed3c1095d..a4d38e2574 100644 --- a/Libraries/rocBLAS/level_3/gemm_strided_batched/Makefile +++ b/Libraries/rocBLAS/level_3/gemm_strided_batched/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocCV/bilateral_filter/Makefile b/Libraries/rocCV/bilateral_filter/Makefile index 16b0521d30..f49da52990 100644 --- a/Libraries/rocCV/bilateral_filter/Makefile +++ b/Libraries/rocCV/bilateral_filter/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/bnd_box/Makefile b/Libraries/rocCV/bnd_box/Makefile index 69ff742c85..433ce01d9b 100644 --- a/Libraries/rocCV/bnd_box/Makefile +++ b/Libraries/rocCV/bnd_box/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/center_crop/Makefile b/Libraries/rocCV/center_crop/Makefile index 45da94da34..003e9e61a6 100644 --- a/Libraries/rocCV/center_crop/Makefile +++ b/Libraries/rocCV/center_crop/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/composite/Makefile b/Libraries/rocCV/composite/Makefile index 69184cc88f..402399f125 100644 --- a/Libraries/rocCV/composite/Makefile +++ b/Libraries/rocCV/composite/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/copy_make_border/Makefile b/Libraries/rocCV/copy_make_border/Makefile index 0f3f204b96..c7eeefe925 100644 --- a/Libraries/rocCV/copy_make_border/Makefile +++ b/Libraries/rocCV/copy_make_border/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/cropandresize/Makefile b/Libraries/rocCV/cropandresize/Makefile index 3aa2c7d32d..8276d8000a 100644 --- a/Libraries/rocCV/cropandresize/Makefile +++ b/Libraries/rocCV/cropandresize/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/custom_crop/Makefile b/Libraries/rocCV/custom_crop/Makefile index e4a1ec24e0..94a2dd9122 100644 --- a/Libraries/rocCV/custom_crop/Makefile +++ b/Libraries/rocCV/custom_crop/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/gamma_contrast/Makefile b/Libraries/rocCV/gamma_contrast/Makefile index c48a948dac..34d5b22c2c 100644 --- a/Libraries/rocCV/gamma_contrast/Makefile +++ b/Libraries/rocCV/gamma_contrast/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/normalize/Makefile b/Libraries/rocCV/normalize/Makefile index 70f0266909..a938a430b0 100644 --- a/Libraries/rocCV/normalize/Makefile +++ b/Libraries/rocCV/normalize/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocCV/warp_perspective/Makefile b/Libraries/rocCV/warp_perspective/Makefile index 542997824b..1f11145f75 100644 --- a/Libraries/rocCV/warp_perspective/Makefile +++ b/Libraries/rocCV/warp_perspective/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv diff --git a/Libraries/rocDecode/rocdec_decode/Makefile b/Libraries/rocDecode/rocdec_decode/Makefile index efd4b8c6df..f06b016164 100644 --- a/Libraries/rocDecode/rocdec_decode/Makefile +++ b/Libraries/rocDecode/rocdec_decode/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCDECODE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocDecode/video_decode/Makefile b/Libraries/rocDecode/video_decode/Makefile index 284e8e6a82..99da825ccc 100644 --- a/Libraries/rocDecode/video_decode/Makefile +++ b/Libraries/rocDecode/video_decode/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_decode_batch/Makefile b/Libraries/rocDecode/video_decode_batch/Makefile index aced12a1c1..3e3ba90978 100644 --- a/Libraries/rocDecode/video_decode_batch/Makefile +++ b/Libraries/rocDecode/video_decode_batch/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_decode_mem/Makefile b/Libraries/rocDecode/video_decode_mem/Makefile index 050c48f85f..728aefb9fe 100644 --- a/Libraries/rocDecode/video_decode_mem/Makefile +++ b/Libraries/rocDecode/video_decode_mem/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_decode_multi_files/Makefile b/Libraries/rocDecode/video_decode_multi_files/Makefile index bcd2da7061..a983efea7c 100644 --- a/Libraries/rocDecode/video_decode_multi_files/Makefile +++ b/Libraries/rocDecode/video_decode_multi_files/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_decode_perf/Makefile b/Libraries/rocDecode/video_decode_perf/Makefile index aa0dbf1a40..67d891f1bd 100644 --- a/Libraries/rocDecode/video_decode_perf/Makefile +++ b/Libraries/rocDecode/video_decode_perf/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_decode_pic_files/Makefile b/Libraries/rocDecode/video_decode_pic_files/Makefile index 757238b0f6..31ca81af5d 100644 --- a/Libraries/rocDecode/video_decode_pic_files/Makefile +++ b/Libraries/rocDecode/video_decode_pic_files/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_decode_raw/Makefile b/Libraries/rocDecode/video_decode_raw/Makefile index 80080dff82..8b3e4c62ca 100644 --- a/Libraries/rocDecode/video_decode_raw/Makefile +++ b/Libraries/rocDecode/video_decode_raw/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_decode_rgb/Makefile b/Libraries/rocDecode/video_decode_rgb/Makefile index 5a35ac2d8b..648078329f 100644 --- a/Libraries/rocDecode/video_decode_rgb/Makefile +++ b/Libraries/rocDecode/video_decode_rgb/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocDecode/video_to_sequence/Makefile b/Libraries/rocDecode/video_to_sequence/Makefile index 9d76e3817f..ecbef6233b 100644 --- a/Libraries/rocDecode/video_to_sequence/Makefile +++ b/Libraries/rocDecode/video_to_sequence/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocFFT/Makefile b/Libraries/rocFFT/Makefile index 93f42a2463..2d46d76537 100644 --- a/Libraries/rocFFT/Makefile +++ b/Libraries/rocFFT/Makefile @@ -21,7 +21,7 @@ # SOFTWARE. # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) EXAMPLES := \ callback \ diff --git a/Libraries/rocFFT/callback/Makefile b/Libraries/rocFFT/callback/Makefile index a8039252a3..39632da1bb 100644 --- a/Libraries/rocFFT/callback/Makefile +++ b/Libraries/rocFFT/callback/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCFFT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocFFT/complex_complex/Makefile b/Libraries/rocFFT/complex_complex/Makefile index f5a2318d9e..5845b16ae1 100644 --- a/Libraries/rocFFT/complex_complex/Makefile +++ b/Libraries/rocFFT/complex_complex/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCFFT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocFFT/complex_real/Makefile b/Libraries/rocFFT/complex_real/Makefile index 524b2db58a..9b073f5021 100644 --- a/Libraries/rocFFT/complex_real/Makefile +++ b/Libraries/rocFFT/complex_real/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCFFT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocFFT/multi_gpu/Makefile b/Libraries/rocFFT/multi_gpu/Makefile index d2fe816afb..592b968cbb 100644 --- a/Libraries/rocFFT/multi_gpu/Makefile +++ b/Libraries/rocFFT/multi_gpu/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCFFT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocFFT/real_complex/Makefile b/Libraries/rocFFT/real_complex/Makefile index 23ba06cc0b..0194714d87 100644 --- a/Libraries/rocFFT/real_complex/Makefile +++ b/Libraries/rocFFT/real_complex/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCFFT_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocJPEG/rocjpeg_decode/Makefile b/Libraries/rocJPEG/rocjpeg_decode/Makefile index f6af66a8f2..0d72da712c 100644 --- a/Libraries/rocJPEG/rocjpeg_decode/Makefile +++ b/Libraries/rocJPEG/rocjpeg_decode/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCJPEG_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile b/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile index 7a45a90f32..1ccaff1531 100644 --- a/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile +++ b/Libraries/rocJPEG/rocjpeg_decode_batched/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCJPEG_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile b/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile index 11e10f58c5..702f828e86 100644 --- a/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile +++ b/Libraries/rocJPEG/rocjpeg_decode_perf/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCJPEG_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocPRIM/block_sum/Makefile b/Libraries/rocPRIM/block_sum/Makefile index 9c42100596..91cf1d93d7 100644 --- a/Libraries/rocPRIM/block_sum/Makefile +++ b/Libraries/rocPRIM/block_sum/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPRIM_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocPRIM/device_sum/Makefile b/Libraries/rocPRIM/device_sum/Makefile index b03ec2b02d..f202fb1f9c 100644 --- a/Libraries/rocPRIM/device_sum/Makefile +++ b/Libraries/rocPRIM/device_sum/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPRIM_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/api_buffered_tracing/Makefile b/Libraries/rocProfiler-SDK/api_buffered_tracing/Makefile index 9d84cb5895..50f95b56dc 100644 --- a/Libraries/rocProfiler-SDK/api_buffered_tracing/Makefile +++ b/Libraries/rocProfiler-SDK/api_buffered_tracing/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/api_callback_tracing/Makefile b/Libraries/rocProfiler-SDK/api_callback_tracing/Makefile index 1034e3329f..0d13d66e39 100644 --- a/Libraries/rocProfiler-SDK/api_callback_tracing/Makefile +++ b/Libraries/rocProfiler-SDK/api_callback_tracing/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile b/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile index 7671d92191..408005e722 100644 --- a/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile +++ b/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/code_object_tracing/Makefile b/Libraries/rocProfiler-SDK/code_object_tracing/Makefile index 0d4a456325..e981af144d 100644 --- a/Libraries/rocProfiler-SDK/code_object_tracing/Makefile +++ b/Libraries/rocProfiler-SDK/code_object_tracing/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/counter_collection/buffer/Makefile b/Libraries/rocProfiler-SDK/counter_collection/buffer/Makefile index a3762bea62..a44c1fe81e 100644 --- a/Libraries/rocProfiler-SDK/counter_collection/buffer/Makefile +++ b/Libraries/rocProfiler-SDK/counter_collection/buffer/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/counter_collection/buffer_device_serialization/Makefile b/Libraries/rocProfiler-SDK/counter_collection/buffer_device_serialization/Makefile index 34da72322a..0ace7a848e 100644 --- a/Libraries/rocProfiler-SDK/counter_collection/buffer_device_serialization/Makefile +++ b/Libraries/rocProfiler-SDK/counter_collection/buffer_device_serialization/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/counter_collection/callback/Makefile b/Libraries/rocProfiler-SDK/counter_collection/callback/Makefile index 200a76aef5..b9793fb1cb 100644 --- a/Libraries/rocProfiler-SDK/counter_collection/callback/Makefile +++ b/Libraries/rocProfiler-SDK/counter_collection/callback/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/counter_collection/device_profiling/Makefile b/Libraries/rocProfiler-SDK/counter_collection/device_profiling/Makefile index c4239d86d5..8943a79f01 100644 --- a/Libraries/rocProfiler-SDK/counter_collection/device_profiling/Makefile +++ b/Libraries/rocProfiler-SDK/counter_collection/device_profiling/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/counter_collection/device_profiling_sync/Makefile b/Libraries/rocProfiler-SDK/counter_collection/device_profiling_sync/Makefile index 36d6545888..016db952e5 100644 --- a/Libraries/rocProfiler-SDK/counter_collection/device_profiling_sync/Makefile +++ b/Libraries/rocProfiler-SDK/counter_collection/device_profiling_sync/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/counter_collection/print_functional_counters/Makefile b/Libraries/rocProfiler-SDK/counter_collection/print_functional_counters/Makefile index f93c02a80e..a507b078a4 100644 --- a/Libraries/rocProfiler-SDK/counter_collection/print_functional_counters/Makefile +++ b/Libraries/rocProfiler-SDK/counter_collection/print_functional_counters/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/external_correlation_id_request/Makefile b/Libraries/rocProfiler-SDK/external_correlation_id_request/Makefile index c42dd1e7bd..7fc8cdbc21 100644 --- a/Libraries/rocProfiler-SDK/external_correlation_id_request/Makefile +++ b/Libraries/rocProfiler-SDK/external_correlation_id_request/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/intercept_table/Makefile b/Libraries/rocProfiler-SDK/intercept_table/Makefile index 44fc1972d1..139836f815 100644 --- a/Libraries/rocProfiler-SDK/intercept_table/Makefile +++ b/Libraries/rocProfiler-SDK/intercept_table/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/openmp_target/Makefile b/Libraries/rocProfiler-SDK/openmp_target/Makefile index 1ceae7fbf9..5405a38bf0 100644 --- a/Libraries/rocProfiler-SDK/openmp_target/Makefile +++ b/Libraries/rocProfiler-SDK/openmp_target/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/pc_sampling/Makefile b/Libraries/rocProfiler-SDK/pc_sampling/Makefile index c8967545d2..170247a0af 100644 --- a/Libraries/rocProfiler-SDK/pc_sampling/Makefile +++ b/Libraries/rocProfiler-SDK/pc_sampling/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocProfiler-SDK/thread_trace/Makefile b/Libraries/rocProfiler-SDK/thread_trace/Makefile index bb699a3b1e..cb427804c4 100644 --- a/Libraries/rocProfiler-SDK/thread_trace/Makefile +++ b/Libraries/rocProfiler-SDK/thread_trace/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocRAND/c_cpp_api/simple_distributions_cpp/Makefile b/Libraries/rocRAND/c_cpp_api/simple_distributions_cpp/Makefile index 7a85dd4549..001042f70d 100644 --- a/Libraries/rocRAND/c_cpp_api/simple_distributions_cpp/Makefile +++ b/Libraries/rocRAND/c_cpp_api/simple_distributions_cpp/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocRAND/device_api/pseudorandom_generations/Makefile b/Libraries/rocRAND/device_api/pseudorandom_generations/Makefile index 92506e2bbb..9d89d78803 100644 --- a/Libraries/rocRAND/device_api/pseudorandom_generations/Makefile +++ b/Libraries/rocRAND/device_api/pseudorandom_generations/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocRAND/device_api/quasirandom_generations/Makefile b/Libraries/rocRAND/device_api/quasirandom_generations/Makefile index d3e6fea894..3e8ad8dd43 100644 --- a/Libraries/rocRAND/device_api/quasirandom_generations/Makefile +++ b/Libraries/rocRAND/device_api/quasirandom_generations/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../../../External GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include diff --git a/Libraries/rocSOLVER/getf2/Makefile b/Libraries/rocSOLVER/getf2/Makefile index 8d9899ec7e..d4aa3b3182 100644 --- a/Libraries/rocSOLVER/getf2/Makefile +++ b/Libraries/rocSOLVER/getf2/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSOLVER/getri/Makefile b/Libraries/rocSOLVER/getri/Makefile index e1bf516581..b543aba604 100644 --- a/Libraries/rocSOLVER/getri/Makefile +++ b/Libraries/rocSOLVER/getri/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSOLVER/syev/Makefile b/Libraries/rocSOLVER/syev/Makefile index 9446df3d9b..fef4f7af7e 100644 --- a/Libraries/rocSOLVER/syev/Makefile +++ b/Libraries/rocSOLVER/syev/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSOLVER/syev_batched/Makefile b/Libraries/rocSOLVER/syev_batched/Makefile index f6d0919600..4df5f706e8 100644 --- a/Libraries/rocSOLVER/syev_batched/Makefile +++ b/Libraries/rocSOLVER/syev_batched/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSOLVER/syev_strided_batched/Makefile b/Libraries/rocSOLVER/syev_strided_batched/Makefile index 5dcf297e46..bb1d247bc9 100644 --- a/Libraries/rocSOLVER/syev_strided_batched/Makefile +++ b/Libraries/rocSOLVER/syev_strided_batched/Makefile @@ -30,7 +30,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCBLAS_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_1/axpyi/Makefile b/Libraries/rocSPARSE/level_1/axpyi/Makefile index 171ee98b04..2abd46b782 100644 --- a/Libraries/rocSPARSE/level_1/axpyi/Makefile +++ b/Libraries/rocSPARSE/level_1/axpyi/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_1/doti/Makefile b/Libraries/rocSPARSE/level_1/doti/Makefile index 6b632afb3d..dd0e1179aa 100644 --- a/Libraries/rocSPARSE/level_1/doti/Makefile +++ b/Libraries/rocSPARSE/level_1/doti/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_1/gthr/Makefile b/Libraries/rocSPARSE/level_1/gthr/Makefile index 79043e0bc9..ce57867886 100644 --- a/Libraries/rocSPARSE/level_1/gthr/Makefile +++ b/Libraries/rocSPARSE/level_1/gthr/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_1/roti/Makefile b/Libraries/rocSPARSE/level_1/roti/Makefile index b216989f8f..16fc0728a1 100644 --- a/Libraries/rocSPARSE/level_1/roti/Makefile +++ b/Libraries/rocSPARSE/level_1/roti/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_1/sctr/Makefile b/Libraries/rocSPARSE/level_1/sctr/Makefile index 88972e8a68..db04689106 100644 --- a/Libraries/rocSPARSE/level_1/sctr/Makefile +++ b/Libraries/rocSPARSE/level_1/sctr/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/bsrmv/Makefile b/Libraries/rocSPARSE/level_2/bsrmv/Makefile index ffaebb32da..af12396612 100644 --- a/Libraries/rocSPARSE/level_2/bsrmv/Makefile +++ b/Libraries/rocSPARSE/level_2/bsrmv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/bsrsv/Makefile b/Libraries/rocSPARSE/level_2/bsrsv/Makefile index 517b15abc4..55e1f37ec4 100644 --- a/Libraries/rocSPARSE/level_2/bsrsv/Makefile +++ b/Libraries/rocSPARSE/level_2/bsrsv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/bsrxmv/Makefile b/Libraries/rocSPARSE/level_2/bsrxmv/Makefile index 8af79e3d40..10c7c2a424 100644 --- a/Libraries/rocSPARSE/level_2/bsrxmv/Makefile +++ b/Libraries/rocSPARSE/level_2/bsrxmv/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/coomv/Makefile b/Libraries/rocSPARSE/level_2/coomv/Makefile index 497dbd3cf7..5c7dd9770a 100644 --- a/Libraries/rocSPARSE/level_2/coomv/Makefile +++ b/Libraries/rocSPARSE/level_2/coomv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/csritsv/Makefile b/Libraries/rocSPARSE/level_2/csritsv/Makefile index 94e2c67b98..fe8be4c0ae 100644 --- a/Libraries/rocSPARSE/level_2/csritsv/Makefile +++ b/Libraries/rocSPARSE/level_2/csritsv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/csrmv/Makefile b/Libraries/rocSPARSE/level_2/csrmv/Makefile index c4f3131241..cd737dffd5 100644 --- a/Libraries/rocSPARSE/level_2/csrmv/Makefile +++ b/Libraries/rocSPARSE/level_2/csrmv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/csrsv/Makefile b/Libraries/rocSPARSE/level_2/csrsv/Makefile index 56b2f201cd..4981ca30d3 100644 --- a/Libraries/rocSPARSE/level_2/csrsv/Makefile +++ b/Libraries/rocSPARSE/level_2/csrsv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/ellmv/Makefile b/Libraries/rocSPARSE/level_2/ellmv/Makefile index 04d01288c8..087719145b 100644 --- a/Libraries/rocSPARSE/level_2/ellmv/Makefile +++ b/Libraries/rocSPARSE/level_2/ellmv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/gebsrmv/Makefile b/Libraries/rocSPARSE/level_2/gebsrmv/Makefile index 47c5c05580..287b9af77f 100644 --- a/Libraries/rocSPARSE/level_2/gebsrmv/Makefile +++ b/Libraries/rocSPARSE/level_2/gebsrmv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/gemvi/Makefile b/Libraries/rocSPARSE/level_2/gemvi/Makefile index 28b458949e..29bbeb6e3f 100644 --- a/Libraries/rocSPARSE/level_2/gemvi/Makefile +++ b/Libraries/rocSPARSE/level_2/gemvi/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/spitsv/Makefile b/Libraries/rocSPARSE/level_2/spitsv/Makefile index 01216744c1..419188d6e3 100644 --- a/Libraries/rocSPARSE/level_2/spitsv/Makefile +++ b/Libraries/rocSPARSE/level_2/spitsv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/spmv/Makefile b/Libraries/rocSPARSE/level_2/spmv/Makefile index 3bbdcf42dc..e03b96cbac 100644 --- a/Libraries/rocSPARSE/level_2/spmv/Makefile +++ b/Libraries/rocSPARSE/level_2/spmv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_2/spsv/Makefile b/Libraries/rocSPARSE/level_2/spsv/Makefile index 1383be640d..cb5f38b6fa 100644 --- a/Libraries/rocSPARSE/level_2/spsv/Makefile +++ b/Libraries/rocSPARSE/level_2/spsv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/bsrmm/Makefile b/Libraries/rocSPARSE/level_3/bsrmm/Makefile index 78aec2f0e9..90814e1c8f 100644 --- a/Libraries/rocSPARSE/level_3/bsrmm/Makefile +++ b/Libraries/rocSPARSE/level_3/bsrmm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/bsrsm/Makefile b/Libraries/rocSPARSE/level_3/bsrsm/Makefile index d87ae0bba6..0480d29127 100644 --- a/Libraries/rocSPARSE/level_3/bsrsm/Makefile +++ b/Libraries/rocSPARSE/level_3/bsrsm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/csrmm/Makefile b/Libraries/rocSPARSE/level_3/csrmm/Makefile index 0a8edc4523..d6e5a1ce1a 100644 --- a/Libraries/rocSPARSE/level_3/csrmm/Makefile +++ b/Libraries/rocSPARSE/level_3/csrmm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/csrsm/Makefile b/Libraries/rocSPARSE/level_3/csrsm/Makefile index bd3665aad9..7da63fd4d1 100644 --- a/Libraries/rocSPARSE/level_3/csrsm/Makefile +++ b/Libraries/rocSPARSE/level_3/csrsm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/gebsrmm/Makefile b/Libraries/rocSPARSE/level_3/gebsrmm/Makefile index d450c9e8e0..fa6fada44a 100644 --- a/Libraries/rocSPARSE/level_3/gebsrmm/Makefile +++ b/Libraries/rocSPARSE/level_3/gebsrmm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/gemmi/Makefile b/Libraries/rocSPARSE/level_3/gemmi/Makefile index 65720e32e6..7307566783 100644 --- a/Libraries/rocSPARSE/level_3/gemmi/Makefile +++ b/Libraries/rocSPARSE/level_3/gemmi/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/sddmm/Makefile b/Libraries/rocSPARSE/level_3/sddmm/Makefile index f625562af7..46e2f545b2 100644 --- a/Libraries/rocSPARSE/level_3/sddmm/Makefile +++ b/Libraries/rocSPARSE/level_3/sddmm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/spmm/Makefile b/Libraries/rocSPARSE/level_3/spmm/Makefile index f65e7726c9..af0c08aad7 100644 --- a/Libraries/rocSPARSE/level_3/spmm/Makefile +++ b/Libraries/rocSPARSE/level_3/spmm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/level_3/spsm/Makefile b/Libraries/rocSPARSE/level_3/spsm/Makefile index ba1baaf7c4..7fe0fa9556 100644 --- a/Libraries/rocSPARSE/level_3/spsm/Makefile +++ b/Libraries/rocSPARSE/level_3/spsm/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/preconditioner/bsric0/Makefile b/Libraries/rocSPARSE/preconditioner/bsric0/Makefile index ac1ac9a401..3da8d92ade 100644 --- a/Libraries/rocSPARSE/preconditioner/bsric0/Makefile +++ b/Libraries/rocSPARSE/preconditioner/bsric0/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/preconditioner/bsrilu0/Makefile b/Libraries/rocSPARSE/preconditioner/bsrilu0/Makefile index d6979343d5..42fedcf3f8 100644 --- a/Libraries/rocSPARSE/preconditioner/bsrilu0/Makefile +++ b/Libraries/rocSPARSE/preconditioner/bsrilu0/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/preconditioner/csric0/Makefile b/Libraries/rocSPARSE/preconditioner/csric0/Makefile index 9df7cc5ddd..8ced19d4a6 100644 --- a/Libraries/rocSPARSE/preconditioner/csric0/Makefile +++ b/Libraries/rocSPARSE/preconditioner/csric0/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/preconditioner/csrilu0/Makefile b/Libraries/rocSPARSE/preconditioner/csrilu0/Makefile index d496c1df81..3a9f226ed8 100644 --- a/Libraries/rocSPARSE/preconditioner/csrilu0/Makefile +++ b/Libraries/rocSPARSE/preconditioner/csrilu0/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/preconditioner/csritilu0/Makefile b/Libraries/rocSPARSE/preconditioner/csritilu0/Makefile index 2d79346060..5a212254e1 100644 --- a/Libraries/rocSPARSE/preconditioner/csritilu0/Makefile +++ b/Libraries/rocSPARSE/preconditioner/csritilu0/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/preconditioner/gpsv/Makefile b/Libraries/rocSPARSE/preconditioner/gpsv/Makefile index 0e8e9b16a3..f1aafe61dd 100644 --- a/Libraries/rocSPARSE/preconditioner/gpsv/Makefile +++ b/Libraries/rocSPARSE/preconditioner/gpsv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocSPARSE/preconditioner/gtsv/Makefile b/Libraries/rocSPARSE/preconditioner/gtsv/Makefile index a349c67599..abab7a5745 100644 --- a/Libraries/rocSPARSE/preconditioner/gtsv/Makefile +++ b/Libraries/rocSPARSE/preconditioner/gtsv/Makefile @@ -28,7 +28,7 @@ ifneq ($(GPU_RUNTIME), HIP) $(error GPU_RUNTIME is set to "$(GPU_RUNTIME)". GPU_RUNTIME must be HIP.) endif -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCSPARSE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocThrust/device_ptr/Makefile b/Libraries/rocThrust/device_ptr/Makefile index 455c6f83a6..e1aeef06c8 100644 --- a/Libraries/rocThrust/device_ptr/Makefile +++ b/Libraries/rocThrust/device_ptr/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCTHRUST_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocThrust/norm/Makefile b/Libraries/rocThrust/norm/Makefile index d0ffebbf5a..322e59d92d 100644 --- a/Libraries/rocThrust/norm/Makefile +++ b/Libraries/rocThrust/norm/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCTHRUST_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocThrust/reduce_sum/Makefile b/Libraries/rocThrust/reduce_sum/Makefile index 3fccb1d987..601f98eda3 100644 --- a/Libraries/rocThrust/reduce_sum/Makefile +++ b/Libraries/rocThrust/reduce_sum/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCTHRUST_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocThrust/remove_points/Makefile b/Libraries/rocThrust/remove_points/Makefile index 3accd1e7ad..0e36d64073 100644 --- a/Libraries/rocThrust/remove_points/Makefile +++ b/Libraries/rocThrust/remove_points/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCTHRUST_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocThrust/saxpy/Makefile b/Libraries/rocThrust/saxpy/Makefile index a3033c055f..32b23faa3f 100644 --- a/Libraries/rocThrust/saxpy/Makefile +++ b/Libraries/rocThrust/saxpy/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCTHRUST_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocThrust/vectors/Makefile b/Libraries/rocThrust/vectors/Makefile index 9bd6da135a..e2142a3b79 100644 --- a/Libraries/rocThrust/vectors/Makefile +++ b/Libraries/rocThrust/vectors/Makefile @@ -29,7 +29,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCTHRUST_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/hiprtc_gemm/Makefile b/Libraries/rocWMMA/hiprtc_gemm/Makefile index 536306e545..3425ecfbe5 100644 --- a/Libraries/rocWMMA/hiprtc_gemm/Makefile +++ b/Libraries/rocWMMA/hiprtc_gemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/perf_dgemm/Makefile b/Libraries/rocWMMA/perf_dgemm/Makefile index 09f6919803..2255ba223f 100644 --- a/Libraries/rocWMMA/perf_dgemm/Makefile +++ b/Libraries/rocWMMA/perf_dgemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/perf_hgemm/Makefile b/Libraries/rocWMMA/perf_hgemm/Makefile index 6f2c68b29d..3f9f615577 100644 --- a/Libraries/rocWMMA/perf_hgemm/Makefile +++ b/Libraries/rocWMMA/perf_hgemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/perf_i8gemm/Makefile b/Libraries/rocWMMA/perf_i8gemm/Makefile index 9470d68693..11f0477b22 100644 --- a/Libraries/rocWMMA/perf_i8gemm/Makefile +++ b/Libraries/rocWMMA/perf_i8gemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/perf_sgemm/Makefile b/Libraries/rocWMMA/perf_sgemm/Makefile index 8c3ec3fde4..b1a618ddd3 100644 --- a/Libraries/rocWMMA/perf_sgemm/Makefile +++ b/Libraries/rocWMMA/perf_sgemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/simple_dgemm/Makefile b/Libraries/rocWMMA/simple_dgemm/Makefile index 3398a98d6f..59ec4a9905 100644 --- a/Libraries/rocWMMA/simple_dgemm/Makefile +++ b/Libraries/rocWMMA/simple_dgemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/simple_dgemv/Makefile b/Libraries/rocWMMA/simple_dgemv/Makefile index bed5e1044b..5f768cf84c 100644 --- a/Libraries/rocWMMA/simple_dgemv/Makefile +++ b/Libraries/rocWMMA/simple_dgemv/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/simple_dlrm/Makefile b/Libraries/rocWMMA/simple_dlrm/Makefile index 9b4bd77146..d580968445 100644 --- a/Libraries/rocWMMA/simple_dlrm/Makefile +++ b/Libraries/rocWMMA/simple_dlrm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/simple_hgemm/Makefile b/Libraries/rocWMMA/simple_hgemm/Makefile index 223619f6dc..7feb58e7d1 100644 --- a/Libraries/rocWMMA/simple_hgemm/Makefile +++ b/Libraries/rocWMMA/simple_hgemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/simple_sgemm/Makefile b/Libraries/rocWMMA/simple_sgemm/Makefile index 3ee39b5dd9..a7e420653d 100644 --- a/Libraries/rocWMMA/simple_sgemm/Makefile +++ b/Libraries/rocWMMA/simple_sgemm/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Libraries/rocWMMA/simple_sgemv/Makefile b/Libraries/rocWMMA/simple_sgemv/Makefile index 110b09d437..bbe116f75d 100644 --- a/Libraries/rocWMMA/simple_sgemv/Makefile +++ b/Libraries/rocWMMA/simple_sgemv/Makefile @@ -33,7 +33,7 @@ ifneq ($(GPU_RUNTIME), HIP) endif # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCWMMA_INCLUDE_DIR := $(HIP_INCLUDE_DIR) diff --git a/Programming-Guide/Tutorials/Performance-Optimization/basic_image_gamma_correction/Makefile b/Programming-Guide/Tutorials/Performance-Optimization/basic_image_gamma_correction/Makefile index f932474b1c..8252e943bf 100644 --- a/Programming-Guide/Tutorials/Performance-Optimization/basic_image_gamma_correction/Makefile +++ b/Programming-Guide/Tutorials/Performance-Optimization/basic_image_gamma_correction/Makefile @@ -24,7 +24,7 @@ EXAMPLE := programming_guide_basic_image_gamma_correction GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Programming-Guide/Tutorials/Performance-Optimization/grid_stride_image_gamma_correction/Makefile b/Programming-Guide/Tutorials/Performance-Optimization/grid_stride_image_gamma_correction/Makefile index db325847bb..d4b804dedf 100644 --- a/Programming-Guide/Tutorials/Performance-Optimization/grid_stride_image_gamma_correction/Makefile +++ b/Programming-Guide/Tutorials/Performance-Optimization/grid_stride_image_gamma_correction/Makefile @@ -24,7 +24,7 @@ EXAMPLE := programming_guide_grid_stride_image_gamma_correction GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_multiply/Makefile b/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_multiply/Makefile index a25beb9355..a56f6915a6 100644 --- a/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_multiply/Makefile +++ b/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_multiply/Makefile @@ -24,7 +24,7 @@ EXAMPLE := programming_guide_tiling_matrix_multiply GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_transpose/Makefile b/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_transpose/Makefile index f65c851c9e..a2e245a39a 100644 --- a/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_transpose/Makefile +++ b/Programming-Guide/Tutorials/Performance-Optimization/tiling_matrix_transpose/Makefile @@ -24,7 +24,7 @@ EXAMPLE := programming_guide_tiling_matrix_transpose GPU_RUNTIME ?= HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Tools/ROCgdb/Makefile b/Tools/ROCgdb/Makefile index 2d725b73b2..6be3f3cfe6 100644 --- a/Tools/ROCgdb/Makefile +++ b/Tools/ROCgdb/Makefile @@ -26,7 +26,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Tools/rocprof-compute/Makefile b/Tools/rocprof-compute/Makefile index 9dd58087bc..3b4c33720c 100644 --- a/Tools/rocprof-compute/Makefile +++ b/Tools/rocprof-compute/Makefile @@ -24,7 +24,7 @@ EXAMPLE := rocprof-compute-occupancy GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Tools/rocprof-systems/Makefile b/Tools/rocprof-systems/Makefile index 79ad9c0329..19dd9d60ae 100644 --- a/Tools/rocprof-systems/Makefile +++ b/Tools/rocprof-systems/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME = HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc diff --git a/Tools/rocprofv3/Makefile b/Tools/rocprofv3/Makefile index c19c6ca90e..a494a1d85d 100644 --- a/Tools/rocprofv3/Makefile +++ b/Tools/rocprofv3/Makefile @@ -27,7 +27,7 @@ EXTERNAL_DIR := ../../External GPU_RUNTIME := HIP # HIP variables -ROCM_INSTALL_DIR ?= /opt/rocm +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc From d27b74268f3edd01b091c7a1172684de3f606fdb Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 17 Mar 2026 10:32:41 -0400 Subject: [PATCH 05/38] fix make command --- .../workflows/build-rocm-examples-reusable.yml | 2 +- .../hip_template_warp_size_reduction | Bin 0 -> 52008 bytes .../warp_size_reduction/hip_warp_size_reduction | Bin 0 -> 41968 bytes .../hip_calling_global_functions | Bin 0 -> 38576 bytes .../Tutorials/Programming-Patterns/bfs/graphgen | Bin 0 -> 26584 bytes Tools/ROCgdb/rocgdb-matmul | Bin 0 -> 58288 bytes 6 files changed, 1 insertion(+), 1 deletion(-) create mode 100755 HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/template_warp_size_reduction/hip_template_warp_size_reduction create mode 100755 HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/warp_size_reduction/hip_warp_size_reduction create mode 100755 HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_host_device_compilation_pass/hip_calling_global_functions create mode 100755 HIP-Doc/Tutorials/Programming-Patterns/bfs/graphgen create mode 100755 Tools/ROCgdb/rocgdb-matmul diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index e78b86ea4e..37abd99b64 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -222,7 +222,7 @@ jobs: - name: Makefile build if: ${{ !cancelled() }} run: | - make -j ROCM_INSTALL_DIR="${ROCM_PATH}" CXXFLAGS="--offload-arch=${{ matrix.gpu_config.gpu_target }}" + make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" - name: Clean the workspace if: always() diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/template_warp_size_reduction/hip_template_warp_size_reduction b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/template_warp_size_reduction/hip_template_warp_size_reduction new file mode 100755 index 0000000000000000000000000000000000000000..175fabe96994e79ece5393fc582a415a3d44d1c5 GIT binary patch literal 52008 zcmeHw4}4U`wg2p91L2R^fT$7wU3`hgKdf1ZF=%ZQ$il8{FeRYWs+Y}XldNoZ)7?!7 z7BL}UStBjaYD@k3hiBDdYYSFuBWe0O_nbNB%*>fTXYSmYy*JyOvyBD=lflTo$_U%MUg4y2er2p^o45feXJu?0 zt_nMojRJ1sG%cQ}6eMgka+FD!qoFJdkmNRs_>D$|$4GcO#~71P=8z!C4FyHqYH;Hk z4V94PX*kJc<8QNwm*tc2V1dRbp#3rH8}|v zivlf@g%SBAHI!bTNUu+%C*dw3C!w_G{QcoNQgy8P6lz$tklV8o!U%g-DhY5o#~71P zX7}rmqkN7ukUaf8E9~{GsCNk!p-@7Z-bFrdZE49xzPhPCufL^jYFk<9)Y1}5C}5e! z^^y6gOmpTfbQSbe>E4`%{$d*X zt7+&1Y3K*j&@Y4`Qst*A4gDKw=-*01Uz&#Ak%r!thW=0*dS4nk^^;WP>Q6)eC=ERq zjVYC$lhe@8OhYeCL${@&|0oT8OB(vtH1z&7^rLC$dFVi?%B!TISEr$0mxdlrL%%f* zy#?)d0y~ZM?Ne~aSRU$$LIWVt*;@+7CB01ODSt+z^GIBNEa>Z!=rmdw;FV1H%Vwi7 z24~}b6wARM{mV}HHyYR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41PoM^W30Ln8+vd+ji@St6Pn*?>A3otN7_AYFGF9tCt)j8pcpj5=QkEM$ zVf+p(npBggDdeH{1obJ>rj9Hc-n3#_0`!1}aHEQz7YJ6*rGcA&ml~zQr<>8;n=sb$ zhCU4$*2;ka0t2L4i?+H1LsVUh+Y@h&-fBwQ>JIqpzUU{WkdgrZ3l1>D>zD zl(u|+kk9Y508VR{QeLia=8yowA`Qg9?I`&qyb$rU7AkSM9=ce_(}oZVgi=>$%k;qokh#9)oz0`4=d&;fCU5`f|N^xnPv*#gaeS{#A&eJV|-E{+%ZlfHw-k z z{GOExkJ=;TmrF(glk@)*(Dmudb-+cPnm{$4-}E6l{YMc=@_2mWL9X{~UZdfaXNw2{ zl8VoM4Z2=lzCSqhQ%wLX3<)7Q|IZ*+FE8IWVdMf%lA2`0;rN4!4&<@*$#R6aFqgk4GXU(TsRmkE%k zB#MVf{7%ZxNJ?L#5>CcVQW9K#(JwWHc_PE)XXsDnU$(2WAunyONod!`EgGcXj?srC VlwFuc{_dwVsas{k5lWKf|3C8OxZ?l- literal 0 HcmV?d00001 diff --git a/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/warp_size_reduction/hip_warp_size_reduction b/HIP-Doc/Programming-Guide/HIP-C++-Language-Extensions/warp_size_reduction/hip_warp_size_reduction new file mode 100755 index 0000000000000000000000000000000000000000..4bfc082f9c89e8e0f62a5281f9b83b342cd472ff GIT binary patch literal 41968 zcmeHw4SZC^)%WZsf$)_L6cwe_OS)>TvSvfTV5=r13%jylNP-`p2S~o@|trjWuG4KD(o!Q*o>{V>v z=lwm;+nr?Zx#vIUoS8W@ckbM|v$M-x-l3w4&|fs)>45x?20@EA!y&pE~3*Rnsr2WpH?>AGb*lLkW>}rjo7)6sgt<*h8VzxdF-c{1 zzY0Cd=VuM1PoF))Z+k?&OR5NilFIZh4h0(~Ra_iu93KjX+uFysS56u~slpMDILf&_ zavzmx+RQoJ0<|xZ1n12Tq%$f@K-gn|V;D@o3f^XqGatxa!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_calling_global_functions b/HIP-Doc/Programming-Guide/Porting-CUDA-code-to-HIP/identifying_host_device_compilation_pass/hip_calling_global_functions new file mode 100755 index 0000000000000000000000000000000000000000..4bf118fb2fa77c961073e50d41722ea8a1c79289 GIT binary patch literal 38576 zcmeHw4Rl<^m1gzpU$t7T_7AdW%je z46Yh%s9#lISDi{!uaV_Zd~DM#x8Eg8pjdSkGG6Q-X%-epTm)RW0RBqg_{$FsKor8? zQUo6dzEHh?RRquRQYilqi{O7=1n)4*uPB1Qp$I+#c`guDLVPKVD@<3^$IuB#eE4)&#tr^QnxD|a3NI7oKMUj3 zi81TMJoiE;@z1CKc;%89R}RB;j%|l%18B!D# zybqY}oryk;i6EMcb;ncbSTfR;jP8s@;(c8SU^@n*k*;`Ov^V~-7^0oAg4yofmagka z45UQ_SGDz#NFtR^#-ck>N-CC2w{!qo+tCwEM$*Y>Je_LkXlmLD+}ieND&Apox7-=I zvnJBCtv=Fr+qSilUX*tGZQIh4Wj~I@S7k0`e#zpzAw&W6@+2Qr1LT5-I-D(KLF2v<;v_vr@6T7KmbF ztrkWeev`z@P6Xv(938|~ZPi`9Ihx*pzD@4QLqiHuBr@||eWuH2vSTnscXpyAb#u6Z z4UN>{CV_-hy0hbb@8dnAUfj~!vSH&r_e9oK*V(VD*If{+ttDM|2gWDKYQ-%ZH-e;w z*bZAkku}w8s;^h1xL#W)Rww$?tCNY2ovUs@QVnlkB-*KnFrQ9_F%#6io^!;6drpSs zCGV|zD#`fvlVJ&oHzorSJtxBi(q=ICO2+$7h6yBIn>I3T^cQiQizXQTMf{}(33%eE zu#9=}-(K&NHoU#wQ#QQ4-e+uhyWQ}t4bM7Ec)^A@HV)HXvf-hCa^Y1Q-k-w?an^>1 z0?UOd8$OW3!p^nf%WU{x+3-OdUVJeuW8@tQHWz$0d?<&7uC?J8*zlD$y#0O^w&54q z@~^bvm3~!;H8%WWTmA+c{t_F$(T1JEZfOfc zy(E%h(F0W=ZVZdFN5VF$`OA3;%uC>RQ38?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Fh(Nj*o@;G z8jMlUmgwJzm(XoY^mWC%2a@QuL?0+?YcI%(jIB|$zvs4CvM&a1B`K<(O^d9X-q@wwCgB>^ z(3^E`zg{@hBb@=aKN(Cu1Fr*?Yhn{O>*6Oh{V7ey`pJ7f|9=FW{rzudU4M^$P_R$M#~?hZK(76!ej~pRBAxUb zbUyQ3B&;7?*q@8=Sw%j56gcvN zyg?1%!cK42EvI&?9HyNne}4Uk^XOmD>z)@heWxMRFu(slkw8Ju4L9HC-x|!6?qlrHD5fDM{k}3o#8?h!8}h=vDxGI^GKllO#SA$(OFGzo+lNf ze=3juyk2*m*YteGYY+MSKaIp7erA4{b@TQI71hQ1?;FU5)oqU6JSQ8}^!f76kN*v5 z*>+REd2W@}^e<`tIsX|9y=liQz%h%VZ#x-A49`1S+Lvy;R87+3cC&3e_)8$Jy|e*Hhoqc_hzM|Ax!7(xy6>E8n0&cAuy(l)FJ zPUR-HiZ?2d`#+5<@?Vp~s0%}XvHfrETjo_E3wUI|D(5Aw$Cn|>xnTG=ukk6y+AulSbiqH=qQB=Ko^EaRV{{W0GrBMI? literal 0 HcmV?d00001 diff --git a/HIP-Doc/Tutorials/Programming-Patterns/bfs/graphgen b/HIP-Doc/Tutorials/Programming-Patterns/bfs/graphgen new file mode 100755 index 0000000000000000000000000000000000000000..73a1375c77cce49d763fc43b5ead061be1d935ab GIT binary patch literal 26584 zcmeHQe{|HXml;jGno{bCMZ`b#0^}oBXy$SkSa1DbxMtL zHr{Q@#mX7r^EsxM*XabMdODOho|*+d0hIKLDU*TD&|yVVX(3V4%a-O?^%6-H!INGA z71`(w$;RJPboRMAFR4+Fw^t|R)9CfWeo2jb-D75 zRXVIlD%-mbdgPbSnuI%*m7=|D<4`C1Eh)_tN|*b*>#Hj-_qEOQc>~=&^LlEk=T%ph zhJ&T$yqxT^;YGu@Y{hB?!!kgas7}f2)p=PTl}!=lBwtZ5>;3DdXuF^PrvK!d2LeS; zyjnYfWXNvPAsI?kpBVBKKNC5U(fx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sY)b>D5d)BG2nWB`5sp8 zJsJb`xjv-o|0ELi{PMl6O2I!t&y4F-{%tAzb?X(*Q78E8QW#S8-;LaO)Fx@)@;$V* z4{$Nb=Lj@vWc&RI33vo1$uHki+bH;@y{F^fhXiVSX{PeMoj$?8hZ+Zg<_`)|o~%bd zFv=qN*F2+uLcc%ABbKK{$xq2Ife&y&nBT{N=yXa!CH& zDg2^3lARp|K(D`iPPqJ+S{7MP$&jkQC52zUx2Ot!`FvnH{wd(s>o4D*=z3V=SeK%I zr4%IMlSKKp6kPIa&-o7}Qe7#?nBEUaDT1f>t>Y03;`t;B3jT`mC+jcgl>+d~zC&^{ b*q+iZD`i0 Date: Tue, 17 Mar 2026 18:41:16 +0000 Subject: [PATCH 06/38] Skip optional libraries in Makefile build when headers are missing The Makefile build unconditionally tried to compile all libraries, failing when optional dependencies (rocALUTION, MIVisionX, rocAL, hipTensor, MIGraphX, rocCV) aren't installed in the CI environment. Add wildcard header checks to mirror the CMake find_package() behavior. Co-Authored-By: Claude Opus 4.6 --- Libraries/Makefile | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/Libraries/Makefile b/Libraries/Makefile index f8d6ae443f..c757bc0fa1 100644 --- a/Libraries/Makefile +++ b/Libraries/Makefile @@ -31,16 +31,14 @@ LIBRARIES := \ hipRAND ifneq ($(GPU_RUNTIME), CUDA) + +ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include + LIBRARIES += \ hipBLASLt \ - hipTensor \ - MIGraphX \ - MIVisionX \ RCCL \ - rocAL \ - rocALUTION \ rocBLAS \ - rocCV \ rocDecode \ rocFFT \ rocJPEG \ @@ -51,6 +49,32 @@ LIBRARIES += \ rocThrust \ rocWMMA \ RPP + +# Only build libraries whose headers are present +ifneq ($(wildcard $(INCLUDE_DIR)/hiptensor/hiptensor.hpp),) +LIBRARIES += hipTensor +endif + +ifneq ($(wildcard $(INCLUDE_DIR)/migraphx/migraphx.hpp),) +LIBRARIES += MIGraphX +endif + +ifneq ($(wildcard $(INCLUDE_DIR)/mivisionx/VX/vx.h),) +LIBRARIES += MIVisionX +endif + +ifneq ($(wildcard $(INCLUDE_DIR)/rocal/rocal_api.h),) +LIBRARIES += rocAL +endif + +ifneq ($(wildcard $(INCLUDE_DIR)/rocalution/rocalution.hpp),) +LIBRARIES += rocALUTION +endif + +ifneq ($(wildcard $(INCLUDE_DIR)/roccv/core/tensor.hpp),) +LIBRARIES += rocCV +endif + endif all: $(LIBRARIES) From ca513dd5fc9e0cc35b84c83e9b382cec0f749df8 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 17 Mar 2026 18:46:25 +0000 Subject: [PATCH 07/38] Move Makefile build step before CMake in CI workflow Co-Authored-By: Claude Opus 4.6 --- .../workflows/build-rocm-examples-reusable.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 2b94e48992..33cd013097 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -107,7 +107,12 @@ jobs: echo "LD_LIBRARY_PATH=${ROCM_PATH}/lib:${ROCM_PATH}/llvm/lib:${ROCM_PATH}/lib/rocprofiler-systems" >> $GITHUB_ENV echo "ENABLE_OPENMP=ON" >> $GITHUB_ENV + - name: Makefile build + run: | + make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" + - name: CMake configure + if: ${{ !cancelled() }} run: | cmake -S . -B build -DCMAKE_HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" -DROCM_ROOT="${ROCM_PATH}" -DCMAKE_BUILD_RPATH="${ROCM_PATH}/lib" -DROCM_EXAMPLES_ENABLE_OPENMP="${ENABLE_OPENMP}" 2> >(tee cmake_error.log >&2) @@ -143,17 +148,19 @@ jobs: fi - name: CMake build + if: ${{ !cancelled() }} run: | cmake --build build -j - name: Upload build artifacts - if: success() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: rocm-examples-build-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} path: build/ - name: Run tests + if: ${{ !cancelled() }} run: | python3 .github/build_tools/generate_skip_tests.py --target ${{ matrix.gpu_config.gpu_target }} --distro ${{ inputs.distro }} @@ -198,7 +205,7 @@ jobs: echo "
Failed tests output" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY - + awk ' /^[0-9]+\/[0-9]+ Testing: / { if (inblock && failed) print block; block = $0; inblock = 1; failed = 0; seen_result = 0; next } inblock { block = block "\n" $0 } @@ -207,7 +214,7 @@ jobs: /^-+$/ { if (inblock && seen_result) { if (failed) print block; inblock = 0 } } END { if (inblock && failed) print block } ' "${LAST_TEST_LOG}" >> $GITHUB_STEP_SUMMARY - + echo '```' >> $GITHUB_STEP_SUMMARY echo "
" >> $GITHUB_STEP_SUMMARY fi @@ -219,11 +226,6 @@ jobs: name: ctest-logs-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} path: build/Testing/Temporary/ - - name: Makefile build - if: ${{ !cancelled() }} - run: | - make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" - - name: Clean the workspace if: always() run: find "$GITHUB_WORKSPACE" -mindepth 1 -delete From c74de5c5e08364f2aea0bb41a1b11448ecae1071 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 17 Mar 2026 18:53:34 +0000 Subject: [PATCH 08/38] Fix additional Makefile build failures: RPP and openmp_target - Add RPP to conditional header checks (rpp/rpp.h missing in wheel env) - Skip rocProfiler-SDK openmp_target example when ENABLE_OPENMP=OFF (wheel installs lack amdllvm needed for OpenMP offloading) Co-Authored-By: Claude Opus 4.6 --- Libraries/Makefile | 7 +++++-- Libraries/rocProfiler-SDK/Makefile | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Libraries/Makefile b/Libraries/Makefile index c757bc0fa1..50c5ea8ad8 100644 --- a/Libraries/Makefile +++ b/Libraries/Makefile @@ -47,8 +47,7 @@ LIBRARIES += \ rocSOLVER \ rocSPARSE \ rocThrust \ - rocWMMA \ - RPP + rocWMMA # Only build libraries whose headers are present ifneq ($(wildcard $(INCLUDE_DIR)/hiptensor/hiptensor.hpp),) @@ -75,6 +74,10 @@ ifneq ($(wildcard $(INCLUDE_DIR)/roccv/core/tensor.hpp),) LIBRARIES += rocCV endif +ifneq ($(wildcard $(INCLUDE_DIR)/rpp/rpp.h),) +LIBRARIES += RPP +endif + endif all: $(LIBRARIES) diff --git a/Libraries/rocProfiler-SDK/Makefile b/Libraries/rocProfiler-SDK/Makefile index 75cc0bd744..38485d36b8 100644 --- a/Libraries/rocProfiler-SDK/Makefile +++ b/Libraries/rocProfiler-SDK/Makefile @@ -28,9 +28,12 @@ EXAMPLES := \ counter_collection \ external_correlation_id_request \ intercept_table \ - openmp_target \ pc_sampling +ifneq ($(ENABLE_OPENMP), OFF) +EXAMPLES += openmp_target +endif + all: $(EXAMPLES) clean: TARGET=clean From c66e072fd4a913dc1bf594d6e9baf173d1c24489 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Wed, 18 Mar 2026 17:30:49 +0000 Subject: [PATCH 09/38] Fix Makefile CI: target correct GPU arch and guard openmp_target Set HIPCC_COMPILE_FLAGS_APPEND env var in CI to ensure all hipcc compilations target the correct GPU architecture. This fixes ~370 leaf Makefiles that don't pass --offload-arch, without affecting g++/amdclang++ examples since only hipcc reads this env var. Guard openmp_target behind an amdclang++ existence check so tarball installs that lack amdclang++ don't fail the Makefile build. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/build-rocm-examples-reusable.yml | 2 ++ Libraries/rocProfiler-SDK/Makefile | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 33cd013097..dc0717335b 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -75,6 +75,7 @@ jobs: echo "PATH=${ROCM_PATH}/bin:${ROCM_PATH}/llvm/bin:${PATH}" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${ROCM_PATH}/lib:${ROCM_PATH}/llvm/lib:${ROCM_PATH}/lib/rocprofiler-systems" >> $GITHUB_ENV echo "ENABLE_OPENMP=OFF" >> $GITHUB_ENV + echo "HIPCC_COMPILE_FLAGS_APPEND=--offload-arch=${{ matrix.gpu_config.gpu_target }}" >> $GITHUB_ENV - name: Install TheRock tarball if: ${{ matrix.install_method == 'tarball' }} @@ -106,6 +107,7 @@ jobs: echo "PATH=${ROCM_PATH}/bin:${ROCM_PATH}/llvm/bin:${PATH}" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${ROCM_PATH}/lib:${ROCM_PATH}/llvm/lib:${ROCM_PATH}/lib/rocprofiler-systems" >> $GITHUB_ENV echo "ENABLE_OPENMP=ON" >> $GITHUB_ENV + echo "HIPCC_COMPILE_FLAGS_APPEND=--offload-arch=${{ matrix.gpu_config.gpu_target }}" >> $GITHUB_ENV - name: Makefile build run: | diff --git a/Libraries/rocProfiler-SDK/Makefile b/Libraries/rocProfiler-SDK/Makefile index 38485d36b8..58e465dda6 100644 --- a/Libraries/rocProfiler-SDK/Makefile +++ b/Libraries/rocProfiler-SDK/Makefile @@ -31,7 +31,10 @@ EXAMPLES := \ pc_sampling ifneq ($(ENABLE_OPENMP), OFF) -EXAMPLES += openmp_target + _ROCM_DIR := $(or $(ROCM_PATH),/opt/rocm) + ifneq ($(wildcard $(_ROCM_DIR)/bin/amdclang++),) + EXAMPLES += openmp_target + endif endif all: $(EXAMPLES) From eb08d6daf5f1282ecd9d8f1ae26dda8d9c767e18 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Wed, 18 Mar 2026 22:33:02 +0000 Subject: [PATCH 10/38] Guard optional Makefile examples behind dependency checks Skip opengl_interop, vulkan_interop, and sobel_filter when glfw3/vulkan pkg-config packages are not available. Guard rocDecode and rocJPEG behind header existence checks, matching the pattern used for other optional libraries like hipTensor, MIGraphX, and rocAL. Co-Authored-By: Claude Opus 4.6 --- Applications/Makefile | 7 +++++-- HIP-Basic/Makefile | 9 +++++++-- Libraries/Makefile | 10 ++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Applications/Makefile b/Applications/Makefile index 0fa70928d1..427dbcc2d0 100644 --- a/Applications/Makefile +++ b/Applications/Makefile @@ -26,8 +26,11 @@ EXAMPLES := \ fdtd \ floyd_warshall \ histogram \ - prefix_sum \ - sobel_filter + prefix_sum + +ifneq ($(shell pkg-config --exists glfw3 2>/dev/null && echo yes),) + EXAMPLES += sobel_filter +endif ifneq ($(GPU_RUNTIME), CUDA) EXAMPLES += \ diff --git a/HIP-Basic/Makefile b/HIP-Basic/Makefile index 95606788ed..7318ac23a3 100644 --- a/HIP-Basic/Makefile +++ b/HIP-Basic/Makefile @@ -36,16 +36,21 @@ EXAMPLES := \ moving_average \ multi_gpu_data_transfer \ occupancy \ - opengl_interop \ runtime_compilation \ saxpy \ shared_memory \ streams \ static_host_library \ texture_management \ - vulkan_interop \ warp_shuffle +ifneq ($(shell pkg-config --exists glfw3 2>/dev/null && echo yes),) + EXAMPLES += opengl_interop + ifneq ($(shell pkg-config --exists vulkan 2>/dev/null && echo yes),) + EXAMPLES += vulkan_interop + endif +endif + # Only supported on HIP (not CUDA). ifneq ($(GPU_RUNTIME), CUDA) EXAMPLES += \ diff --git a/Libraries/Makefile b/Libraries/Makefile index 50c5ea8ad8..8133663d49 100644 --- a/Libraries/Makefile +++ b/Libraries/Makefile @@ -39,9 +39,7 @@ LIBRARIES += \ hipBLASLt \ RCCL \ rocBLAS \ - rocDecode \ rocFFT \ - rocJPEG \ rocPRIM \ rocProfiler-SDK \ rocSOLVER \ @@ -49,6 +47,14 @@ LIBRARIES += \ rocThrust \ rocWMMA +ifneq ($(wildcard $(INCLUDE_DIR)/rocdecode/rocdecode.h),) +LIBRARIES += rocDecode +endif + +ifneq ($(wildcard $(INCLUDE_DIR)/rocjpeg/rocjpeg.h),) +LIBRARIES += rocJPEG +endif + # Only build libraries whose headers are present ifneq ($(wildcard $(INCLUDE_DIR)/hiptensor/hiptensor.hpp),) LIBRARIES += hipTensor From 0dcca6824e7d5d7edbed831bf08c07409929448a Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Thu, 19 Mar 2026 19:05:05 +0000 Subject: [PATCH 11/38] Fix Makefile CI: replace pkg-config checks with wildcard header checks pkg-config is not installed in SLES and AlmaLinux CI containers, causing make to exit with code 2. Use $(wildcard ...) header detection instead, matching the pattern already used in Libraries/Makefile. Co-Authored-By: Claude Opus 4.6 --- Applications/Makefile | 2 +- HIP-Basic/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Applications/Makefile b/Applications/Makefile index 427dbcc2d0..a0dedbfaa6 100644 --- a/Applications/Makefile +++ b/Applications/Makefile @@ -28,7 +28,7 @@ EXAMPLES := \ histogram \ prefix_sum -ifneq ($(shell pkg-config --exists glfw3 2>/dev/null && echo yes),) +ifneq ($(wildcard /usr/include/GLFW/glfw3.h),) EXAMPLES += sobel_filter endif diff --git a/HIP-Basic/Makefile b/HIP-Basic/Makefile index 7318ac23a3..9f83aaff18 100644 --- a/HIP-Basic/Makefile +++ b/HIP-Basic/Makefile @@ -44,9 +44,9 @@ EXAMPLES := \ texture_management \ warp_shuffle -ifneq ($(shell pkg-config --exists glfw3 2>/dev/null && echo yes),) +ifneq ($(wildcard /usr/include/GLFW/glfw3.h),) EXAMPLES += opengl_interop - ifneq ($(shell pkg-config --exists vulkan 2>/dev/null && echo yes),) + ifneq ($(wildcard /usr/include/vulkan/vulkan.h),) EXAMPLES += vulkan_interop endif endif From 7ca427c7e57d44868b6d91a8e0cab8c11723d8be Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Thu, 19 Mar 2026 19:16:43 +0000 Subject: [PATCH 12/38] Fix Makefile CI: guard rocDecode behind FFmpeg check, fix pthread link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two failures in the Makefile build step: 1. rocDecode examples link against FFmpeg (-lavcodec, -lavformat, -lavutil) which is not installed in CI containers. The rocdecode header check alone is insufficient — also check for FFmpeg headers before including rocDecode in the build. 2. rocProfiler-SDK/code_object_tracing fails with undefined symbol pthread_join — add missing -lpthread to the link command. Co-Authored-By: Claude Opus 4.6 --- Libraries/Makefile | 2 ++ Libraries/rocProfiler-SDK/code_object_tracing/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/Makefile b/Libraries/Makefile index 8133663d49..4e9d9df706 100644 --- a/Libraries/Makefile +++ b/Libraries/Makefile @@ -48,8 +48,10 @@ LIBRARIES += \ rocWMMA ifneq ($(wildcard $(INCLUDE_DIR)/rocdecode/rocdecode.h),) +ifneq ($(wildcard /usr/include/libavcodec/avcodec.h),) LIBRARIES += rocDecode endif +endif ifneq ($(wildcard $(INCLUDE_DIR)/rocjpeg/rocjpeg.h),) LIBRARIES += rocJPEG diff --git a/Libraries/rocProfiler-SDK/code_object_tracing/Makefile b/Libraries/rocProfiler-SDK/code_object_tracing/Makefile index e981af144d..dca9c57899 100644 --- a/Libraries/rocProfiler-SDK/code_object_tracing/Makefile +++ b/Libraries/rocProfiler-SDK/code_object_tracing/Makefile @@ -60,7 +60,7 @@ $(CLIENT_LIB): client.cpp $(COMMON_INCLUDE_DIR)/rocprofiler_utils.hpp $(COMPILER) $(ICXXFLAGS) $(ICPPFLAGS) -fPIC -shared -o $@ $< $(ILDFLAGS) $(ILDLIBS) $(EXAMPLE): $(CLIENT_LIB) main.cpp - $(COMPILER) $(ICXXFLAGS) $(ICPPFLAGS) $(ILDFLAGS) -o $@ main.cpp -L. -l$(EXAMPLE)_client -Wl,-rpath,'$$ORIGIN' + $(COMPILER) $(ICXXFLAGS) $(ICPPFLAGS) $(ILDFLAGS) -o $@ main.cpp -L. -l$(EXAMPLE)_client -Wl,-rpath,'$$ORIGIN' -lpthread clean: $(RM) $(EXAMPLE) $(CLIENT_LIB) From ef252937139cfb215418956bebce469c7467b2d8 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Thu, 19 Mar 2026 22:06:44 +0000 Subject: [PATCH 13/38] Add configure phase and Makefile test runner to CI Add configure.sh and Common/require_deps.mk to detect external dependencies (FFmpeg, OpenCV, GLFW3, Vulkan, glslangValidator) before build. Each leaf Makefile declares REQUIRED_DEPS and cleanly skips when dependencies are missing, preventing link-time failures in CI. - configure.sh: probes deps via pkg-config with fallbacks, writes config.mk - require_deps.mk: checks REQUIRED_DEPS, sets SKIP_BUILD=1 if unmet - run_makefile_tests.sh: finds and runs Makefile-built executables with timeout and skip-file support - Update 27 leaf Makefiles (rocDecode, rocCV, RPP, opengl/vulkan_interop, sobel_filter) to use the new dependency gating - Remove FFmpeg guard from Libraries/Makefile (let leaves decide) - Update CI workflow: run configure.sh before make, run Makefile tests before CMake build - Fix rocProfiler-SDK/code_object_tracing: add -lpthread to ILDLIBS Co-Authored-By: Claude Opus 4.6 --- .../build-rocm-examples-reusable.yml | 8 + .gitignore | 1 + Applications/sobel_filter/Makefile | 16 +- Common/require_deps.mk | 118 ++++++++++++ HIP-Basic/opengl_interop/Makefile | 16 +- HIP-Basic/vulkan_interop/Makefile | 16 +- Libraries/Makefile | 2 - Libraries/RPP/box_filter/Makefile | 14 +- Libraries/RPP/brightness/Makefile | 14 +- Libraries/RPP/contrast/Makefile | 14 +- Libraries/RPP/flip/Makefile | 14 +- Libraries/RPP/gamma_correction/Makefile | 14 +- Libraries/RPP/resize/Makefile | 14 +- Libraries/rocCV/bilateral_filter/Makefile | 16 +- Libraries/rocCV/bnd_box/Makefile | 16 +- Libraries/rocCV/center_crop/Makefile | 16 +- Libraries/rocCV/composite/Makefile | 16 +- Libraries/rocCV/copy_make_border/Makefile | 16 +- Libraries/rocCV/cropandresize/Makefile | 16 +- Libraries/rocCV/custom_crop/Makefile | 16 +- Libraries/rocCV/gamma_contrast/Makefile | 16 +- Libraries/rocCV/normalize/Makefile | 16 +- Libraries/rocCV/warp_perspective/Makefile | 16 +- Libraries/rocDecode/video_decode/Makefile | 12 ++ .../rocDecode/video_decode_batch/Makefile | 12 ++ Libraries/rocDecode/video_decode_mem/Makefile | 12 ++ .../video_decode_multi_files/Makefile | 12 ++ .../rocDecode/video_decode_perf/Makefile | 12 ++ .../rocDecode/video_decode_pic_files/Makefile | 12 ++ Libraries/rocDecode/video_decode_rgb/Makefile | 12 ++ .../rocDecode/video_to_sequence/Makefile | 12 ++ .../code_object_tracing/Makefile | 2 +- Makefile | 5 +- configure.sh | 169 ++++++++++++++++++ run_makefile_tests.sh | 132 ++++++++++++++ 35 files changed, 789 insertions(+), 36 deletions(-) create mode 100644 Common/require_deps.mk create mode 100755 configure.sh create mode 100755 run_makefile_tests.sh diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index dc0717335b..3a8116f4e2 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -111,8 +111,16 @@ jobs: - name: Makefile build run: | + ./configure.sh --rocm-path="${ROCM_PATH}" make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" + - name: Makefile tests + if: ${{ !cancelled() }} + run: | + python3 .github/build_tools/generate_skip_tests.py --target ${{ matrix.gpu_config.gpu_target }} --distro ${{ inputs.distro }} + SKIP_FILE="${GITHUB_WORKSPACE}/.github/build_tools/skip_tests.txt" + ./run_makefile_tests.sh --skip-file="${SKIP_FILE}" --timeout=120 + - name: CMake configure if: ${{ !cancelled() }} run: | diff --git a/.gitignore b/.gitignore index 6c015456b0..b44f3447cd 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ *.pdb CMakeUserPresets.json .cline_storage +config.mk diff --git a/Applications/sobel_filter/Makefile b/Applications/sobel_filter/Makefile index 0205fdb0ee..35fbcc63a6 100644 --- a/Applications/sobel_filter/Makefile +++ b/Applications/sobel_filter/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../Common EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP +# Dependency checking +REQUIRED_DEPS := GLFW3 +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -34,9 +40,9 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(shell pkg-config --cflags glfw3) +ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(GLFW3_CFLAGS) ILDFLAGS := -ILDLIBS := $(shell pkg-config --libs glfw3) -ldl +ILDLIBS := $(GLFW3_LIBS) -ldl ifeq ($(GPU_RUNTIME), CUDA) ICXXFLAGS += -x cu @@ -63,3 +69,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Common/require_deps.mk b/Common/require_deps.mk new file mode 100644 index 0000000000..11674b37d5 --- /dev/null +++ b/Common/require_deps.mk @@ -0,0 +1,118 @@ +# MIT License +# +# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# Dependency checker for rocm-examples Makefile build system +# +# Usage in example Makefiles: +# REQUIRED_DEPS := FFMPEG OPENCV +# include $(COMMON_INCLUDE_DIR)/require_deps.mk +# +# Before including, set COMMON_INCLUDE_DIR (already standard in all examples). +# +# This file works in two modes: +# 1. Fast path: includes config.mk (generated by configure.sh) from the repo root +# 2. Fallback: uses inline pkg-config checks for standalone builds +# +# After including, check SKIP_BUILD. This composes with filter_hip_architectures.mk +# which also sets SKIP_BUILD. +# +# Output variables: +# SKIP_BUILD - set to 1 if any required dependency is missing +# MISSING_DEPS - list of missing dependency names + +# Locate the repository root relative to COMMON_INCLUDE_DIR +_REPO_ROOT := $(dir $(COMMON_INCLUDE_DIR)) + +# Try to include the pre-generated config.mk (silent if absent) +-include $(_REPO_ROOT)/config.mk + +# If config.mk was not found, run inline fallback detection. +# We detect this by checking if HAVE_FFMPEG is defined (it's always written by configure.sh). +ifndef HAVE_FFMPEG + # Fallback: detect dependencies via pkg-config / file existence + + # FFmpeg + _FFMPEG_CHECK := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null && echo 1 || echo 0) + ifeq ($(_FFMPEG_CHECK),0) + _FFMPEG_CHECK := $(if $(wildcard /usr/include/libavcodec/avcodec.h),1,0) + endif + HAVE_FFMPEG := $(_FFMPEG_CHECK) + ifeq ($(HAVE_FFMPEG),1) + FFMPEG_CFLAGS := $(shell pkg-config --cflags libavcodec libavformat libavutil 2>/dev/null) + FFMPEG_LIBS := $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") + else + FFMPEG_CFLAGS := + FFMPEG_LIBS := + endif + + # OpenCV + _OPENCV_CHECK := $(shell pkg-config --exists opencv4 2>/dev/null && echo 1 || (pkg-config --exists opencv 2>/dev/null && echo 1 || echo 0)) + HAVE_OPENCV := $(_OPENCV_CHECK) + ifeq ($(HAVE_OPENCV),1) + OPENCV_CFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) + OPENCV_LIBS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) + else + OPENCV_CFLAGS := + OPENCV_LIBS := + endif + + # GLFW3 + _GLFW3_CHECK := $(shell pkg-config --exists glfw3 2>/dev/null && echo 1 || echo 0) + HAVE_GLFW3 := $(_GLFW3_CHECK) + ifeq ($(HAVE_GLFW3),1) + GLFW3_CFLAGS := $(shell pkg-config --cflags glfw3 2>/dev/null) + GLFW3_LIBS := $(shell pkg-config --libs glfw3 2>/dev/null) + else + GLFW3_CFLAGS := + GLFW3_LIBS := + endif + + # Vulkan + _VULKAN_CHECK := $(shell pkg-config --exists vulkan 2>/dev/null && echo 1 || echo 0) + ifeq ($(_VULKAN_CHECK),0) + _VULKAN_CHECK := $(if $(wildcard /usr/include/vulkan/vulkan.h),1,0) + endif + HAVE_VULKAN := $(_VULKAN_CHECK) + ifeq ($(HAVE_VULKAN),1) + VULKAN_CFLAGS := $(shell pkg-config --cflags vulkan 2>/dev/null) + VULKAN_LIBS := $(shell pkg-config --libs vulkan 2>/dev/null || echo "-lvulkan") + else + VULKAN_CFLAGS := + VULKAN_LIBS := + endif + + # glslangValidator + _GLSLANG_CHECK := $(shell command -v glslangValidator >/dev/null 2>&1 && echo 1 || echo 0) + HAVE_GLSLANG_VALIDATOR := $(_GLSLANG_CHECK) + +endif # ifndef HAVE_FFMPEG + +# Check REQUIRED_DEPS against HAVE_ flags +MISSING_DEPS := +$(foreach dep,$(REQUIRED_DEPS),\ + $(if $(filter 1,$(HAVE_$(dep))),,\ + $(eval MISSING_DEPS += $(dep)))) + +ifneq ($(MISSING_DEPS),) + SKIP_BUILD := 1 + $(info $(EXAMPLE): Skipping build — missing dependencies: $(MISSING_DEPS)) +endif diff --git a/HIP-Basic/opengl_interop/Makefile b/HIP-Basic/opengl_interop/Makefile index a8a76681c2..3128fff4d7 100644 --- a/HIP-Basic/opengl_interop/Makefile +++ b/HIP-Basic/opengl_interop/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../Common EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP +# Dependency checking +REQUIRED_DEPS := GLFW3 +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -34,9 +40,9 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(shell pkg-config --cflags glfw3) +ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(GLFW3_CFLAGS) ILDFLAGS := -ILDLIBS := $(shell pkg-config --libs glfw3) -ldl +ILDLIBS := $(GLFW3_LIBS) -ldl ifeq ($(GPU_RUNTIME), CUDA) ICXXFLAGS += -x cu @@ -65,3 +71,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/HIP-Basic/vulkan_interop/Makefile b/HIP-Basic/vulkan_interop/Makefile index e5b94a81ee..53de4637da 100644 --- a/HIP-Basic/vulkan_interop/Makefile +++ b/HIP-Basic/vulkan_interop/Makefile @@ -24,6 +24,12 @@ EXAMPLE := hip_vulkan_interop COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP +# Dependency checking +REQUIRED_DEPS := GLFW3 VULKAN GLSLANG_VALIDATOR +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) CUDA_INSTALL_DIR ?= /usr/local/cuda @@ -36,9 +42,9 @@ CUDACXX ?= $(CUDA_INSTALL_DIR)/bin/nvcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) $(shell pkg-config --cflags glfw3 vulkan) +ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) $(GLFW3_CFLAGS) $(VULKAN_CFLAGS) ILDFLAGS := -ILDLIBS := $(shell pkg-config --libs glfw3) +ILDLIBS := $(GLFW3_LIBS) IGLSLFLAGS := -V100 ifeq ($(GPU_RUNTIME), CUDA) @@ -72,3 +78,9 @@ clean: $(RM) $(EXAMPLE) sinewave.frag.spv.h sinewave.vert.spv.h .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/Makefile b/Libraries/Makefile index 4e9d9df706..8133663d49 100644 --- a/Libraries/Makefile +++ b/Libraries/Makefile @@ -48,10 +48,8 @@ LIBRARIES += \ rocWMMA ifneq ($(wildcard $(INCLUDE_DIR)/rocdecode/rocdecode.h),) -ifneq ($(wildcard /usr/include/libavcodec/avcodec.h),) LIBRARIES += rocDecode endif -endif ifneq ($(wildcard $(INCLUDE_DIR)/rocjpeg/rocjpeg.h),) LIBRARIES += rocJPEG diff --git a/Libraries/RPP/box_filter/Makefile b/Libraries/RPP/box_filter/Makefile index a16745bc10..3f17c5ea97 100644 --- a/Libraries/RPP/box_filter/Makefile +++ b/Libraries/RPP/box_filter/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -36,7 +42,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_INCLUDE := $(OPENCV_CFLAGS) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -63,3 +69,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/RPP/brightness/Makefile b/Libraries/RPP/brightness/Makefile index 90db33979a..9d80269107 100644 --- a/Libraries/RPP/brightness/Makefile +++ b/Libraries/RPP/brightness/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -36,7 +42,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_INCLUDE := $(OPENCV_CFLAGS) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -63,3 +69,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/RPP/contrast/Makefile b/Libraries/RPP/contrast/Makefile index 74e01b4d73..36c18a4458 100644 --- a/Libraries/RPP/contrast/Makefile +++ b/Libraries/RPP/contrast/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -36,7 +42,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_INCLUDE := $(OPENCV_CFLAGS) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -63,3 +69,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/RPP/flip/Makefile b/Libraries/RPP/flip/Makefile index a0481b4d6e..4a07b3e5bc 100644 --- a/Libraries/RPP/flip/Makefile +++ b/Libraries/RPP/flip/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -36,7 +42,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_INCLUDE := $(OPENCV_CFLAGS) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -63,3 +69,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/RPP/gamma_correction/Makefile b/Libraries/RPP/gamma_correction/Makefile index 623d56d877..729b633929 100644 --- a/Libraries/RPP/gamma_correction/Makefile +++ b/Libraries/RPP/gamma_correction/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -36,7 +42,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_INCLUDE := $(OPENCV_CFLAGS) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -63,3 +69,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/RPP/resize/Makefile b/Libraries/RPP/resize/Makefile index af0553553e..5ea51b12f1 100644 --- a/Libraries/RPP/resize/Makefile +++ b/Libraries/RPP/resize/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -36,7 +42,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_INCLUDE := $(OPENCV_CFLAGS) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -63,3 +69,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/bilateral_filter/Makefile b/Libraries/rocCV/bilateral_filter/Makefile index f49da52990..df01fa5ff6 100644 --- a/Libraries/rocCV/bilateral_filter/Makefile +++ b/Libraries/rocCV/bilateral_filter/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/bnd_box/Makefile b/Libraries/rocCV/bnd_box/Makefile index 433ce01d9b..59a1f77a4e 100644 --- a/Libraries/rocCV/bnd_box/Makefile +++ b/Libraries/rocCV/bnd_box/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/center_crop/Makefile b/Libraries/rocCV/center_crop/Makefile index 003e9e61a6..61c2fb7718 100644 --- a/Libraries/rocCV/center_crop/Makefile +++ b/Libraries/rocCV/center_crop/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/composite/Makefile b/Libraries/rocCV/composite/Makefile index 402399f125..fb3efc01c3 100644 --- a/Libraries/rocCV/composite/Makefile +++ b/Libraries/rocCV/composite/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/copy_make_border/Makefile b/Libraries/rocCV/copy_make_border/Makefile index c7eeefe925..118d5a66b1 100644 --- a/Libraries/rocCV/copy_make_border/Makefile +++ b/Libraries/rocCV/copy_make_border/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/cropandresize/Makefile b/Libraries/rocCV/cropandresize/Makefile index 8276d8000a..09eada2a17 100644 --- a/Libraries/rocCV/cropandresize/Makefile +++ b/Libraries/rocCV/cropandresize/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/custom_crop/Makefile b/Libraries/rocCV/custom_crop/Makefile index 94a2dd9122..003bf5e638 100644 --- a/Libraries/rocCV/custom_crop/Makefile +++ b/Libraries/rocCV/custom_crop/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/gamma_contrast/Makefile b/Libraries/rocCV/gamma_contrast/Makefile index 34d5b22c2c..e8c05d4c59 100644 --- a/Libraries/rocCV/gamma_contrast/Makefile +++ b/Libraries/rocCV/gamma_contrast/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/normalize/Makefile b/Libraries/rocCV/normalize/Makefile index a938a430b0..7e44b663c8 100644 --- a/Libraries/rocCV/normalize/Makefile +++ b/Libraries/rocCV/normalize/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocCV/warp_perspective/Makefile b/Libraries/rocCV/warp_perspective/Makefile index 1f11145f75..f14face831 100644 --- a/Libraries/rocCV/warp_perspective/Makefile +++ b/Libraries/rocCV/warp_perspective/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := OPENCV +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -34,8 +40,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) -OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) +OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) +OPENCV_LDFLAGS := $(OPENCV_LIBS) # Common variables and flags CXX_STD := c++20 @@ -64,3 +70,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_decode/Makefile b/Libraries/rocDecode/video_decode/Makefile index 99da825ccc..842989cfbb 100644 --- a/Libraries/rocDecode/video_decode/Makefile +++ b/Libraries/rocDecode/video_decode/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -99,3 +105,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_decode_batch/Makefile b/Libraries/rocDecode/video_decode_batch/Makefile index 3e3ba90978..de45fcca95 100644 --- a/Libraries/rocDecode/video_decode_batch/Makefile +++ b/Libraries/rocDecode/video_decode_batch/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -79,3 +85,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_decode_mem/Makefile b/Libraries/rocDecode/video_decode_mem/Makefile index 728aefb9fe..d7024829f5 100644 --- a/Libraries/rocDecode/video_decode_mem/Makefile +++ b/Libraries/rocDecode/video_decode_mem/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -79,3 +85,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_decode_multi_files/Makefile b/Libraries/rocDecode/video_decode_multi_files/Makefile index a983efea7c..63bd0574df 100644 --- a/Libraries/rocDecode/video_decode_multi_files/Makefile +++ b/Libraries/rocDecode/video_decode_multi_files/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -79,3 +85,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_decode_perf/Makefile b/Libraries/rocDecode/video_decode_perf/Makefile index 67d891f1bd..a918be6cd0 100644 --- a/Libraries/rocDecode/video_decode_perf/Makefile +++ b/Libraries/rocDecode/video_decode_perf/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -99,3 +105,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_decode_pic_files/Makefile b/Libraries/rocDecode/video_decode_pic_files/Makefile index 31ca81af5d..aeff2f08e2 100644 --- a/Libraries/rocDecode/video_decode_pic_files/Makefile +++ b/Libraries/rocDecode/video_decode_pic_files/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -99,3 +105,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_decode_rgb/Makefile b/Libraries/rocDecode/video_decode_rgb/Makefile index 648078329f..85903fbdf6 100644 --- a/Libraries/rocDecode/video_decode_rgb/Makefile +++ b/Libraries/rocDecode/video_decode_rgb/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -79,3 +85,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocDecode/video_to_sequence/Makefile b/Libraries/rocDecode/video_to_sequence/Makefile index ecbef6233b..c77978c5fb 100644 --- a/Libraries/rocDecode/video_to_sequence/Makefile +++ b/Libraries/rocDecode/video_to_sequence/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Dependency checking +REQUIRED_DEPS := FFMPEG +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils @@ -79,3 +85,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/Libraries/rocProfiler-SDK/code_object_tracing/Makefile b/Libraries/rocProfiler-SDK/code_object_tracing/Makefile index dca9c57899..6c1a7ca7e9 100644 --- a/Libraries/rocProfiler-SDK/code_object_tracing/Makefile +++ b/Libraries/rocProfiler-SDK/code_object_tracing/Makefile @@ -39,7 +39,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCPROFILER_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocprofiler-sdk -lstdc++fs +ILDLIBS := -lrocprofiler-sdk -lstdc++fs -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Makefile b/Makefile index 353de12032..01c1cce3be 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,13 @@ SUB_PROJECTS := \ all: $(SUB_PROJECTS) +configure: + ./configure.sh --rocm-path="$(or $(ROCM_PATH),/opt/rocm)" + clean: TARGET=clean clean: all $(SUB_PROJECTS): $(MAKE) -C $@ $(TARGET) -.PHONY: all clean $(SUB_PROJECTS) +.PHONY: all configure clean $(SUB_PROJECTS) diff --git a/configure.sh b/configure.sh new file mode 100755 index 0000000000..4d9ad9a940 --- /dev/null +++ b/configure.sh @@ -0,0 +1,169 @@ +#!/bin/sh +# MIT License +# +# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# configure.sh - Dependency detection for rocm-examples Makefile build system +# +# Probes for external dependencies and writes a config.mk file that individual +# example Makefiles include to decide whether to build or skip. +# +# Usage: +# ./configure.sh [--rocm-path=DIR] +# +# Output: +# config.mk in the repository root + +set -e + +ROCM_PATH="/opt/rocm" + +for arg in "$@"; do + case "$arg" in + --rocm-path=*) + ROCM_PATH="${arg#--rocm-path=}" + ;; + --help|-h) + echo "Usage: $0 [--rocm-path=DIR]" + echo " --rocm-path=DIR Path to ROCm installation (default: /opt/rocm)" + exit 0 + ;; + *) + echo "Unknown option: $arg" >&2 + exit 1 + ;; + esac +done + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +CONFIG_MK="${SCRIPT_DIR}/config.mk" + +echo "configure: detecting dependencies (ROCm path: ${ROCM_PATH})" + +# Helper: check via pkg-config +pkg_check() { + pkg-config --exists "$@" 2>/dev/null +} + +# Helper: get pkg-config cflags +pkg_cflags() { + pkg-config --cflags "$@" 2>/dev/null || true +} + +# Helper: get pkg-config libs +pkg_libs() { + pkg-config --libs "$@" 2>/dev/null || true +} + +# Start writing config.mk +cat > "${CONFIG_MK}" << 'HEADER' +# Auto-generated by configure.sh - do not edit +# Re-run ./configure.sh to regenerate +HEADER + +echo "" >> "${CONFIG_MK}" + +# --- FFmpeg (libavcodec, libavformat, libavutil) --- +HAVE_FFMPEG=0 +FFMPEG_CFLAGS="" +FFMPEG_LIBS="" +if pkg_check libavcodec libavformat libavutil; then + HAVE_FFMPEG=1 + FFMPEG_CFLAGS="$(pkg_cflags libavcodec libavformat libavutil)" + FFMPEG_LIBS="$(pkg_libs libavcodec libavformat libavutil)" +elif [ -f /usr/include/libavcodec/avcodec.h ]; then + HAVE_FFMPEG=1 + FFMPEG_LIBS="-lavcodec -lavformat -lavutil" +fi +echo " FFmpeg: $([ ${HAVE_FFMPEG} -eq 1 ] && echo yes || echo no)" +cat >> "${CONFIG_MK}" << EOF +HAVE_FFMPEG := ${HAVE_FFMPEG} +FFMPEG_CFLAGS := ${FFMPEG_CFLAGS} +FFMPEG_LIBS := ${FFMPEG_LIBS} +EOF + +# --- OpenCV --- +HAVE_OPENCV=0 +OPENCV_CFLAGS="" +OPENCV_LIBS="" +if pkg_check opencv4; then + HAVE_OPENCV=1 + OPENCV_CFLAGS="$(pkg_cflags opencv4)" + OPENCV_LIBS="$(pkg_libs opencv4)" +elif pkg_check opencv; then + HAVE_OPENCV=1 + OPENCV_CFLAGS="$(pkg_cflags opencv)" + OPENCV_LIBS="$(pkg_libs opencv)" +fi +echo " OpenCV: $([ ${HAVE_OPENCV} -eq 1 ] && echo yes || echo no)" +cat >> "${CONFIG_MK}" << EOF +HAVE_OPENCV := ${HAVE_OPENCV} +OPENCV_CFLAGS := ${OPENCV_CFLAGS} +OPENCV_LIBS := ${OPENCV_LIBS} +EOF + +# --- GLFW3 --- +HAVE_GLFW3=0 +GLFW3_CFLAGS="" +GLFW3_LIBS="" +if pkg_check glfw3; then + HAVE_GLFW3=1 + GLFW3_CFLAGS="$(pkg_cflags glfw3)" + GLFW3_LIBS="$(pkg_libs glfw3)" +fi +echo " GLFW3: $([ ${HAVE_GLFW3} -eq 1 ] && echo yes || echo no)" +cat >> "${CONFIG_MK}" << EOF +HAVE_GLFW3 := ${HAVE_GLFW3} +GLFW3_CFLAGS := ${GLFW3_CFLAGS} +GLFW3_LIBS := ${GLFW3_LIBS} +EOF + +# --- Vulkan --- +HAVE_VULKAN=0 +VULKAN_CFLAGS="" +VULKAN_LIBS="" +if pkg_check vulkan; then + HAVE_VULKAN=1 + VULKAN_CFLAGS="$(pkg_cflags vulkan)" + VULKAN_LIBS="$(pkg_libs vulkan)" +elif [ -f /usr/include/vulkan/vulkan.h ]; then + HAVE_VULKAN=1 + VULKAN_LIBS="-lvulkan" +fi +echo " Vulkan: $([ ${HAVE_VULKAN} -eq 1 ] && echo yes || echo no)" +cat >> "${CONFIG_MK}" << EOF +HAVE_VULKAN := ${HAVE_VULKAN} +VULKAN_CFLAGS := ${VULKAN_CFLAGS} +VULKAN_LIBS := ${VULKAN_LIBS} +EOF + +# --- glslangValidator --- +HAVE_GLSLANG_VALIDATOR=0 +if command -v glslangValidator >/dev/null 2>&1; then + HAVE_GLSLANG_VALIDATOR=1 +fi +echo " glslangValidator: $([ ${HAVE_GLSLANG_VALIDATOR} -eq 1 ] && echo yes || echo no)" +cat >> "${CONFIG_MK}" << EOF +HAVE_GLSLANG_VALIDATOR := ${HAVE_GLSLANG_VALIDATOR} +EOF + +echo "" +echo "configure: wrote ${CONFIG_MK}" diff --git a/run_makefile_tests.sh b/run_makefile_tests.sh new file mode 100755 index 0000000000..442810a64b --- /dev/null +++ b/run_makefile_tests.sh @@ -0,0 +1,132 @@ +#!/bin/sh +# MIT License +# +# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# run_makefile_tests.sh - Run tests for Makefile-built examples +# +# Finds all executables built by the Makefile build system, runs each one +# with a timeout, and reports pass/fail results. +# +# Usage: +# ./run_makefile_tests.sh [--skip-file FILE] [--timeout SECONDS] +# +# The skip file should contain one test name per line (the EXAMPLE name). + +set -u + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +SKIP_FILE="" +TIMEOUT=120 + +for arg in "$@"; do + case "$arg" in + --skip-file=*) + SKIP_FILE="${arg#--skip-file=}" + ;; + --timeout=*) + TIMEOUT="${arg#--timeout=}" + ;; + --help|-h) + echo "Usage: $0 [--skip-file=FILE] [--timeout=SECONDS]" + exit 0 + ;; + esac +done + +# Load skip list into a string for matching +SKIP_LIST="" +if [ -n "${SKIP_FILE}" ] && [ -f "${SKIP_FILE}" ]; then + SKIP_LIST=$(cat "${SKIP_FILE}") +fi + +is_skipped() { + test_name="$1" + echo "${SKIP_LIST}" | grep -qx "${test_name}" 2>/dev/null +} + +PASSED=0 +FAILED=0 +SKIPPED=0 +TOTAL=0 +FAILED_TESTS="" + +# Find all Makefiles with EXAMPLE definitions, extract name and directory +find "${SCRIPT_DIR}" -name Makefile -path '*/Makefile' | sort | while IFS= read -r makefile; do + dir=$(dirname "$makefile") + example_name=$(grep '^EXAMPLE := ' "$makefile" 2>/dev/null | head -1 | sed 's/^EXAMPLE := //') + + # Skip Makefiles without EXAMPLE (parent Makefiles) + [ -z "${example_name}" ] && continue + + # Skip if executable wasn't built + [ ! -x "${dir}/${example_name}" ] && continue + + echo "${dir}|${example_name}" +done > /tmp/makefile_tests_list.txt + +# Count and run +while IFS='|' read -r dir example_name; do + TOTAL=$((TOTAL + 1)) + + if is_skipped "${example_name}"; then + SKIPPED=$((SKIPPED + 1)) + printf " SKIP %s\n" "${example_name}" + continue + fi + + # Run the test with timeout + printf " RUN %s\n" "${example_name}" + if timeout "${TIMEOUT}" "${dir}/${example_name}" > "/tmp/test_${example_name}.log" 2>&1; then + PASSED=$((PASSED + 1)) + printf " PASS %s\n" "${example_name}" + else + exit_code=$? + FAILED=$((FAILED + 1)) + FAILED_TESTS="${FAILED_TESTS} ${example_name}" + if [ "${exit_code}" -eq 124 ]; then + printf " TIMEOUT %s (after %ss)\n" "${example_name}" "${TIMEOUT}" + else + printf " FAIL %s (exit code %d)\n" "${example_name}" "${exit_code}" + fi + # Print last 20 lines of output for failed tests + echo "--- output (last 20 lines) ---" + tail -20 "/tmp/test_${example_name}.log" + echo "--- end output ---" + fi +done < /tmp/makefile_tests_list.txt + +rm -f /tmp/makefile_tests_list.txt + +echo "" +echo "==========================================" +echo "Makefile test results:" +echo " Total: ${TOTAL}" +echo " Passed: ${PASSED}" +echo " Failed: ${FAILED}" +echo " Skipped: ${SKIPPED}" +echo "==========================================" + +if [ -n "${FAILED_TESTS}" ]; then + echo "" + echo "Failed tests:${FAILED_TESTS}" + exit 1 +fi From b8f2454493dccecb66f5268962cedff1dabb2144 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Thu, 19 Mar 2026 22:30:14 +0000 Subject: [PATCH 14/38] Gate code_object_isa_decode behind libdw and amd_comgr checks The code_object_isa_decode example links -ldw and -lamd_comgr which are not available in all CI containers (e.g. AlmaLinux). Add LIBDW and AMD_COMGR to the configure detection system and skip the example when either is missing. Co-Authored-By: Claude Opus 4.6 --- Common/require_deps.mk | 15 ++++++++++++ .../code_object_isa_decode/Makefile | 12 ++++++++++ configure.sh | 24 +++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/Common/require_deps.mk b/Common/require_deps.mk index 11674b37d5..f2010c4d77 100644 --- a/Common/require_deps.mk +++ b/Common/require_deps.mk @@ -100,6 +100,21 @@ ifndef HAVE_FFMPEG VULKAN_LIBS := endif + # libdw (elfutils) + _LIBDW_CHECK := $(shell pkg-config --exists libdw 2>/dev/null && echo 1 || echo 0) + ifeq ($(_LIBDW_CHECK),0) + _LIBDW_CHECK := $(if $(or $(wildcard /usr/include/elfutils/libdw.h),$(wildcard /usr/include/dwarf.h)),1,0) + endif + HAVE_LIBDW := $(_LIBDW_CHECK) + + # amd_comgr + ROCM_INSTALL_DIR ?= $(or $(ROCM_PATH),/opt/rocm) + _AMD_COMGR_CHECK := $(if $(or $(wildcard $(ROCM_INSTALL_DIR)/include/amd_comgr/amd_comgr.h),$(wildcard $(ROCM_INSTALL_DIR)/lib/libamd_comgr.so)),1,0) + ifeq ($(_AMD_COMGR_CHECK),0) + _AMD_COMGR_CHECK := $(shell pkg-config --exists amd_comgr 2>/dev/null && echo 1 || echo 0) + endif + HAVE_AMD_COMGR := $(_AMD_COMGR_CHECK) + # glslangValidator _GLSLANG_CHECK := $(shell command -v glslangValidator >/dev/null 2>&1 && echo 1 || echo 0) HAVE_GLSLANG_VALIDATOR := $(_GLSLANG_CHECK) diff --git a/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile b/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile index 408005e722..fb8cae6a21 100644 --- a/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile +++ b/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile @@ -25,6 +25,12 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP +# Dependency checking +REQUIRED_DEPS := LIBDW AMD_COMGR +include $(COMMON_INCLUDE_DIR)/require_deps.mk + +ifneq ($(SKIP_BUILD),1) + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -60,3 +66,9 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean + +else +all: +clean: +.PHONY: all clean +endif diff --git a/configure.sh b/configure.sh index 4d9ad9a940..f18f13bf67 100755 --- a/configure.sh +++ b/configure.sh @@ -155,6 +155,30 @@ VULKAN_CFLAGS := ${VULKAN_CFLAGS} VULKAN_LIBS := ${VULKAN_LIBS} EOF +# --- libdw (elfutils) --- +HAVE_LIBDW=0 +if pkg_check libdw; then + HAVE_LIBDW=1 +elif [ -f /usr/include/elfutils/libdw.h ] || [ -f /usr/include/dwarf.h ]; then + HAVE_LIBDW=1 +fi +echo " libdw: $([ ${HAVE_LIBDW} -eq 1 ] && echo yes || echo no)" +cat >> "${CONFIG_MK}" << EOF +HAVE_LIBDW := ${HAVE_LIBDW} +EOF + +# --- amd_comgr --- +HAVE_AMD_COMGR=0 +if [ -f "${ROCM_PATH}/include/amd_comgr/amd_comgr.h" ] || [ -f "${ROCM_PATH}/lib/libamd_comgr.so" ]; then + HAVE_AMD_COMGR=1 +elif pkg_check amd_comgr; then + HAVE_AMD_COMGR=1 +fi +echo " amd_comgr: $([ ${HAVE_AMD_COMGR} -eq 1 ] && echo yes || echo no)" +cat >> "${CONFIG_MK}" << EOF +HAVE_AMD_COMGR := ${HAVE_AMD_COMGR} +EOF + # --- glslangValidator --- HAVE_GLSLANG_VALIDATOR=0 if command -v glslangValidator >/dev/null 2>&1; then From 26d6e6dcf1e638facb41d13152f60a7a2f7f08c3 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 14:40:03 +0000 Subject: [PATCH 15/38] Improve Makefile test runner output with progress counter Show (N/total) counter for each test like ctest does, e.g.: (1/42) RUN hip_device_query (1/42) PASS hip_device_query (2/42) SKIP rccl_allgather Also print total test count and skip file info upfront, and show a single summary line at the end. Co-Authored-By: Claude Opus 4.6 --- run_makefile_tests.sh | 56 +++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/run_makefile_tests.sh b/run_makefile_tests.sh index 442810a64b..1b207ab771 100755 --- a/run_makefile_tests.sh +++ b/run_makefile_tests.sh @@ -27,9 +27,10 @@ # with a timeout, and reports pass/fail results. # # Usage: -# ./run_makefile_tests.sh [--skip-file FILE] [--timeout SECONDS] +# ./run_makefile_tests.sh [--skip-file=FILE] [--timeout=SECONDS] # # The skip file should contain one test name per line (the EXAMPLE name). +# This is the same format produced by generate_skip_tests.py. set -u @@ -47,6 +48,10 @@ for arg in "$@"; do ;; --help|-h) echo "Usage: $0 [--skip-file=FILE] [--timeout=SECONDS]" + echo "" + echo " --skip-file=FILE File with test names to skip (one per line)." + echo " Same format as generate_skip_tests.py output." + echo " --timeout=SECONDS Per-test timeout (default: 120)" exit 0 ;; esac @@ -63,11 +68,7 @@ is_skipped() { echo "${SKIP_LIST}" | grep -qx "${test_name}" 2>/dev/null } -PASSED=0 -FAILED=0 -SKIPPED=0 -TOTAL=0 -FAILED_TESTS="" +TESTS_LIST="/tmp/makefile_tests_list_$$.txt" # Find all Makefiles with EXAMPLE definitions, extract name and directory find "${SCRIPT_DIR}" -name Makefile -path '*/Makefile' | sort | while IFS= read -r makefile; do @@ -81,48 +82,61 @@ find "${SCRIPT_DIR}" -name Makefile -path '*/Makefile' | sort | while IFS= read [ ! -x "${dir}/${example_name}" ] && continue echo "${dir}|${example_name}" -done > /tmp/makefile_tests_list.txt +done > "${TESTS_LIST}" + +# Count total tests upfront +NUM_TESTS=$(wc -l < "${TESTS_LIST}") + +echo "" +echo "Found ${NUM_TESTS} Makefile-built test(s)" +if [ -n "${SKIP_FILE}" ] && [ -f "${SKIP_FILE}" ] && [ -s "${SKIP_FILE}" ]; then + echo "Skip file: ${SKIP_FILE} ($(wc -l < "${SKIP_FILE}") entries)" +fi +echo "" + +PASSED=0 +FAILED=0 +SKIPPED=0 +CURRENT=0 +FAILED_TESTS="" -# Count and run +# Run tests while IFS='|' read -r dir example_name; do - TOTAL=$((TOTAL + 1)) + CURRENT=$((CURRENT + 1)) if is_skipped "${example_name}"; then SKIPPED=$((SKIPPED + 1)) - printf " SKIP %s\n" "${example_name}" + printf "(%d/%d) SKIP %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" continue fi # Run the test with timeout - printf " RUN %s\n" "${example_name}" + printf "(%d/%d) RUN %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" if timeout "${TIMEOUT}" "${dir}/${example_name}" > "/tmp/test_${example_name}.log" 2>&1; then PASSED=$((PASSED + 1)) - printf " PASS %s\n" "${example_name}" + printf "(%d/%d) PASS %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" else exit_code=$? FAILED=$((FAILED + 1)) FAILED_TESTS="${FAILED_TESTS} ${example_name}" if [ "${exit_code}" -eq 124 ]; then - printf " TIMEOUT %s (after %ss)\n" "${example_name}" "${TIMEOUT}" + printf "(%d/%d) TIMEOUT %s (after %ss)\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" "${TIMEOUT}" else - printf " FAIL %s (exit code %d)\n" "${example_name}" "${exit_code}" + printf "(%d/%d) FAIL %s (exit code %d)\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" "${exit_code}" fi # Print last 20 lines of output for failed tests echo "--- output (last 20 lines) ---" tail -20 "/tmp/test_${example_name}.log" echo "--- end output ---" fi -done < /tmp/makefile_tests_list.txt +done < "${TESTS_LIST}" -rm -f /tmp/makefile_tests_list.txt +rm -f "${TESTS_LIST}" echo "" echo "==========================================" -echo "Makefile test results:" -echo " Total: ${TOTAL}" -echo " Passed: ${PASSED}" -echo " Failed: ${FAILED}" -echo " Skipped: ${SKIPPED}" +RAN=$((PASSED + FAILED)) +echo "Makefile test results: ${RAN} tests ran, ${PASSED} passed, ${FAILED} failed, ${SKIPPED} skipped (${NUM_TESTS} total)" echo "==========================================" if [ -n "${FAILED_TESTS}" ]; then From 6c03dc75677b1302c12efb16b03f34c4200e09ca Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 14:48:05 +0000 Subject: [PATCH 16/38] Fix Makefile test runner: cd into example dir, add test args support - Run each test from its own directory so data files (test.jpg, graph4096.txt, etc.) are found via relative paths - Support TEST_ARGS variable in Makefiles for tests needing arguments (e.g. hip_bfs requires graph4096.txt as input) - Add AlmaLinux 8 skip entries for GLIBC_2.34 incompatible binaries (warp_size_reduction) and missing hipSPARSELt Tensile libraries Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/generate_skip_tests.py | 10 ++++++++-- HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile | 1 + run_makefile_tests.sh | 13 ++++++++----- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/build_tools/generate_skip_tests.py b/.github/build_tools/generate_skip_tests.py index 3aefee99d4..ae8e2b3ef9 100644 --- a/.github/build_tools/generate_skip_tests.py +++ b/.github/build_tools/generate_skip_tests.py @@ -29,8 +29,14 @@ # Tests to skip for a specific GPU target + distro combination. # Keys are ":", e.g. "gfx1151:sles-15.7". DISTRO_SKIP_TESTS = { - # Example: - # "gfx1151:sles-15.7": ["some_test"], + # AlmaLinux 8 has glibc 2.28; binaries compiled against 2.34+ fail at runtime + "gfx1100:almalinux-8": [ + "hip_template_warp_size_reduction", + "hip_warp_size_reduction", + # hipSPARSELt Tensile library files not packaged for this target + "hipsparselt_spmm", + "hipsparselt_spmm_advanced", + ], } diff --git a/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile b/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile index 9f16b7e810..e271571d38 100644 --- a/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile +++ b/HIP-Doc/Tutorials/Programming-Patterns/bfs/Makefile @@ -21,6 +21,7 @@ # SOFTWARE. EXAMPLE := hip_bfs +TEST_ARGS := graph4096.txt GRAPHGEN := graphgen GPU_RUNTIME := HIP diff --git a/run_makefile_tests.sh b/run_makefile_tests.sh index 1b207ab771..ccc616ad08 100755 --- a/run_makefile_tests.sh +++ b/run_makefile_tests.sh @@ -70,7 +70,7 @@ is_skipped() { TESTS_LIST="/tmp/makefile_tests_list_$$.txt" -# Find all Makefiles with EXAMPLE definitions, extract name and directory +# Find all Makefiles with EXAMPLE definitions, extract name, directory, and test args find "${SCRIPT_DIR}" -name Makefile -path '*/Makefile' | sort | while IFS= read -r makefile; do dir=$(dirname "$makefile") example_name=$(grep '^EXAMPLE := ' "$makefile" 2>/dev/null | head -1 | sed 's/^EXAMPLE := //') @@ -81,7 +81,10 @@ find "${SCRIPT_DIR}" -name Makefile -path '*/Makefile' | sort | while IFS= read # Skip if executable wasn't built [ ! -x "${dir}/${example_name}" ] && continue - echo "${dir}|${example_name}" + # Extract TEST_ARGS if defined (e.g. TEST_ARGS := graph4096.txt) + test_args=$(grep '^TEST_ARGS := ' "$makefile" 2>/dev/null | head -1 | sed 's/^TEST_ARGS := //') + + echo "${dir}|${example_name}|${test_args}" done > "${TESTS_LIST}" # Count total tests upfront @@ -101,7 +104,7 @@ CURRENT=0 FAILED_TESTS="" # Run tests -while IFS='|' read -r dir example_name; do +while IFS='|' read -r dir example_name test_args; do CURRENT=$((CURRENT + 1)) if is_skipped "${example_name}"; then @@ -110,9 +113,9 @@ while IFS='|' read -r dir example_name; do continue fi - # Run the test with timeout + # Run the test from its own directory (so data files are found) printf "(%d/%d) RUN %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" - if timeout "${TIMEOUT}" "${dir}/${example_name}" > "/tmp/test_${example_name}.log" 2>&1; then + if (cd "${dir}" && timeout "${TIMEOUT}" "./${example_name}" ${test_args}) > "/tmp/test_${example_name}.log" 2>&1; then PASSED=$((PASSED + 1)) printf "(%d/%d) PASS %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" else From 94ade5e8705d73c31e72d9ce5da2b43fec21560e Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 15:28:07 +0000 Subject: [PATCH 17/38] Run Makefile tests after ctest, using ctest test list as allow filter Only run Makefile-built tests that are also registered as ctest tests. This ensures the Makefile test runner exercises exactly the same set of examples that CMake validates, avoiding failures from examples that need special arguments, scripts, or aren't meant to run standalone. - Add --allow-file option to run_makefile_tests.sh: filters Makefile executables to only those present in the allow list - Move Makefile tests step after ctest in CI workflow - Extract ctest test names via `ctest -N` and pass as the allow file Co-Authored-By: Claude Opus 4.6 --- .../build-rocm-examples-reusable.yml | 20 ++++--- run_makefile_tests.sh | 58 +++++++++++++++---- 2 files changed, 60 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 3a8116f4e2..739e327f02 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -114,13 +114,6 @@ jobs: ./configure.sh --rocm-path="${ROCM_PATH}" make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" - - name: Makefile tests - if: ${{ !cancelled() }} - run: | - python3 .github/build_tools/generate_skip_tests.py --target ${{ matrix.gpu_config.gpu_target }} --distro ${{ inputs.distro }} - SKIP_FILE="${GITHUB_WORKSPACE}/.github/build_tools/skip_tests.txt" - ./run_makefile_tests.sh --skip-file="${SKIP_FILE}" --timeout=120 - - name: CMake configure if: ${{ !cancelled() }} run: | @@ -229,6 +222,19 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY fi + - name: Makefile tests + if: ${{ !cancelled() }} + run: | + # Extract the list of registered ctest test names + ctest --test-dir build -N | grep ' Test #' | sed 's/.*: //' > /tmp/ctest_test_names.txt + echo "ctest registered $(wc -l < /tmp/ctest_test_names.txt) tests" + + SKIP_FILE="${GITHUB_WORKSPACE}/.github/build_tools/skip_tests.txt" + ./run_makefile_tests.sh \ + --allow-file=/tmp/ctest_test_names.txt \ + --skip-file="${SKIP_FILE}" \ + --timeout=120 + - name: Upload test logs if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 diff --git a/run_makefile_tests.sh b/run_makefile_tests.sh index ccc616ad08..cf3abe892c 100755 --- a/run_makefile_tests.sh +++ b/run_makefile_tests.sh @@ -27,19 +27,30 @@ # with a timeout, and reports pass/fail results. # # Usage: -# ./run_makefile_tests.sh [--skip-file=FILE] [--timeout=SECONDS] +# ./run_makefile_tests.sh [--allow-file=FILE] [--skip-file=FILE] [--timeout=SECONDS] # -# The skip file should contain one test name per line (the EXAMPLE name). -# This is the same format produced by generate_skip_tests.py. +# Options: +# --allow-file=FILE Only run tests listed in this file (one name per line). +# Use to mirror the ctest test list so Makefile tests run +# exactly the same set as CMake. Tests not in the allow +# list are silently skipped. +# --skip-file=FILE Skip tests listed in this file (one name per line). +# Same format as generate_skip_tests.py output. +# Applied after allow-file filtering. +# --timeout=SECONDS Per-test timeout (default: 120). set -u SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +ALLOW_FILE="" SKIP_FILE="" TIMEOUT=120 for arg in "$@"; do case "$arg" in + --allow-file=*) + ALLOW_FILE="${arg#--allow-file=}" + ;; --skip-file=*) SKIP_FILE="${arg#--skip-file=}" ;; @@ -47,22 +58,32 @@ for arg in "$@"; do TIMEOUT="${arg#--timeout=}" ;; --help|-h) - echo "Usage: $0 [--skip-file=FILE] [--timeout=SECONDS]" - echo "" - echo " --skip-file=FILE File with test names to skip (one per line)." - echo " Same format as generate_skip_tests.py output." - echo " --timeout=SECONDS Per-test timeout (default: 120)" + echo "Usage: $0 [--allow-file=FILE] [--skip-file=FILE] [--timeout=SECONDS]" exit 0 ;; esac done -# Load skip list into a string for matching +# Load allow list (if provided, only tests in this list will run) +ALLOW_LIST="" +USE_ALLOW_LIST=0 +if [ -n "${ALLOW_FILE}" ] && [ -f "${ALLOW_FILE}" ]; then + ALLOW_LIST=$(cat "${ALLOW_FILE}") + USE_ALLOW_LIST=1 +fi + +# Load skip list SKIP_LIST="" if [ -n "${SKIP_FILE}" ] && [ -f "${SKIP_FILE}" ]; then SKIP_LIST=$(cat "${SKIP_FILE}") fi +is_allowed() { + test_name="$1" + [ "${USE_ALLOW_LIST}" -eq 0 ] && return 0 + echo "${ALLOW_LIST}" | grep -qx "${test_name}" 2>/dev/null +} + is_skipped() { test_name="$1" echo "${SKIP_LIST}" | grep -qx "${test_name}" 2>/dev/null @@ -87,11 +108,26 @@ find "${SCRIPT_DIR}" -name Makefile -path '*/Makefile' | sort | while IFS= read echo "${dir}|${example_name}|${test_args}" done > "${TESTS_LIST}" -# Count total tests upfront +NUM_BUILT=$(wc -l < "${TESTS_LIST}") + +# Filter to only allowed tests (if allow list provided) +if [ "${USE_ALLOW_LIST}" -eq 1 ]; then + FILTERED_LIST="/tmp/makefile_tests_filtered_$$.txt" + while IFS='|' read -r dir example_name test_args; do + if is_allowed "${example_name}"; then + echo "${dir}|${example_name}|${test_args}" + fi + done < "${TESTS_LIST}" > "${FILTERED_LIST}" + mv "${FILTERED_LIST}" "${TESTS_LIST}" +fi + NUM_TESTS=$(wc -l < "${TESTS_LIST}") echo "" -echo "Found ${NUM_TESTS} Makefile-built test(s)" +echo "Found ${NUM_BUILT} Makefile-built executable(s)" +if [ "${USE_ALLOW_LIST}" -eq 1 ]; then + echo "Allow file: ${ALLOW_FILE} ($(wc -l < "${ALLOW_FILE}") ctest entries, ${NUM_TESTS} matched)" +fi if [ -n "${SKIP_FILE}" ] && [ -f "${SKIP_FILE}" ] && [ -s "${SKIP_FILE}" ]; then echo "Skip file: ${SKIP_FILE} ($(wc -l < "${SKIP_FILE}") entries)" fi From 88c30be11b6d9edd0dc3abdcb079af457c5f0aed Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 15:52:01 +0000 Subject: [PATCH 18/38] Skip rocdec_decode in Makefile tests (needs CMake test data) rocdecode_rocdec_decode requires -i which is only available via ROCDECODE_TEST_FRAMES_DIR set during CMake configure. Add a MAKEFILE_SKIP_TESTS list to generate_skip_tests.py and a --makefile flag to include these skips. The CI Makefile tests step now regenerates the skip list with --makefile before running. Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/generate_skip_tests.py | 17 +++++++++++++++++ .../workflows/build-rocm-examples-reusable.yml | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/.github/build_tools/generate_skip_tests.py b/.github/build_tools/generate_skip_tests.py index ae8e2b3ef9..406d3fe97b 100644 --- a/.github/build_tools/generate_skip_tests.py +++ b/.github/build_tools/generate_skip_tests.py @@ -8,6 +8,13 @@ import argparse import os +# Tests to always skip in Makefile runs. These require test data or arguments +# that are only set up by the CMake build system (e.g. ROCDECODE_TEST_FRAMES_DIR). +# ctest handles them via add_test() COMMAND args; the Makefile runner cannot. +MAKEFILE_SKIP_TESTS = [ + "rocdecode_rocdec_decode", +] + # Tests to skip per GPU target (one list per target that has skips) SKIP_TESTS = { "gfx1151": [ @@ -59,10 +66,20 @@ def main(): default="", help="Distro key for distro-specific skips (e.g. sles-15.7)", ) + parser.add_argument( + "--makefile", + action="store_true", + help="Include Makefile-only skips (tests needing CMake test data)", + ) args = parser.parse_args() lines = list(SKIP_TESTS.get(args.target, [])) + if args.makefile: + for test in MAKEFILE_SKIP_TESTS: + if test not in lines: + lines.append(test) + if args.distro: combo_key = f"{args.target}:{args.distro}" distro_lines = DISTRO_SKIP_TESTS.get(combo_key, []) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 739e327f02..13971e364e 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -229,7 +229,13 @@ jobs: ctest --test-dir build -N | grep ' Test #' | sed 's/.*: //' > /tmp/ctest_test_names.txt echo "ctest registered $(wc -l < /tmp/ctest_test_names.txt) tests" + # Generate skip list with --makefile to include tests that need CMake test data + python3 .github/build_tools/generate_skip_tests.py \ + --target ${{ matrix.gpu_config.gpu_target }} \ + --distro ${{ inputs.distro }} \ + --makefile SKIP_FILE="${GITHUB_WORKSPACE}/.github/build_tools/skip_tests.txt" + ./run_makefile_tests.sh \ --allow-file=/tmp/ctest_test_names.txt \ --skip-file="${SKIP_FILE}" \ From df9d410bad1e33f46fc33ca76e3aed96f965f775 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 16:31:20 +0000 Subject: [PATCH 19/38] Fix FFmpeg/Vulkan detection: check libraries exist, not just headers On SLES 15.7 the FFmpeg development headers exist at /usr/include/libavcodec/avcodec.h but the shared libraries are not installed, causing link failures. The header-only fallback in both configure.sh and require_deps.mk now also verifies the library is in ldconfig before reporting the dependency as available. Co-Authored-By: Claude Opus 4.6 --- Common/require_deps.mk | 4 ++-- configure.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/require_deps.mk b/Common/require_deps.mk index f2010c4d77..28dd59394a 100644 --- a/Common/require_deps.mk +++ b/Common/require_deps.mk @@ -53,7 +53,7 @@ ifndef HAVE_FFMPEG # FFmpeg _FFMPEG_CHECK := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null && echo 1 || echo 0) ifeq ($(_FFMPEG_CHECK),0) - _FFMPEG_CHECK := $(if $(wildcard /usr/include/libavcodec/avcodec.h),1,0) + _FFMPEG_CHECK := $(if $(and $(wildcard /usr/include/libavcodec/avcodec.h),$(shell ldconfig -p 2>/dev/null | grep -q libavcodec && echo y)),1,0) endif HAVE_FFMPEG := $(_FFMPEG_CHECK) ifeq ($(HAVE_FFMPEG),1) @@ -89,7 +89,7 @@ ifndef HAVE_FFMPEG # Vulkan _VULKAN_CHECK := $(shell pkg-config --exists vulkan 2>/dev/null && echo 1 || echo 0) ifeq ($(_VULKAN_CHECK),0) - _VULKAN_CHECK := $(if $(wildcard /usr/include/vulkan/vulkan.h),1,0) + _VULKAN_CHECK := $(if $(and $(wildcard /usr/include/vulkan/vulkan.h),$(shell ldconfig -p 2>/dev/null | grep -q libvulkan && echo y)),1,0) endif HAVE_VULKAN := $(_VULKAN_CHECK) ifeq ($(HAVE_VULKAN),1) diff --git a/configure.sh b/configure.sh index f18f13bf67..d20f512b30 100755 --- a/configure.sh +++ b/configure.sh @@ -89,7 +89,7 @@ if pkg_check libavcodec libavformat libavutil; then HAVE_FFMPEG=1 FFMPEG_CFLAGS="$(pkg_cflags libavcodec libavformat libavutil)" FFMPEG_LIBS="$(pkg_libs libavcodec libavformat libavutil)" -elif [ -f /usr/include/libavcodec/avcodec.h ]; then +elif [ -f /usr/include/libavcodec/avcodec.h ] && ldconfig -p 2>/dev/null | grep -q libavcodec; then HAVE_FFMPEG=1 FFMPEG_LIBS="-lavcodec -lavformat -lavutil" fi @@ -144,7 +144,7 @@ if pkg_check vulkan; then HAVE_VULKAN=1 VULKAN_CFLAGS="$(pkg_cflags vulkan)" VULKAN_LIBS="$(pkg_libs vulkan)" -elif [ -f /usr/include/vulkan/vulkan.h ]; then +elif [ -f /usr/include/vulkan/vulkan.h ] && ldconfig -p 2>/dev/null | grep -q libvulkan; then HAVE_VULKAN=1 VULKAN_LIBS="-lvulkan" fi From ca3bc40ee6b89b6509fb2cff5b03ab06c979e504 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 18:12:41 +0000 Subject: [PATCH 20/38] Remove header-only fallback for FFmpeg/Vulkan detection The header-only fallback (checking /usr/include for headers) causes false positives on SLES where dev headers exist but libraries don't. Rely solely on pkg-config, which only succeeds when dev packages are properly installed with both headers and linkable libraries. Co-Authored-By: Claude Opus 4.6 --- Common/require_deps.mk | 6 ------ configure.sh | 6 ------ 2 files changed, 12 deletions(-) diff --git a/Common/require_deps.mk b/Common/require_deps.mk index 28dd59394a..4295c1fbdc 100644 --- a/Common/require_deps.mk +++ b/Common/require_deps.mk @@ -52,9 +52,6 @@ ifndef HAVE_FFMPEG # FFmpeg _FFMPEG_CHECK := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null && echo 1 || echo 0) - ifeq ($(_FFMPEG_CHECK),0) - _FFMPEG_CHECK := $(if $(and $(wildcard /usr/include/libavcodec/avcodec.h),$(shell ldconfig -p 2>/dev/null | grep -q libavcodec && echo y)),1,0) - endif HAVE_FFMPEG := $(_FFMPEG_CHECK) ifeq ($(HAVE_FFMPEG),1) FFMPEG_CFLAGS := $(shell pkg-config --cflags libavcodec libavformat libavutil 2>/dev/null) @@ -88,9 +85,6 @@ ifndef HAVE_FFMPEG # Vulkan _VULKAN_CHECK := $(shell pkg-config --exists vulkan 2>/dev/null && echo 1 || echo 0) - ifeq ($(_VULKAN_CHECK),0) - _VULKAN_CHECK := $(if $(and $(wildcard /usr/include/vulkan/vulkan.h),$(shell ldconfig -p 2>/dev/null | grep -q libvulkan && echo y)),1,0) - endif HAVE_VULKAN := $(_VULKAN_CHECK) ifeq ($(HAVE_VULKAN),1) VULKAN_CFLAGS := $(shell pkg-config --cflags vulkan 2>/dev/null) diff --git a/configure.sh b/configure.sh index d20f512b30..41a1f8799c 100755 --- a/configure.sh +++ b/configure.sh @@ -89,9 +89,6 @@ if pkg_check libavcodec libavformat libavutil; then HAVE_FFMPEG=1 FFMPEG_CFLAGS="$(pkg_cflags libavcodec libavformat libavutil)" FFMPEG_LIBS="$(pkg_libs libavcodec libavformat libavutil)" -elif [ -f /usr/include/libavcodec/avcodec.h ] && ldconfig -p 2>/dev/null | grep -q libavcodec; then - HAVE_FFMPEG=1 - FFMPEG_LIBS="-lavcodec -lavformat -lavutil" fi echo " FFmpeg: $([ ${HAVE_FFMPEG} -eq 1 ] && echo yes || echo no)" cat >> "${CONFIG_MK}" << EOF @@ -144,9 +141,6 @@ if pkg_check vulkan; then HAVE_VULKAN=1 VULKAN_CFLAGS="$(pkg_cflags vulkan)" VULKAN_LIBS="$(pkg_libs vulkan)" -elif [ -f /usr/include/vulkan/vulkan.h ] && ldconfig -p 2>/dev/null | grep -q libvulkan; then - HAVE_VULKAN=1 - VULKAN_LIBS="-lvulkan" fi echo " Vulkan: $([ ${HAVE_VULKAN} -eq 1 ] && echo yes || echo no)" cat >> "${CONFIG_MK}" << EOF From 66e13e6eb9df7d382048bc3badaa6a4208f73b78 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 18:54:32 +0000 Subject: [PATCH 21/38] Fix rocdec_decode build on SLES: use config.mk for FFmpeg detection, add -lstdc++fs rocdec_decode had inline pkg-config FFmpeg detection that bypassed the configure system. On SLES, pkg-config found .pc files but libraries couldn't actually be linked. Now uses HAVE_FFMPEG from config.mk/ require_deps.mk instead. Also adds -lstdc++fs to rocdec_decode and video_to_sequence for std::experimental::filesystem symbols needed on older toolchains. Co-Authored-By: Claude Opus 4.6 --- Libraries/rocDecode/rocdec_decode/Makefile | 14 ++++++++------ Libraries/rocDecode/video_to_sequence/Makefile | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Libraries/rocDecode/rocdec_decode/Makefile b/Libraries/rocDecode/rocdec_decode/Makefile index f06b016164..b7d82c6e9e 100644 --- a/Libraries/rocDecode/rocdec_decode/Makefile +++ b/Libraries/rocDecode/rocdec_decode/Makefile @@ -25,6 +25,9 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP +# Load dependency detection (FFmpeg is optional for this example) +include $(COMMON_INCLUDE_DIR)/require_deps.mk + # HIP variables ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) @@ -45,7 +48,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode +ILDLIBS := -lrocdecode -lstdc++fs ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -59,11 +62,10 @@ ifeq ($(GPU_RUNTIME), HIP) CPPFLAGS += -DENABLE_HOST_DECODE=0 endif - # Optional FFmpeg - FFMPEG_FOUND := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null && echo 1) - ifeq ($(FFMPEG_FOUND),1) - ICPPFLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil) - ILDLIBS += $(shell pkg-config --libs libavcodec libavformat libavutil) + # Optional FFmpeg (uses HAVE_FFMPEG from config.mk / require_deps.mk) + ifeq ($(HAVE_FFMPEG),1) + ICPPFLAGS += $(FFMPEG_CFLAGS) + ILDLIBS += $(FFMPEG_LIBS) endif COMPILER := $(HIPCXX) diff --git a/Libraries/rocDecode/video_to_sequence/Makefile b/Libraries/rocDecode/video_to_sequence/Makefile index c77978c5fb..73205d494c 100644 --- a/Libraries/rocDecode/video_to_sequence/Makefile +++ b/Libraries/rocDecode/video_to_sequence/Makefile @@ -45,7 +45,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil -lswresample -lpthread +ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil -lswresample -lpthread -lstdc++fs ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra From 3c54d77689474c4ae1522933b54df45af13323e2 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 19:59:08 +0000 Subject: [PATCH 22/38] Add link-test to configure.sh and require_deps.mk to catch missing -dev packages On SLES, FFmpeg .pc files exist (runtime packages) but the actual libraries cannot be linked (-dev packages missing). pkg-config --exists succeeds but linking fails. Now both configure.sh and the require_deps.mk fallback verify that pkg-config libraries can actually be linked by compiling a trivial C program with the reported -l flags. Also integrates rocdec_decode with the configure system (HAVE_FFMPEG) instead of its own inline pkg-config detection. Co-Authored-By: Claude Opus 4.6 --- Common/require_deps.mk | 24 ++++++++++++++++-------- configure.sh | 22 +++++++++++++++++----- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Common/require_deps.mk b/Common/require_deps.mk index 4295c1fbdc..a1835cd0f6 100644 --- a/Common/require_deps.mk +++ b/Common/require_deps.mk @@ -50,8 +50,10 @@ _REPO_ROOT := $(dir $(COMMON_INCLUDE_DIR)) ifndef HAVE_FFMPEG # Fallback: detect dependencies via pkg-config / file existence - # FFmpeg - _FFMPEG_CHECK := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null && echo 1 || echo 0) + # FFmpeg (pkg-config + link test to catch missing -dev packages) + _FFMPEG_CHECK := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null \ + && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs libavcodec libavformat libavutil) -o /dev/null 2>/dev/null \ + && echo 1 || echo 0) HAVE_FFMPEG := $(_FFMPEG_CHECK) ifeq ($(HAVE_FFMPEG),1) FFMPEG_CFLAGS := $(shell pkg-config --cflags libavcodec libavformat libavutil 2>/dev/null) @@ -61,8 +63,10 @@ ifndef HAVE_FFMPEG FFMPEG_LIBS := endif - # OpenCV - _OPENCV_CHECK := $(shell pkg-config --exists opencv4 2>/dev/null && echo 1 || (pkg-config --exists opencv 2>/dev/null && echo 1 || echo 0)) + # OpenCV (pkg-config + link test) + _OPENCV_CHECK := $(shell (pkg-config --exists opencv4 2>/dev/null && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs opencv4) -o /dev/null 2>/dev/null && echo 1) \ + || (pkg-config --exists opencv 2>/dev/null && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs opencv) -o /dev/null 2>/dev/null && echo 1) \ + || echo 0) HAVE_OPENCV := $(_OPENCV_CHECK) ifeq ($(HAVE_OPENCV),1) OPENCV_CFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) @@ -72,8 +76,10 @@ ifndef HAVE_FFMPEG OPENCV_LIBS := endif - # GLFW3 - _GLFW3_CHECK := $(shell pkg-config --exists glfw3 2>/dev/null && echo 1 || echo 0) + # GLFW3 (pkg-config + link test) + _GLFW3_CHECK := $(shell pkg-config --exists glfw3 2>/dev/null \ + && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs glfw3) -o /dev/null 2>/dev/null \ + && echo 1 || echo 0) HAVE_GLFW3 := $(_GLFW3_CHECK) ifeq ($(HAVE_GLFW3),1) GLFW3_CFLAGS := $(shell pkg-config --cflags glfw3 2>/dev/null) @@ -83,8 +89,10 @@ ifndef HAVE_FFMPEG GLFW3_LIBS := endif - # Vulkan - _VULKAN_CHECK := $(shell pkg-config --exists vulkan 2>/dev/null && echo 1 || echo 0) + # Vulkan (pkg-config + link test) + _VULKAN_CHECK := $(shell pkg-config --exists vulkan 2>/dev/null \ + && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs vulkan) -o /dev/null 2>/dev/null \ + && echo 1 || echo 0) HAVE_VULKAN := $(_VULKAN_CHECK) ifeq ($(HAVE_VULKAN),1) VULKAN_CFLAGS := $(shell pkg-config --cflags vulkan 2>/dev/null) diff --git a/configure.sh b/configure.sh index 41a1f8799c..c885ccfde3 100755 --- a/configure.sh +++ b/configure.sh @@ -73,6 +73,18 @@ pkg_libs() { pkg-config --libs "$@" 2>/dev/null || true } +# Helper: verify that libraries from pkg-config can actually be linked. +# On some distros (e.g. SLES), .pc files exist but -dev packages are missing. +# Uses the C compiler to do a link test. +can_link() { + _libs="$(pkg_libs "$@")" + if [ -z "$_libs" ]; then + return 1 + fi + _cc="${CC:-cc}" + echo "int main(){return 0;}" | "$_cc" -x c - $_libs -o /dev/null 2>/dev/null +} + # Start writing config.mk cat > "${CONFIG_MK}" << 'HEADER' # Auto-generated by configure.sh - do not edit @@ -85,7 +97,7 @@ echo "" >> "${CONFIG_MK}" HAVE_FFMPEG=0 FFMPEG_CFLAGS="" FFMPEG_LIBS="" -if pkg_check libavcodec libavformat libavutil; then +if pkg_check libavcodec libavformat libavutil && can_link libavcodec libavformat libavutil; then HAVE_FFMPEG=1 FFMPEG_CFLAGS="$(pkg_cflags libavcodec libavformat libavutil)" FFMPEG_LIBS="$(pkg_libs libavcodec libavformat libavutil)" @@ -101,11 +113,11 @@ EOF HAVE_OPENCV=0 OPENCV_CFLAGS="" OPENCV_LIBS="" -if pkg_check opencv4; then +if pkg_check opencv4 && can_link opencv4; then HAVE_OPENCV=1 OPENCV_CFLAGS="$(pkg_cflags opencv4)" OPENCV_LIBS="$(pkg_libs opencv4)" -elif pkg_check opencv; then +elif pkg_check opencv && can_link opencv; then HAVE_OPENCV=1 OPENCV_CFLAGS="$(pkg_cflags opencv)" OPENCV_LIBS="$(pkg_libs opencv)" @@ -121,7 +133,7 @@ EOF HAVE_GLFW3=0 GLFW3_CFLAGS="" GLFW3_LIBS="" -if pkg_check glfw3; then +if pkg_check glfw3 && can_link glfw3; then HAVE_GLFW3=1 GLFW3_CFLAGS="$(pkg_cflags glfw3)" GLFW3_LIBS="$(pkg_libs glfw3)" @@ -137,7 +149,7 @@ EOF HAVE_VULKAN=0 VULKAN_CFLAGS="" VULKAN_LIBS="" -if pkg_check vulkan; then +if pkg_check vulkan && can_link vulkan; then HAVE_VULKAN=1 VULKAN_CFLAGS="$(pkg_cflags vulkan)" VULKAN_LIBS="$(pkg_libs vulkan)" From 3baedb6227e956123171008ce96f3647df6722b0 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 20:09:16 +0000 Subject: [PATCH 23/38] Improve can_link compiler fallback chain (cc, gcc, clang, ROCm clang) The SLES wheel containers may not have cc/gcc. Try multiple compilers in order, including the ROCm-bundled clang as last resort. If no compiler is found, conservatively report the dependency as missing. Co-Authored-By: Claude Opus 4.6 --- configure.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/configure.sh b/configure.sh index c885ccfde3..6f24f6db46 100755 --- a/configure.sh +++ b/configure.sh @@ -75,14 +75,25 @@ pkg_libs() { # Helper: verify that libraries from pkg-config can actually be linked. # On some distros (e.g. SLES), .pc files exist but -dev packages are missing. -# Uses the C compiler to do a link test. +# Tries CC, cc, gcc, clang in order; if none found, assumes not linkable. can_link() { _libs="$(pkg_libs "$@")" if [ -z "$_libs" ]; then return 1 fi - _cc="${CC:-cc}" - echo "int main(){return 0;}" | "$_cc" -x c - $_libs -o /dev/null 2>/dev/null + _test_cc="" + for _try_cc in "${CC}" cc gcc clang "${ROCM_PATH}/lib/llvm/bin/clang"; do + [ -z "$_try_cc" ] && continue + if command -v "$_try_cc" >/dev/null 2>&1; then + _test_cc="$_try_cc" + break + fi + done + if [ -z "$_test_cc" ]; then + # No C compiler found — conservatively say not linkable + return 1 + fi + echo "int main(){return 0;}" | "$_test_cc" -x c - $_libs -o /dev/null 2>/dev/null } # Start writing config.mk From 82eadf0f9c1c2d2d0d70fb9f0c353dc4e7717ca8 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Fri, 20 Mar 2026 20:22:53 +0000 Subject: [PATCH 24/38] Use $(FFMPEG_LIBS) from config.mk instead of hardcoded -lavcodec/-lavformat/-lavutil On SLES tarball, FFmpeg is installed under /usr/local/lib. pkg-config returns -L/usr/local/lib along with the -l flags, but the Makefiles were hardcoding just -lavcodec -lavformat -lavutil without the -L path. The ROCm linker (ld.lld) doesn't search /usr/local/lib by default, so linking failed. Now all 8 rocDecode Makefiles use $(FFMPEG_LIBS) which includes the correct -L path from pkg-config. Co-Authored-By: Claude Opus 4.6 --- Libraries/rocDecode/video_decode/Makefile | 2 +- Libraries/rocDecode/video_decode_batch/Makefile | 2 +- Libraries/rocDecode/video_decode_mem/Makefile | 2 +- Libraries/rocDecode/video_decode_multi_files/Makefile | 2 +- Libraries/rocDecode/video_decode_perf/Makefile | 2 +- Libraries/rocDecode/video_decode_pic_files/Makefile | 2 +- Libraries/rocDecode/video_decode_rgb/Makefile | 2 +- Libraries/rocDecode/video_to_sequence/Makefile | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Libraries/rocDecode/video_decode/Makefile b/Libraries/rocDecode/video_decode/Makefile index 842989cfbb..30392d3367 100644 --- a/Libraries/rocDecode/video_decode/Makefile +++ b/Libraries/rocDecode/video_decode/Makefile @@ -52,7 +52,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I .. -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lrocprofiler-register -lavcodec -lavformat -lavutil -lpthread +ILDLIBS := -lrocdecode -lrocprofiler-register $(FFMPEG_LIBS) -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Libraries/rocDecode/video_decode_batch/Makefile b/Libraries/rocDecode/video_decode_batch/Makefile index de45fcca95..118d62affc 100644 --- a/Libraries/rocDecode/video_decode_batch/Makefile +++ b/Libraries/rocDecode/video_decode_batch/Makefile @@ -45,7 +45,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lrocprofiler-register -lavcodec -lavformat -lavutil -lpthread -lstdc++fs +ILDLIBS := -lrocdecode -lrocprofiler-register $(FFMPEG_LIBS) -lpthread -lstdc++fs ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Libraries/rocDecode/video_decode_mem/Makefile b/Libraries/rocDecode/video_decode_mem/Makefile index d7024829f5..0a03278930 100644 --- a/Libraries/rocDecode/video_decode_mem/Makefile +++ b/Libraries/rocDecode/video_decode_mem/Makefile @@ -45,7 +45,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil +ILDLIBS := -lrocdecode $(FFMPEG_LIBS) ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Libraries/rocDecode/video_decode_multi_files/Makefile b/Libraries/rocDecode/video_decode_multi_files/Makefile index 63bd0574df..3439a38520 100644 --- a/Libraries/rocDecode/video_decode_multi_files/Makefile +++ b/Libraries/rocDecode/video_decode_multi_files/Makefile @@ -45,7 +45,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil +ILDLIBS := -lrocdecode $(FFMPEG_LIBS) ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Libraries/rocDecode/video_decode_perf/Makefile b/Libraries/rocDecode/video_decode_perf/Makefile index a918be6cd0..36db9e2f26 100644 --- a/Libraries/rocDecode/video_decode_perf/Makefile +++ b/Libraries/rocDecode/video_decode_perf/Makefile @@ -52,7 +52,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil -lpthread +ILDLIBS := -lrocdecode $(FFMPEG_LIBS) -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Libraries/rocDecode/video_decode_pic_files/Makefile b/Libraries/rocDecode/video_decode_pic_files/Makefile index aeff2f08e2..cd8b64d453 100644 --- a/Libraries/rocDecode/video_decode_pic_files/Makefile +++ b/Libraries/rocDecode/video_decode_pic_files/Makefile @@ -52,7 +52,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil +ILDLIBS := -lrocdecode $(FFMPEG_LIBS) ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Libraries/rocDecode/video_decode_rgb/Makefile b/Libraries/rocDecode/video_decode_rgb/Makefile index 85903fbdf6..374d82d04f 100644 --- a/Libraries/rocDecode/video_decode_rgb/Makefile +++ b/Libraries/rocDecode/video_decode_rgb/Makefile @@ -45,7 +45,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil -lswresample -lpthread +ILDLIBS := -lrocdecode $(FFMPEG_LIBS) -lswresample -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra diff --git a/Libraries/rocDecode/video_to_sequence/Makefile b/Libraries/rocDecode/video_to_sequence/Makefile index 73205d494c..1d59b459f6 100644 --- a/Libraries/rocDecode/video_to_sequence/Makefile +++ b/Libraries/rocDecode/video_to_sequence/Makefile @@ -45,7 +45,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lavcodec -lavformat -lavutil -lswresample -lpthread -lstdc++fs +ILDLIBS := -lrocdecode $(FFMPEG_LIBS) -lswresample -lpthread -lstdc++fs ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra From 1fac6e3ac59c48d2397ece0dbdbe5875dc5b131f Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 15:30:38 +0000 Subject: [PATCH 25/38] Use ctest JUnit XML results for Makefile test allow list Replace `ctest -N` + grep/sed (which listed *registered* tests) with `ctest --output-junit` + a Python script that parses the JUnit XML to extract tests that ctest *actually ran*. This ensures true parity between CMake and Makefile test sets. Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/parse_ctest_results.py | 46 +++++++++++++++++++ .../build-rocm-examples-reusable.yml | 11 +++-- 2 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 .github/build_tools/parse_ctest_results.py diff --git a/.github/build_tools/parse_ctest_results.py b/.github/build_tools/parse_ctest_results.py new file mode 100644 index 0000000000..a98b2b2cbb --- /dev/null +++ b/.github/build_tools/parse_ctest_results.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +"""Parse ctest JUnit XML results and extract test names that actually ran. + +Used by the Makefile test step to only run tests that ctest executed, +ensuring parity between CMake and Makefile test sets. +""" + +import argparse +import sys +import xml.etree.ElementTree as ET + + +def main(): + parser = argparse.ArgumentParser( + description="Extract test names from ctest JUnit XML results." + ) + parser.add_argument( + "--junit", required=True, help="Path to ctest JUnit XML file" + ) + parser.add_argument( + "--output", required=True, help="Output file (one test name per line)" + ) + args = parser.parse_args() + + try: + tree = ET.parse(args.junit) + except (ET.ParseError, FileNotFoundError) as e: + print(f"Error reading {args.junit}: {e}", file=sys.stderr) + sys.exit(1) + + root = tree.getroot() + test_names = [] + for testcase in root.iter("testcase"): + name = testcase.get("name") + if name: + test_names.append(name) + + with open(args.output, "w") as f: + for name in test_names: + f.write(name + "\n") + + print(f"Extracted {len(test_names)} test names from ctest JUnit results") + + +if __name__ == "__main__": + main() diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 13971e364e..f51041a5ba 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -179,7 +179,7 @@ jobs: echo "No tests skipped." >> $GITHUB_STEP_SUMMARY fi - ctest --test-dir build --output-on-failure --exclude-from-file "${SKIP_FILE}" 2>&1 | tee ctest_output.log + ctest --test-dir build --output-on-failure --exclude-from-file "${SKIP_FILE}" --output-junit build/ctest_results.xml 2>&1 | tee ctest_output.log - name: Test summary if: ${{ !cancelled() }} @@ -225,9 +225,10 @@ jobs: - name: Makefile tests if: ${{ !cancelled() }} run: | - # Extract the list of registered ctest test names - ctest --test-dir build -N | grep ' Test #' | sed 's/.*: //' > /tmp/ctest_test_names.txt - echo "ctest registered $(wc -l < /tmp/ctest_test_names.txt) tests" + # Extract test names that ctest actually ran from JUnit XML results + python3 .github/build_tools/parse_ctest_results.py \ + --junit build/ctest_results.xml \ + --output /tmp/ctest_ran_tests.txt # Generate skip list with --makefile to include tests that need CMake test data python3 .github/build_tools/generate_skip_tests.py \ @@ -237,7 +238,7 @@ jobs: SKIP_FILE="${GITHUB_WORKSPACE}/.github/build_tools/skip_tests.txt" ./run_makefile_tests.sh \ - --allow-file=/tmp/ctest_test_names.txt \ + --allow-file=/tmp/ctest_ran_tests.txt \ --skip-file="${SKIP_FILE}" \ --timeout=120 From d258066e434fb39817e54c83bb14eb9345b79070 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 15:44:50 +0000 Subject: [PATCH 26/38] Skip rocprof-systems-basic (too slow) and rocprof-systems-advanced (fails) Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/generate_skip_tests.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/build_tools/generate_skip_tests.py b/.github/build_tools/generate_skip_tests.py index 406d3fe97b..b8ec59be36 100644 --- a/.github/build_tools/generate_skip_tests.py +++ b/.github/build_tools/generate_skip_tests.py @@ -15,6 +15,14 @@ "rocdecode_rocdec_decode", ] +# Tests to always skip (all targets, all distros). +ALWAYS_SKIP_TESTS = [ + # rocprof-systems-basic passes but takes ~6 minutes + "rocprof-systems-basic", + # rocprof-systems-advanced fails + "rocprof-systems-advanced", +] + # Tests to skip per GPU target (one list per target that has skips) SKIP_TESTS = { "gfx1151": [ @@ -73,7 +81,10 @@ def main(): ) args = parser.parse_args() - lines = list(SKIP_TESTS.get(args.target, [])) + lines = list(ALWAYS_SKIP_TESTS) + for test in SKIP_TESTS.get(args.target, []): + if test not in lines: + lines.append(test) if args.makefile: for test in MAKEFILE_SKIP_TESTS: From f75213cdd10547cfa46cb23bcbf03edb61407d42 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 15:46:15 +0000 Subject: [PATCH 27/38] Fix ctest JUnit XML path: use absolute GITHUB_WORKSPACE path --output-junit path was relative and may not resolve correctly with --test-dir. Use absolute path via GITHUB_WORKSPACE. Also handle missing XML gracefully (empty allow list if ctest didn't run). Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/parse_ctest_results.py | 10 ++++++++-- .github/workflows/build-rocm-examples-reusable.yml | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/build_tools/parse_ctest_results.py b/.github/build_tools/parse_ctest_results.py index a98b2b2cbb..3109627c62 100644 --- a/.github/build_tools/parse_ctest_results.py +++ b/.github/build_tools/parse_ctest_results.py @@ -24,8 +24,14 @@ def main(): try: tree = ET.parse(args.junit) - except (ET.ParseError, FileNotFoundError) as e: - print(f"Error reading {args.junit}: {e}", file=sys.stderr) + except FileNotFoundError: + print(f"Warning: {args.junit} not found (ctest may not have run)") + print("Creating empty allow list — no Makefile tests will run") + with open(args.output, "w") as f: + pass + return + except ET.ParseError as e: + print(f"Error parsing {args.junit}: {e}", file=sys.stderr) sys.exit(1) root = tree.getroot() diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index f51041a5ba..8b2ef120bd 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -179,7 +179,7 @@ jobs: echo "No tests skipped." >> $GITHUB_STEP_SUMMARY fi - ctest --test-dir build --output-on-failure --exclude-from-file "${SKIP_FILE}" --output-junit build/ctest_results.xml 2>&1 | tee ctest_output.log + ctest --test-dir build --output-on-failure --exclude-from-file "${SKIP_FILE}" --output-junit "${GITHUB_WORKSPACE}/ctest_results.xml" 2>&1 | tee ctest_output.log - name: Test summary if: ${{ !cancelled() }} @@ -227,7 +227,7 @@ jobs: run: | # Extract test names that ctest actually ran from JUnit XML results python3 .github/build_tools/parse_ctest_results.py \ - --junit build/ctest_results.xml \ + --junit "${GITHUB_WORKSPACE}/ctest_results.xml" \ --output /tmp/ctest_ran_tests.txt # Generate skip list with --makefile to include tests that need CMake test data From 2084f9f9f3567de7f77203863453fb5bea29b7b7 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 16:05:10 +0000 Subject: [PATCH 28/38] Match ctest output format in Makefile test runner Output now matches ctest style: - " Start N: test_name" before each test - "N/total Test #N: test_name .... Passed X.XX sec" with dot padding - Per-test timing in seconds - "X% tests passed, Y tests failed out of Z" summary - "Total Test time (real) = N.00 sec" footer - Skipped tests excluded from output (matching --exclude-from-file) Co-Authored-By: Claude Opus 4.6 --- run_makefile_tests.sh | 109 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 88 insertions(+), 21 deletions(-) diff --git a/run_makefile_tests.sh b/run_makefile_tests.sh index cf3abe892c..45f1f0f220 100755 --- a/run_makefile_tests.sh +++ b/run_makefile_tests.sh @@ -121,47 +121,94 @@ if [ "${USE_ALLOW_LIST}" -eq 1 ]; then mv "${FILTERED_LIST}" "${TESTS_LIST}" fi +# Filter out skipped tests (matching ctest --exclude-from-file behavior) +FILTERED_LIST="/tmp/makefile_tests_filtered_$$.txt" +while IFS='|' read -r dir example_name test_args; do + if ! is_skipped "${example_name}"; then + echo "${dir}|${example_name}|${test_args}" + fi +done < "${TESTS_LIST}" > "${FILTERED_LIST}" +SKIPPED_COUNT=$(($(wc -l < "${TESTS_LIST}") - $(wc -l < "${FILTERED_LIST}"))) +mv "${FILTERED_LIST}" "${TESTS_LIST}" + NUM_TESTS=$(wc -l < "${TESTS_LIST}") echo "" -echo "Found ${NUM_BUILT} Makefile-built executable(s)" -if [ "${USE_ALLOW_LIST}" -eq 1 ]; then - echo "Allow file: ${ALLOW_FILE} ($(wc -l < "${ALLOW_FILE}") ctest entries, ${NUM_TESTS} matched)" -fi -if [ -n "${SKIP_FILE}" ] && [ -f "${SKIP_FILE}" ] && [ -s "${SKIP_FILE}" ]; then - echo "Skip file: ${SKIP_FILE} ($(wc -l < "${SKIP_FILE}") entries)" +echo "Found ${NUM_BUILT} Makefile-built executable(s), ${NUM_TESTS} to run" +if [ "${SKIPPED_COUNT}" -gt 0 ]; then + echo "Excluded ${SKIPPED_COUNT} test(s) via skip list" fi echo "" PASSED=0 FAILED=0 -SKIPPED=0 CURRENT=0 FAILED_TESTS="" +LINE_WIDTH=72 +START_TIME=$(date +%s) + +# Helper: print ctest-style result line with dot padding +# Format: "N/total Test #N: name ..... Passed X.XX sec" +print_result() { + _current="$1" + _total="$2" + _num="$3" + _name="$4" + _result="$5" + _time="$6" + _prefix=$(printf "%d/%d Test #%d: %s " "$_current" "$_total" "$_num" "$_name") + _suffix=$(printf " %s %8s sec" "$_result" "$_time") + _prefix_len=$(printf "%s" "$_prefix" | wc -c) + _suffix_len=$(printf "%s" "$_suffix" | wc -c) + _dots_needed=$((LINE_WIDTH - _prefix_len - _suffix_len)) + if [ "$_dots_needed" -lt 3 ]; then + _dots_needed=3 + fi + _dots=$(printf '%*s' "$_dots_needed" '' | tr ' ' '.') + printf "%s%s%s\n" "$_prefix" "$_dots" "$_suffix" +} # Run tests while IFS='|' read -r dir example_name test_args; do CURRENT=$((CURRENT + 1)) - if is_skipped "${example_name}"; then - SKIPPED=$((SKIPPED + 1)) - printf "(%d/%d) SKIP %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" - continue - fi + # Print "Start" line (ctest style) + printf " Start %d: %s\n" "${CURRENT}" "${example_name}" # Run the test from its own directory (so data files are found) - printf "(%d/%d) RUN %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" + test_start=$(date +%s%N 2>/dev/null || date +%s) if (cd "${dir}" && timeout "${TIMEOUT}" "./${example_name}" ${test_args}) > "/tmp/test_${example_name}.log" 2>&1; then + test_end=$(date +%s%N 2>/dev/null || date +%s) + # Calculate elapsed time in seconds with 2 decimal places + if [ ${#test_start} -gt 10 ]; then + elapsed=$(( (test_end - test_start) )) + elapsed_sec=$((elapsed / 1000000000)) + elapsed_ms=$(( (elapsed % 1000000000) / 10000000 )) + elapsed_fmt=$(printf "%d.%02d" "$elapsed_sec" "$elapsed_ms") + else + elapsed_fmt=$(( test_end - test_start )) + elapsed_fmt="${elapsed_fmt}.00" + fi PASSED=$((PASSED + 1)) - printf "(%d/%d) PASS %s\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" + print_result "${CURRENT}" "${NUM_TESTS}" "${CURRENT}" "${example_name}" "Passed" "${elapsed_fmt}" else exit_code=$? + test_end=$(date +%s%N 2>/dev/null || date +%s) + if [ ${#test_start} -gt 10 ]; then + elapsed=$(( (test_end - test_start) )) + elapsed_sec=$((elapsed / 1000000000)) + elapsed_ms=$(( (elapsed % 1000000000) / 10000000 )) + elapsed_fmt=$(printf "%d.%02d" "$elapsed_sec" "$elapsed_ms") + else + elapsed_fmt=$(( test_end - test_start )) + elapsed_fmt="${elapsed_fmt}.00" + fi FAILED=$((FAILED + 1)) FAILED_TESTS="${FAILED_TESTS} ${example_name}" if [ "${exit_code}" -eq 124 ]; then - printf "(%d/%d) TIMEOUT %s (after %ss)\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" "${TIMEOUT}" + print_result "${CURRENT}" "${NUM_TESTS}" "${CURRENT}" "${example_name}" "Timeout" "${elapsed_fmt}" else - printf "(%d/%d) FAIL %s (exit code %d)\n" "${CURRENT}" "${NUM_TESTS}" "${example_name}" "${exit_code}" + print_result "${CURRENT}" "${NUM_TESTS}" "${CURRENT}" "${example_name}" "***Failed" "${elapsed_fmt}" fi # Print last 20 lines of output for failed tests echo "--- output (last 20 lines) ---" @@ -172,14 +219,34 @@ done < "${TESTS_LIST}" rm -f "${TESTS_LIST}" +END_TIME=$(date +%s) +TOTAL_TIME=$((END_TIME - START_TIME)) + echo "" -echo "==========================================" RAN=$((PASSED + FAILED)) -echo "Makefile test results: ${RAN} tests ran, ${PASSED} passed, ${FAILED} failed, ${SKIPPED} skipped (${NUM_TESTS} total)" -echo "==========================================" +if [ "${FAILED}" -eq 0 ]; then + PERCENT=100 +elif [ "${RAN}" -gt 0 ]; then + PERCENT=$(( (PASSED * 100) / RAN )) +else + PERCENT=0 +fi -if [ -n "${FAILED_TESTS}" ]; then +if [ "${FAILED}" -eq 0 ]; then + printf "%d%% tests passed, %d tests failed out of %d\n" "${PERCENT}" "${FAILED}" "${RAN}" +else + printf "%d%% tests passed, %d tests failed out of %d\n" "${PERCENT}" "${FAILED}" "${RAN}" echo "" - echo "Failed tests:${FAILED_TESTS}" + echo "The following tests FAILED:" + _fail_num=0 + for t in ${FAILED_TESTS}; do + _fail_num=$((_fail_num + 1)) + printf " %d - %s (Failed)\n" "${_fail_num}" "$t" + done +fi + +printf "\nTotal Test time (real) = %d.00 sec\n" "${TOTAL_TIME}" + +if [ -n "${FAILED_TESTS}" ]; then exit 1 fi From 96384931d026006055900507904fe5bec9baa161 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 18:36:33 +0000 Subject: [PATCH 29/38] Skip hip_calling_global_functions on AlmaLinux 8 (glibc 2.28 too old) Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/generate_skip_tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/build_tools/generate_skip_tests.py b/.github/build_tools/generate_skip_tests.py index b8ec59be36..a3b5ba94e5 100644 --- a/.github/build_tools/generate_skip_tests.py +++ b/.github/build_tools/generate_skip_tests.py @@ -46,6 +46,8 @@ DISTRO_SKIP_TESTS = { # AlmaLinux 8 has glibc 2.28; binaries compiled against 2.34+ fail at runtime "gfx1100:almalinux-8": [ + # glibc 2.28 too old — binaries compiled against 2.34+ fail at runtime + "hip_calling_global_functions", "hip_template_warp_size_reduction", "hip_warp_size_reduction", # hipSPARSELt Tensile library files not packaged for this target From 53449136b303090af1305875d808e51222535219 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 18:39:55 +0000 Subject: [PATCH 30/38] Only run Makefile tests for tests that passed in ctest Filter JUnit XML to only include passed tests (no element). Tests that failed in ctest won't be retried via the Makefile runner. Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/parse_ctest_results.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/build_tools/parse_ctest_results.py b/.github/build_tools/parse_ctest_results.py index 3109627c62..3d422fc46a 100644 --- a/.github/build_tools/parse_ctest_results.py +++ b/.github/build_tools/parse_ctest_results.py @@ -35,17 +35,24 @@ def main(): sys.exit(1) root = tree.getroot() - test_names = [] + passed = [] + failed = [] for testcase in root.iter("testcase"): name = testcase.get("name") - if name: - test_names.append(name) + if not name: + continue + # In JUnit XML, failed tests have a child element + if testcase.find("failure") is not None: + failed.append(name) + else: + passed.append(name) with open(args.output, "w") as f: - for name in test_names: + for name in passed: f.write(name + "\n") - print(f"Extracted {len(test_names)} test names from ctest JUnit results") + total = len(passed) + len(failed) + print(f"Extracted {len(passed)} passed tests from {total} ctest results ({len(failed)} failed, excluded)") if __name__ == "__main__": From df468d3393e5c3a21e1ddb352636563c4c46e795 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 19:15:18 +0000 Subject: [PATCH 31/38] Use CMake build tree to selectively build Makefiles, remove configure.sh Instead of maintaining a separate dependency detection system (configure.sh, require_deps.mk, config.mk), use CMake as the single source of truth. The new find_cmake_built_dirs.py script scans the CMake build tree for executables and maps them back to source directories with Makefiles. Only those directories are built, eliminating false negatives from missing dependencies. - Add Makefile build step to workflow using find_cmake_built_dirs.py - Delete configure.sh and Common/require_deps.mk (no longer needed) - Revert all Makefiles to upstream (remove REQUIRED_DEPS/SKIP_BUILD) - Add inline pkg-config detection in rocDecode Makefiles for FFmpeg -L paths Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/find_cmake_built_dirs.py | 66 ++++++ .../build-rocm-examples-reusable.yml | 31 ++- .gitignore | 1 - Applications/sobel_filter/Makefile | 18 +- Common/require_deps.mk | 135 ----------- HIP-Basic/opengl_interop/Makefile | 18 +- HIP-Basic/vulkan_interop/Makefile | 18 +- Libraries/Makefile | 53 +---- Libraries/RPP/box_filter/Makefile | 16 +- Libraries/RPP/brightness/Makefile | 16 +- Libraries/RPP/contrast/Makefile | 16 +- Libraries/RPP/flip/Makefile | 16 +- Libraries/RPP/gamma_correction/Makefile | 16 +- Libraries/RPP/resize/Makefile | 16 +- Libraries/rocCV/bilateral_filter/Makefile | 18 +- Libraries/rocCV/bnd_box/Makefile | 18 +- Libraries/rocCV/center_crop/Makefile | 18 +- Libraries/rocCV/composite/Makefile | 18 +- Libraries/rocCV/copy_make_border/Makefile | 18 +- Libraries/rocCV/cropandresize/Makefile | 18 +- Libraries/rocCV/custom_crop/Makefile | 18 +- Libraries/rocCV/gamma_contrast/Makefile | 18 +- Libraries/rocCV/normalize/Makefile | 18 +- Libraries/rocCV/warp_perspective/Makefile | 18 +- Libraries/rocDecode/rocdec_decode/Makefile | 16 +- Libraries/rocDecode/video_decode/Makefile | 16 +- .../rocDecode/video_decode_batch/Makefile | 16 +- Libraries/rocDecode/video_decode_mem/Makefile | 16 +- .../video_decode_multi_files/Makefile | 16 +- .../rocDecode/video_decode_perf/Makefile | 16 +- .../rocDecode/video_decode_pic_files/Makefile | 16 +- Libraries/rocDecode/video_decode_rgb/Makefile | 16 +- .../rocDecode/video_to_sequence/Makefile | 16 +- .../code_object_isa_decode/Makefile | 14 +- Makefile | 5 +- configure.sh | 210 ------------------ 36 files changed, 176 insertions(+), 813 deletions(-) create mode 100644 .github/build_tools/find_cmake_built_dirs.py delete mode 100644 Common/require_deps.mk delete mode 100755 configure.sh diff --git a/.github/build_tools/find_cmake_built_dirs.py b/.github/build_tools/find_cmake_built_dirs.py new file mode 100644 index 0000000000..1c339e02bc --- /dev/null +++ b/.github/build_tools/find_cmake_built_dirs.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +"""Find source directories where CMake produced executables. + +Scans the CMake build tree for executables and maps them back to source +directories that contain a Makefile. Used to selectively build only the +Makefile examples whose dependencies CMake confirmed are available. +""" + +import argparse +import os +import stat +import sys + + +def main(): + parser = argparse.ArgumentParser( + description="Find source dirs where CMake built executables." + ) + parser.add_argument( + "--build-dir", required=True, help="CMake build directory" + ) + parser.add_argument( + "--source-dir", required=True, help="Source root directory" + ) + parser.add_argument( + "--output", required=True, help="Output file (one directory per line)" + ) + args = parser.parse_args() + + build_dir = os.path.abspath(args.build_dir) + source_dir = os.path.abspath(args.source_dir) + + dirs = set() + for root, _dirnames, filenames in os.walk(build_dir): + for fname in filenames: + fpath = os.path.join(root, fname) + # Skip non-executable files + try: + st = os.stat(fpath) + except OSError: + continue + if not (st.st_mode & stat.S_IXUSR): + continue + # Skip shared libraries, scripts, cmake files, etc. + if fname.endswith((".so", ".a", ".cmake", ".sh", ".py", ".txt")): + continue + if fname.startswith("lib"): + continue + + # Map build path back to source path + rel = os.path.relpath(root, build_dir) + source_candidate = os.path.join(source_dir, rel) + makefile = os.path.join(source_candidate, "Makefile") + if os.path.isfile(makefile): + dirs.add(rel) + + sorted_dirs = sorted(dirs) + with open(args.output, "w") as f: + for d in sorted_dirs: + f.write(d + "\n") + + print(f"Found {len(sorted_dirs)} source directories with Makefiles matching CMake build targets") + + +if __name__ == "__main__": + main() diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 8b2ef120bd..ad5e11adeb 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -109,13 +109,7 @@ jobs: echo "ENABLE_OPENMP=ON" >> $GITHUB_ENV echo "HIPCC_COMPILE_FLAGS_APPEND=--offload-arch=${{ matrix.gpu_config.gpu_target }}" >> $GITHUB_ENV - - name: Makefile build - run: | - ./configure.sh --rocm-path="${ROCM_PATH}" - make -j ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" - - name: CMake configure - if: ${{ !cancelled() }} run: | cmake -S . -B build -DCMAKE_HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}" -DROCM_ROOT="${ROCM_PATH}" -DCMAKE_BUILD_RPATH="${ROCM_PATH}/lib" -DROCM_EXAMPLES_ENABLE_OPENMP="${ENABLE_OPENMP}" 2> >(tee cmake_error.log >&2) @@ -222,10 +216,33 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY fi + - name: Makefile build + if: ${{ !cancelled() }} + run: | + # Find which source directories had CMake-built executables + python3 .github/build_tools/find_cmake_built_dirs.py \ + --build-dir build \ + --source-dir . \ + --output /tmp/cmake_built_dirs.txt + + BUILT=0 + FAILED=0 + while IFS= read -r dir; do + echo "Building Makefile in ${dir}..." + if make -C "${dir}" ROCM_INSTALL_DIR="${ROCM_PATH}"; then + BUILT=$((BUILT + 1)) + else + echo "WARNING: Makefile build failed in ${dir}" + FAILED=$((FAILED + 1)) + fi + done < /tmp/cmake_built_dirs.txt + + echo "Makefile build complete: ${BUILT} succeeded, ${FAILED} failed" + - name: Makefile tests if: ${{ !cancelled() }} run: | - # Extract test names that ctest actually ran from JUnit XML results + # Extract test names that ctest actually passed from JUnit XML results python3 .github/build_tools/parse_ctest_results.py \ --junit "${GITHUB_WORKSPACE}/ctest_results.xml" \ --output /tmp/ctest_ran_tests.txt diff --git a/.gitignore b/.gitignore index b44f3447cd..6c015456b0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ *.pdb CMakeUserPresets.json .cline_storage -config.mk diff --git a/Applications/sobel_filter/Makefile b/Applications/sobel_filter/Makefile index 35fbcc63a6..a4ca5c0ca5 100644 --- a/Applications/sobel_filter/Makefile +++ b/Applications/sobel_filter/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../Common EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP -# Dependency checking -REQUIRED_DEPS := GLFW3 -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc @@ -40,9 +34,9 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(GLFW3_CFLAGS) +ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(shell pkg-config --cflags glfw3) ILDFLAGS := -ILDLIBS := $(GLFW3_LIBS) -ldl +ILDLIBS := $(shell pkg-config --libs glfw3) -ldl ifeq ($(GPU_RUNTIME), CUDA) ICXXFLAGS += -x cu @@ -69,9 +63,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Common/require_deps.mk b/Common/require_deps.mk deleted file mode 100644 index a1835cd0f6..0000000000 --- a/Common/require_deps.mk +++ /dev/null @@ -1,135 +0,0 @@ -# MIT License -# -# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -# Dependency checker for rocm-examples Makefile build system -# -# Usage in example Makefiles: -# REQUIRED_DEPS := FFMPEG OPENCV -# include $(COMMON_INCLUDE_DIR)/require_deps.mk -# -# Before including, set COMMON_INCLUDE_DIR (already standard in all examples). -# -# This file works in two modes: -# 1. Fast path: includes config.mk (generated by configure.sh) from the repo root -# 2. Fallback: uses inline pkg-config checks for standalone builds -# -# After including, check SKIP_BUILD. This composes with filter_hip_architectures.mk -# which also sets SKIP_BUILD. -# -# Output variables: -# SKIP_BUILD - set to 1 if any required dependency is missing -# MISSING_DEPS - list of missing dependency names - -# Locate the repository root relative to COMMON_INCLUDE_DIR -_REPO_ROOT := $(dir $(COMMON_INCLUDE_DIR)) - -# Try to include the pre-generated config.mk (silent if absent) --include $(_REPO_ROOT)/config.mk - -# If config.mk was not found, run inline fallback detection. -# We detect this by checking if HAVE_FFMPEG is defined (it's always written by configure.sh). -ifndef HAVE_FFMPEG - # Fallback: detect dependencies via pkg-config / file existence - - # FFmpeg (pkg-config + link test to catch missing -dev packages) - _FFMPEG_CHECK := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null \ - && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs libavcodec libavformat libavutil) -o /dev/null 2>/dev/null \ - && echo 1 || echo 0) - HAVE_FFMPEG := $(_FFMPEG_CHECK) - ifeq ($(HAVE_FFMPEG),1) - FFMPEG_CFLAGS := $(shell pkg-config --cflags libavcodec libavformat libavutil 2>/dev/null) - FFMPEG_LIBS := $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") - else - FFMPEG_CFLAGS := - FFMPEG_LIBS := - endif - - # OpenCV (pkg-config + link test) - _OPENCV_CHECK := $(shell (pkg-config --exists opencv4 2>/dev/null && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs opencv4) -o /dev/null 2>/dev/null && echo 1) \ - || (pkg-config --exists opencv 2>/dev/null && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs opencv) -o /dev/null 2>/dev/null && echo 1) \ - || echo 0) - HAVE_OPENCV := $(_OPENCV_CHECK) - ifeq ($(HAVE_OPENCV),1) - OPENCV_CFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) - OPENCV_LIBS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) - else - OPENCV_CFLAGS := - OPENCV_LIBS := - endif - - # GLFW3 (pkg-config + link test) - _GLFW3_CHECK := $(shell pkg-config --exists glfw3 2>/dev/null \ - && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs glfw3) -o /dev/null 2>/dev/null \ - && echo 1 || echo 0) - HAVE_GLFW3 := $(_GLFW3_CHECK) - ifeq ($(HAVE_GLFW3),1) - GLFW3_CFLAGS := $(shell pkg-config --cflags glfw3 2>/dev/null) - GLFW3_LIBS := $(shell pkg-config --libs glfw3 2>/dev/null) - else - GLFW3_CFLAGS := - GLFW3_LIBS := - endif - - # Vulkan (pkg-config + link test) - _VULKAN_CHECK := $(shell pkg-config --exists vulkan 2>/dev/null \ - && echo 'int main(){return 0;}' | $${CC:-cc} -x c - $$(pkg-config --libs vulkan) -o /dev/null 2>/dev/null \ - && echo 1 || echo 0) - HAVE_VULKAN := $(_VULKAN_CHECK) - ifeq ($(HAVE_VULKAN),1) - VULKAN_CFLAGS := $(shell pkg-config --cflags vulkan 2>/dev/null) - VULKAN_LIBS := $(shell pkg-config --libs vulkan 2>/dev/null || echo "-lvulkan") - else - VULKAN_CFLAGS := - VULKAN_LIBS := - endif - - # libdw (elfutils) - _LIBDW_CHECK := $(shell pkg-config --exists libdw 2>/dev/null && echo 1 || echo 0) - ifeq ($(_LIBDW_CHECK),0) - _LIBDW_CHECK := $(if $(or $(wildcard /usr/include/elfutils/libdw.h),$(wildcard /usr/include/dwarf.h)),1,0) - endif - HAVE_LIBDW := $(_LIBDW_CHECK) - - # amd_comgr - ROCM_INSTALL_DIR ?= $(or $(ROCM_PATH),/opt/rocm) - _AMD_COMGR_CHECK := $(if $(or $(wildcard $(ROCM_INSTALL_DIR)/include/amd_comgr/amd_comgr.h),$(wildcard $(ROCM_INSTALL_DIR)/lib/libamd_comgr.so)),1,0) - ifeq ($(_AMD_COMGR_CHECK),0) - _AMD_COMGR_CHECK := $(shell pkg-config --exists amd_comgr 2>/dev/null && echo 1 || echo 0) - endif - HAVE_AMD_COMGR := $(_AMD_COMGR_CHECK) - - # glslangValidator - _GLSLANG_CHECK := $(shell command -v glslangValidator >/dev/null 2>&1 && echo 1 || echo 0) - HAVE_GLSLANG_VALIDATOR := $(_GLSLANG_CHECK) - -endif # ifndef HAVE_FFMPEG - -# Check REQUIRED_DEPS against HAVE_ flags -MISSING_DEPS := -$(foreach dep,$(REQUIRED_DEPS),\ - $(if $(filter 1,$(HAVE_$(dep))),,\ - $(eval MISSING_DEPS += $(dep)))) - -ifneq ($(MISSING_DEPS),) - SKIP_BUILD := 1 - $(info $(EXAMPLE): Skipping build — missing dependencies: $(MISSING_DEPS)) -endif diff --git a/HIP-Basic/opengl_interop/Makefile b/HIP-Basic/opengl_interop/Makefile index 3128fff4d7..1643f092bf 100644 --- a/HIP-Basic/opengl_interop/Makefile +++ b/HIP-Basic/opengl_interop/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../Common EXTERNAL_DIR := ../../External GPU_RUNTIME ?= HIP -# Dependency checking -REQUIRED_DEPS := GLFW3 -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc @@ -40,9 +34,9 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(GLFW3_CFLAGS) +ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) $(shell pkg-config --cflags glfw3) ILDFLAGS := -ILDLIBS := $(GLFW3_LIBS) -ldl +ILDLIBS := $(shell pkg-config --libs glfw3) -ldl ifeq ($(GPU_RUNTIME), CUDA) ICXXFLAGS += -x cu @@ -71,9 +65,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/HIP-Basic/vulkan_interop/Makefile b/HIP-Basic/vulkan_interop/Makefile index 53de4637da..d80c1d9c7a 100644 --- a/HIP-Basic/vulkan_interop/Makefile +++ b/HIP-Basic/vulkan_interop/Makefile @@ -24,14 +24,8 @@ EXAMPLE := hip_vulkan_interop COMMON_INCLUDE_DIR := ../../Common GPU_RUNTIME ?= HIP -# Dependency checking -REQUIRED_DEPS := GLFW3 VULKAN GLSLANG_VALIDATOR -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm CUDA_INSTALL_DIR ?= /usr/local/cuda HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -42,9 +36,9 @@ CUDACXX ?= $(CUDA_INSTALL_DIR)/bin/nvcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) $(GLFW3_CFLAGS) $(VULKAN_CFLAGS) +ICPPFLAGS := -I $(COMMON_INCLUDE_DIR) $(shell pkg-config --cflags glfw3 vulkan) ILDFLAGS := -ILDLIBS := $(GLFW3_LIBS) +ILDLIBS := $(shell pkg-config --libs glfw3) IGLSLFLAGS := -V100 ifeq ($(GPU_RUNTIME), CUDA) @@ -78,9 +72,3 @@ clean: $(RM) $(EXAMPLE) sinewave.frag.spv.h sinewave.vert.spv.h .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/Makefile b/Libraries/Makefile index 8133663d49..f8d6ae443f 100644 --- a/Libraries/Makefile +++ b/Libraries/Makefile @@ -31,59 +31,26 @@ LIBRARIES := \ hipRAND ifneq ($(GPU_RUNTIME), CUDA) - -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) -INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include - LIBRARIES += \ hipBLASLt \ + hipTensor \ + MIGraphX \ + MIVisionX \ RCCL \ + rocAL \ + rocALUTION \ rocBLAS \ + rocCV \ + rocDecode \ rocFFT \ + rocJPEG \ rocPRIM \ rocProfiler-SDK \ rocSOLVER \ rocSPARSE \ rocThrust \ - rocWMMA - -ifneq ($(wildcard $(INCLUDE_DIR)/rocdecode/rocdecode.h),) -LIBRARIES += rocDecode -endif - -ifneq ($(wildcard $(INCLUDE_DIR)/rocjpeg/rocjpeg.h),) -LIBRARIES += rocJPEG -endif - -# Only build libraries whose headers are present -ifneq ($(wildcard $(INCLUDE_DIR)/hiptensor/hiptensor.hpp),) -LIBRARIES += hipTensor -endif - -ifneq ($(wildcard $(INCLUDE_DIR)/migraphx/migraphx.hpp),) -LIBRARIES += MIGraphX -endif - -ifneq ($(wildcard $(INCLUDE_DIR)/mivisionx/VX/vx.h),) -LIBRARIES += MIVisionX -endif - -ifneq ($(wildcard $(INCLUDE_DIR)/rocal/rocal_api.h),) -LIBRARIES += rocAL -endif - -ifneq ($(wildcard $(INCLUDE_DIR)/rocalution/rocalution.hpp),) -LIBRARIES += rocALUTION -endif - -ifneq ($(wildcard $(INCLUDE_DIR)/roccv/core/tensor.hpp),) -LIBRARIES += rocCV -endif - -ifneq ($(wildcard $(INCLUDE_DIR)/rpp/rpp.h),) -LIBRARIES += RPP -endif - + rocWMMA \ + RPP endif all: $(LIBRARIES) diff --git a/Libraries/RPP/box_filter/Makefile b/Libraries/RPP/box_filter/Makefile index 3f17c5ea97..28459a4e7d 100644 --- a/Libraries/RPP/box_filter/Makefile +++ b/Libraries/RPP/box_filter/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -42,7 +36,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(OPENCV_CFLAGS) +OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -69,9 +63,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/RPP/brightness/Makefile b/Libraries/RPP/brightness/Makefile index 9d80269107..f651586d69 100644 --- a/Libraries/RPP/brightness/Makefile +++ b/Libraries/RPP/brightness/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -42,7 +36,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(OPENCV_CFLAGS) +OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -69,9 +63,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/RPP/contrast/Makefile b/Libraries/RPP/contrast/Makefile index 36c18a4458..bab22245e0 100644 --- a/Libraries/RPP/contrast/Makefile +++ b/Libraries/RPP/contrast/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -42,7 +36,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(OPENCV_CFLAGS) +OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -69,9 +63,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/RPP/flip/Makefile b/Libraries/RPP/flip/Makefile index 4a07b3e5bc..a198138bfc 100644 --- a/Libraries/RPP/flip/Makefile +++ b/Libraries/RPP/flip/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -42,7 +36,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(OPENCV_CFLAGS) +OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -69,9 +63,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/RPP/gamma_correction/Makefile b/Libraries/RPP/gamma_correction/Makefile index 729b633929..b1f31b40e9 100644 --- a/Libraries/RPP/gamma_correction/Makefile +++ b/Libraries/RPP/gamma_correction/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -42,7 +36,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(OPENCV_CFLAGS) +OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -69,9 +63,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/RPP/resize/Makefile b/Libraries/RPP/resize/Makefile index 5ea51b12f1..038e59a33a 100644 --- a/Libraries/RPP/resize/Makefile +++ b/Libraries/RPP/resize/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include RPP_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -42,7 +36,7 @@ HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # Common variables and flags CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) -OPENCV_INCLUDE := $(OPENCV_CFLAGS) +OPENCV_INCLUDE := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) ICPPFLAGS := -isystem $(RPP_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) \ $(OPENCV_INCLUDE) -I $(ROCM_INSTALL_DIR)/include/rpp \ -DEXAMPLE_DATA_DIR=\"$(CURDIR)/../data/images\" @@ -69,9 +63,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/bilateral_filter/Makefile b/Libraries/rocCV/bilateral_filter/Makefile index df01fa5ff6..172db1c793 100644 --- a/Libraries/rocCV/bilateral_filter/Makefile +++ b/Libraries/rocCV/bilateral_filter/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/bnd_box/Makefile b/Libraries/rocCV/bnd_box/Makefile index 59a1f77a4e..8c5fddb1f4 100644 --- a/Libraries/rocCV/bnd_box/Makefile +++ b/Libraries/rocCV/bnd_box/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/center_crop/Makefile b/Libraries/rocCV/center_crop/Makefile index 61c2fb7718..4f0e411acd 100644 --- a/Libraries/rocCV/center_crop/Makefile +++ b/Libraries/rocCV/center_crop/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/composite/Makefile b/Libraries/rocCV/composite/Makefile index fb3efc01c3..d740fbbc22 100644 --- a/Libraries/rocCV/composite/Makefile +++ b/Libraries/rocCV/composite/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/copy_make_border/Makefile b/Libraries/rocCV/copy_make_border/Makefile index 118d5a66b1..96b4a2aba7 100644 --- a/Libraries/rocCV/copy_make_border/Makefile +++ b/Libraries/rocCV/copy_make_border/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/cropandresize/Makefile b/Libraries/rocCV/cropandresize/Makefile index 09eada2a17..8e319c98e6 100644 --- a/Libraries/rocCV/cropandresize/Makefile +++ b/Libraries/rocCV/cropandresize/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/custom_crop/Makefile b/Libraries/rocCV/custom_crop/Makefile index 003bf5e638..ff36c725aa 100644 --- a/Libraries/rocCV/custom_crop/Makefile +++ b/Libraries/rocCV/custom_crop/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/gamma_contrast/Makefile b/Libraries/rocCV/gamma_contrast/Makefile index e8c05d4c59..de414254d2 100644 --- a/Libraries/rocCV/gamma_contrast/Makefile +++ b/Libraries/rocCV/gamma_contrast/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/normalize/Makefile b/Libraries/rocCV/normalize/Makefile index 7e44b663c8..0a0fd4d685 100644 --- a/Libraries/rocCV/normalize/Makefile +++ b/Libraries/rocCV/normalize/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocCV/warp_perspective/Makefile b/Libraries/rocCV/warp_perspective/Makefile index f14face831..25779d31a5 100644 --- a/Libraries/rocCV/warp_perspective/Makefile +++ b/Libraries/rocCV/warp_perspective/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := OPENCV -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR := /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv @@ -40,8 +34,8 @@ ROCCV_INCLUDE_DIR := $(HIP_INCLUDE_DIR)/roccv HIPCXX ?= $(ROCM_INSTALL_DIR)/bin/hipcc # OpenCV variables -OPENCV_CXXFLAGS := $(OPENCV_CFLAGS) -OPENCV_LDFLAGS := $(OPENCV_LIBS) +OPENCV_CXXFLAGS := $(shell pkg-config --cflags opencv4 2>/dev/null || pkg-config --cflags opencv) +OPENCV_LDFLAGS := $(shell pkg-config --libs opencv4 2>/dev/null || pkg-config --libs opencv) # Common variables and flags CXX_STD := c++20 @@ -70,9 +64,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/rocdec_decode/Makefile b/Libraries/rocDecode/rocdec_decode/Makefile index b7d82c6e9e..efd4b8c6df 100644 --- a/Libraries/rocDecode/rocdec_decode/Makefile +++ b/Libraries/rocDecode/rocdec_decode/Makefile @@ -25,11 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Load dependency detection (FFmpeg is optional for this example) -include $(COMMON_INCLUDE_DIR)/require_deps.mk - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCDECODE_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -48,7 +45,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lstdc++fs +ILDLIBS := -lrocdecode ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -62,10 +59,11 @@ ifeq ($(GPU_RUNTIME), HIP) CPPFLAGS += -DENABLE_HOST_DECODE=0 endif - # Optional FFmpeg (uses HAVE_FFMPEG from config.mk / require_deps.mk) - ifeq ($(HAVE_FFMPEG),1) - ICPPFLAGS += $(FFMPEG_CFLAGS) - ILDLIBS += $(FFMPEG_LIBS) + # Optional FFmpeg + FFMPEG_FOUND := $(shell pkg-config --exists libavcodec libavformat libavutil 2>/dev/null && echo 1) + ifeq ($(FFMPEG_FOUND),1) + ICPPFLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil) + ILDLIBS += $(shell pkg-config --libs libavcodec libavformat libavutil) endif COMPILER := $(HIPCXX) diff --git a/Libraries/rocDecode/video_decode/Makefile b/Libraries/rocDecode/video_decode/Makefile index 30392d3367..b0d48b6882 100644 --- a/Libraries/rocDecode/video_decode/Makefile +++ b/Libraries/rocDecode/video_decode/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -52,7 +46,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I .. -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lrocprofiler-register $(FFMPEG_LIBS) -lpthread +ILDLIBS := -lrocdecode -lrocprofiler-register $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -105,9 +99,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/video_decode_batch/Makefile b/Libraries/rocDecode/video_decode_batch/Makefile index 118d62affc..1217036fb4 100644 --- a/Libraries/rocDecode/video_decode_batch/Makefile +++ b/Libraries/rocDecode/video_decode_batch/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -45,7 +39,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode -lrocprofiler-register $(FFMPEG_LIBS) -lpthread -lstdc++fs +ILDLIBS := -lrocdecode -lrocprofiler-register $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") -lpthread -lstdc++fs ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -85,9 +79,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/video_decode_mem/Makefile b/Libraries/rocDecode/video_decode_mem/Makefile index 0a03278930..2a3f0d6f83 100644 --- a/Libraries/rocDecode/video_decode_mem/Makefile +++ b/Libraries/rocDecode/video_decode_mem/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -45,7 +39,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode $(FFMPEG_LIBS) +ILDLIBS := -lrocdecode $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -85,9 +79,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/video_decode_multi_files/Makefile b/Libraries/rocDecode/video_decode_multi_files/Makefile index 3439a38520..7475eee42c 100644 --- a/Libraries/rocDecode/video_decode_multi_files/Makefile +++ b/Libraries/rocDecode/video_decode_multi_files/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -45,7 +39,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode $(FFMPEG_LIBS) +ILDLIBS := -lrocdecode $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -85,9 +79,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/video_decode_perf/Makefile b/Libraries/rocDecode/video_decode_perf/Makefile index 36db9e2f26..521231f909 100644 --- a/Libraries/rocDecode/video_decode_perf/Makefile +++ b/Libraries/rocDecode/video_decode_perf/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -52,7 +46,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode $(FFMPEG_LIBS) -lpthread +ILDLIBS := -lrocdecode $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -105,9 +99,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/video_decode_pic_files/Makefile b/Libraries/rocDecode/video_decode_pic_files/Makefile index cd8b64d453..b8220b5e7d 100644 --- a/Libraries/rocDecode/video_decode_pic_files/Makefile +++ b/Libraries/rocDecode/video_decode_pic_files/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -52,7 +46,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode $(FFMPEG_LIBS) +ILDLIBS := -lrocdecode $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -105,9 +99,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/video_decode_rgb/Makefile b/Libraries/rocDecode/video_decode_rgb/Makefile index 374d82d04f..8cfce5252d 100644 --- a/Libraries/rocDecode/video_decode_rgb/Makefile +++ b/Libraries/rocDecode/video_decode_rgb/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -45,7 +39,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode $(FFMPEG_LIBS) -lswresample -lpthread +ILDLIBS := -lrocdecode $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") -lswresample -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -85,9 +79,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocDecode/video_to_sequence/Makefile b/Libraries/rocDecode/video_to_sequence/Makefile index 1d59b459f6..1d85399956 100644 --- a/Libraries/rocDecode/video_to_sequence/Makefile +++ b/Libraries/rocDecode/video_to_sequence/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME := HIP -# Dependency checking -REQUIRED_DEPS := FFMPEG -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm UTILS_DIR := ${ROCM_INSTALL_DIR}/share/rocdecode/utils HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include @@ -45,7 +39,7 @@ CXX_STD := c++17 ICXXFLAGS := -std=$(CXX_STD) ICPPFLAGS := -isystem $(ROCDECODE_INCLUDE_DIR) -I $(COMMON_INCLUDE_DIR) -I $(EXTERNAL_DIR) -I $(UTILS_DIR) -I $(UTILS_DIR)/rocvideodecode ILDFLAGS := -L $(ROCM_INSTALL_DIR)/lib -ILDLIBS := -lrocdecode $(FFMPEG_LIBS) -lswresample -lpthread -lstdc++fs +ILDLIBS := -lrocdecode $(shell pkg-config --libs libavcodec libavformat libavutil 2>/dev/null || echo "-lavcodec -lavformat -lavutil") -lswresample -lpthread ifeq ($(GPU_RUNTIME), HIP) CXXFLAGS ?= -Wall -Wextra @@ -85,9 +79,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile b/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile index fb8cae6a21..7671d92191 100644 --- a/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile +++ b/Libraries/rocProfiler-SDK/code_object_isa_decode/Makefile @@ -25,14 +25,8 @@ COMMON_INCLUDE_DIR := ../../../Common EXTERNAL_DIR := ../../../External GPU_RUNTIME ?= HIP -# Dependency checking -REQUIRED_DEPS := LIBDW AMD_COMGR -include $(COMMON_INCLUDE_DIR)/require_deps.mk - -ifneq ($(SKIP_BUILD),1) - # HIP variables -ROCM_INSTALL_DIR := $(or $(ROCM_PATH),/opt/rocm) +ROCM_INSTALL_DIR ?= /opt/rocm HIP_INCLUDE_DIR := $(ROCM_INSTALL_DIR)/include ROCPROFILER_INCLUDE_DIR := $(HIP_INCLUDE_DIR) @@ -66,9 +60,3 @@ clean: $(RM) $(EXAMPLE) .PHONY: clean - -else -all: -clean: -.PHONY: all clean -endif diff --git a/Makefile b/Makefile index 01c1cce3be..353de12032 100644 --- a/Makefile +++ b/Makefile @@ -30,13 +30,10 @@ SUB_PROJECTS := \ all: $(SUB_PROJECTS) -configure: - ./configure.sh --rocm-path="$(or $(ROCM_PATH),/opt/rocm)" - clean: TARGET=clean clean: all $(SUB_PROJECTS): $(MAKE) -C $@ $(TARGET) -.PHONY: all configure clean $(SUB_PROJECTS) +.PHONY: all clean $(SUB_PROJECTS) diff --git a/configure.sh b/configure.sh deleted file mode 100755 index 6f24f6db46..0000000000 --- a/configure.sh +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/sh -# MIT License -# -# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -# configure.sh - Dependency detection for rocm-examples Makefile build system -# -# Probes for external dependencies and writes a config.mk file that individual -# example Makefiles include to decide whether to build or skip. -# -# Usage: -# ./configure.sh [--rocm-path=DIR] -# -# Output: -# config.mk in the repository root - -set -e - -ROCM_PATH="/opt/rocm" - -for arg in "$@"; do - case "$arg" in - --rocm-path=*) - ROCM_PATH="${arg#--rocm-path=}" - ;; - --help|-h) - echo "Usage: $0 [--rocm-path=DIR]" - echo " --rocm-path=DIR Path to ROCm installation (default: /opt/rocm)" - exit 0 - ;; - *) - echo "Unknown option: $arg" >&2 - exit 1 - ;; - esac -done - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -CONFIG_MK="${SCRIPT_DIR}/config.mk" - -echo "configure: detecting dependencies (ROCm path: ${ROCM_PATH})" - -# Helper: check via pkg-config -pkg_check() { - pkg-config --exists "$@" 2>/dev/null -} - -# Helper: get pkg-config cflags -pkg_cflags() { - pkg-config --cflags "$@" 2>/dev/null || true -} - -# Helper: get pkg-config libs -pkg_libs() { - pkg-config --libs "$@" 2>/dev/null || true -} - -# Helper: verify that libraries from pkg-config can actually be linked. -# On some distros (e.g. SLES), .pc files exist but -dev packages are missing. -# Tries CC, cc, gcc, clang in order; if none found, assumes not linkable. -can_link() { - _libs="$(pkg_libs "$@")" - if [ -z "$_libs" ]; then - return 1 - fi - _test_cc="" - for _try_cc in "${CC}" cc gcc clang "${ROCM_PATH}/lib/llvm/bin/clang"; do - [ -z "$_try_cc" ] && continue - if command -v "$_try_cc" >/dev/null 2>&1; then - _test_cc="$_try_cc" - break - fi - done - if [ -z "$_test_cc" ]; then - # No C compiler found — conservatively say not linkable - return 1 - fi - echo "int main(){return 0;}" | "$_test_cc" -x c - $_libs -o /dev/null 2>/dev/null -} - -# Start writing config.mk -cat > "${CONFIG_MK}" << 'HEADER' -# Auto-generated by configure.sh - do not edit -# Re-run ./configure.sh to regenerate -HEADER - -echo "" >> "${CONFIG_MK}" - -# --- FFmpeg (libavcodec, libavformat, libavutil) --- -HAVE_FFMPEG=0 -FFMPEG_CFLAGS="" -FFMPEG_LIBS="" -if pkg_check libavcodec libavformat libavutil && can_link libavcodec libavformat libavutil; then - HAVE_FFMPEG=1 - FFMPEG_CFLAGS="$(pkg_cflags libavcodec libavformat libavutil)" - FFMPEG_LIBS="$(pkg_libs libavcodec libavformat libavutil)" -fi -echo " FFmpeg: $([ ${HAVE_FFMPEG} -eq 1 ] && echo yes || echo no)" -cat >> "${CONFIG_MK}" << EOF -HAVE_FFMPEG := ${HAVE_FFMPEG} -FFMPEG_CFLAGS := ${FFMPEG_CFLAGS} -FFMPEG_LIBS := ${FFMPEG_LIBS} -EOF - -# --- OpenCV --- -HAVE_OPENCV=0 -OPENCV_CFLAGS="" -OPENCV_LIBS="" -if pkg_check opencv4 && can_link opencv4; then - HAVE_OPENCV=1 - OPENCV_CFLAGS="$(pkg_cflags opencv4)" - OPENCV_LIBS="$(pkg_libs opencv4)" -elif pkg_check opencv && can_link opencv; then - HAVE_OPENCV=1 - OPENCV_CFLAGS="$(pkg_cflags opencv)" - OPENCV_LIBS="$(pkg_libs opencv)" -fi -echo " OpenCV: $([ ${HAVE_OPENCV} -eq 1 ] && echo yes || echo no)" -cat >> "${CONFIG_MK}" << EOF -HAVE_OPENCV := ${HAVE_OPENCV} -OPENCV_CFLAGS := ${OPENCV_CFLAGS} -OPENCV_LIBS := ${OPENCV_LIBS} -EOF - -# --- GLFW3 --- -HAVE_GLFW3=0 -GLFW3_CFLAGS="" -GLFW3_LIBS="" -if pkg_check glfw3 && can_link glfw3; then - HAVE_GLFW3=1 - GLFW3_CFLAGS="$(pkg_cflags glfw3)" - GLFW3_LIBS="$(pkg_libs glfw3)" -fi -echo " GLFW3: $([ ${HAVE_GLFW3} -eq 1 ] && echo yes || echo no)" -cat >> "${CONFIG_MK}" << EOF -HAVE_GLFW3 := ${HAVE_GLFW3} -GLFW3_CFLAGS := ${GLFW3_CFLAGS} -GLFW3_LIBS := ${GLFW3_LIBS} -EOF - -# --- Vulkan --- -HAVE_VULKAN=0 -VULKAN_CFLAGS="" -VULKAN_LIBS="" -if pkg_check vulkan && can_link vulkan; then - HAVE_VULKAN=1 - VULKAN_CFLAGS="$(pkg_cflags vulkan)" - VULKAN_LIBS="$(pkg_libs vulkan)" -fi -echo " Vulkan: $([ ${HAVE_VULKAN} -eq 1 ] && echo yes || echo no)" -cat >> "${CONFIG_MK}" << EOF -HAVE_VULKAN := ${HAVE_VULKAN} -VULKAN_CFLAGS := ${VULKAN_CFLAGS} -VULKAN_LIBS := ${VULKAN_LIBS} -EOF - -# --- libdw (elfutils) --- -HAVE_LIBDW=0 -if pkg_check libdw; then - HAVE_LIBDW=1 -elif [ -f /usr/include/elfutils/libdw.h ] || [ -f /usr/include/dwarf.h ]; then - HAVE_LIBDW=1 -fi -echo " libdw: $([ ${HAVE_LIBDW} -eq 1 ] && echo yes || echo no)" -cat >> "${CONFIG_MK}" << EOF -HAVE_LIBDW := ${HAVE_LIBDW} -EOF - -# --- amd_comgr --- -HAVE_AMD_COMGR=0 -if [ -f "${ROCM_PATH}/include/amd_comgr/amd_comgr.h" ] || [ -f "${ROCM_PATH}/lib/libamd_comgr.so" ]; then - HAVE_AMD_COMGR=1 -elif pkg_check amd_comgr; then - HAVE_AMD_COMGR=1 -fi -echo " amd_comgr: $([ ${HAVE_AMD_COMGR} -eq 1 ] && echo yes || echo no)" -cat >> "${CONFIG_MK}" << EOF -HAVE_AMD_COMGR := ${HAVE_AMD_COMGR} -EOF - -# --- glslangValidator --- -HAVE_GLSLANG_VALIDATOR=0 -if command -v glslangValidator >/dev/null 2>&1; then - HAVE_GLSLANG_VALIDATOR=1 -fi -echo " glslangValidator: $([ ${HAVE_GLSLANG_VALIDATOR} -eq 1 ] && echo yes || echo no)" -cat >> "${CONFIG_MK}" << EOF -HAVE_GLSLANG_VALIDATOR := ${HAVE_GLSLANG_VALIDATOR} -EOF - -echo "" -echo "configure: wrote ${CONFIG_MK}" From 85aee48924e251eafb0a31868684b69427710fb8 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 19:29:28 +0000 Subject: [PATCH 32/38] Fix find_cmake_built_dirs.py: match by executable name, not directory path CMake uses CMAKE_RUNTIME_OUTPUT_DIRECTORY to place executables in build/bin//, not build///. The directory path mapping was wrong, finding only 2 of ~300 matches. New approach: scan Makefiles for 'EXAMPLE := ', collect executable names from the CMake build tree, and match by name. This correctly maps CMake-built executables to their Makefile source directories regardless of build tree layout. Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/find_cmake_built_dirs.py | 101 ++++++++++++------- 1 file changed, 66 insertions(+), 35 deletions(-) diff --git a/.github/build_tools/find_cmake_built_dirs.py b/.github/build_tools/find_cmake_built_dirs.py index 1c339e02bc..78b6fd524e 100644 --- a/.github/build_tools/find_cmake_built_dirs.py +++ b/.github/build_tools/find_cmake_built_dirs.py @@ -1,65 +1,96 @@ #!/usr/bin/env python3 -"""Find source directories where CMake produced executables. +"""Find source directories whose Makefile examples were also built by CMake. -Scans the CMake build tree for executables and maps them back to source -directories that contain a Makefile. Used to selectively build only the -Makefile examples whose dependencies CMake confirmed are available. +Scans all Makefiles for 'EXAMPLE := ', then checks if that executable +exists anywhere in the CMake build tree. Outputs the list of source directories +whose Makefile targets have a matching CMake-built executable. + +This lets us selectively build only Makefiles for examples whose dependencies +CMake confirmed are available, without requiring the directory structures to +match between source and build trees. """ import argparse import os +import re import stat -import sys -def main(): - parser = argparse.ArgumentParser( - description="Find source dirs where CMake built executables." - ) - parser.add_argument( - "--build-dir", required=True, help="CMake build directory" - ) - parser.add_argument( - "--source-dir", required=True, help="Source root directory" - ) - parser.add_argument( - "--output", required=True, help="Output file (one directory per line)" - ) - args = parser.parse_args() +def find_makefile_examples(source_dir): + """Walk source tree, find Makefiles with 'EXAMPLE := '. + + Returns dict mapping example_name -> relative source directory. + """ + examples = {} + for root, _dirs, files in os.walk(source_dir): + if "Makefile" not in files: + continue + makefile_path = os.path.join(root, "Makefile") + try: + with open(makefile_path) as f: + for line in f: + m = re.match(r"^EXAMPLE\s*:=\s*(\S+)", line) + if m: + name = m.group(1) + rel = os.path.relpath(root, source_dir) + examples[name] = rel + break + except OSError: + continue + return examples - build_dir = os.path.abspath(args.build_dir) - source_dir = os.path.abspath(args.source_dir) - dirs = set() - for root, _dirnames, filenames in os.walk(build_dir): - for fname in filenames: +def find_cmake_executables(build_dir): + """Walk CMake build tree and collect names of executable files.""" + executables = set() + for root, _dirs, files in os.walk(build_dir): + for fname in files: fpath = os.path.join(root, fname) - # Skip non-executable files try: st = os.stat(fpath) except OSError: continue if not (st.st_mode & stat.S_IXUSR): continue - # Skip shared libraries, scripts, cmake files, etc. + # Skip non-executable artifacts if fname.endswith((".so", ".a", ".cmake", ".sh", ".py", ".txt")): continue if fname.startswith("lib"): continue + executables.add(fname) + return executables - # Map build path back to source path - rel = os.path.relpath(root, build_dir) - source_candidate = os.path.join(source_dir, rel) - makefile = os.path.join(source_candidate, "Makefile") - if os.path.isfile(makefile): - dirs.add(rel) - sorted_dirs = sorted(dirs) +def main(): + parser = argparse.ArgumentParser( + description="Find source dirs whose Makefile examples were built by CMake." + ) + parser.add_argument("--build-dir", required=True, help="CMake build directory") + parser.add_argument("--source-dir", required=True, help="Source root directory") + parser.add_argument( + "--output", required=True, help="Output file (one directory per line)" + ) + args = parser.parse_args() + + build_dir = os.path.abspath(args.build_dir) + source_dir = os.path.abspath(args.source_dir) + + makefile_examples = find_makefile_examples(source_dir) + cmake_executables = find_cmake_executables(build_dir) + + matched_dirs = [] + for name, rel_dir in sorted(makefile_examples.items()): + if name in cmake_executables: + matched_dirs.append(rel_dir) + with open(args.output, "w") as f: - for d in sorted_dirs: + for d in matched_dirs: f.write(d + "\n") - print(f"Found {len(sorted_dirs)} source directories with Makefiles matching CMake build targets") + print( + f"Found {len(matched_dirs)} Makefile directories matching CMake-built " + f"executables (out of {len(makefile_examples)} Makefiles total)" + ) if __name__ == "__main__": From 0d6332f4baf8ef0ae71b6cb10463d2cbef103cee Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Mon, 23 Mar 2026 20:29:38 +0000 Subject: [PATCH 33/38] Update README: document Make build and test runner Document that CMake is used as the source of truth for dependency detection in CI, and add run_makefile_tests.sh usage instructions. Co-Authored-By: Claude Opus 4.6 --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cef8ec0667..bc492abd53 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,27 @@ See [CMake build options](#cmake-build-options) for an overview of build options #### Make -Beware that only a subset of the examples support building via Make. +Only a subset of the examples support building via Make. To build all Makefile examples at once: - `$ git clone https://github.com/ROCm/rocm-examples.git` - `$ cd rocm-examples` - `$ make` (on ROCm) or `$ make ROCM_EXAMPLES_GPU_LANGUAGE=CUDA` (on CUDA) +Some examples depend on external libraries (e.g. FFmpeg, OpenCV, Vulkan). If a dependency is missing, the Makefile build for that example will fail. In CI, CMake is used as the source of truth for dependency detection — only examples that CMake successfully builds are then built and tested via Make. + +#### Makefile Testing + +After building, you can run the Makefile-built examples as tests: + +``` +$ ./run_makefile_tests.sh --timeout=120 +``` + +Options: +- `--allow-file=FILE` — only run tests listed in this file (one name per line) +- `--skip-file=FILE` — skip tests listed in this file +- `--timeout=SECONDS` — per-test timeout (default: 120) + ### Linux with Docker Alternatively, instead of installing the prerequisites on the system, the [Dockerfiles](https://github.com/ROCm/rocm-examples/tree/amd-staging/Dockerfiles/) in this repository can be used to build images that provide all required prerequisites. Note, that the ROCm kernel GPU driver still needs to be installed on the host system. From 427d1c57dbb76e11f7365fecd267ba1211c6ce43 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 24 Mar 2026 15:00:49 +0000 Subject: [PATCH 34/38] Move test summary to end, add Makefile test log uploads - Move Test summary step after Makefile tests so it covers both - Add CMake and Makefile test results to the GitHub step summary - Upload Makefile test output as a separate artifact - Remove duplicate skipped-tests output from ctest step (now in summary) Co-Authored-By: Claude Opus 4.6 --- .../build-rocm-examples-reusable.yml | 141 +++++++++++------- 1 file changed, 87 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index ad5e11adeb..21a590cdb9 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -162,60 +162,8 @@ jobs: python3 .github/build_tools/generate_skip_tests.py --target ${{ matrix.gpu_config.gpu_target }} --distro ${{ inputs.distro }} SKIP_FILE="${GITHUB_WORKSPACE}/.github/build_tools/skip_tests.txt" - if [ -s "${SKIP_FILE}" ]; then - echo "## Skipped tests" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - cat "${SKIP_FILE}" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - else - echo "No tests skipped." >> $GITHUB_STEP_SUMMARY - fi - ctest --test-dir build --output-on-failure --exclude-from-file "${SKIP_FILE}" --output-junit "${GITHUB_WORKSPACE}/ctest_results.xml" 2>&1 | tee ctest_output.log - - name: Test summary - if: ${{ !cancelled() }} - run: | - LAST_TEST_LOG="build/Testing/Temporary/LastTest.log" - if [ ! -f ctest_output.log ] || [ ! -f "${LAST_TEST_LOG}" ]; then - echo "No test logs found." >> $GITHUB_STEP_SUMMARY - exit 0 - fi - - echo "## Test summary" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - SUMMARY=$(grep "tests passed" ctest_output.log) - echo "**${SUMMARY}**" >> $GITHUB_STEP_SUMMARY - - FAILED_LOG="build/Testing/Temporary/LastTestsFailed.log" - if [ -s "${FAILED_LOG}" ]; then - echo "## Failed tests" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - cat "${FAILED_LOG}" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - echo "
Failed tests output" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - - awk ' - /^[0-9]+\/[0-9]+ Testing: / { if (inblock && failed) print block; block = $0; inblock = 1; failed = 0; seen_result = 0; next } - inblock { block = block "\n" $0 } - /^Test Failed\.$/ { failed = 1; seen_result = 1 } - /^Test Passed\.$/ { seen_result = 1 } - /^-+$/ { if (inblock && seen_result) { if (failed) print block; inblock = 0 } } - END { if (inblock && failed) print block } - ' "${LAST_TEST_LOG}" >> $GITHUB_STEP_SUMMARY - - echo '```' >> $GITHUB_STEP_SUMMARY - echo "
" >> $GITHUB_STEP_SUMMARY - fi - - name: Makefile build if: ${{ !cancelled() }} run: | @@ -257,15 +205,100 @@ jobs: ./run_makefile_tests.sh \ --allow-file=/tmp/ctest_ran_tests.txt \ --skip-file="${SKIP_FILE}" \ - --timeout=120 + --timeout=120 2>&1 | tee makefile_test_output.log + + - name: Test summary + if: ${{ !cancelled() }} + run: | + # --- CMake test summary --- + echo "## CMake Test Summary" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + if [ -f ctest_output.log ]; then + SUMMARY=$(grep "tests passed" ctest_output.log || echo "No ctest results found") + echo "**${SUMMARY}**" >> $GITHUB_STEP_SUMMARY + else + echo "No ctest output log found." >> $GITHUB_STEP_SUMMARY + fi + + FAILED_LOG="build/Testing/Temporary/LastTestsFailed.log" + if [ -s "${FAILED_LOG}" ]; then + echo "" >> $GITHUB_STEP_SUMMARY + echo "### Failed CMake tests" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + cat "${FAILED_LOG}" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + LAST_TEST_LOG="build/Testing/Temporary/LastTest.log" + if [ -f "${LAST_TEST_LOG}" ]; then + echo "
Failed tests output" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + + awk ' + /^[0-9]+\/[0-9]+ Testing: / { if (inblock && failed) print block; block = $0; inblock = 1; failed = 0; seen_result = 0; next } + inblock { block = block "\n" $0 } + /^Test Failed\.$/ { failed = 1; seen_result = 1 } + /^Test Passed\.$/ { seen_result = 1 } + /^-+$/ { if (inblock && seen_result) { if (failed) print block; inblock = 0 } } + END { if (inblock && failed) print block } + ' "${LAST_TEST_LOG}" >> $GITHUB_STEP_SUMMARY + + echo '```' >> $GITHUB_STEP_SUMMARY + echo "
" >> $GITHUB_STEP_SUMMARY + fi + fi + + # --- Makefile test summary --- + echo "" >> $GITHUB_STEP_SUMMARY + echo "## Makefile Test Summary" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + if [ -f makefile_test_output.log ]; then + MAKEFILE_SUMMARY=$(grep "tests passed\|tests failed" makefile_test_output.log | tail -1 || echo "No Makefile test results found") + echo "**${MAKEFILE_SUMMARY}**" >> $GITHUB_STEP_SUMMARY + + # Show any failed Makefile tests + MAKEFILE_FAILURES=$(grep "Failed" makefile_test_output.log | grep -v "^[[:space:]]*$" || true) + if [ -n "${MAKEFILE_FAILURES}" ]; then + echo "" >> $GITHUB_STEP_SUMMARY + echo "### Failed Makefile tests" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo "${MAKEFILE_FAILURES}" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + fi + else + echo "No Makefile test output found." >> $GITHUB_STEP_SUMMARY + fi - - name: Upload test logs + # --- Skipped tests --- + SKIP_FILE="${GITHUB_WORKSPACE}/.github/build_tools/skip_tests.txt" + if [ -s "${SKIP_FILE}" ]; then + echo "" >> $GITHUB_STEP_SUMMARY + echo "## Skipped tests" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + cat "${SKIP_FILE}" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + fi + + - name: Upload CMake test logs if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ctest-logs-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} path: build/Testing/Temporary/ + - name: Upload Makefile test logs + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: makefile-test-logs-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} + path: makefile_test_output.log + - name: Clean the workspace if: always() run: find "$GITHUB_WORKSPACE" -mindepth 1 -delete From c6970afb8922d0d81f9626fc208aaf6cb97d564d Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 24 Mar 2026 15:37:58 +0000 Subject: [PATCH 35/38] Add Makefile build artifact upload Collect Makefile-built executables into a staging directory and upload them as a separate artifact, matching the CMake build artifact upload. Co-Authored-By: Claude Opus 4.6 --- .../build-rocm-examples-reusable.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 21a590cdb9..7c6df0f1d1 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -187,6 +187,25 @@ jobs: echo "Makefile build complete: ${BUILT} succeeded, ${FAILED} failed" + - name: Collect Makefile build artifacts + if: ${{ !cancelled() }} + run: | + mkdir -p /tmp/makefile_build + while IFS= read -r dir; do + example_name=$(grep '^EXAMPLE := ' "${dir}/Makefile" 2>/dev/null | head -1 | sed 's/^EXAMPLE := //') + if [ -n "${example_name}" ] && [ -x "${dir}/${example_name}" ]; then + mkdir -p "/tmp/makefile_build/${dir}" + cp "${dir}/${example_name}" "/tmp/makefile_build/${dir}/" + fi + done < /tmp/cmake_built_dirs.txt + + - name: Upload Makefile build artifacts + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: makefile-build-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} + path: /tmp/makefile_build/ + - name: Makefile tests if: ${{ !cancelled() }} run: | From f841a5f3010d583c9313bd88026b4a9fa513c3dd Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 24 Mar 2026 15:43:48 +0000 Subject: [PATCH 36/38] Fail workflow on Makefile build errors, pass HIP_ARCHITECTURES - Exit with error if any Makefile build fails (lists failed directories) - Pass HIP_ARCHITECTURES to per-directory make calls for correct arch targeting (assembly_to_executable, rocWMMA, etc.) Co-Authored-By: Claude Opus 4.6 --- .github/workflows/build-rocm-examples-reusable.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 7c6df0f1d1..0d5a6d5ff4 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -175,17 +175,24 @@ jobs: BUILT=0 FAILED=0 + FAILED_DIRS="" while IFS= read -r dir; do echo "Building Makefile in ${dir}..." - if make -C "${dir}" ROCM_INSTALL_DIR="${ROCM_PATH}"; then + if make -C "${dir}" ROCM_INSTALL_DIR="${ROCM_PATH}" HIP_ARCHITECTURES="${{ matrix.gpu_config.gpu_target }}"; then BUILT=$((BUILT + 1)) else - echo "WARNING: Makefile build failed in ${dir}" + echo "ERROR: Makefile build failed in ${dir}" FAILED=$((FAILED + 1)) + FAILED_DIRS="${FAILED_DIRS} ${dir}\n" fi done < /tmp/cmake_built_dirs.txt echo "Makefile build complete: ${BUILT} succeeded, ${FAILED} failed" + if [ "${FAILED}" -gt 0 ]; then + echo "Failed directories:" + echo -e "${FAILED_DIRS}" + exit 1 + fi - name: Collect Makefile build artifacts if: ${{ !cancelled() }} From d6e8a7f5f3607a00bf56499264ab104a6673f8aa Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 24 Mar 2026 17:55:10 +0000 Subject: [PATCH 37/38] Group build artifact uploads together after both builds complete Move CMake build upload to after Makefile build, so both build artifact uploads are logically grouped together. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/build-rocm-examples-reusable.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-rocm-examples-reusable.yml b/.github/workflows/build-rocm-examples-reusable.yml index 0d5a6d5ff4..e096742c50 100644 --- a/.github/workflows/build-rocm-examples-reusable.yml +++ b/.github/workflows/build-rocm-examples-reusable.yml @@ -149,13 +149,6 @@ jobs: run: | cmake --build build -j - - name: Upload build artifacts - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: rocm-examples-build-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} - path: build/ - - name: Run tests if: ${{ !cancelled() }} run: | @@ -206,6 +199,13 @@ jobs: fi done < /tmp/cmake_built_dirs.txt + - name: Upload CMake build artifacts + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: rocm-examples-build-${{ inputs.distro }}-${{ matrix.gpu_config.gpu_target }}-${{ steps.sanity-check.outputs.rocm_version || steps.install-tarball.outputs.rocm_version }}-${{ matrix.install_method }} + path: build/ + - name: Upload Makefile build artifacts if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 From 9460c6ab8bf4cd6d447d95d1a5e3c4573cf75140 Mon Sep 17 00:00:00 2001 From: sshi-amd Date: Tue, 24 Mar 2026 20:27:54 +0000 Subject: [PATCH 38/38] Remove ALWAYS_SKIP_TESTS entries for clean CI validation Co-Authored-By: Claude Opus 4.6 --- .github/build_tools/generate_skip_tests.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/build_tools/generate_skip_tests.py b/.github/build_tools/generate_skip_tests.py index a3b5ba94e5..4a398d3447 100644 --- a/.github/build_tools/generate_skip_tests.py +++ b/.github/build_tools/generate_skip_tests.py @@ -17,10 +17,6 @@ # Tests to always skip (all targets, all distros). ALWAYS_SKIP_TESTS = [ - # rocprof-systems-basic passes but takes ~6 minutes - "rocprof-systems-basic", - # rocprof-systems-advanced fails - "rocprof-systems-advanced", ] # Tests to skip per GPU target (one list per target that has skips) @@ -44,16 +40,6 @@ # Tests to skip for a specific GPU target + distro combination. # Keys are ":", e.g. "gfx1151:sles-15.7". DISTRO_SKIP_TESTS = { - # AlmaLinux 8 has glibc 2.28; binaries compiled against 2.34+ fail at runtime - "gfx1100:almalinux-8": [ - # glibc 2.28 too old — binaries compiled against 2.34+ fail at runtime - "hip_calling_global_functions", - "hip_template_warp_size_reduction", - "hip_warp_size_reduction", - # hipSPARSELt Tensile library files not packaged for this target - "hipsparselt_spmm", - "hipsparselt_spmm_advanced", - ], }