()
| 165 | |
| 166 | |
| 167 | def cleanup(): |
| 168 | try: |
| 169 | import tinycudann as tcnn |
| 170 | except ImportError as e: |
| 171 | raise ImportError( |
| 172 | 'Cannot import tinycudann, please install by ' |
| 173 | '`pip install git+https://github.com/NVlabs/tiny-cuda-nn/' |
| 174 | '#subdirectory=bindings/torc`') from e |
| 175 | |
| 176 | gc.collect() |
| 177 | torch.cuda.empty_cache() |
| 178 | tcnn.free_temporary_memory() |
| 179 | |
| 180 | |
| 181 | def update_module_step(m, epoch, global_step): |