A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 00:45 UTC
[Misc] Fix improper placement of SPDX header in scripts (#12694)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Russell Bryant committed
Feb 3, 2025 at 14:16 UTC
33e0602e59cfb37ab0bfdff5ea6802aeb3a3ecc9
6 files changed
+17
-10
cmake/hipify.py
+1
-2
@@ -1,6 +1,5 @@
1
-# SPDX-License-Identifier: Apache-2.0
2
-
1
#!/usr/bin/env python3
2
+# SPDX-License-Identifier: Apache-2.0
3
4
#
5
# A command line tool for running pytorch's hipify preprocessor on CUDA
tests/models/test_transformers.py
+1
@@ -1,3 +1,4 @@
1
+# SPDX-License-Identifier: Apache-2.0
2
"""Test the functionality of the Transformers backend.
3
4
Run `pytest tests/models/test_transformers.py`.
tools/check_spdx_header.py
+12
-5
@@ -10,18 +10,25 @@ def check_spdx_header(file_path):
10
with open(file_path, encoding='UTF-8') as file:
11
lines = file.readlines()
12
if not lines:
13
- # not necessary for an empty file like __init__.py
13
+ # Empty file like __init__.py
14
return True
15
- if not lines[0].strip().startswith(SPDX_HEADER_PREFIX):
16
- return False
17
- return True
15
+ for line in lines:
16
+ if line.strip().startswith(SPDX_HEADER_PREFIX):
17
+ return True
18
+ return False
19
20
21
def add_header(file_path):
22
with open(file_path, 'r+', encoding='UTF-8') as file:
23
lines = file.readlines()
24
file.seek(0, 0)
24
- file.write(SPDX_HEADER + '\n\n' + ''.join(lines))
25
+ if lines and lines[0].startswith("#!"):
26
+ file.write(lines[0])
27
+ file.write(SPDX_HEADER + '\n')
28
+ file.writelines(lines[1:])
29
+ else:
30
+ file.write(SPDX_HEADER + '\n')
31
+ file.writelines(lines)
32
33
34
def main():
tools/report_build_time_ninja.py
+1
-1
@@ -1,6 +1,6 @@
1
+#!/usr/bin/env python3
2
# SPDX-License-Identifier: Apache-2.0
3
3
-#!/usr/bin/env python3
4
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
5
# Use of this source code is governed by a BSD-style license that can be
6
# found in the LICENSE file.
vllm/attention/ops/triton_flash_attention.py
+1
-2
@@ -1,6 +1,5 @@
1
-# SPDX-License-Identifier: Apache-2.0
2
-
1
#!/usr/bin/env python
2
+# SPDX-License-Identifier: Apache-2.0
3
"""
4
Fused Attention
5
===============
vllm/model_executor/models/transformers.py
+1
@@ -1,3 +1,4 @@
1
+# SPDX-License-Identifier: Apache-2.0
2
# Copyright 2024 The vLLM team.
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");