Skip to content

Commit 73409ae

Browse files
committed
correct fabric imports.py
1 parent 2548f1d commit 73409ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lightning/fabric/utilities/imports.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
"""General utilities."""
15+
import functools
1516
import operator
1617
import platform
1718
import sys
@@ -36,7 +37,7 @@
3637

3738

3839
@functools.lru_cache(maxsize=1)
39-
def _lightning_habana_available() -> bool:
40-
# This is defined as a function instead of a constant to avoid circular imports, because `lightning_habana`
40+
def _lightning_xpu_available() -> bool:
41+
# This is defined as a function instead of a constant to avoid circular imports, because `lightning_xpu`
4142
# also imports Lightning
42-
return bool(RequirementCache("lightning-habana")) and _try_import_module("lightning_habana")
43+
return bool(RequirementCache("lightning-xpu")) and _try_import_module("lightning_xpu")

0 commit comments

Comments
 (0)