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] Hide dtype and needs_grad from SNode #4308

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

strongoier
Copy link
Contributor

Related issue = #3782

Both of them only apply to leaf SNodes, i.e., fields. So users should get the info from a Field instance instead of a SNode. After this PR, dtype of SNode is hidden and needs_grad is removed.

@netlify
Copy link

netlify bot commented Feb 16, 2022

✔️ Deploy Preview for docsite-preview ready!

🔨 Explore the source changes: c4ef9f7

🔍 Inspect the deploy log: https://app.netlify.com/sites/docsite-preview/deploys/620d04dbf54ac90008590162

😎 Browse the preview: https://deploy-preview-4308--docsite-preview.netlify.app

@strongoier strongoier requested a review from ailzhang February 16, 2022 14:52
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!

@strongoier strongoier merged commit be74dbd into taichi-dev:master Feb 17, 2022
@strongoier strongoier deleted the remove-needs-grad branch February 17, 2022 03:25
@ifsheldon
Copy link

ifsheldon commented Jun 25, 2022

@ailzhang @strongoier I need needs_grad in my library stannum. This property dates back to #2498 and I had the conversation in the old slack channel of Taichi community. Removing this break my library silently....... Can you add it back and add a note in its inline doc that it was added in #2498 for a reason. And I cannot now write field.snode.ptr.has_grad() as a workaround.

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