Commit 4986b43
authored
use importlib machinery to check for habana plugin (#1910)
* use importlib machinery to check for habana plugin
Not all environments have pip, and even fewer have grep (e.g. Windows
platforms), and the shell command is relatively costly for
larger environments. Instead, use the stdlib infrastructure with
`importlib` to identify the version of `habana-torch-plugin` if it is
installed.
* use direct import rather than transitive1 parent 61c0375 commit 4986b43
1 file changed
+10
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
79 | 78 | | |
80 | | - | |
| 79 | + | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
0 commit comments