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
When variables are re-declared each time through the loop like below, the memory can not be released.
z_temp = ti.Vector.field(3, dtype=ti.f32, shape=1000000) # the particle position zz_temp = ti.Vector.field(3, dtype=ti.f32, shape=1000000)
This code is well.
if __name__ == "__main__": while True: z_temp = ti.Vector.field(3, dtype=ti.f32, shape=1000000) # the particle position zz_temp = ti.Vector.field(3, dtype=ti.f32, shape=1000000)
This code is well too.
if __name__ == "__main__": with open("./data/scenes/demo_fluid_and_rigid.json", "r") as f: simulation_config = json.load(f) points, indices = getlines(simulation_config['configuration']) print(points) config = simulation_config['configuration'] ps = particle_systemv4.ParticleSystemV4(simulation_config) # add fluid and rigid # ps.add_fluid_and_rigid() wcsph = WCSPHV2(ps) # wcsph.step() # wcsph.step() while True: for i in range(5): wcsph.step()
Whenever you merge these two codes, you will get a memory leak.
The text was updated successfully, but these errors were encountered:
For each code, the memory usage of gpu is lower than 500MB, after merge them, the memory usage will be bigger than 24GB after some time steps.
Sorry, something went wrong.
Full code: git@github.com:jiajun-c/Ti-SPH.git
Branch: benchmark
command: python3 main_fluid_rigid.py
minimal code
import taichi as ti ti.init(ti.cuda) @ti.data_oriented class Leaker: def __init__(self): pass @ti.kernel def foo(self): pass @ti.kernel def bar(): pass if __name__ == "__main__": # leaker = Leaker() while True: # leaker.foo() bar() print("11") # bugger = ti.Vector.field(3, dtype=ti.f32, shape=1000000) # the particle position bugger1 = ti.field(dtype=ti.i32, shape=1000000)
No branches or pull requests
When variables are re-declared each time through the loop like below, the memory can not be released.
This code is well.
This code is well too.
Whenever you merge these two codes, you will get a memory leak.
The text was updated successfully, but these errors were encountered: