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

[Issue]: no member named 'exception_ptr' in namespace 'std' #3135

Closed
lamikr opened this issue May 30, 2024 · 3 comments
Closed

[Issue]: no member named 'exception_ptr' in namespace 'std' #3135

lamikr opened this issue May 30, 2024 · 3 comments

Comments

@lamikr
Copy link

lamikr commented May 30, 2024

Problem Description

Seeing this error on Fedora 40 environment. Works fine on Fedora 39.

cd /builddir/035_AMDMIGraphX/test && /opt/rocm_sdk_611/bin/clang++ -DHAVE_GPU -DMIGRAPHX_HAS_EXECUTORS=0 -DMIGRAPHX_HAS_FIND_2_API -DMIGRAPHX_HAS_FIND_MODE_API -DMIGRAPHX_PREALLOCATE_MIOPEN_BUFFERS -DMIGRAPHX_USE_ROCBLAS_FP8_API -DMIGRAPHX_USE_ROCBLAS_TUNING_API -DROCBLAS_BETA_FEATURES_API -DROCBLAS_NO_DEPRECATED_WARNINGS -DUSE_PROF_API=1 -D__HIP_PLATFORM_AMD__ -D__HIP_PLATFORM_AMD__=1 -I/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611AMDMIGraphX/test/include -I/builddir/035_AMDMIGraphX/src/include -I/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611AMDMIGraphX/src/include -I/builddir/035_AMDMIGraphX/src/onnx/include -I/builddir/035_AMDMIGraphX/src/tf/include -I/builddir/035_AMDMIGraphX/src/targets/ref/include -I/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611AMDMIGraphX/src/targets/ref/include -I/builddir/035_AMDMIGraphX/src/targets/gpu/include -I/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611AMDMIGraphX/src/targets/gpu/include -isystem /opt/rocm_sdk_611/include -O3 -DNDEBUG -std=c++17 -Wall -Wextra -Wcomment -Wendif-labels -Wformat -Winit-self -Wreturn-type -Wsequence-point -Wswitch -Wtrigraphs -Wundef -Wuninitialized -Wunreachable-code -Wunused -Wno-sign-compare -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion -Wno-double-promotion -Wno-exit-time-destructors -Wno-extra-semi -Wno-extra-semi-stmt -Wno-float-conversion -Wno-gnu-anonymous-struct -Wno-gnu-zero-variadic-macro-arguments -Wno-missing-prototypes -Wno-nested-anon-types -Wno-option-ignored -Wno-padded -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-unused-command-line-argument -Wno-weak-vtables -Wno-c99-extensions -Wno-unsafe-buffer-usage -MD -MT test/CMakeFiles/header_src_include_migraphx_erase_hpp.dir/header-main-include-header_src_include_migraphx_erase_hpp.cpp.o -MF CMakeFiles/header_src_include_migraphx_erase_hpp.dir/header-main-include-header_src_include_migraphx_erase_hpp.cpp.o.d -o CMakeFiles/header_src_include_migraphx_erase_hpp.dir/header-main-include-header_src_include_migraphx_erase_hpp.cpp.o -c /builddir/035_AMDMIGraphX/test/header-main-include-header_src_include_migraphx_erase_hpp.cpp
[ 31%] Linking CXX executable ../bin/header_src_include_migraphx_eliminate_common_subexpression_hpp
cd /builddir/035_AMDMIGraphX/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/header_src_include_migraphx_eliminate_common_subexpression_hpp.dir/link.txt --verbose=1
In file included from /builddir/035_AMDMIGraphX/test/header-static-include-header_src_include_migraphx_convolution_hpp.cpp:2:
In file included from AMDMIGraphX/src/include/migraphx/convolution.hpp:29:
In file included from AMDMIGraphX/src/include/migraphx/par_for.hpp:27:
AMDMIGraphX/src/include/migraphx/par.hpp:54:22: error: no member named 'exception_ptr' in namespace 'std'
54 | std::vectorstd::exception_ptr exceptions;

Operating System

Fedora 40

CPU

AMD Ryzen 5700x

GPU

AMD Radeon RX 6800

Other

No response

ROCm Version

ROCm 6.0.0

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

ROCk module is loaded

HSA System Attributes

Runtime Version: 1.1
Runtime Ext Version: 1.4
System Timestamp Freq.: 1000.000000MHz
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model: LARGE
System Endianness: LITTLE
Mwaitx: DISABLED
DMAbuf Support: YES

==========
HSA Agents


Agent 1


Name: AMD Ryzen 9 6900HS Creator Edition
Uuid: CPU-XX
Marketing Name: AMD Ryzen 9 6900HS Creator Edition
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 0
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 4935
BDFID: 0
Internal Node ID: 0
Compute Unit: 16
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 28423768(0x1b1b658) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 28423768(0x1b1b658) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 28423768(0x1b1b658) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:


Agent 2


Name: gfx1035
Uuid: GPU-XX
Marketing Name: AMD Radeon Graphics
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 1
Device Type: GPU
Cache Info:
L1: 16(0x10) KB
L2: 2048(0x800) KB
Chip ID: 5761(0x1681)
ASIC Revision: 2(0x2)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 2400
BDFID: 1024
Internal Node ID: 1
Compute Unit: 12
SIMDs per CU: 2
Shader Engines: 1
Shader Arrs. per Eng.: 2
WatchPts on Addr. Ranges:4
Coherent Host Access: FALSE
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 32(0x20)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 32(0x20)
Max Work-item Per CU: 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
Max fbarriers/Workgrp: 32
Packet Processor uCode:: 115
SDMA engine uCode:: 47
IOMMU Support:: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 4194304(0x400000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED
Size: 4194304(0x400000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 3
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Recommended Granule:0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa--gfx1035
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
FBarrier Max Size: 32
*** Done ***

Additional Information

I use own rock sdk build system. Same build works on Ubuntu 23.10 and Fedora 39.

@ppanchad-amd
Copy link

Hi @lamikr, an internal ticket has been created to investigate your issue. Thanks!

@sohaibnd
Copy link
Contributor

Hi @lamikr, have you tried adding #include <exception> in AMDMIGraphX/src/include/migraphx/par.hpp manually?

@sohaibnd
Copy link
Contributor

sohaibnd commented Oct 21, 2024

@lamikr The problem seems to be because Fedora 40 is using gcc 14. For gcc 13 and earlier, including <mutex> (as in src/include/migraphx/par.hpp) would include <exception> internally so there would be no need to do so explicitly to use std::exception_ptr . For gcc 14, "Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library" (source). A couple of headers files have been updated (including src/include/migraphx/par.hpp) to add the necessary includes to compile correctly with the STL headers for gcc 14 (see PR #3536).

I am going to close this issue as it is resolved (the fix has been merged into the develop branch and will be included in an upcoming release). If you come across any other problems, feel free to create another issue.

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

3 participants