Build llvm with torch-mlir & mlir

Is there any way to build (torch-mlir) project under the umbrella of llvm project with mlir? what will be the procedure?

It’s not clear to me what is it that you’re asking: torch-mlir is a project built using MLIR and so you can’t build torch-mlir without MLIR in the first place. The build instructions for torch-mlir are building it bundled with MLIR.

Sorry if I wasn’t very clear, what I wish to understand how to build torch-mlir as part of llvm-project (i.e., in-tree). Just the way mlir is within the llvm-project root directory, should I copy the entire torch-mlir directory under llvm-project? And then I will follow the in-tree build method available on the page you pointed out?

(The reason I want to do it this way, is because I want to modify the torch-mlir codebase and lower it to LLVM IR)

That should be exactly the link I sent then?

Understood. Thanks.