Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
1caca5a5
Unverified
Commit
1caca5a5
authored
Jul 04, 2025
by
Jee Jee Li
Committed by
GitHub
Jul 04, 2025
Browse files
[Misc] Add SPDX-FileCopyrightText (#20428)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
783921d8
Changes
58
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
140 additions
and
26 deletions
+140
-26
tests/v1/tpu/test_tpu_qkv_linear.py
tests/v1/tpu/test_tpu_qkv_linear.py
+1
-0
tools/check_pickle_imports.py
tools/check_pickle_imports.py
+1
-0
tools/check_spdx_header.py
tools/check_spdx_header.py
+121
-26
vllm/compilation/fusion_attn.py
vllm/compilation/fusion_attn.py
+1
-0
vllm/distributed/eplb/__init__.py
vllm/distributed/eplb/__init__.py
+1
-0
vllm/distributed/eplb/eplb_state.py
vllm/distributed/eplb/eplb_state.py
+1
-0
vllm/distributed/eplb/rebalance_algo.py
vllm/distributed/eplb/rebalance_algo.py
+1
-0
vllm/distributed/eplb/rebalance_execute.py
vllm/distributed/eplb/rebalance_execute.py
+1
-0
vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py
...ted/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py
+1
-0
vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py
...ibuted/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py
+1
-0
vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py
...ted/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py
+1
-0
vllm/distributed/tpu_distributed_utils.py
vllm/distributed/tpu_distributed_utils.py
+1
-0
vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py
vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py
+1
-0
vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py
.../model_executor/layers/fused_moe/batched_deep_gemm_moe.py
+1
-0
vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py
...cutor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py
+1
-0
vllm/model_executor/layers/fused_moe/cpu_fused_moe.py
vllm/model_executor/layers/fused_moe/cpu_fused_moe.py
+1
-0
vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py
...l_executor/layers/fused_moe/deepep_ht_prepare_finalize.py
+1
-0
vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py
...l_executor/layers/fused_moe/deepep_ll_prepare_finalize.py
+1
-0
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py
...mpressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py
+1
-0
vllm/model_executor/layers/quantization/deepgemm.py
vllm/model_executor/layers/quantization/deepgemm.py
+1
-0
No files found.
tests/v1/tpu/test_tpu_qkv_linear.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
tempfile
import
numpy
as
np
...
...
tools/check_pickle_imports.py
View file @
1caca5a5
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
os
import
sys
...
...
tools/check_spdx_header.py
View file @
1caca5a5
...
...
@@ -2,51 +2,146 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
sys
from
enum
import
Enum
SPDX_HEADER
=
(
class
SPDXStatus
(
Enum
):
"""SPDX header status enumeration"""
EMPTY
=
"empty"
# empty __init__.py
COMPLETE
=
"complete"
MISSING_LICENSE
=
"missing_license"
# Only has copyright line
MISSING_COPYRIGHT
=
"missing_copyright"
# Only has license line
MISSING_BOTH
=
"missing_both"
# Completely missing
FULL_SPDX_HEADER
=
(
"# SPDX-License-Identifier: Apache-2.0
\n
"
"# SPDX-FileCopyrightText: Copyright contributors to the vLLM project"
)
SPDX_HEADER_PREFIX
=
"# SPDX-License-Identifier:"
LICENSE_LINE
=
"# SPDX-License-Identifier: Apache-2.0"
COPYRIGHT_LINE
=
"# SPDX-FileCopyrightText: Copyright contributors to the vLLM project"
# noqa: E501
def
check_spdx_header
(
file_path
):
with
open
(
file_path
,
encoding
=
'UTF-8'
)
as
file
:
def
check_spdx_header_status
(
file_path
):
"""Check SPDX header status of the file"""
with
open
(
file_path
,
encoding
=
"UTF-8"
)
as
file
:
lines
=
file
.
readlines
()
if
not
lines
:
# Empty file like __init__.py
return
True
for
line
in
lines
:
if
line
.
strip
().
startswith
(
SPDX_HEADER_PREFIX
):
return
True
return
False
# Empty file
return
SPDXStatus
.
EMPTY
# Skip shebang line
start_idx
=
0
if
lines
and
lines
[
0
].
startswith
(
"#!"
):
start_idx
=
1
has_license
=
False
has_copyright
=
False
def
add_header
(
file_path
):
with
open
(
file_path
,
'r+'
,
encoding
=
'UTF-8'
)
as
file
:
# Check all lines for SPDX headers (not just the first two)
for
i
in
range
(
start_idx
,
len
(
lines
)):
line
=
lines
[
i
].
strip
()
if
line
==
LICENSE_LINE
:
has_license
=
True
elif
line
==
COPYRIGHT_LINE
:
has_copyright
=
True
# Determine status based on what we found
if
has_license
and
has_copyright
:
return
SPDXStatus
.
COMPLETE
elif
has_license
and
not
has_copyright
:
# Only has license line
return
SPDXStatus
.
MISSING_COPYRIGHT
# Only has copyright line
elif
not
has_license
and
has_copyright
:
return
SPDXStatus
.
MISSING_LICENSE
else
:
# Completely missing both lines
return
SPDXStatus
.
MISSING_BOTH
def
add_header
(
file_path
,
status
):
"""Add or supplement SPDX header based on status"""
with
open
(
file_path
,
"r+"
,
encoding
=
"UTF-8"
)
as
file
:
lines
=
file
.
readlines
()
file
.
seek
(
0
,
0
)
if
lines
and
lines
[
0
].
startswith
(
"#!"
):
file
.
write
(
lines
[
0
])
file
.
write
(
SPDX_HEADER
+
'
\n
'
)
file
.
writelines
(
lines
[
1
:])
else
:
file
.
write
(
SPDX_HEADER
+
'
\n
'
)
file
.
truncate
()
if
status
==
SPDXStatus
.
MISSING_BOTH
:
# Completely missing, add complete header
if
lines
and
lines
[
0
].
startswith
(
"#!"
):
# Preserve shebang line
file
.
write
(
lines
[
0
])
file
.
write
(
FULL_SPDX_HEADER
+
"
\n
"
)
file
.
writelines
(
lines
[
1
:])
else
:
# Add header directly
file
.
write
(
FULL_SPDX_HEADER
+
"
\n
"
)
file
.
writelines
(
lines
)
elif
status
==
SPDXStatus
.
MISSING_COPYRIGHT
:
# Only has license line, need to add copyright line
# Find the license line and add copyright line after it
for
i
,
line
in
enumerate
(
lines
):
if
line
.
strip
()
==
LICENSE_LINE
:
# Insert copyright line after license line
lines
.
insert
(
i
+
1
,
f
"
{
COPYRIGHT_LINE
}
\n
"
,
)
break
file
.
writelines
(
lines
)
elif
status
==
SPDXStatus
.
MISSING_LICENSE
:
# Only has copyright line, need to add license line
# Find the copyright line and add license line before it
for
i
,
line
in
enumerate
(
lines
):
if
line
.
strip
()
==
COPYRIGHT_LINE
:
# Insert license line before copyright line
lines
.
insert
(
i
,
f
"
{
LICENSE_LINE
}
\n
"
)
break
file
.
writelines
(
lines
)
def
main
():
files_with_missing_header
=
[]
"""Main function"""
files_missing_both
=
[]
files_missing_copyright
=
[]
files_missing_license
=
[]
for
file_path
in
sys
.
argv
[
1
:]:
if
not
check_spdx_header
(
file_path
):
files_with_missing_header
.
append
(
file_path
)
status
=
check_spdx_header_status
(
file_path
)
if
files_with_missing_header
:
if
status
==
SPDXStatus
.
MISSING_BOTH
:
files_missing_both
.
append
(
file_path
)
elif
status
==
SPDXStatus
.
MISSING_COPYRIGHT
:
files_missing_copyright
.
append
(
file_path
)
elif
status
==
SPDXStatus
.
MISSING_LICENSE
:
files_missing_license
.
append
(
file_path
)
else
:
continue
# Collect all files that need fixing
all_files_to_fix
=
(
files_missing_both
+
files_missing_copyright
+
files_missing_license
)
if
all_files_to_fix
:
print
(
"The following files are missing the SPDX header:"
)
for
file_path
in
files_with_missing_header
:
print
(
f
"
{
file_path
}
"
)
add_header
(
file_path
)
if
files_missing_both
:
for
file_path
in
files_missing_both
:
print
(
f
"
{
file_path
}
"
)
add_header
(
file_path
,
SPDXStatus
.
MISSING_BOTH
)
if
files_missing_copyright
:
for
file_path
in
files_missing_copyright
:
print
(
f
"
{
file_path
}
"
)
add_header
(
file_path
,
SPDXStatus
.
MISSING_COPYRIGHT
)
if
files_missing_license
:
for
file_path
in
files_missing_license
:
print
(
f
"
{
file_path
}
"
)
add_header
(
file_path
,
SPDXStatus
.
MISSING_LICENSE
)
sys
.
exit
(
1
if
files_
with_missing_header
else
0
)
sys
.
exit
(
1
if
all_
files_
to_fix
else
0
)
if
__name__
==
"__main__"
:
...
...
vllm/compilation/fusion_attn.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
torch
import
torch._inductor.pattern_matcher
as
pm
...
...
vllm/distributed/eplb/__init__.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
'''
Expert parallelism load balancer (EPLB).
'''
...
...
vllm/distributed/eplb/eplb_state.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
Expert parallelism load balancer (EPLB) metrics and states.
...
...
vllm/distributed/eplb/rebalance_algo.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
Expert parallelism load balancer (EPLB) for vLLM.
...
...
vllm/distributed/eplb/rebalance_execute.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
The actual execution of the rearrangement.
...
...
vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
dataclasses
import
dataclass
from
typing
import
TYPE_CHECKING
,
Any
,
Optional
...
...
vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
logging
import
os
...
...
vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
atexit
import
ctypes
...
...
vllm/distributed/tpu_distributed_utils.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
collections
import
OrderedDict
from
typing
import
Optional
...
...
vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# ruff: noqa
import
json
from
collections.abc
import
Sequence
...
...
vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
typing
import
Optional
import
torch
...
...
vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
typing
import
Optional
import
torch
...
...
vllm/model_executor/layers/fused_moe/cpu_fused_moe.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
typing
import
Callable
,
Optional
import
torch
...
...
vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
typing
import
Optional
import
deep_ep
...
...
vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
typing
import
Optional
,
Union
import
deep_ep
...
...
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from
typing
import
Callable
,
Optional
import
torch
...
...
vllm/model_executor/layers/quantization/deepgemm.py
View file @
1caca5a5
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
logging
import
torch
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment