Issue 71473
Summary [mlir][standalone] Can't import linalg after building
Labels mlir
Assignees
Reporter qzylalala
    Hi, I build standalone successfully, but get an error when I try to use Python APIs.
```python3
from mlir_standalone.dialects import linalg
```
When I ran this line of code, I got an error like this
```
build/python_packages/standalone/mlir_standalone/dialects/linalg/__init__.py", line 6, in <module>
    from ..._mlir_libs._mlirDialectsLinalg import *
ImportError: build/python_packages/standalone/mlir_standalone/_mlir_libs/_mlirDialectsLinalg.cpython-38-x86_64-linux-gnu.so: undefined symbol: mlirLinalgFillBuiltinNamedOpRegion
```
I find that `mlirLinalgFillBuiltinNamedOpRegion` appears three times in llvm/mlir

1. `llvm/mlir/include/mlir-c/Dialect/Linalg.h`
https://github.com/llvm/llvm-project/blob/bdb309c5fd4030ae6ff9d5114e3532d45a98a183/mlir/include/mlir-c/Dialect/Linalg.h#L20-L25
2. `llvm/mlir/lib/Bindings/Python/DialectLinalg.cpp`
https://github.com/llvm/llvm-project/blob/bdb309c5fd4030ae6ff9d5114e3532d45a98a183/mlir/lib/Bindings/Python/DialectLinalg.cpp#L15-L28
3. `llvm/mlir/lib/CAPI/Dialect/Linalg.cpp`
https://github.com/llvm/llvm-project/blob/bdb309c5fd4030ae6ff9d5114e3532d45a98a183/mlir/lib/CAPI/Dialect/Linalg.cpp#L16-L42

However, I'm not sure what's the problem actually.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to