From 91943eb0eff6727912b0cb6d6ed060aa603bda34 Mon Sep 17 00:00:00 2001 From: David Galiffi Date: Fri, 21 Jun 2024 10:15:14 -0400 Subject: [PATCH] Fix CMake Failure Within Libraries/ (#129) * Fix CMake Failure Within Libraries/ Project languages is not set before "find_package" is called. This leads to a configuration failure when running `cmake` within the `Libraries/` folder. * Update README.md * Update project languages in additional CMakelists Signed-off-by: David Galiffi --- HIP-Basic/texture_management/README.md | 4 ++++ Libraries/CMakeLists.txt | 2 +- Libraries/hipBLAS/CMakeLists.txt | 2 +- Libraries/hipSOLVER/CMakeLists.txt | 2 +- Libraries/rocBLAS/CMakeLists.txt | 2 +- Libraries/rocBLAS/level_1/CMakeLists.txt | 4 ++-- Libraries/rocBLAS/level_2/CMakeLists.txt | 4 ++-- Libraries/rocBLAS/level_3/CMakeLists.txt | 4 ++-- Libraries/rocSOLVER/CMakeLists.txt | 2 +- Libraries/rocSPARSE/CMakeLists.txt | 2 +- Libraries/rocSPARSE/level_2/CMakeLists.txt | 2 +- Libraries/rocSPARSE/level_3/CMakeLists.txt | 4 ++-- Libraries/rocSPARSE/preconditioner/CMakeLists.txt | 2 +- 13 files changed, 20 insertions(+), 16 deletions(-) diff --git a/HIP-Basic/texture_management/README.md b/HIP-Basic/texture_management/README.md index 105179278..c6ba11904 100644 --- a/HIP-Basic/texture_management/README.md +++ b/HIP-Basic/texture_management/README.md @@ -64,3 +64,7 @@ This example demonstrates how a kernel may use texture memory through the textur - `hipStreamDefault` - `hipTextureDesc` - `hipTextureObject_t` + +## Limitations + +This example is not supported on CDNA3 architecture (MI300) and above. diff --git a/Libraries/CMakeLists.txt b/Libraries/CMakeLists.txt index e214e945f..8a3d91d82 100644 --- a/Libraries/CMakeLists.txt +++ b/Libraries/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(Libraries LANGUAGES NONE) +project(Libraries LANGUAGES CXX) # CMake configuration files for CUDA versions of HIP libraries are not yet # included under the HIP SDK for Windows. diff --git a/Libraries/hipBLAS/CMakeLists.txt b/Libraries/hipBLAS/CMakeLists.txt index 8109cada8..b389ac66d 100644 --- a/Libraries/hipBLAS/CMakeLists.txt +++ b/Libraries/hipBLAS/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(hipBLAS_examples LANGUAGES NONE) +project(hipBLAS_examples LANGUAGES CXX) if(WIN32) set(ROCM_ROOT diff --git a/Libraries/hipSOLVER/CMakeLists.txt b/Libraries/hipSOLVER/CMakeLists.txt index e86fb14d6..23eb74bf9 100644 --- a/Libraries/hipSOLVER/CMakeLists.txt +++ b/Libraries/hipSOLVER/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(hipSOLVER_examples LANGUAGES NONE) +project(hipSOLVER_examples LANGUAGES CXX) if(WIN32) set(ROCM_ROOT diff --git a/Libraries/rocBLAS/CMakeLists.txt b/Libraries/rocBLAS/CMakeLists.txt index 23077987a..ab3d3d531 100644 --- a/Libraries/rocBLAS/CMakeLists.txt +++ b/Libraries/rocBLAS/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocBLAS_examples LANGUAGES NONE) +project(rocBLAS_examples LANGUAGES CXX) if(GPU_RUNTIME STREQUAL "CUDA") message(STATUS "rocBLAS examples do not support the CUDA runtime") diff --git a/Libraries/rocBLAS/level_1/CMakeLists.txt b/Libraries/rocBLAS/level_1/CMakeLists.txt index 583ea6c15..aaeda0aeb 100644 --- a/Libraries/rocBLAS/level_1/CMakeLists.txt +++ b/Libraries/rocBLAS/level_1/CMakeLists.txt @@ -1,6 +1,6 @@ # MIT License # -# Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2022-2024 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 @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocBLAS_level_1_examples LANGUAGES NONE) +project(rocBLAS_level_1_examples LANGUAGES CXX) add_subdirectory(axpy) add_subdirectory(dot) diff --git a/Libraries/rocBLAS/level_2/CMakeLists.txt b/Libraries/rocBLAS/level_2/CMakeLists.txt index 6c890a0f6..04fd3cdd2 100644 --- a/Libraries/rocBLAS/level_2/CMakeLists.txt +++ b/Libraries/rocBLAS/level_2/CMakeLists.txt @@ -1,6 +1,6 @@ # MIT License # -# Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2022-2024 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 @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocBLAS_level_2_examples LANGUAGES NONE) +project(rocBLAS_level_2_examples LANGUAGES CXX) add_subdirectory(gemv) add_subdirectory(her) diff --git a/Libraries/rocBLAS/level_3/CMakeLists.txt b/Libraries/rocBLAS/level_3/CMakeLists.txt index 064602127..a3307d31f 100644 --- a/Libraries/rocBLAS/level_3/CMakeLists.txt +++ b/Libraries/rocBLAS/level_3/CMakeLists.txt @@ -1,6 +1,6 @@ # MIT License # -# Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2022-2024 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 @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocBLAS_level_3_examples LANGUAGES NONE) +project(rocBLAS_level_3_examples LANGUAGES CXX) add_subdirectory(gemm) add_subdirectory(gemm_strided_batched) diff --git a/Libraries/rocSOLVER/CMakeLists.txt b/Libraries/rocSOLVER/CMakeLists.txt index 35573bd4c..73ffa5f76 100644 --- a/Libraries/rocSOLVER/CMakeLists.txt +++ b/Libraries/rocSOLVER/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocSOLVER_examples LANGUAGES NONE) +project(rocSOLVER_examples LANGUAGES CXX) if(GPU_RUNTIME STREQUAL "CUDA") message(STATUS "rocSOLVER examples do not support the CUDA runtime") diff --git a/Libraries/rocSPARSE/CMakeLists.txt b/Libraries/rocSPARSE/CMakeLists.txt index 89a79aeb9..536db6610 100644 --- a/Libraries/rocSPARSE/CMakeLists.txt +++ b/Libraries/rocSPARSE/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocSPARSE_examples LANGUAGES NONE) +project(rocSPARSE_examples LANGUAGES CXX) if(GPU_RUNTIME STREQUAL "CUDA") message(STATUS "rocSPARSE examples do not support the CUDA runtime") diff --git a/Libraries/rocSPARSE/level_2/CMakeLists.txt b/Libraries/rocSPARSE/level_2/CMakeLists.txt index e44a93bf7..a135d4e6f 100644 --- a/Libraries/rocSPARSE/level_2/CMakeLists.txt +++ b/Libraries/rocSPARSE/level_2/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocSPARSE_level_2_examples LANGUAGES NONE) +project(rocSPARSE_level_2_examples LANGUAGES CXX) add_subdirectory(bsrmv) add_subdirectory(bsrsv) diff --git a/Libraries/rocSPARSE/level_3/CMakeLists.txt b/Libraries/rocSPARSE/level_3/CMakeLists.txt index f976e4cfb..7deb1bd8a 100644 --- a/Libraries/rocSPARSE/level_3/CMakeLists.txt +++ b/Libraries/rocSPARSE/level_3/CMakeLists.txt @@ -1,6 +1,6 @@ # MIT License # -# Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2023-2024 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 @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocSPARSE_level_3_examples LANGUAGES NONE) +project(rocSPARSE_level_3_examples LANGUAGES CXX) add_subdirectory(bsrmm) add_subdirectory(bsrsm) diff --git a/Libraries/rocSPARSE/preconditioner/CMakeLists.txt b/Libraries/rocSPARSE/preconditioner/CMakeLists.txt index 409eae76e..b0d772510 100644 --- a/Libraries/rocSPARSE/preconditioner/CMakeLists.txt +++ b/Libraries/rocSPARSE/preconditioner/CMakeLists.txt @@ -21,7 +21,7 @@ # SOFTWARE. cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -project(rocSPARSE_preconditioner_examples LANGUAGES NONE) +project(rocSPARSE_preconditioner_examples LANGUAGES CXX) add_subdirectory(bsric0) add_subdirectory(bsrilu0)