[Mlir-commits] [flang] [mlir] [acc][flang] Add isDeviceData APIs for device data detection (PR #176219)

LLVM Continuous Integration llvmlistbot at llvm.org
Thu Jan 15 18:16:06 PST 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `amdgpu-offload-rhel-8-cmake-build-only` running on `rocm-docker-rhel-8` while building `flang,mlir` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/33127

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[8340/8424] Creating library symlink lib/libFortranParser.so
[8341/8424] Linking CXX executable bin/f18-parse-demo
[8342/8424] Linking CXX shared library lib/libFortranEvaluate.so.23.0git
[8343/8424] Creating library symlink lib/libFortranEvaluate.so
[8344/8424] Linking CXX shared library lib/libFIRBuilder.so.23.0git
[8345/8424] Creating library symlink lib/libFIRBuilder.so
[8346/8424] Linking CXX shared library lib/libFIROpenMPSupport.so.23.0git
[8347/8424] Creating library symlink lib/libFIROpenMPSupport.so
[8348/8424] Linking CXX shared library lib/libFIRAnalysis.so.23.0git
[8349/8424] Linking CXX shared library lib/libFIROpenACCSupport.so.23.0git
FAILED: lib/libFIROpenACCSupport.so.23.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-semantic-interposition -fpch-preprocess -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIROpenACCSupport.so.23.0git -o lib/libFIROpenACCSupport.so.23.0git tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCAttributes.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCOpsInterfaces.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCTypeInterfaces.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCUtils.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/RegisterOpenACCExtensions.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.23.0git  lib/libFIRCodeGenDialect.so.23.0git  lib/libFIRSupport.so.23.0git  lib/libHLFIRDialect.so.23.0git  lib/libCUFDialect.so.23.0git  lib/libFIRDialect.so.23.0git  lib/libFIRDialectSupport.so.23.0git  lib/libMLIROpenACCDialect.so.23.0git  lib/libMLIRGPUDialect.so.23.0git  lib/libMLIRMemRefDialect.so.23.0git  lib/libMLIRArithUtils.so.23.0git  lib/libMLIRComplexDialect.so.23.0git  lib/libMLIRDialectUtils.so.23.0git  lib/libMLIRDLTIDialect.so.23.0git  lib/libMLIRMathDialect.so.23.0git  lib/libMLIRArithDialect.so.23.0git  lib/libMLIRInferIntRangeCommon.so.23.0git  lib/libMLIRShapedOpInterfaces.so.23.0git  lib/libMLIRCastInterfaces.so.23.0git  lib/libMLIRDialect.so.23.0git  lib/libMLIRLLVMDialect.so.23.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.23.0git  lib/libMLIROpenACCMPCommon.so.23.0git  lib/libMLIRMemorySlotInterfaces.so.23.0git  lib/libMLIRMemOpInterfaces.so.23.0git  lib/libMLIRUBDialect.so.23.0git  lib/libMLIRValueBoundsOpInterface.so.23.0git  lib/libMLIRDestinationStyleOpInterface.so.23.0git  lib/libMLIRAnalysis.so.23.0git  lib/libMLIRControlFlowInterfaces.so.23.0git  lib/libMLIRSideEffectInterfaces.so.23.0git  lib/libMLIRDataLayoutInterfaces.so.23.0git  lib/libMLIRInferTypeOpInterface.so.23.0git  lib/libMLIRInferStridedMetadataInterface.so.23.0git  lib/libMLIRInferIntRangeInterface.so.23.0git  lib/libMLIRViewLikeInterface.so.23.0git  lib/libMLIRLoopLikeInterface.so.23.0git  lib/libMLIRFunctionInterfaces.so.23.0git  lib/libMLIRCallInterfaces.so.23.0git  lib/libMLIRPresburger.so.23.0git  lib/libMLIRIR.so.23.0git  lib/libMLIRSupport.so.23.0git  -lpthread  lib/libLLVMCore.so.23.0git  lib/libLLVMBinaryFormat.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCTypeInterfaces.cpp.o: In function `fir::acc::isDeviceDataImpl(mlir::Value)':
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x49): undefined reference to `cuf::hasDeviceDataAttr(mlir::Operation*)'
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x17b): undefined reference to `mlir::detail::TypeIDResolver<cuf::DataAttributeAttr, void>::id'
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x191): undefined reference to `cuf::DataAttributeAttr::getValue() const'
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x198): undefined reference to `cuf::isDeviceDataAttribute(cuf::DataAttribute)'
tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCOpsInterfaces.cpp.o: In function `fir::acc::GlobalVariableModel::isDeviceData(mlir::Operation*) const':
FIROpenACCOpsInterfaces.cpp:(.text._ZNK3fir3acc19GlobalVariableModel12isDeviceDataEPN4mlir9OperationE+0x8): undefined reference to `cuf::getDataAttr(mlir::Operation*)'
FIROpenACCOpsInterfaces.cpp:(.text._ZNK3fir3acc19GlobalVariableModel12isDeviceDataEPN4mlir9OperationE+0x21): undefined reference to `cuf::DataAttributeAttr::getValue() const'
FIROpenACCOpsInterfaces.cpp:(.text._ZNK3fir3acc19GlobalVariableModel12isDeviceDataEPN4mlir9OperationE+0x28): undefined reference to `cuf::isDeviceDataAttribute(cuf::DataAttribute)'
collect2: error: ld returned 1 exit status
[8350/8424] Creating library symlink lib/libFIRAnalysis.so
[8351/8424] Linking CXX shared library lib/libFortranUtils.so.23.0git
[8352/8424] Linking CXX shared library lib/libFortranSemantics.so.23.0git
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[8340/8424] Creating library symlink lib/libFortranParser.so
[8341/8424] Linking CXX executable bin/f18-parse-demo
[8342/8424] Linking CXX shared library lib/libFortranEvaluate.so.23.0git
[8343/8424] Creating library symlink lib/libFortranEvaluate.so
[8344/8424] Linking CXX shared library lib/libFIRBuilder.so.23.0git
[8345/8424] Creating library symlink lib/libFIRBuilder.so
[8346/8424] Linking CXX shared library lib/libFIROpenMPSupport.so.23.0git
[8347/8424] Creating library symlink lib/libFIROpenMPSupport.so
[8348/8424] Linking CXX shared library lib/libFIRAnalysis.so.23.0git
[8349/8424] Linking CXX shared library lib/libFIROpenACCSupport.so.23.0git
FAILED: lib/libFIROpenACCSupport.so.23.0git 
: && /usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-semantic-interposition -fpch-preprocess -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIROpenACCSupport.so.23.0git -o lib/libFIROpenACCSupport.so.23.0git tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCAttributes.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCOpsInterfaces.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCTypeInterfaces.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCUtils.cpp.o tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/RegisterOpenACCExtensions.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.23.0git  lib/libFIRCodeGenDialect.so.23.0git  lib/libFIRSupport.so.23.0git  lib/libHLFIRDialect.so.23.0git  lib/libCUFDialect.so.23.0git  lib/libFIRDialect.so.23.0git  lib/libFIRDialectSupport.so.23.0git  lib/libMLIROpenACCDialect.so.23.0git  lib/libMLIRGPUDialect.so.23.0git  lib/libMLIRMemRefDialect.so.23.0git  lib/libMLIRArithUtils.so.23.0git  lib/libMLIRComplexDialect.so.23.0git  lib/libMLIRDialectUtils.so.23.0git  lib/libMLIRDLTIDialect.so.23.0git  lib/libMLIRMathDialect.so.23.0git  lib/libMLIRArithDialect.so.23.0git  lib/libMLIRInferIntRangeCommon.so.23.0git  lib/libMLIRShapedOpInterfaces.so.23.0git  lib/libMLIRCastInterfaces.so.23.0git  lib/libMLIRDialect.so.23.0git  lib/libMLIRLLVMDialect.so.23.0git  lib/libMLIRPtrMemorySpaceInterfaces.so.23.0git  lib/libMLIROpenACCMPCommon.so.23.0git  lib/libMLIRMemorySlotInterfaces.so.23.0git  lib/libMLIRMemOpInterfaces.so.23.0git  lib/libMLIRUBDialect.so.23.0git  lib/libMLIRValueBoundsOpInterface.so.23.0git  lib/libMLIRDestinationStyleOpInterface.so.23.0git  lib/libMLIRAnalysis.so.23.0git  lib/libMLIRControlFlowInterfaces.so.23.0git  lib/libMLIRSideEffectInterfaces.so.23.0git  lib/libMLIRDataLayoutInterfaces.so.23.0git  lib/libMLIRInferTypeOpInterface.so.23.0git  lib/libMLIRInferStridedMetadataInterface.so.23.0git  lib/libMLIRInferIntRangeInterface.so.23.0git  lib/libMLIRViewLikeInterface.so.23.0git  lib/libMLIRLoopLikeInterface.so.23.0git  lib/libMLIRFunctionInterfaces.so.23.0git  lib/libMLIRCallInterfaces.so.23.0git  lib/libMLIRPresburger.so.23.0git  lib/libMLIRIR.so.23.0git  lib/libMLIRSupport.so.23.0git  -lpthread  lib/libLLVMCore.so.23.0git  lib/libLLVMBinaryFormat.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCTypeInterfaces.cpp.o: In function `fir::acc::isDeviceDataImpl(mlir::Value)':
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x49): undefined reference to `cuf::hasDeviceDataAttr(mlir::Operation*)'
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x17b): undefined reference to `mlir::detail::TypeIDResolver<cuf::DataAttributeAttr, void>::id'
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x191): undefined reference to `cuf::DataAttributeAttr::getValue() const'
FIROpenACCTypeInterfaces.cpp:(.text._ZN3fir3accL16isDeviceDataImplEN4mlir5ValueE+0x198): undefined reference to `cuf::isDeviceDataAttribute(cuf::DataAttribute)'
tools/flang/lib/Optimizer/OpenACC/Support/CMakeFiles/FIROpenACCSupport.dir/FIROpenACCOpsInterfaces.cpp.o: In function `fir::acc::GlobalVariableModel::isDeviceData(mlir::Operation*) const':
FIROpenACCOpsInterfaces.cpp:(.text._ZNK3fir3acc19GlobalVariableModel12isDeviceDataEPN4mlir9OperationE+0x8): undefined reference to `cuf::getDataAttr(mlir::Operation*)'
FIROpenACCOpsInterfaces.cpp:(.text._ZNK3fir3acc19GlobalVariableModel12isDeviceDataEPN4mlir9OperationE+0x21): undefined reference to `cuf::DataAttributeAttr::getValue() const'
FIROpenACCOpsInterfaces.cpp:(.text._ZNK3fir3acc19GlobalVariableModel12isDeviceDataEPN4mlir9OperationE+0x28): undefined reference to `cuf::isDeviceDataAttribute(cuf::DataAttribute)'
collect2: error: ld returned 1 exit status
[8350/8424] Creating library symlink lib/libFIRAnalysis.so
[8351/8424] Linking CXX shared library lib/libFortranUtils.so.23.0git
[8352/8424] Linking CXX shared library lib/libFortranSemantics.so.23.0git
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=492.787668

```

</details>

https://github.com/llvm/llvm-project/pull/176219


More information about the Mlir-commits mailing list