Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/llm-api/quickstart_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ def setup_llm(args, **kwargs):
enable_iter_perf_stats=args.print_iter_log,
torch_compile_config=TorchCompileConfig(
enable_fullgraph=args.use_torch_compile,
enable_inductor=args.use_torch_compile,
enable_piecewise_cuda_graph= \
args.use_piecewise_cuda_graph)
if args.use_torch_compile else None,
Expand Down
3 changes: 2 additions & 1 deletion tensorrt_llm/_torch/compilation/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ def __call__(self, gm: GraphModule,
)
return gm

self.input_num_tokens = None
for node in gm.graph.nodes:
if node.op == "placeholder":
if node.name == "l_input_ids_":
if node.name in ["l_input_ids_", "l_kwargs_input_ids_"]:
example_value = node.meta["example_value"]
assert isinstance(example_value, FakeTensor)
self.input_num_tokens = example_value.shape[0]
Expand Down
Loading