We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Using the opengl or vulkan backends result in nonsensical values even in the most basic examples. CPU and cuda work fine.
To Reproduce
import taichi as ti ti.init(arch=ti.vulkan) x = ti.ndarray(ti.float32, shape=(), needs_grad=True) y = ti.ndarray(ti.float32, shape=(), needs_grad=True) x[None] = 2.0 @ti.kernel def forward(x: ti.types.ndarray(ti.float32, 0, needs_grad=True), y: ti.types.ndarray(ti.float32, 0, needs_grad=True)): y[None] = x[None] with ti.ad.Tape(loss=y): forward(x, y) print(x.to_numpy()) # expect 2 print(y.to_numpy()) # expect 2 print(x.grad.to_numpy()) # expect 1
Log/Screenshots
$ python my_sample_code.py [Taichi] version 1.8.0, llvm 15.0.4, commit 52b24f3e, linux, python 3.8.8 [Taichi] Starting on arch=vulkan 4.0 0.0 0.0
Additional comments I'm not sure if this is a known limitation, but if it is, it would be helpful if it was mentioned somewhere in the docs
The text was updated successfully, but these errors were encountered:
It's suprising that ad.Tape works at all on ndarrays.... So we are looking into why it worked on LLVM backends first.
ad.Tape is designed for use with ti.fields. For ndarray autodiff the intended usecase is to use it as a custom function and use Torch's graph
ti.field
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Using the opengl or vulkan backends result in nonsensical values even in the most basic examples. CPU and cuda work fine.
To Reproduce
Log/Screenshots
Additional comments
I'm not sure if this is a known limitation, but if it is, it would be helpful if it was mentioned somewhere in the docs
The text was updated successfully, but these errors were encountered: