Skip to content

Added support for HiFi build for ISS (simulator) under EXECUTORCH_BUILD_CADENCE cmake-config switch #3629

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

Closed
wants to merge 5 commits into from

Conversation

cad-audio
Copy link
Contributor

…LD_CADENCE cmake-config switch.

Copy link

pytorch-bot bot commented May 16, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3629

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

Hi @cad-audio!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 5, 2024
CMakeLists.txt Outdated
@@ -443,7 +443,9 @@ target_link_options_shared_lib(executorch)
# Real integrations should supply their own YAML file that only lists the
# operators necessary for the models that will run.
#
if(NOT EXECUTORCH_BUILD_CADENCE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than guarding this by NOT EXECUTORCH_BUILD_CADENCE flags i think we should maybe add a flag to not build portable ops. e.g. BUILD_EXECUTORCH_PORTABLE_OPS which is on by default and for cadence builds it can be disabled explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the PR as per this suggestion

CMakeLists.txt Outdated
@@ -417,7 +417,7 @@ target_link_libraries(executorch_no_prim_ops PRIVATE program_schema)
# Check if dl exists for this toolchain and only then link it.
find_library(DL_LIBRARY_EXISTS NAMES dl)
# Check if the library was found
if(DL_LIBRARY_EXISTS)
if(DL_LIBRARY_EXISTS AND NOT EXECUTORCH_BUILD_CADENCE)
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 please elaborate on why this change was needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

find_library() command sets DL_LIBRARY_EXISTS (incorrectly ?) for Cadence HiFi core.
It then fails link-time with 'xt-ld: cannot find libdl' error. So added that extra check.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would love this to not bound to any specific backend though. Maybe we can have an option EXECUTORCH_USE_DL and you guys can set it to False.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, that would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the PR as per this suggestion

CMakeLists.txt Outdated
#
cmake_dependent_option(
BUILD_EXECUTORCH_PORTABLE_OPS "Build portable_ops library." ON
"NOT EXECUTORCH_BUILD_CADENCE" OFF
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to tie these together right. I think in the build commands you have for Cadence you can just explicitly turn BUILD_EXECUTORCH_PORTABLE_OPS off? Same with EXECUTORCH_USE_DL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@tarun292
Copy link
Contributor

@cad-audio thanks for addressing the comments.

@facebook-github-bot
Copy link
Contributor

@mcremon-meta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mcremon-meta
Copy link
Contributor

@cad-audio still looking into it, but maybe a rebase would help to see if CI gets happier

@facebook-github-bot
Copy link
Contributor

@mcremon-meta merged this pull request in 8f12da1.

facebook-github-bot pushed a commit that referenced this pull request Jul 2, 2024
Differential Revision: D59294438
tarun292 added a commit that referenced this pull request Jul 2, 2024
Summary: ^

Differential Revision: D59294438
@cad-audio cad-audio deleted the dev branch July 24, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants