MCPcopy Create free account
hub / github.com/MatrixTeam-AI/RAIN / get_engine

Function get_engine

src/modeling/engine_model.py:13–20  ·  view source on GitHub ↗
(engine_file_path)

Source from the content-addressed store, hash-verified

11SKIP_ENGINE_MODEL_CHECK = True
12
13def get_engine(engine_file_path):
14 if os.path.exists(engine_file_path):
15 print(f"Loading engine from file {engine_file_path}...")
16 with open(engine_file_path, "rb") as f, trt.Runtime(TRT_LOGGER) as runtime:
17 return runtime.deserialize_cuda_engine(f.read())
18 else:
19 print(f"No file named {engine_file_path}! Please check the input.")
20 return None
21
22
23def numpy_to_torch_dtype(np_dtype):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected