Skip to content

Commit 13cc024

Browse files
committed
chore: Deepcopy other objects
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 8d8cbfd commit 13cc024

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

py/torch_tensorrt/ts/_compile_spec.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,13 @@ def _parse_input_signature(input_signature: Any):
226226

227227
def _parse_compile_spec(compile_spec_: Dict[str, Any]) -> _ts_C.CompileSpec:
228228
# TODO: Use deepcopy to support partial compilation of collections
229-
compile_spec = compile_spec_
229+
compile_spec = {}
230+
for k, v in compile_spec_.items():
231+
if k != "calibrator":
232+
compile_spec[k] = deepcopy(v)
233+
else:
234+
compile_spec[k] = v
235+
230236
info = _ts_C.CompileSpec()
231237

232238
if len(compile_spec["inputs"]) > 0:

0 commit comments

Comments
 (0)