Skip to content

Encountered a compilation error with the function reshapeLikeShapesAreCompatible while building and running all MLIR tests #93423

Open
@Rayfxl

Description

@Rayfxl

Encountered an error when running the command “cmake --build . --target check-mlir”:

[4/2491] Building CXX object tools/mli....MLIRTensorDialect.dir/TensorOps.cpp.o
FAILED: tools/mlir/lib/Dialect/Tensor/IR/CMakeFiles/obj.MLIRTensorDialect.dir/TensorOps.cpp.o
......(missing the unimportant parts)
llvm-project/mlir/include/mlir/Dialect/Utils/ReshapeOpsUtils.h:137:10: error: call to function 'reshapeLikeShapesAreCompatible' that is neither visible in the template definition nor found by argument-dependent lookup
return reshapeLikeShapesAreCompatible(
......

My CMake version is 3.29.0 and my Clang version is 8. I'm running them on Ubuntu 18.04 in VMware Workstation.
I checked the header file 'ReshapeOpsUtils.h' and found that the function 'reshapeLikeShapesAreCompatible' was declared after the return statement, which might be the cause of the issue.
So, I moved the declaration of this function before the function that call it (verifyReshapeLikeTypes), and then there were no errors during compilation. I checked the source code of the project and it seemed there were no modifications at this place. Hence, I've reported this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions