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

[HotFix] Fix build errors on SLES due to incomplete C++17 support #3085

Merged
merged 167 commits into from
Jun 28, 2024

Conversation

xinlipn
Copy link
Contributor

@xinlipn xinlipn commented Jun 27, 2024

Aakash reported build errors as below.

2024-06-25T02:43:44.069186122Z /long_pathname_so_that_rpms_can_package_the_debug_info/src/extlibs/MLOpen/test/gtest/execute_primitive.cpp:27:10: fatal error: 'filesystem' file not found
2024-06-25T02:43:44.069229053Z 27 | #include

Here's the log
http://rocm-ci.amd.com/job/compute-stage2-build/5502/artifact/logs/miopen-hip_failed.log/*view*/

Daniel Lowell and others added 30 commits October 9, 2020 14:32
@xinlipn xinlipn self-assigned this Jun 27, 2024
@xinlipn xinlipn requested review from junliume and AryanSalmanpour and removed request for junliume June 27, 2024 05:51
@junliume junliume changed the title Fix build errors on SLES [HotFix] Fix build errors on SLES due to incomplete C++17 support Jun 27, 2024
@@ -24,7 +24,11 @@
*
*******************************************************************************/

#if __cplusplus >= 201703L && __has_include(<filesystem>)
#include <filesystem>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xinlipn #2690 and #2732 may have missed this?

#include <miopen/filesystem.hpp>

should be able to replace that if-else block. Could you give it a try?

@junliume junliume merged commit 3552626 into develop Jun 28, 2024
141 checks passed
@junliume junliume deleted the sl/amd_dev_sles_build branch June 28, 2024 00:32
@xinlipn
Copy link
Contributor Author

xinlipn commented Jul 3, 2024

Tested the changes in PR3085 on SLES container on MI200 node and no build errors found. Here's steps:

  1. Start container
    sudo docker run -it --rm --name sles --network=host --ipc=host --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /home/shinlee/gTestSingleBin/MIOpen:/MIOpen compute-artifactory.amd.com:5000/rocm-plus-docker/compute-rocm-dkms-no-npi-hipclang:14309-sles-stg2

  2. Installd dependency:
    cmake -P install_deps.cmake --minimum --prefix /root/MIOpen/install_dir

  3. Update this CMakeLists.txt
    set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "")
    ->
    set(CMAKE_INSTALL_PREFIX "/root/MIOpen/install_dir/" CACHE PATH "")

  4. Build the code
    mkdir build; cd build

export CXX=/opt/rocm/llvm/bin/clang++ && cmake -DMIOPEN_BACKEND=HIP -DMIOPEN_TEST_FLAGS=--disable-verification-cache -DCMAKE_BUILD_TYPE=debug -DBUILD_DEV=On -DMIOPEN_TEST_DISCRETE=OFF -DMIOPEN_USE_MLIR=ON -DMIOPEN_GPU_SYNC=Off -DCMAKE_PREFIX_PATH="/root/MIOpen/install_dir;/opt/rocm" -DCMAKE_INCLUDE_PATH="/usr/include;/root/MIOpen/install_dir/include;/root/MIOpen/install_dir/cget/pkg/sqlite3/install/include" ..

make -j$(nproc) check

Build log:
make.log

junliume pushed a commit that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants