Skip to content

Commit 8819a03

Browse files
authored
[Others] Fix typo (#7280)
* typo * typo * typo * typo
1 parent 9d9d79c commit 8819a03

File tree

24 files changed

+70
-70
lines changed

24 files changed

+70
-70
lines changed

custom_ops/gpu_ops/fp8_gemm_with_cutlass/fp8_fp8_half_block_gemm.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ std::vector<paddle::DataType> CutlassFp8Fp8HalfBlockGemmFusedInferDtype(
220220
}
221221

222222
PD_BUILD_STATIC_OP(cutlass_fp8_fp8_half_block_gemm_fused)
223-
.Inputs({"x", "y", "x_sacle", "y_scale", paddle::Optional("bias")})
223+
.Inputs({"x", "y", "x_scale", "y_scale", paddle::Optional("bias")})
224224
.Attrs({"transpose_x: bool",
225225
"transpose_y: bool",
226226
"output_dtype: std::string",

custom_ops/xpu_ops/src/plugin/src/kernel/kunlun3cpp/quant2d_per_channel.xpu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ __global__ void quant2d_per_channel_cached(
694694
constexpr int PINGPONG_LM_LEN = 512;
695695
constexpr int LM_LEN = PINGPONG_LM_LEN * 2;
696696
constexpr int INPUT_BUF_LEN = 4 * 1024;
697-
constexpr int OUPUT_BUF_LEN = 2 * 1024;
697+
constexpr int OUTPUT_BUF_LEN = 2 * 1024;
698698
constexpr int INPUT_MAX_LEN = INPUT_BUF_LEN / sizeof(TX);
699-
constexpr int OUTPUT_MAX_LEN = OUPUT_BUF_LEN / sizeof(TY);
699+
constexpr int OUTPUT_MAX_LEN = OUTPUT_BUF_LEN / sizeof(TY);
700700
constexpr int INPUT_SIZE =
701701
INPUT_MAX_LEN < OUTPUT_MAX_LEN ? INPUT_MAX_LEN : OUTPUT_MAX_LEN;
702702
__simd__ __shared__ float

fastdeploy/engine/common_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ def _zmq_send_generated_tokens(self):
20162016
if batch_data:
20172017
self.send_response_server.send_response(None, batch_data, worker_pid=wpid)
20182018
except Exception as e:
2019-
self.llm_logger.error(f"Unexcepted error happend: {e}, {traceback.format_exc()!s}")
2019+
self.llm_logger.error(f"Unexpected error happend: {e}, {traceback.format_exc()!s}")
20202020

20212021
def _decode_process_splitwise_requests(self):
20222022
"""

fastdeploy/entrypoints/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def _receive_output(self):
139139
continue
140140
self.req_output[request_id].add(result)
141141
except Exception as e:
142-
llm_logger.error(f"Unexcepted error happened: {e}, {traceback.format_exc()!s}")
142+
llm_logger.error(f"Unexpected error happened: {e}, {traceback.format_exc()!s}")
143143

144144
def generate(
145145
self,

fastdeploy/entrypoints/openai/v1/serving_chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ async def _build_full_response(
331331
# api_server_logger.debug(f"Client {ctx.request_id} received: {data}")
332332
# The logprob for handling the response
333333
choices: list[ChatCompletionResponseChoice] = []
334-
for choice_index, respose in accumula_output_map.items():
335-
choice = await self._create_chat_completion_choice(respose, ctx)
334+
for choice_index, response in accumula_output_map.items():
335+
choice = await self._create_chat_completion_choice(response, ctx)
336336
choices.append(choice)
337337

338338
choices = sorted(choices, key=lambda x: x.index)

fastdeploy/entrypoints/openai/v1/serving_completion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ async def _build_full_response(
302302
try:
303303
choices: List[CompletionResponseChoice] = []
304304

305-
for choice_index, respose_list in accumula_output_map.items():
305+
for choice_index, response_list in accumula_output_map.items():
306306
response: RequestOutput | None = None
307-
for response_current in respose_list:
307+
for response_current in response_list:
308308
if response_current.error_code != 200:
309309
raise ValueError("{}".format(response_current.error_msg))
310310
if response is None:

fastdeploy/eplb/experts_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def __init__(
112112
self.model_tokens_per_expert_stats_list = np.ones(
113113
(self.num_hidden_layers, self.num_logical_experts), dtype=np.int32
114114
)
115-
self.caculate_expert_rank_table(True)
115+
self.calculate_expert_rank_table(True)
116116

117117
self.dp_rank_address = None
118118
self.need_allgather_load_weight_result = False
@@ -270,14 +270,14 @@ def listen_rearrange_expert_signal(self):
270270
if signal_update_weight_from_disk_array.value[0] == 1:
271271
# step 2. async load weight: disk -> memory
272272
self.model_tokens_per_expert_stats_list[:] = shm_all_experts_token_stats.value[:]
273-
self.caculate_expert_rank_table()
273+
self.calculate_expert_rank_table()
274274
self.update_weight_from_disk()
275275
signal_update_weight_from_disk_array.value[0] = 0
276276
time.sleep(0.5)
277277

278-
def caculate_expert_rank_table(self, is_init=False):
278+
def calculate_expert_rank_table(self, is_init=False):
279279
"""
280-
caculate_expert_rank_table
280+
calculate_expert_rank_table
281281
"""
282282
num_groups = self.num_groups
283283
num_nodes = self.num_nodes

fastdeploy/input/ernie4_5_vl_processor/utils/io_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def get_filename(url=None):
8080
tid = threading.get_ident()
8181

8282
# 去掉后缀,防止save-jpg报错
83-
image_filname = f"{t.year}-{t.month:02d}-{t.day:02d}-{pid}-{tid}-{md5_hash}"
84-
return image_filname
83+
image_filename = f"{t.year}-{t.month:02d}-{t.day:02d}-{pid}-{tid}-{md5_hash}"
84+
return image_filename
8585

8686

8787
def get_downloadable(

fastdeploy/model_executor/ops/triton_ops/triton_utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -702,20 +702,20 @@ def decorator(*args, **kwargs):
702702
const_args = [f"{{{ele}}}" for ele in const_args]
703703
const_args = ",".join(const_args)
704704

705-
lanuch_grid = list(self.grid)
706-
for i in range(len(lanuch_grid)):
707-
ele = lanuch_grid[i]
705+
launch_grid = list(self.grid)
706+
for i in range(len(launch_grid)):
707+
ele = launch_grid[i]
708708
if isinstance(ele, str):
709709
for key in const_hint_dict.keys():
710710
if key in ele:
711711
ele = ele.replace(key, f"{{{key}}}")
712712
else:
713713
ele = str(ele)
714714

715-
lanuch_grid[i] = ele
716-
if len(lanuch_grid) < 3:
717-
lanuch_grid += ["1"] * (3 - len(lanuch_grid))
718-
lanuch_grid = ",".join(lanuch_grid)
715+
launch_grid[i] = ele
716+
if len(launch_grid) < 3:
717+
launch_grid += ["1"] * (3 - len(launch_grid))
718+
launch_grid = ",".join(launch_grid)
719719

720720
op_dict = {"op_name": op_name, "reset_zero_when_tune": ""}
721721
op_dict["triton_kernel_args"] = ",".join(modified_arg_exclude_constexpr)
@@ -745,7 +745,7 @@ def decorator(*args, **kwargs):
745745
+ f"""--out-name {op_name}_kernel """
746746
+ """ -w {num_warps} -ns {num_stages} """
747747
+ f""" -s"{address_hint} {value_hint} {const_args}" """
748-
+ f""" -g "{lanuch_grid}" """
748+
+ f""" -g "{launch_grid}" """
749749
)
750750
all_tune_config = [{key: value} for key, value in self.tune_config.items()]
751751
if len(all_tune_config) == 0:

fastdeploy/model_executor/ops/triton_ops/triton_utils_v2.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def decorator(*args, **kwargs):
156156
x_list = []
157157
const_args = [self.arg_names[i] for i in self.constexprs]
158158

159-
decalare_arg_exclude_constexpr = list(self.arg_exclude_constexpr)
159+
declare_arg_exclude_constexpr = list(self.arg_exclude_constexpr)
160160
passed_arg_exclude_constexpr = list(self.arg_exclude_constexpr)
161161

162162
const_hint_dict = {}
@@ -177,8 +177,8 @@ def decorator(*args, **kwargs):
177177
else:
178178
dtypes.append(paddle.int8)
179179
passed_arg_exclude_constexpr[i] = "(CUdeviceptr)(nullptr)"
180-
decalare_arg_exclude_constexpr[i] = (
181-
"const paddle::optional<paddle::Tensor>&" + decalare_arg_exclude_constexpr[i]
180+
declare_arg_exclude_constexpr[i] = (
181+
"const paddle::optional<paddle::Tensor>&" + declare_arg_exclude_constexpr[i]
182182
)
183183
elif i in self.constexprs:
184184
if isinstance(ele, bool):
@@ -193,9 +193,9 @@ def decorator(*args, **kwargs):
193193
else:
194194
x_list.append(ele)
195195
if isinstance(ele, int):
196-
decalare_arg_exclude_constexpr[i] = "const int64_t " + decalare_arg_exclude_constexpr[i]
196+
declare_arg_exclude_constexpr[i] = "const int64_t " + declare_arg_exclude_constexpr[i]
197197
elif isinstance(ele, float):
198-
decalare_arg_exclude_constexpr[i] = "const float " + decalare_arg_exclude_constexpr[i]
198+
declare_arg_exclude_constexpr[i] = "const float " + declare_arg_exclude_constexpr[i]
199199
else:
200200
assert False, f"Unsupported arg type: {type(ele)} for arg '{self.arg_names[i]}'"
201201

@@ -215,9 +215,9 @@ def decorator(*args, **kwargs):
215215
const_args = [f"{{{ele}}}" for ele in const_args]
216216
const_args = ",".join(const_args)
217217

218-
lanuch_grid = list(self.grid)
219-
for i in range(len(lanuch_grid)):
220-
ele = lanuch_grid[i]
218+
launch_grid = list(self.grid)
219+
for i in range(len(launch_grid)):
220+
ele = launch_grid[i]
221221
if isinstance(ele, str):
222222
keys = list(const_hint_dict.keys())
223223
keys.sort(key=len, reverse=True)
@@ -226,15 +226,15 @@ def decorator(*args, **kwargs):
226226
ele = ele.replace(key, f"{const_hint_dict[key]}")
227227
else:
228228
ele = str(ele)
229-
lanuch_grid[i] = ele
229+
launch_grid[i] = ele
230230

231-
if len(lanuch_grid) < 3:
232-
lanuch_grid += ["1"] * (3 - len(lanuch_grid))
233-
lanuch_grid = ",".join(lanuch_grid)
231+
if len(launch_grid) < 3:
232+
launch_grid += ["1"] * (3 - len(launch_grid))
233+
launch_grid = ",".join(launch_grid)
234234

235235
op_dict = {"op_name": op_name}
236236
op_dict["triton_kernel_args"] = ",".join(passed_arg_exclude_constexpr)
237-
op_dict["tensor_and_attr"] = ",".join(decalare_arg_exclude_constexpr)
237+
op_dict["tensor_and_attr"] = ",".join(declare_arg_exclude_constexpr)
238238

239239
paddle_custom_op_file_path = f"{generated_dir}/{op_name}.cu"
240240
so_path = find_so_path(generated_dir, python_package_name)
@@ -257,7 +257,7 @@ def decorator(*args, **kwargs):
257257
+ f"""--out-name {op_name}_kernel """
258258
+ """ -w {num_warps} -ns {num_stages} """
259259
+ f""" -s"{address_hint} {value_hint} {const_args}" """
260-
+ f""" -g "{lanuch_grid}" """
260+
+ f""" -g "{launch_grid}" """
261261
)
262262

263263
all_tune_config = [const_hint_dict]

0 commit comments

Comments
 (0)