Description
Hi there, we're currently working on a graph-compiler based on [some front graph]-mhlo-linalg-[some backend]. When we tried to use mhlo as a third party dependency in another repo as following BUILD:
cc_library(
name = "utils",
srcs = [
"utils.cc",
],
hdrs = [
"utils.h",
],
deps = [
"@mlir-hlo//stablehlo:stablehlo_ops",
"@mlir-hlo//stablehlo:chlo_ops",
"@mlir-hlo//stablehlo:vhlo_ops",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Dialect",
"@llvm-project//mlir:Support"
]
An error occured in bazel build //target:this rule is missing dependency declarations for the following files.
I found out this error may caused by attr strip_include_prefix = "." in BUILD file, and the extensive use of this attribute seems due to file includes mainly for generated files.
https://github.com/tensorflow/mlir-hlo/blob/master/mhlo/IR/hlo_ops.cc#L87
Once all file includes are in full path, the problem is solved.
We are wondering that are these file includes written by some certain purpose for CMAKE(we tried bazel only), or they are just some known issues need to be rewrite in the future?
Activity