From 1110e3d89035e7df56422cd5c4c715a90e515f3f Mon Sep 17 00:00:00 2001
From: Izzy Putterman <iputterman@nvidia.com>
Date: Mon, 13 May 2024 17:22:20 -0700
Subject: [PATCH] Bug fixes

---
 .../genai-perf/genai_perf/llm_inputs/llm_inputs.py            | 4 ++--
 src/c++/perf_analyzer/genai-perf/genai_perf/llm_metrics.py    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/llm_inputs.py b/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/llm_inputs.py
index c3878b9c3..1431e9a65 100644
--- a/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/llm_inputs.py
+++ b/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/llm_inputs.py
@@ -579,7 +579,7 @@ def _convert_generic_json_to_trtllm_backend_format(
             text_input_headers,
         ) = cls._determine_json_feature_roles(dataset_json)
 
-        pa_json = cls._populate_trtllm_output_json(
+        pa_json = cls._populate_trtllm_backend_output_json(
             dataset_json,
             system_role_headers,
             user_role_headers,
@@ -819,7 +819,7 @@ def _populate_trtllm_output_json(
 
         return pa_json
 
-   @classmethod
+    @classmethod
     def _populate_trtllm_backend_output_json(
         cls,
         dataset_json: Dict,
diff --git a/src/c++/perf_analyzer/genai-perf/genai_perf/llm_metrics.py b/src/c++/perf_analyzer/genai-perf/genai_perf/llm_metrics.py
index 0928c75a9..4856a5d82 100755
--- a/src/c++/perf_analyzer/genai-perf/genai_perf/llm_metrics.py
+++ b/src/c++/perf_analyzer/genai-perf/genai_perf/llm_metrics.py
@@ -652,7 +652,7 @@ def _tokenize_openai_request_input(self, req_inputs: dict) -> List[int]:
     def _tokenize_response_outputs(self, res_outputs: dict) -> List[List[int]]:
         """Deserialize the response output and return tokenized outputs."""
         if self._service_kind == "triton" and self._response_format == ResponseFormat.TENSORRTLLM_BACKEND:
-            return self._tokenize_trtllm_response_output(req_inputs)
+            return self._tokenize_trtllm_response_output(res_outputs)
         elif self._service_kind == "triton":
             return self._tokenize_triton_response_output(res_outputs)
         elif self._service_kind == "openai":