-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[ir] Let the type of ExternalTensorExpression be an ndarray struct #8191
Merged
taichi-gardener
merged 5 commits into
gh/lin-hitonami/10/base
from
gh/lin-hitonami/10/head
Jun 19, 2023
Merged
[ir] Let the type of ExternalTensorExpression be an ndarray struct #8191
taichi-gardener
merged 5 commits into
gh/lin-hitonami/10/base
from
gh/lin-hitonami/10/head
Jun 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ghstack-poisoned]
This was referenced Jun 15, 2023
…y struct" [ghstack-poisoned]
…y struct" [ghstack-poisoned]
ailzhang
approved these changes
Jun 16, 2023
…y struct" <!-- copilot:all --> ### <samp>🤖 Generated by Copilot at 392b4c4</samp> ### Summary 🔧🧠🌐 <!-- 1. 🔧 - This emoji represents a tool or a wrench, and it can be used to indicate a refactoring or a modification of existing code or functionality. 2. 🧠 - This emoji represents a brain or intelligence, and it can be used to indicate a change that involves logic, reasoning, or type system. 3. 🌐 - This emoji represents a globe or the world, and it can be used to indicate a change that involves external or foreign data or interfaces, such as tensors or arrays. --> Refactor the `ExternalTensorExpression` class to use the `TypeFactory` singleton for creating types of external tensors. This improves the consistency and extensibility of the type system of Taichi. > _`TypeFactory` helps_ > _unify Taichi types for_ > _backend generation_ ### Walkthrough * Refactor the type system of external tensors using `TypeFactory` ([link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35R611), [link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL505-R506)) - Use `TypeFactory::create_vector_or_scalar_type` to create a pointer type for the external tensor data in `flatten` ([link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35R611)) - Use `TypeFactory::create_struct_type` to create a struct type for the external tensor metadata in `type_check` ([link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL505-R506)) [ghstack-poisoned]
…y struct" <!-- copilot:all --> ### <samp>🤖 Generated by Copilot at 392b4c4</samp> ### Summary 🔧🧠🌐 <!-- 1. 🔧 - This emoji represents a tool or a wrench, and it can be used to indicate a refactoring or a modification of existing code or functionality. 2. 🧠 - This emoji represents a brain or intelligence, and it can be used to indicate a change that involves logic, reasoning, or type system. 3. 🌐 - This emoji represents a globe or the world, and it can be used to indicate a change that involves external or foreign data or interfaces, such as tensors or arrays. --> Refactor the `ExternalTensorExpression` class to use the `TypeFactory` singleton for creating types of external tensors. This improves the consistency and extensibility of the type system of Taichi. > _`TypeFactory` helps_ > _unify Taichi types for_ > _backend generation_ ### Walkthrough * Refactor the type system of external tensors using `TypeFactory` ([link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35R611), [link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL505-R506)) - Use `TypeFactory::create_vector_or_scalar_type` to create a pointer type for the external tensor data in `flatten` ([link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35R611)) - Use `TypeFactory::create_struct_type` to create a struct type for the external tensor metadata in `type_check` ([link](https://github.com/taichi-dev/taichi/pull/8191/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL505-R506)) [ghstack-poisoned]
taichi-gardener
pushed a commit
that referenced
this pull request
Jun 19, 2023
ghstack-source-id: 8b5cea534c215bcacff943ff89294700ffa63ce3 Pull Request resolved: #8191
L2ncE
pushed a commit
to L2ncE/taichi
that referenced
this pull request
Jun 20, 2023
ghstack-source-id: 8b5cea534c215bcacff943ff89294700ffa63ce3 Pull Request resolved: taichi-dev#8191
PGZXB
pushed a commit
to PGZXB/taichi
that referenced
this pull request
Jul 13, 2023
ghstack-source-id: 8b5cea534c215bcacff943ff89294700ffa63ce3 Pull Request resolved: taichi-dev#8191
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Generated by Copilot at 392b4c4
Summary
🔧🧠🌐
Refactor the
ExternalTensorExpression
class to use theTypeFactory
singleton for creating types of external tensors. This improves the consistency and extensibility of the type system of Taichi.Walkthrough
TypeFactory
(link, link)TypeFactory::create_vector_or_scalar_type
to create a pointer type for the external tensor data inflatten
(link)TypeFactory::create_struct_type
to create a struct type for the external tensor metadata intype_check
(link)Stack from ghstack (oldest at bottom):