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
As a follow-up of #7061, I found some vector arithmetics gave me wrong numerical results:
import taichi as ti ti.init(arch=ti.cuda, print_kernel_llvm_ir_optimized=True, print_ir=True, real_matrix_scalarize=False) f = ti.ndarray(ti.math.vec4, 4) @ti.kernel def fill(arr: ti.types.ndarray()): v0 = ti.math.vec4([0.0, 1.0, 2.0, 3.0]) v1 = ti.math.vec4([1.0, 2.0, 3.0, 4.0]) v2 = ti.math.vec4([2.0, 3.0, 4.0, 5.0]) v3 = ti.math.vec4([4.0, 5.0, 6.0, 7.0]) arr[0] = v0 arr[1] = v1 arr[2] = v2 arr[3] = v3 @ti.kernel def vec_test(arr : ti.types.ndarray()): v0 = arr[0] v1 = arr[1] v2 = arr[2] v3 = arr[3] arr[0] = v0 * v1 + v2 arr[1] = v1 * v2 + v3 arr[2] = v0 * v2 + v3 fill(f) vec_test(f) print(f.to_numpy())
Screen output was
[[ 2. 6. 4. 9.] [16. 31. 7. 0.] [ 0. 0. 0. 0.] [ 0. 0. 0. 0.]]
Which is apparently unexpected.
The text was updated successfully, but these errors were encountered:
[bug] Fix numerical issue with TensorType'd arithmetics (#7526)
7469675
fix #7258
[bug] Fix numerical issue with TensorType'd arithmetics (taichi-dev#7526
7df2602
) fix taichi-dev#7258
jim19930609
Successfully merging a pull request may close this issue.
As a follow-up of #7061, I found some vector arithmetics gave me wrong numerical results:
Screen output was
Which is apparently unexpected.
The text was updated successfully, but these errors were encountered: