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

[v1.7.0][Bug] Fix Quant Taichi error with "benchmark_advect" #8374

Closed
jim19930609 opened this issue Oct 24, 2023 · 1 comment
Closed

[v1.7.0][Bug] Fix Quant Taichi error with "benchmark_advect" #8374

jim19930609 opened this issue Oct 24, 2023 · 1 comment
Milestone

Comments

@jim19930609
Copy link
Contributor

jim19930609 commented Oct 24, 2023

Reproduce

cd quantaichi/eulerian_fluid/
python3 benchmark_advect.py

Log

[Taichi] version 1.7.0, llvm 15.0.4, commit fd46a563, linux, python 3.10.12
cmd args: Namespace(dim=2, res=512, debug=False, quant_all=False, quant_v=False, quant_dye=False, dye_type=0, no_gui=False, visualize=False, advect='mc', frames=100000, benchmark_id=0)
[Taichi] Starting on arch=cuda
Traceback (most recent call last):
  File "/home/taichigraphics/workspace/TaichiRepos/Release/quantaichi/eulerian_fluid/benchmark_advect.py", line 164, in <module>
    solver.advect()
  File "/home/taichigraphics/workspace/TaichiRepos/Release/quantaichi/eulerian_fluid/benchmark_advect.py", line 118, in advect
    self.advection_op.advect(self.v, self.dye[0], self.dye[1], self.dye[2],
  File "/home/taichigraphics/workspace/TaichiRepos/Release/quantaichi/eulerian_fluid/advection.py", line 21, in advect
    self.advect_operator(*args)
  File "/home/taichigraphics/workspace/TaichiRepos/Release/taichi/python/taichi/lang/kernel_impl.py", line 1168, in __call__
    raise type(e)("\n" + str(e)) from None
taichi.lang.exception.TaichiTypeError: 
File "/home/taichigraphics/workspace/TaichiRepos/Release/quantaichi/eulerian_fluid/advection.py", line 82, in advect_mc:
                if not cond:
                ^^^^^^^^^^^^
`if` conditions must be an integer; found [Tensor (3) u1]. Consider using `if x != 0` instead of `if x` for float values.
@jim19930609 jim19930609 added this to the v1.7.0 milestone Oct 24, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in Taichi Lang Oct 24, 2023
@jim19930609
Copy link
Contributor Author

Fix in: taichi-dev/quantaichi#8

@github-project-automation github-project-automation bot moved this from Untriaged to Done in Taichi Lang Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant