fixed memory leakage caused by writer (#250)

* add print

* updated benchmark for more fine-grain options

* fixed increasing gpu memory leakage

* merge didnt save

* isort not working locally?

* checking isort order
This commit is contained in:
evonneng authored and GitHub committed 2022-08-04 19:22:29 -07:00
1 parent fce10e6bc8
commit 113b6d3faf
1 file changed
+1 -1
+1 -1
View File
@@ -68,7 +68,7 @@ def put_image(name, image: TensorType["H", "W", "C"], step: int):
if isinstance(name, EventName):
name = name.value
EVENT_STORAGE.append({"name": name, "write_type": EventType.IMAGE, "event": image, "step": step})
EVENT_STORAGE.append({"name": name, "write_type": EventType.IMAGE, "event": image.detach().cpu(), "step": step})
@check_main_thread