Skip to content

Commit 1944aba

Browse files
committed
[init] migrated project (#1)
1 parent 52bc352 commit 1944aba

36 files changed

+6918
-33
lines changed

.clang-format

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BasedOnStyle: Google

.gitignore

+99-31
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ parts/
2020
sdist/
2121
var/
2222
wheels/
23+
pip-wheel-metadata/
2324
share/python-wheels/
2425
*.egg-info/
2526
.installed.cfg
@@ -49,7 +50,6 @@ coverage.xml
4950
*.py,cover
5051
.hypothesis/
5152
.pytest_cache/
52-
cover/
5353

5454
# Translations
5555
*.mo
@@ -70,9 +70,9 @@ instance/
7070

7171
# Sphinx documentation
7272
docs/_build/
73+
docs/.build/
7374

7475
# PyBuilder
75-
.pybuilder/
7676
target/
7777

7878
# Jupyter Notebook
@@ -83,9 +83,7 @@ profile_default/
8383
ipython_config.py
8484

8585
# pyenv
86-
# For a library or package, you might want to ignore these files since the code is
87-
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
86+
.python-version
8987

9088
# pipenv
9189
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -94,22 +92,7 @@ ipython_config.py
9492
# install all needed dependencies.
9593
#Pipfile.lock
9694

97-
# poetry
98-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99-
# This is especially recommended for binary packages to ensure reproducibility, and is more
100-
# commonly ignored for libraries.
101-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102-
#poetry.lock
103-
104-
# pdm
105-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106-
#pdm.lock
107-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108-
# in version control.
109-
# https://pdm.fming.dev/#use-with-ide
110-
.pdm.toml
111-
112-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
95+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
11396
__pypackages__/
11497

11598
# Celery stuff
@@ -146,15 +129,100 @@ dmypy.json
146129
# Pyre type checker
147130
.pyre/
148131

149-
# pytype static type analyzer
150-
.pytype/
132+
# IDE
133+
.idea/
134+
.vscode/
151135

152-
# Cython debug symbols
153-
cython_debug/
136+
# macos
137+
*.DS_Store
138+
#data/
154139

155-
# PyCharm
156-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158-
# and can be added to the global gitignore or merged into this file. For a more nuclear
159-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
#.idea/
140+
docs/.build
141+
142+
# pytorch checkpoint
143+
*.pt
144+
145+
# ignore version.py generated by setup.py
146+
swiftinfer/version.py
147+
148+
# ignore any kernel build files
149+
.o
150+
.so
151+
152+
# ignore python interface defition file
153+
.pyi
154+
155+
# ignore coverage test file
156+
coverage.lcov
157+
coverage.xml
158+
159+
# ignore testmon and coverage files
160+
.coverage
161+
.testmondata*
162+
163+
############
164+
# ignore c++
165+
############
166+
# Prerequisites
167+
*.d
168+
169+
# Compiled Object files
170+
*.slo
171+
*.lo
172+
*.o
173+
*.obj
174+
175+
# Precompiled Headers
176+
*.gch
177+
*.pch
178+
179+
# Compiled Dynamic libraries
180+
*.so
181+
*.dylib
182+
*.dll
183+
184+
# Fortran module files
185+
*.mod
186+
*.smod
187+
188+
# Compiled Static libraries
189+
*.lai
190+
*.la
191+
*.a
192+
*.lib
193+
194+
# Executables
195+
*.exe
196+
*.out
197+
*.app
198+
199+
############
200+
# ignore cuda
201+
############
202+
*.i
203+
*.ii
204+
*.gpu
205+
*.ptx
206+
*.cubin
207+
*.fatbin
208+
209+
############
210+
# ignore cmake
211+
############
212+
CMakeLists.txt.user
213+
CMakeCache.txt
214+
CMakeFiles
215+
CMakeScripts
216+
Testing
217+
Makefile
218+
cmake_install.cmake
219+
install_manifest.txt
220+
compile_commands.json
221+
CTestTestfile.cmake
222+
_deps
223+
224+
# cache
225+
examples/*/output/
226+
examples/*/benchmark/
227+
examples/*/mt_bench_data/
228+
examples/*/data/

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "3rdparty/TensorRT-LLM"]
2+
path = 3rdparty/TensorRT-LLM
3+
url = https://github.com/NVIDIA/TensorRT-LLM.git

.isort.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[settings]
2+
line_length = 120
3+
multi_line_output=3
4+
include_trailing_comma = true
5+
ignore_comments = true
6+
profile = black
7+
honor_noqa = true

.pre-commit-config.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
repos:
2+
3+
- repo: https://github.com/PyCQA/autoflake
4+
rev: v2.2.1
5+
hooks:
6+
- id: autoflake
7+
name: autoflake (python)
8+
args: ['--in-place', '--remove-unused-variables', '--remove-all-unused-imports', '--ignore-init-module-imports']
9+
10+
- repo: https://github.com/pycqa/isort
11+
rev: 5.12.0
12+
hooks:
13+
- id: isort
14+
name: sort all imports (python)
15+
16+
- repo: https://github.com/psf/black-pre-commit-mirror
17+
rev: 23.9.1
18+
hooks:
19+
- id: black
20+
name: black formatter
21+
args: ['--line-length=120', '--target-version=py37', '--target-version=py38', '--target-version=py39','--target-version=py310']
22+
23+
- repo: https://github.com/pre-commit/mirrors-clang-format
24+
rev: v13.0.1
25+
hooks:
26+
- id: clang-format
27+
name: clang formatter
28+
types_or: [c++, c]
29+
30+
- repo: https://github.com/pre-commit/pre-commit-hooks
31+
rev: v4.3.0
32+
hooks:
33+
- id: check-yaml
34+
- id: check-merge-conflict
35+
- id: check-case-conflict
36+
- id: trailing-whitespace
37+
- id: end-of-file-fixer
38+
- id: mixed-line-ending
39+
args: ['--fix=lf']

3rdparty/TensorRT-LLM

Submodule TensorRT-LLM added at 42af740

LICENSE

+45-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2024 HPC-AI Technology Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.
@@ -199,3 +199,47 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202+
203+
204+
Files modifiled from other projects have a copy of their respective license in the file header and
205+
are subject to the licenses below:
206+
207+
>>>> files modified from NVIDIA/TensorRT-LLM
208+
209+
Copyright 2023 NVIDIA Corporation
210+
211+
Licensed under the Apache License, Version 2.0 (the "License");
212+
you may not use this file except in compliance with the License.
213+
You may obtain a copy of the License at
214+
215+
http://www.apache.org/licenses/LICENSE-2.0
216+
217+
Unless required by applicable law or agreed to in writing, software
218+
distributed under the License is distributed on an "AS IS" BASIS,
219+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220+
See the License for the specific language governing permissions and
221+
limitations under the License.
222+
223+
>>>> files modified from mit-han-lab/streaming-llm
224+
225+
MIT License
226+
227+
Copyright (c) 2023 MIT HAN Lab
228+
229+
Permission is hereby granted, free of charge, to any person obtaining a copy
230+
of this software and associated documentation files (the "Software"), to deal
231+
in the Software without restriction, including without limitation the rights
232+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
233+
copies of the Software, and to permit persons to whom the Software is
234+
furnished to do so, subject to the following conditions:
235+
236+
The above copyright notice and this permission notice shall be included in all
237+
copies or substantial portions of the Software.
238+
239+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
240+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
241+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
242+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
243+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
244+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
245+
SOFTWARE.

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include *.txt README.md
2+
recursive-include requirements *.txt
3+
recursive-include swiftinfer/lib *.so *.dll

0 commit comments

Comments
 (0)