MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / append_preimport

Method append_preimport

tools/Polygraphy/polygraphy/tools/script.py:360–368  ·  view source on GitHub ↗

Append a line to the pre-import prefix of the script. Args: line (str): The line to append.

(self, line)

Source from the content-addressed store, hash-verified

358 self.runners.append(runner_str)
359
360 def append_preimport(self, line):
361 """
362 Append a line to the pre-import prefix of the script.
363
364 Args:
365 line (str): The line to append.
366 """
367 line = ensure_safe(line).unwrap()
368 self.preimport.append(line)
369
370 def append_suffix(self, line):
371 """

Callers 1

add_to_script_implMethod · 0.80

Calls 3

ensure_safeFunction · 0.85
unwrapMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected