HIP
HIP copied to clipboard
cmake + HIP_PLATFORM=nvidia fails with "Could NOT find Threads"
When trying to compile for Nvidia using cmake I get the following error:
export HIP_PLATFORM=nvidia
export CC=/opt/rocm/bin/hipcc
export CXX=/opt/rocm/bin/hipcc
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- The ASM compiler identification is unknown
-- Found assembler: /opt/rocm/bin/hipcc
-- Check for working C compiler: /opt/rocm/bin/hipcc
-- Check for working C compiler: /opt/rocm/bin/hipcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/rocm/bin/hipcc
-- Check for working CXX compiler: /opt/rocm/bin/hipcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Warning: Did not find file Compiler/-ASM
-- Found Git: /usr/bin/git (found version "2.25.1")
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindThreads.cmake:220 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
/usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
/opt/rocm/lib/cmake/hip/hip-config.cmake:204 (find_dependency)
CMakeLists.txt:22 (find_package)
$ hipconfig
HIP version : 5.1.20531-cacfa990
== hipconfig
HIP_PATH : /opt/rocm-5.1.0/hip
ROCM_PATH : /opt/rocm-5.1.0
HIP_COMPILER : clang
HIP_PLATFORM : nvidia
HIP_RUNTIME : rocclr
CPP_CONFIG : -D__HIP_PLATFORM_NVCC__= -D__HIP_PLATFORM_NVIDIA__= -I/opt/rocm-5.1.0/hip/include -I/usr/local/cuda/include
== nvcc
CUDA_PATH : /usr/local/cuda
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
=== Environment Variables
PATH=/home/mad/.cargo/bin:/home/mad/.local/bin:/home/mad/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/opt/rocm/bin
HIP_PLATFORM=nvidia
CUDA_NVCC_FLAGS=-gencode arch=compute_86,code=sm_86
== Linux Kernel
Hostname : AN515-45
Linux AN515-45 5.13.0-37-generic #42~20.04.1-Ubuntu SMP Tue Mar 15 15:44:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
| NVIDIA-SMI 515.48.07 Driver Version: 515.48.07 CUDA Version: 11.7 |
$ /usr/local/cuda/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
@madMAx43v3r Hi, were you able to resolve this issue on the latest HIP? If so can we close this ticket?