-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Memory leak #8497
Comments
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. |
Full code: [email protected]: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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: