Add both absolute and relative rocm paths to include clang headers#3195
Add both absolute and relative rocm paths to include clang headers#3195hsharsha wants to merge 4 commits intor2.18-rocm-enhancedfrom
Conversation
i-chaochen
left a comment
There was a problem hiding this comment.
Seems CI still has these build errors?
[2026-03-13T01:22:02.471Z] //tensorflow/compiler/mlir/tools/kernel_gen/tests:buffer_deallocation.mlir.test FAILED TO BUILD
[2026-03-13T01:22:02.471Z] //tensorflow/compiler/mlir/tools/kernel_gen/tests:buffer_reuse.mlir.test FAILED TO BUILD
[2026-03-13T01:22:02.471Z] //tensorflow/compiler/mlir/tools/kernel_gen/tests:bufferize.mlir.test FAILED TO BUILD
[2026-03-13T01:22:02.471Z] //tensorflow/compiler/mlir/tools/kernel_gen/tests:copy_cleanup.mlir.test FAILED TO BUILD
[2026-03-13T01:22:02.471Z] //tensorflow/compiler/mlir/tools/kernel_gen/tests:embed_tf_framework.mlir.test FAILED TO BUILD
[2026-03-13T01:22:02.471Z] (Skipping other failed to build tests)
|
Failures are due to related to embedded device libs. Looks like data is not generated. |
|
@alekstheod Looks like r2.18 still has a mix of gcc and clang support. So -no-canonical-prefixes doesn't seems to work. |
|
This happens because config=rocm is not passed to cpu tests |
we shouldn't not run these gpu related tests in our CPU pipeline, isn't? I thought we already fixed this issue before? @mmakevic-amd does it ring any bell? |
These were marked manual and the code is refactored in r2.19 and above into amdgpu_backend.cc. For r2.18 it is still part of llvm_backend_lib.cc. This can be fixed for r2.18 passing config=rocm so that if_rocm_configured path in bazel is taken. |
240e421 to
395c6b3
Compare
Motivation
On MI355 with new 7.1.1 and 7.2 docker images TF 2.18 fails to build with clang include path not found. Adding rocm relative path /opt/rocm is not sufficient as it looks for absolute path as well.
Technical Details
Add both relative and absolute paths for clang headers to be included
Submission Checklist