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

Add build flag for out-of-tree builds #1403

Merged
merged 1 commit into from
Sep 23, 2022
Merged

Conversation

qedawkins
Copy link
Collaborator

Needed for external builds when we have an out-of-tree build (e.g. onnx-mlir)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
option(TORCH_MLIR_OOT_BUILD "Specifies an out of tree build" OFF)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR TORCH_MLIR_OOT_BUILD)
Copy link
Contributor

@silvasean silvasean Sep 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reliably detect this without the option? I thought that mlir-hlo or torch-mlir-external-dialects had a way to do this.

cc @marbre

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mlir-hlo has MHLO_BUILD_EMBEDDED which, as far as I can tell, serves the same purpose and we use it in torch-mlir when building MHLO. For torch-mlir-external-dialects it uses the MLIR_FOUND flag which could work instead, but I don't know if that would affect other torch-mlir builds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename this to TORCH_MLIR_BUILD_EMBEDDED for consistency?

Also, generally you should not merge PR's without resolving all conversations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Was there an unresolved conversation here though?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this one is marked unresolved.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open an issue to track that feature request and we can see if there is a more general interest.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we at least rename the flag OUT_OF_TREE instead of OOT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #1416. Apologies if I've been difficult here. How should I avoid this in the future, as having code-review level problems show up in a merged PR is definitely not something that should be happening often?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case since I'm in a different time zone (CEST), it is somewhat expected for this to happen and we just have to be open to post-commit review. For "major" things like build flags letting it sit until all time zones can have a chance to chime in would be good.

I have to apologize, I didn't see that this was already merged when I left my comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reliably detect this without the option? I thought that mlir-hlo or torch-mlir-external-dialects had a way to do this.

cc @marbre

Sry, i am currently oof (and sick), but I can take a look after I return. I think we can handle this more consistently across the projects.

qedawkins pushed a commit to nod-ai/torch-mlir that referenced this pull request Oct 3, 2022
…lvm#1403)

Use builder based interface to generate Krnl loops for Scan.cpp and Pooling.cpp.

Signed-off-by: Whitney Tsang whitneyt@ca.ibm.com
qedawkins pushed a commit to nod-ai/torch-mlir that referenced this pull request Oct 3, 2022
The modification to use the builder based interface to generate Krnl loop is completed (llvm#1250, llvm#1283, llvm#1285, llvm#1292, llvm#1293, llvm#1303, llvm#1308, llvm#1314, llvm#1316, llvm#1317, llvm#1326, llvm#1403), and BuildKrnlLoop is no longer needed.

Signed-off-by: Whitney Tsang whitneyt@ca.ibm.com
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

Successfully merging this pull request may close these issues.

4 participants