Skip to content

Commit 81f3904

Browse files
committed
chore: run ruff-format according to vllm-project#14492
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
1 parent c7740fb commit 81f3904

File tree

27 files changed

+1231
-855
lines changed

27 files changed

+1231
-855
lines changed

collect_env.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,13 @@ def get_vllm_version():
277277
if __version__ == "dev":
278278
return "N/A (dev)"
279279

280-
if len(__version_tuple__) == 4: # dev build
281-
git_sha = __version_tuple__[-1][1:] # type: ignore
280+
if len(__version_tuple__) == 4: # dev build
281+
git_sha = __version_tuple__[-1][1:] # type: ignore
282282
return f"{__version__} (git sha: {git_sha}"
283283

284284
return __version__
285285

286+
286287
def summarize_vllm_build_flags():
287288
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.
288289
return 'CUDA Archs: {}; ROCm: {}; Neuron: {}'.format(
@@ -517,13 +518,12 @@ def is_xnnpack_available():
517518
else:
518519
return "N/A"
519520

521+
520522
def get_env_vars():
521523
env_vars = ''
522-
secret_terms=('secret', 'token', 'api', 'access', 'password')
523-
report_prefix = ("TORCH", "NCCL", "PYTORCH",
524-
"CUDA", "CUBLAS", "CUDNN",
525-
"OMP_", "MKL_",
526-
"NVIDIA")
524+
secret_terms = ('secret', 'token', 'api', 'access', 'password')
525+
report_prefix = ("TORCH", "NCCL", "PYTORCH", "CUDA", "CUBLAS", "CUDNN",
526+
"OMP_", "MKL_", "NVIDIA")
527527
for k, v in os.environ.items():
528528
if any(term in k.lower() for term in secret_terms):
529529
continue
@@ -534,6 +534,7 @@ def get_env_vars():
534534

535535
return env_vars
536536

537+
537538
def get_env_info():
538539
run_lambda = run
539540
pip_version, pip_list_output = get_pip_packages(run_lambda)

csrc/cutlass_extensions/vllm_cutlass_library_extension.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ class MixedInputKernelScheduleType(enum.Enum):
2626
**{
2727
VLLMDataType.u4b8: "u4b8",
2828
VLLMDataType.u8b128: "u8b128",
29-
}
29+
},
3030
}
3131

3232
VLLMDataTypeTag: dict[Union[VLLMDataType, DataType], str] = {
3333
**DataTypeTag, # type: ignore
3434
**{
3535
VLLMDataType.u4b8: "cutlass::vllm_uint4b8_t",
3636
VLLMDataType.u8b128: "cutlass::vllm_uint8b128_t",
37-
}
37+
},
3838
}
3939

4040
VLLMDataTypeSize: dict[Union[VLLMDataType, DataType], int] = {
4141
**DataTypeSize, # type: ignore
4242
**{
4343
VLLMDataType.u4b8: 4,
4444
VLLMDataType.u8b128: 8,
45-
}
45+
},
4646
}
4747

4848
VLLMDataTypeVLLMScalarTypeTag: dict[Union[VLLMDataType, DataType], str] = {
@@ -66,15 +66,13 @@ class MixedInputKernelScheduleType(enum.Enum):
6666
DataType.f32: "at::ScalarType::Float",
6767
}
6868

69-
VLLMKernelScheduleTag: dict[Union[
70-
MixedInputKernelScheduleType, KernelScheduleType], str] = {
71-
**KernelScheduleTag, # type: ignore
72-
**{
73-
MixedInputKernelScheduleType.TmaWarpSpecialized:
74-
"cutlass::gemm::KernelTmaWarpSpecialized",
75-
MixedInputKernelScheduleType.TmaWarpSpecializedPingpong:
76-
"cutlass::gemm::KernelTmaWarpSpecializedPingpong",
77-
MixedInputKernelScheduleType.TmaWarpSpecializedCooperative:
78-
"cutlass::gemm::KernelTmaWarpSpecializedCooperative",
79-
}
80-
}
69+
VLLMKernelScheduleTag: dict[
70+
Union[MixedInputKernelScheduleType, KernelScheduleType], str
71+
] = {
72+
**KernelScheduleTag, # type: ignore
73+
**{
74+
MixedInputKernelScheduleType.TmaWarpSpecialized: "cutlass::gemm::KernelTmaWarpSpecialized",
75+
MixedInputKernelScheduleType.TmaWarpSpecializedPingpong: "cutlass::gemm::KernelTmaWarpSpecializedPingpong",
76+
MixedInputKernelScheduleType.TmaWarpSpecializedCooperative: "cutlass::gemm::KernelTmaWarpSpecializedCooperative",
77+
},
78+
}

0 commit comments

Comments
 (0)