Skip to content

Fixes to build samples with CMake - #161

Closed
marbre wants to merge 2 commits into
iree-org:masterfrom
marbre:cmake-2
Closed

marbre wants to merge 2 commits into
iree-org:masterfrom
marbre:cmake-2

Conversation

@marbre

@marbre marbre commented Nov 26, 2019 •

Copy link
Copy Markdown
Member

This PR complements #160. I implemented the generation of emod, h and cc files, by using add_custom_command to call iree-translate and generate_cc_embed_data.

At the moment, the iree_translate target to build the iree-translate executable still fails. For testing puposes, I added #file(COPY "${CMAKE_SOURCE_DIR}/iree/tools/iree-translate" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") to iree/tools/CMakeLists.txt and replaced COMMAND iree-translate by COMMAND "${CMAKE_BINARY_DIR}/iree/tools/iree-translate". This allowed me to verify that the additions to the CMakeLists.txt work as expected, using the iree-translate executable build with Bazel.

Prior to (maybe) merging this, I would like to discuss if a raw add_custom_command is the way to go or, taking comment #160 (comment) into account, if wrapping, e.g. in a CMake function, would be preferable.

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

#DEPENDS iree_translate
)

add_custom_command(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, we would prefer to wrap these in a iree_bytecode_module CMake function to reduce code duplication and make synchronizing between Bazel and CMake simpler.

For now, this is a step in the right direction and we can refactor later. Getting more parts of the project building with CMake is a great help :)

@marbre

marbre commented Nov 29, 2019

Copy link
Copy Markdown
Member Author

@googlebot I signed it!

@marbre

marbre commented Dec 10, 2019

Copy link
Copy Markdown
Member Author

@googlebot Rescan

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@marbre
marbre deleted the cmake-2 branch December 10, 2019 21:22
stellaraccident pushed a commit that referenced this pull request Sep 24, 2023
Handles tuple case, I resisted flipping to `auto` as that pipeline is
newer and the currrent nvgpu plugin keys off the value of the pipeline.

Fixes #140
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.

3 participants