Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: expected type #2849

Open
Manav361 opened this issue Jun 17, 2024 · 1 comment
Open

Error: expected type #2849

Manav361 opened this issue Jun 17, 2024 · 1 comment

Comments

@Manav361
Copy link

Manav361 commented Jun 17, 2024

Problem Description:

When running the following command to optimize OPT.ll by adding O3 optimization:

opt -O3 -S -o OPT_O3.ll OPT.ll 

an error occurs indicating an error in expected type:

OPT.ll:12:63: warning: ptr type is only supported in -opaque-pointers mode
@om_external_constant_data_constant_733_opt = internal global ptr null, align 16
                                                              ^
opt: OPT.ll:12:63: error: expected type
@om_external_constant_data_constant_733_opt = internal global ptr null, align 16
                                                              ^                                                        ^

I have attached the OPT.ll file to reproduce the error by running the above mentioned command.
OPT.ll .

I generated OPT.ll using onnx-mlir tools and the commands are as follows:-

     onnx-mlir --EmitONNXIR $ONNX_MLIR_FILES_PATH/$filename.onnx &&
     onnx-mlir -O3 --EmitLLVMIR $ONNX_MLIR_FILES_PATH/$filename.onnx --shapeInformation -o $ONNX_MLIR_FILES_PATH/$filename  

The above mentioned command generated the OPT.onnx.mlir

mlir-translate $ONNX_MLIR_FILES_PATH/$filename.onnx.mlir --mlir-to-llvmir -o $filename.ll

and OPT.ll is generated by the above command

@AlexandreEichenberger
Copy link
Collaborator

Can you give us the original onnx file? Since we are mostly about lowering ONNX to LLVM, that is where we would like to see if something went wrong. Please a small reproducer if it's a large model.

Also, does it work if you issue the command that lower it directly to .so (namely -EmitLib). That is how we usually issue the command.

Tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants