Commit 8f433fe
Andrew Reusch
Don't remove() TempDirectory in __del__ after atexit hook runs. (#5414)
* Use atexit to remove TempDirectory before interpreter shutdown.
* Can't rely on complex functions from __del__ anyway.
* Fixes warning message on my box:
Exception ignored in: <function TempDirectory.__del__ at 0x12be10680>
Traceback (most recent call last):
File ".../tvm/python/tvm/contrib/util.py", line 55, in __del__
File ".../tvm/python/tvm/contrib/util.py", line 51, in remove
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py", line 509, in rmtree
AttributeError: 'NoneType' object has no attribute 'path'1 parent 3ab3751 commit 8f433fe
1 file changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
38 | | - | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
42 | 56 | | |
43 | | - | |
| 57 | + | |
| 58 | + | |
44 | 59 | | |
45 | 60 | | |
46 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
47 | 67 | | |
48 | 68 | | |
49 | 69 | | |
| |||
72 | 92 | | |
73 | 93 | | |
74 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
75 | 98 | | |
76 | 99 | | |
77 | 100 | | |
| |||
0 commit comments