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

[Autodiff] Implement ti.ad.no_grad to skip autograd #4751

Merged
merged 2 commits into from
Apr 13, 2022
Merged

[Autodiff] Implement ti.ad.no_grad to skip autograd #4751

merged 2 commits into from
Apr 13, 2022

Conversation

shwnyao
Copy link
Contributor

@shwnyao shwnyao commented Apr 9, 2022

Related issue = #4747

The implementation should be expressive enough, which is to replace the auto grad function with an empty function.

This is my first PR to an open source project! While it's certainly exciting to me, please excuse me if any requirements are missing.
Another issue when I'm writing tests is that while the contribution guideline requires using @ti.test to decorate the test functions, all tests for the Autodiff module is prepended with the @test_utils.test decorator. I decided to follow the convention and if that is not recommended, please let me know too.

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2022

CLA assistant check
All committers have signed the CLA.

@netlify
Copy link

netlify bot commented Apr 9, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 74d79c2
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62554201ec60380008c5488f
😎 Deploy Preview https://deploy-preview-4751--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.

@shwnyao shwnyao changed the title [Lang] [Autodiff]: implement ti.ad.no_grad to skip autograd [Lang] [Autodiff] implement ti.ad.no_grad to skip autograd Apr 9, 2022
@shwnyao shwnyao changed the title [Lang] [Autodiff] implement ti.ad.no_grad to skip autograd [Lang] [Autodiff] Implement ti.ad.no_grad to skip autograd Apr 9, 2022
@shwnyao shwnyao changed the title [Lang] [Autodiff] Implement ti.ad.no_grad to skip autograd [Autodiff] Implement ti.ad.no_grad to skip autograd Apr 9, 2022
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.

Nice work!

python/taichi/ad.py Outdated Show resolved Hide resolved
tests/python/test_customized_grad.py Show resolved Hide resolved
@erizmr erizmr merged commit dc3e96c into taichi-dev:master Apr 13, 2022
k-ye pushed a commit to k-ye/taichi that referenced this pull request May 5, 2022
* [Autodiff]: implement ti.ad.no_gradto skip autograd

* [Autodiff]: update ti.ad.no_grad tests and remove comment
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