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

[build] [refactor] Move metal source files to target locations #5208

Merged
merged 10 commits into from
Jun 21, 2022

Conversation

qiao-bo
Copy link
Collaborator

@qiao-bo qiao-bo commented Jun 20, 2022

Related issue = #4832

One of the series of steps to split source files from backends, this PR addresses Metal:

  • Move Metal runtime files to taichi/runtime/metal for target metal_runtime.
  • Move Metal program impl files to taichi/runtime/program_impls/metal for target metal_program_impl.
  • The remaining files in taichi/backends/metal (Device API files) belongs to the target metal_rhi.

The dependency relation is:
metal_rhi <- metal_runtime <- metal_program_impl <- core

In addition, this PR also breaks the usage of global file glob in Cmake core target (all sources were built under this target):

file(GLOB TAICHI_CORE_SOURCE
"taichi/*/*/*/*.cpp" "taichi/*/*/*.cpp" "taichi/*/*.cpp" "taichi/*.cpp"
"taichi/*/*/*/*.h" "taichi/*/*/*.h" "taichi/*/*.h" "taichi/*.h" "tests/cpp/task/*.cpp")

This allows us to be explicit on which files are needed by which target.

@netlify
Copy link

netlify bot commented Jun 20, 2022

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit 90b9334
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62b19ef2509001000834ba1f

@taichi-gardener taichi-gardener added this to In progress in CI/CD & Build & Tests Jun 20, 2022
@qiao-bo qiao-bo marked this pull request as ready for review June 20, 2022 11:01
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

LGTM!

cmake/TaichiCore.cmake Outdated Show resolved Hide resolved
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

LGTM!

taichi/backends/metal/CMakeLists.txt Outdated Show resolved Hide resolved
@qiao-bo qiao-bo merged commit 17da708 into taichi-dev:master Jun 21, 2022
CI/CD & Build & Tests automation moved this from In progress to Done Jun 21, 2022
@qiao-bo qiao-bo deleted the metal_rt branch June 21, 2022 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants