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

[Lang] MatrixNdarray refactor part1: Refactor Taichi kernel argument to use TensorType #5881

Merged
merged 16 commits into from
Aug 29, 2022

Conversation

jim19930609
Copy link
Contributor

Related issue = #5873, #5819

This PR belongs to "Part ②" in #5873.

@netlify
Copy link

netlify bot commented Aug 25, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit a89cc26
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/630c490fe1636f00088b929e
😎 Deploy Preview https://deploy-preview-5881--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jim19930609 jim19930609 changed the title [Lang] MatrixNdarray refactor part1: Refactored Taichi kernel argument to use TensorType [Lang] MatrixNdarray refactor part1: Refactor Taichi kernel argument to use TensorType Aug 26, 2022
@AD1024
Copy link
Contributor

AD1024 commented Aug 26, 2022

LGTM!
Just wondering will there be a test case for passing TensorType arguments to a kernel?

@jim19930609
Copy link
Contributor Author

jim19930609 commented Aug 27, 2022

LGTM! Just wondering will there be a test case for passing TensorType arguments to a kernel?

Thanks! Basically this is a refactor PR and we're relying on existing unit tests for verification purpose. The entrance to kernel argument construction is decl_ndarray_arg:

image

and decl_ndarray_arg is called whenever the compiler parses a ti.types.ndarray() in the argument annotation.

image

Therefore existing MatrixNdarray test cases such as those in test_ndarray.py should be able to cover this change:

image

@jim19930609 jim19930609 requested a review from AD1024 August 29, 2022 03:29
Copy link
Contributor

@AD1024 AD1024 left a comment

Choose a reason for hiding this comment

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

LGTM!

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!

taichi/program/callable.h Show resolved Hide resolved
@jim19930609 jim19930609 merged commit 256c7e8 into taichi-dev:master Aug 29, 2022
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