Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to builld MIOpen from source on SLES #2939

Open
Zakhrov opened this issue May 1, 2024 · 1 comment
Open

Unable to builld MIOpen from source on SLES #2939

Zakhrov opened this issue May 1, 2024 · 1 comment

Comments

@Zakhrov
Copy link

Zakhrov commented May 1, 2024

When trying to build MIOpen from source, the compilation fails with the following error:

MIOpen/src/include/miopen/handle.hpp:242:17: error: no member named 'has_value' in 'boost::optional<miopen::AlgorithmName>'
  242 |         if(algo.has_value())

I have confirmed that Boost is installed and can be found by MIOpen during the CMAKE configuration step:

-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is Clang 18.1.4
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found SQLite3: /usr/include (found version "3.44.0") 
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.8") 
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found nlohmann_json: /usr/lib64/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.2", minimum required is "3.9.1") 
-- Performing Test HAS_HIP
-- Performing Test HAS_HIP - Success
-- Performing Test _result
-- Performing Test _result - Success
-- MIOPEN_OFFLINE_COMPILER_PATHS_V2: OFF
-- MIOPEN_BUILD_DRIVER: ON
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS - Failed
-- Build with HIP 6.1.40091
-- Enable Composable Kernels: ON
-- Performing Test MIOPEN_HIP_COMPILER_HAS_OPTION_OFFLOAD_UNIFORM_BLOCK
-- Performing Test MIOPEN_HIP_COMPILER_HAS_OPTION_OFFLOAD_UNIFORM_BLOCK - Success
-- Hip compiler flags:  -mllvm=-amdgpu-early-inline-all=true -mllvm=-amdgpu-function-calls=false -x hip    -D__HIP_PLATFORM_AMD__=1  -DUSE_PROF_API=1 --hip-link    -fno-offload-uniform-block 
-- OpenCL compiler: /opt/rocm/bin/amdclang
-- Build with rocblas 4.3.0
-- HIP backend selected.
-- clang-offload-bundler found: /opt/rocm/llvm/bin/clang-offload-bundler
-- Build with rocMLIR::rockCompiler 2.0.0
-- AMDGCN assembler: /opt/rocm/llvm/bin/clang
-- Build with comgr 2.7.0
-- Build with HIPRTC 6.1.40091
-- Found Boost: /usr/local/lib/cmake/Boost-1.85.0/BoostConfig.cmake (found version "1.85.0") found components: filesystem 
-- HALF_INCLUDE_DIR: /opt/rocm/include
-- Found nlohmann_json: /usr/lib64/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.11.2") 
-- Build with rocTracer: /opt/rocm/lib/libroctx64.so
-- rocrand_VERSION=3.0.1

What am I doing wrong?

@junliume
Copy link
Collaborator

@Zakhrov it might be a Boost version issue, are you following the build guide closely to build MIOpen dependencies?

export LC_ALL=C.UTF-8 && \
export LANG=C.UTF-8 && \
apt-get update -y && \
apt-get install -y sudo && \
sudo apt-get -y install git git-lfs unzip lbzip2 python3.9-venv pkg-config vim ninja-build half && \
sudo apt update && \
cd /root && git clone -b develop https://github.com/ROCmSoftwarePlatform/MIOpen && cd MIOpen && \
mkdir -p install_dir && cmake -P install_deps.cmake --minimum --prefix /root/MIOpen/install_dir && \
mkdir -p build && \
cd build && \
CXX=/opt/rocm/bin/amdclang++ CC=/opt/rocm/bin/amdclang cmake -DMIOPEN_BACKEND=HIP -DCMAKE_PREFIX_PATH="/root/MIOpen/install_dir;/opt/rocm" \
-DMIOPEN_TEST_ALL=On -DMIOPEN_TEST_HALF=On .. && \
make -j$(nproc) install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants