MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / main

Function main

scripts/package_trt_llm.py:113–138  ·  view source on GitHub ↗
(
    src_dir: Path,
    liblist: LibListConfig,
    archs: Iterable[str],
    sm_arch_win: str,
    addr: str,
    commit_id: str,
    clean: bool,
    package: str,
)

Source from the content-addressed store, hash-verified

111
112
113def main(
114 src_dir: Path,
115 liblist: LibListConfig,
116 archs: Iterable[str],
117 sm_arch_win: str,
118 addr: str,
119 commit_id: str,
120 clean: bool,
121 package: str,
122):
123
124 if clean:
125 _clean_files(src_dir, liblist.cleanfiles)
126
127 if package:
128 git_path = src_dir / ".git"
129 if git_path.exists():
130 shutil.rmtree(git_path)
131 logging.debug(f"Removed directory: {git_path}")
132 else:
133 logging.warning(f"git path not exist, ignored: {git_path}")
134 if clean or package:
135 _check_banned_symbols(src_dir, symbols=("__LUNOWUD", ))
136
137 if package:
138 compress(Path.cwd() / package, Path(src_dir))
139
140
141if __name__ == "__main__":

Callers 1

package_trt_llm.pyFile · 0.70

Calls 5

_clean_filesFunction · 0.85
_check_banned_symbolsFunction · 0.85
compressFunction · 0.85
debugMethod · 0.45
warningMethod · 0.45

Tested by

no test coverage detected