Skip to content

Commit 2d4978a

Browse files
authored
fix: clean up function never use in setup.py (#29061)
Signed-off-by: yihong0618 <[email protected]>
1 parent 6965a39 commit 2d4978a

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

setup.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,6 @@ def is_ninja_available() -> bool:
7474
return which("ninja") is not None
7575

7676

77-
def is_url_available(url: str) -> bool:
78-
from urllib.request import urlopen
79-
80-
status = None
81-
try:
82-
with urlopen(url) as f:
83-
status = f.status
84-
except Exception:
85-
return False
86-
return status == 200
87-
88-
8977
class CMakeExtension(Extension):
9078
def __init__(self, name: str, cmake_lists_dir: str = ".", **kwa) -> None:
9179
super().__init__(name, sources=[], py_limited_api=True, **kwa)
@@ -533,28 +521,6 @@ def get_nvcc_cuda_version() -> Version:
533521
return nvcc_cuda_version
534522

535523

536-
def get_gaudi_sw_version():
537-
"""
538-
Returns the driver version.
539-
"""
540-
# Enable console printing for `hl-smi` check
541-
output = subprocess.run(
542-
"hl-smi",
543-
shell=True,
544-
text=True,
545-
capture_output=True,
546-
env={"ENABLE_CONSOLE": "true"},
547-
)
548-
if output.returncode == 0 and output.stdout:
549-
return (
550-
output.stdout.split("\n")[2]
551-
.replace(" ", "")
552-
.split(":")[1][:-1]
553-
.split("-")[0]
554-
)
555-
return "0.0.0" # when hl-smi is not available
556-
557-
558524
def get_vllm_version() -> str:
559525
# Allow overriding the version. This is useful to build platform-specific
560526
# wheels (e.g. CPU, TPU) without modifying the source.

0 commit comments

Comments
 (0)