Skip to content

Commit 1cbd89b

Browse files
committed
review fixes
1 parent db60c25 commit 1cbd89b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tripy/nvtripy/backend/api/compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def process_arg_and_flag(top_arg_name, name, arg, steps):
240240
return arg, False
241241

242242
def process_arg(name, arg):
243-
processed, has_input = process_arg_and_flag(name, name, arg, ())
243+
processed, has_input = process_arg_and_flag(name, name, arg, tuple())
244244
if has_input:
245245
input_names.add(name)
246246
return processed

tripy/nvtripy/backend/api/executable.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def __init__(
8484
name_to_index = {name: idx for idx, name in enumerate(self._arg_names)}
8585

8686
def make_accessor(arg_index: int, steps: Tuple[Union[str, int], ...]):
87-
def accessor(inputs, idx=arg_index, stps=steps):
88-
v = inputs[idx]
89-
for s in stps:
87+
def accessor(inputs):
88+
v = inputs[arg_index]
89+
for s in steps:
9090
v = v[s]
9191
return v
9292

@@ -220,12 +220,13 @@ def add(a, b):
220220
for name in input_info_names:
221221
try:
222222
flattened_tensors.append(self._accessor_map[name](input_tensors))
223-
except Exception:
223+
except Exception as exc:
224224
raise_error(
225225
f"Missing runtime tensor for input `{name}`.",
226226
[
227227
"Ensure your provided collections include tensors for all compiled inputs.",
228228
f"Expected inputs: {input_info_names}",
229+
f"Note: Error was:\n{exc}",
229230
],
230231
)
231232
expected_devices = ["gpu" if isinstance(info, InputInfo) else "cpu" for info in self.input_infos.values()]

0 commit comments

Comments
 (0)