MCPcopy Create free account
hub / github.com/apache/tvm / which

Function which

python/tvm/support/utils.py:261–279  ·  view source on GitHub ↗

Try to find full path of exec_name Parameters ---------- exec_name : str The executable name Returns ------- path : str The full path of executable if found, otherwise returns None

(exec_name)

Source from the content-addressed store, hash-verified

259
260
261def which(exec_name):
262 """Try to find full path of exec_name
263
264 Parameters
265 ----------
266 exec_name : str
267 The executable name
268
269 Returns
270 -------
271 path : str
272 The full path of executable if found, otherwise returns None
273 """
274 base_list = ["", "/bin"] + os.environ.get("PATH", "").split(os.pathsep)
275 for path in base_list:
276 full_path = os.path.join(path, exec_name)
277 if os.path.isfile(full_path) and os.access(full_path, os.X_OK):
278 return full_path
279 return None

Callers

nothing calls this directly

Calls 3

splitMethod · 0.45
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…